I am currently migrating one of my Firefox addon to SDK (in fact, it is a complete rewrite).
For localization I have an issue : I have followed steps from https://developer.mozilla.org/en-US/Add-ons/SDK/Tutorials/l10n but on my french profile, my addon is in English instead of French.
In the locale folder, I have 2 files : en-US.properties and fr-FR.properties.
The only way I found to display my addon in French is to update general.useragent.locale in about:config by setting the value “fr-FR” instead of “fr”.
But the problem is that the default value is “fr” …
What I need to do ? Do I have to rename my properties file to fr.properties ? If so, it will not be coherent with mozilla tutorial about l10n.
Any help would be appreciated, thanks by advance !
Technical information:
Firefox v40.0.3
jpm v1.0.1
Workstation and browser French localized
Hi @arenlor, thanks for the reply.
Based on it, I conclude that Mozilla tutorial on localization is obsolete and French property file must be named fr.properties (which is working) and not fr-FR.properties (which is not working).
I fought half a day for found this solution. Updating documentation could help.
Another bug (probably), bothering, is the fact that
when you run the command jpm run for test your addon, and if you require(“sdk/l10n”).get, you can be 100% sure you will always having a consol.warn, outpouting something like "Plural form unknown for locale “null”. Even if your properties have just one translations with no plural.
Example of a very simple demo with this test addon into a zip: http://s000.tinyupload.com/?file_id=25303241916050774463