Addon localization issue for fr-FR (with SDK)

Hi all,

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

1 Like

I think most languages will only be fr or eo, English is rather unique in how badly united it is. I think using fr is correct and not fr-FR.

1 Like

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 don’t think it’s obsolete, I think it’s incorrect. Probably written by an English speaker, assuming that most languages have the same issues.

‘fr’ should just work, yes.

Also, that fr-FR doesn’t match fr is a bug.

Agree with “Pike” Axel, it’s a bug.

I fought half a day for found this solution. Updating documentation could help.
Another bug (probably), bothering, is the fact that :smile:

  • 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

Hello,
Recently I found out that on many cases Firefox is looking at the intls with the following formats:
https://ftp.mozilla.org/pub/firefox/releases/47.0.1/mac/

While it should handle both “fr” and “fr-FR”, I think it safer to follow exactly the intls as they are handled in the different Firefox releases.