Closed Bug 1292539 Opened 8 years ago Closed 6 years ago

The SDK add-on localization documentation about options in preferences is not clear

Categories

(Developer Documentation Graveyard :: Add-ons, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: u576948, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0
Build ID: 20160606113944

Steps to reproduce:

I was trying to localize radio options in preferences for an SDK add-on, but I found the documentation about it to be difficult to understand. The following part of it:

"The menulist and the radio preference types have options. The label attribute of each option is displayed to the user. If the locale file has a entry with the value of the label attribute prefixed with "{name}_options." as its key, where {name} is the name of the preference, its value is used as a localized label."

https://developer.mozilla.org/en-US/Add-ons/SDK/Tutorials/l10n#Using_localized_strings_in_preferences

Seems like I was not the only one to misunderstood it, this person had the same exact problem:

"I've put this line in my locale files:

style_options.a = my translated label for a"

https://stackoverflow.com/questions/37872582/internationalization-of-preferences-file-in-firefox-addons

Maybe there should be an example?
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.