I have a project with two components.
First is a desktop application written in C# and it has it's localization files in language-country format - ru-RU.lang / en-US.lang / de-DE.lang
Russian is the base language
Second is a web application with Java properties files and it's localization uses i10n/language-code/default.properties pattern and ISO 639-1 code
i18n/ru/default.properties
i18n/en/default.properties
i18n/de/default.propertie
So my desktop app component has English (United States) in it's list of languages and Java web app one is called just English.
The problem here is that there are separate glossaries for both of English languages and most probably it doesn't check for inconsistency between two component translations (haven't checked it yet).
What I did - in admin/lang/language/ changed en_US code's name to just English and recreated the component. The name changed but there were two English glossaries nevertheless.
In settings.py SIMPLIFY_LANGUAGES is set to True but I guess that this setting works on component level.
What I wanted to ask - is there a way to "merge" variants of English on project level or the only solution is to unify codes across components?
SIMPLIFY_LANGUAGES only allows to use language aliases in case the language is not defined in Weblate database. For languages defined there, it makes no difference for matching ones. The problem with English is that British and American English are different and there is no consensus which of these en should be. Having some overrides per component might address this.
Run into similar problem with Kazakh. In language-country format desktop application's file name should be kk-KZ.lang
When adding Kazakh to desktop application's component using Weblate's interface it creates a file named kk.lang
If a file is added to repository named kk-KZ.lang Weblate displays it's language as "Kazakh (kk_KZ)" with the same problems described in the first message (seperate glossary etc)
Interestingly, German language file de-DE.lang and Russian language file ru-RU.lang don't have this problem. My guess is that it's because the language code part and country code part is identical.
@tariver There is list of such locales and Kazakh was missing there, I've just added it. Still, this is different from en / en-US where such decision can not be made automatically.
Thank you for quick fix.
I understand that en /en-US different, but I guess I can do a workaround with adding it to that list. That's not a universal solution but it will do for me.
I understand that en /en-US different, but I guess I can do a workaround with adding it to that list. That's not a universal solution but it will do for me.
Just realized that en_US is already in weblate/lang/data.py file but it won't "stack" with en
To make en_US work as an alias for en, you would have to first delete the language in Weblate. It would be however recreated on upgrade.
Thank you for your report, the issue you have reported has just been fixed.