Avoiding breaking translations

In examinging the JSON files in ./gui/default/assets/lang/, I am noticing that translated strings appear to be keyed to their English counterparts. Does this imply that in order to improve a string in the English translation of the web GUI, I must refactor all instances of that string across all translation files? And what about adding a new string? (Such as a tooltip for a button which currently lacks any.)

Yes, translations are keyed by the English text as in the source code. New Translations are picked up by a script (go run build.go translate). You basically never should have to edit the jsons. And unfortunately this also means minor changes are often out of question as that would require all languages to re-translate it, which is a lot of work.

1 Like

:face_with_raised_eyebrow:

If you’re looking for something to do, it would probably be worthwhile to change the translation system to use identifiers as keys instead of the English phrase. The current system is suboptimal for the reasons noted, and an unfortunate effect of taking the path of least resistance way back when.

2 Likes