-
Notifications
You must be signed in to change notification settings - Fork 27
Conversation
Did you notice that you can also translate the preferences? See fi.properties for the syntax. Some of the strings of the default locale are in package.json, that's why fi and en-US properties files differ. Should I add documentation what you can translate and how? |
@fluks Oups, I missed it! Thanks for pointing me. @bpierre Nothing special. But it seems me the addon makes a lot more by now! 😅 |
Also fix missing translation in en-US as in [MDN documentation](https://developer.mozilla.org/en-US/Add-ons/SDK/Tutorials/l10n#Using_localized_strings_in_preferences)
Ok, I have update French locale and complete the default US one. @bpierre It should be okay now if you would like to merge. |
Did you try to run with your patches, @PerfectSlayer? The preferences are ok with I see Firefox only with fr locale at https://www.mozilla.org/en-US/firefox/all/. So, as I understand, general.useragent.locale should never be fr-FR? I used en and fi locales, when testing, with en-US the addon doesn't work and it's possible to have en-US. The bug probably is that, if there are no translations for the browser's locale, the addon cannot fallback to use some other language. So, if there are no translations for the browser's locale, drop the subcode (territory, country, region, whatever it is) part of the locale and if there's no translations for that either, use en. But I need to look closer what the problem is. And open an issue. |
@fluks I tried my locale by renaming it I check my own addon locale folder and the French locale, which works fine, is named EDIT: Where did you read it's the standard way to test a locale? |
I don't remember, probably Stack Overflow or something. And I confirmed it that by changing
This is just what I think should be done. |
Ok, I did a test using master branch with Meanwhile, I add few improvements to some sentences. It should be fine to merge now. |
It's not the French locale. It's any locale for which there are no translations in |
The bug was that if Firefox's locale (browser.useragent.locale in about:config) was such that there weren't translations for that locale in data/languages.json file, gtranslate's menucontext didn't show up at all. To fix this, a support for a locale is tested and in case a locale isn't supported, a fallback locale is used. See PR bpierre#77 for additional conversation.
Looks like |
See this PR for more discussion #77
Merged, thanks! |
You're welcome! 👌 |
As the I18N support just landed, I add my native language 😉
Note: @bpierre The addon description is quite outdated… May be it's time to update it before more locales come?