Option_ui and localization

I’m currently developing my webextension using Firefox 48.0.1 on Windows 10.

My webextension has a few long menus in html files so instead of using over complicated javascript functions to fill in the localized strings according to the user language, I prefer to simply request a different html file, each with a specific suffix. It works well for the browser_action popup file in the manifest, so for example, instead of declaring this:

"default_popup": "/popup/menu.html",

I do this:

"default_popup": "/popup/menu-__MSG_@@ui_locale__.html",

In order to get menu-en.html, menu-es.html, menu-fr.html, etc depending on the user’s language, which works well.

However, the same method doesn’t work for the options_ui page setting in the manifest in order to display the add-on preferences with the correct language.

Thanks for your help.

In the end I will have to take the javascript route to replace strings in the html files usng data attributes instead of managing multiple html files for each languages, those localized strings are to unpredictable with the manifest file, some fields are supported, some not, and the value of predefined MSG@@ui_locale_ also includes the region, not just the language, so I’d have to create dummy html files for all variants (en_GB, en_US, etc), which is not practical.

Please file a bug report about the inconsistent string handling. It sounds like something that should be fixed.