Skip to content

Fix translation fallback

Erik Lundin requested to merge luen/Jirafeau:translation-fallback into next-release

Until now, the website has been rather unusable for users unlucky to request a language with an unfinished translation, because the localization code has delivered the empty strings in the unfinished json files. This has been the case for me (since my browser will send Accept-Language: sv-SE...), so I have only seen buttons with no text, as seen in the screenshot below.

This MR removes untranslated strings from the different language files to make the fallback to English work properly. Having English strings where no translation exists is far better than nothing. However, with empty strings removed, it's not possible for translators to use this to track what is left to translate, so to make it easier for them I add two scripts: one for listing the number of translated strings for each of the languages, and one to make it easy to copy new strings from the template. The idea is that a translator easily can copy strings from the template and fill the empty strings, but should not commit any untranslated, empty string.

jirafeau_empty_translation_strings

Merge request reports