Plan localization #2205
Comments
Ref: #865 |
MattN is having this same discussion with the L10n team for their system add-on and he said he'd have it on the Go Faster list so we could follow along. He's using Pocket as a model which uses .properties files on github (https://github.com/mozilla-l10n/pocket-l10n ) localized by Pontoon. |
Looks like this one is still up for grabs, so I'll take it |
Here are some official Mozilla l10n process links: https://wiki.mozilla.org/L10n:NewProjects |
Seems like we should loop in l10n people on this soon. @ckprice ? (Probably via bugzilla ticket) |
@ianb Yup, the l10n wiki page I linked above suggests opening a bugzilla bug for l10n planning. I can open that bug. |
I"ll also ping MattN to see what's happening |
I notice that there's some WebExtension i18n support: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/i18n |
Pinged #l10n to ask about some stuff, and @flodolo mentioned that the i18n WebExtension library has some shortcomings, both with the localization aspect (plural forms are not supported), as well as technical aspects (the JSON format is incompatible with Pontoon, requiring an additional build step). Given the react vs l20n.js issues we've seen with test pilot (two libraries racing to modify the DOM), fluent-react seems like the nicest library available: https://www.npmjs.com/package/fluent-react |
CC @stasm |
I've updated this bug's description with a draft plan, and started a discussion thread on the go-faster list (also CC'd the pageshot-staff list): https://mail.mozilla.org/pipermail/gofaster/2017-March/000626.html |
fluent.js is a monorepo with a number of packages in it. The fluent package is very low-level. For instance, it powers the fluent-react package. As a standalone solution, |
@stasm The addon UI is built using innerHTML and DOM APIs, so a low-level tool should be fine, or we can try l20n.js or whatever other tool you'd suggest. This gist lists all the strings in the addon, along with the files where they are found; the paths are relative to the top-level webextension folder. |
As an update, I wound up using the WebExtension i18n library in the add-on. See #2294 for details and links to PRs. |
I think we have the addon part of localization completely planned out at this point, so I'm going to remove the 'beta blocker' label and tweak the title. |
Hmm. Actually, we have a plan for server localization, too. So, I'm going to go ahead and close this. |
We should have a plan for how to implement localization across the website and add-on.
Questions:
i18n
API auto-detects the user's locale. Unfortunately, it uses the UI language (language of Firefox), not the content language (language configured by user in Preferences for viewing websites).navigator.languages
.The text was updated successfully, but these errors were encountered: