Player icon indicating copy to clipboard operation
Player copied to clipboard

[Feature Request] - Allow the text of the main engine to be translated (as part of Weblate or per game translation?)

Open Mimigris opened this issue 2 years ago • 1 comments

A request that I've seen on YNOproject once was to be able to have the text of the engine be translated to be able to have non-English users understand what they are doing in menus. This includes settings menu, licenses, errors (maybe not, could be annoying for sending logs?), etc., to make non-English speakers not being lost. (Below are example pictures of screens that could be translated) screenshot_0 screenshot_1

At first, this would need to tag the strings used in the code of the player, see if they need plural handling, and be correctly flagged to be used.

While the idea can be good on paper, there would need to have some thoughts put into it before:

  • Does the translation of the engine should be a part of our Weblate instance (and if someone would like to be able to have the engine in a language that is not supported yet, they could request to have a new language on the instance and translate it?) or should it be something that could be manually translated per game, similar to the translation system?
  • How does the language could be selected for standalone games? (by writing in the ini of the game/translation the language specified and thus the language of the menu to use?)
  • How does the language could be selected for the game browser? (it would probably need to be saved)

Mimigris avatar Sep 26 '23 16:09 Mimigris

Does the translation of the engine should be a part of our Weblate instance

The po file should be provided by the engine but it could be possible for translations to ship a custom po file that is loaded instead.

they could request to have a new language on the instance and translate it

This is actually possible with one click. Just not offered for games because it is a bit more involved to translate them. But for single file translations this is possible.

How does the language could be selected for standalone games

Could use the language code provided by the translation.

How does the language could be selected for the game browser?

Hmm, some config setting maybe?


Everything that involves Output::Debug can be probably skipped as the user won't see it outside of the log.

Everything else must be translatable. As an initial step to figure out what must be translated could be tagged after the line with something like //T CONTEXT where CONTEXT is e.g. settings.video to prevent issues when two words translate to the same in the target language.

Formated strings that contain more than one {} must be changed to {0}, {1} etc. to allow reordering.

Code that checks for != 1 before showing text must be flagged as this is not how plural is handled in many languages.

Ghabry avatar Sep 26 '23 17:09 Ghabry