Strip space after color code in locale files #1044
Labels
Status: Done
This issue has been completed or answered. This pull request has been merged.
Type: Enhancement
Improvement or modification which is usually a new feature.
Milestone
Description
Is your feature request related to a problem?
GitLocalize machine translation gets confused with color codes. For example "&cOnly players can do that!" will make it try to translate the word "conly", which is not an English word, so it usually is left untranslated. This then affects the whole sentence. Although this is not an issue for manual translation, one of the benefits of GitLocalize is the fast machine translation.
Describe the solution you'd like us to implement.
Strip one space after a color code when reading the locale files. So, the translation file will be:
"&c Only players can do that!"
and the User translation class will strip the space after the color code automatically so it will become "&cOnly players can do that!" This is to avoid formatting issues.
Describe alternatives you've considered.
Using other characters, like hyphens. e.g. "&6-" or &c-"
Additional context
The text was updated successfully, but these errors were encountered: