Dictionaries property format in manifest.json

Hi.

I have noticed that all dictionaries on AMO have been converted to WebExtensions. I have updated our build scripts for Czech spell check dictionary add-ons but I also got feedback that the new format does not work well when there are two dictionaries installed for the same locale. In our case (cs) we have two add-ons (with and without diacritics).

Does the keys of the “dictionaries” property in manifest.json have to be valid ISO locale codes, or they can be anything? If they have to be valid ISO code, how can Firefox handle multiple dictionaries with the same code?

Is there some documentation for the newly added support for spellchecking dictionaries in WebExts?

The following is adapted from what @aswan said on IRC:

No, however all that changed is the packaging format.

The key has to be the language code. In general this should be working exactly the same as before, including how it handles multiple dictionaries with the same language. The actual dictionary infrastructure has stayed the same, Only the distribution format has changed.

Thanks @freaktechnik and @aswan.

Before WebExt, Firefox probably determined the locale from the dictionary file name. The add-on with dictionaries/cs.dic file appeared as Čeština in the context menu, while the other with dictionaries/Cestina.dic was listed as Cestina (without diacritics).

Now when both add-ons still have the same file name in the manifest, but the key in the property is the same for them (cs) and only one entry shows up in the Firefox context menu.

So if I understand it correctly, if the file name (now key in the manifest) is not a language code, Firefox just displays the key as is swallowing any potential error for now. And if the key is duplicated by multiple add-ons/dictionaries, only one is shown (bug?). Is that correct?