Closed Bug 1000269 Opened 10 years ago Closed 9 years ago

Sort out L10n process for localising the standalone pages

Categories

(Hello (Loop) :: Client, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED
mozilla36
Iteration:
37.3 - 12 Jan
backlog Fx36+

People

(Reporter: standard8, Assigned: pkerr)

References

Details

(Whiteboard: [p=2, investigation][standalone-uplift])

Attachments

(2 files)

We have the standalone pages ready for L10n - the strings and everything are translated.

At some stage we need to work out how to make this work with the various l10n processes.

There's several of options here, use something like verbatim (which l10n uses for websites), or if we're completely in mozilla-central, then we could use that infrastructure in some manner.
Put in 33 to sort out ownership and timing needed to guide this.
Priority: -- → P3
Whiteboard: p=?
Target Milestone: --- → mozilla33
Assignee: nobody → standard8
Target Milestone: mozilla33 → 33 Sprint 2- 7/7
Blocks: 1036948
Priority: P3 → P1
Target Milestone: 33 Sprint 2- 7/7 → mozilla34
Whiteboard: p=? → [p=2, investigation]
Blocks: 1042528
Depends on: 1046178
Status: NEW → ASSIGNED
Since this is for standalone, we can push the work on this bug to the mozilla35 cycle (sept 1 - oct 13)
Target Milestone: mozilla34 → mozilla35
Chris, I'm probably going to be looking at this in the next cycle. Could you detail the current set-up of FxA, and the process that it generally uses to get the localisers to localise the files etc?

Thanks
Flags: needinfo?(ckarlof)
Zach Carter leads our l10n efforts for FxA. He'll give you a high level overview of our process and answer any questions. Zach, the code for the loop standalone client lives in m-c, but is pushed to https://github.com/mozilla/loop-client.
Flags: needinfo?(ckarlof) → needinfo?(zack.carter)
Here are the basics of our Verbatim setup:

- Verbatim uses the PO file format to store string translations
- Each locale has its own .po file that is derived from a template containing all English strings
- The template (.pot file) is generated by extracting strings directly from source using `jsxgettext`
- Strings appear in source as an argument to a translation function, e.g. (`__("Create an account")`)
  - The extraction script can be configured to look for different function names
- PO files are converted into JSON files for the application to use
  - in the JSON, there's a direct mapping from the English string to the translation

Adding new strings
- When new strings are added or modified in source, the extraction script is run again to regenerate the template
- A merge tool merges the changes into each locale's .po file

Repository setup
- We use a separate git repo to store the .po and .pot files; updates to strings in Verbatim are pushed directly to this "l10n" repo
- To push new or modified strings we run extraction as mentioned before, but note that the template is added and merged with the .po files in the l10n repo
- We coordinate with mathjazz before committing the modified PO files to the repo, to ensure Verbatim is in a state to receive the updates
- To pull in new translations, we simply add the l10n repo as a Bower/npm dependency and run a po2json conversion script as needed

Here's our l10n repo: https://github.com/mozilla/fxa-content-server-l10n
Flags: needinfo?(zack.carter)
Depends on: 1062771
Depends on: 1062835
not required to be uplifted - but tagging so it's on the list of bugs since the process is being investigated in parallel.  close when the new process is determined/locked down.
Whiteboard: [p=2, investigation] → [p=2, investigation][loop-uplift]
Depends on: 1059776
Whiteboard: [p=2, investigation][loop-uplift] → [p=2, investigation][standalone-uplift]
Depends on: 1065631
backlog: --- → Fx35+
backlog: Fx35+ → Fx36+
Shell - does the blocking-loop fx36+ mean we need to fix it in the 36 cycle, or for the 36 release? Given the GA release at 35, I don't think we can wait until 36 for this.
Flags: needinfo?(sescalante)
I agree with Mark that we need this for Fx35.  We should plan to work on it during the Fx36 Nightly cycle.
backlog: Fx36+ → Fx35+
Target Milestone: mozilla35 → ---
Depends on: 1091789
Flags: needinfo?(sescalante)
Updating the owner to pkerr, who is doing the implementation.  (Mark is helping advise, but focused on Rooms.)
Assignee: standard8 → pkerr
Status on scripts:
I had a bit of a false start but now think I am working on the correct operation. What I am working on:

locale_update.py - This script will move versions of loop.properties files from loop-client-l10n to loop-client (running from loop-client). It will treat the source of the en_US properties file as the loop-client-l10n/l10n/templates/loop.properties file. If there are any new locale folders, these will be created in the loop-client repo. Finally, a list of locales will be generated from the folder names. This list will be used to replace the <meta="locales" content=...> line content attributes with the generated locales list in the loop-client/content/js/index.html file. For the time being, I think that this script action should be kept separate from extract_from_hg.py. It would allow for updating locale files at a faster update period than the code.
re-organization of the l10n directory
Attachment #8522365 - Flags: review?(standard8)
Comment on attachment 8522365 [details] [diff] [review]
Part 1: Reconfigure l10n directory structure

Review of attachment 8522365 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, r=Standard8
Attachment #8522365 - Flags: review?(standard8) → review+
Keywords: checkin-needed
Comment on attachment 8522365 [details] [diff] [review]
Part 1: Reconfigure l10n directory structure

Approval Request Comment
[Feature/regressing bug #]: N/A
[User impact if declined]: merge issues with future patches
[Describe test coverage new/current, TBPL]: standalone - NPOTB
[Risks and why]: no risk, NPOTB
[String/UUID change made/needed]: none in the browser.  (removes some strings from standalone/server)
Attachment #8522365 - Flags: approval-mozilla-aurora?
Attachment #8522365 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
I believe this is largely done, and I know it's standalone only.  I'd love to close this bug out this week.  I expect we'll file follow up bugs to make the localization process for the standalone better/more streamlined.
backlog: Fx35+ → Fx36+
Priority: P1 → P2
Attaching here for records.
Attachment #8547540 - Flags: review?(standard8)
Comment on attachment 8547540 [details] [review]
Link to Github pull-request: https://github.com/mozilla/loop-client/pull/47

r+ as noted on the PR.
Attachment #8547540 - Flags: review?(standard8) → review+
I think this is now good enough that we have a basic process. There's more to document and tidy up still, we'll do that in bug 1042528.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Keywords: leave-open
Resolution: --- → FIXED
Iteration: --- → 37.3 - 12 Jan
You need to log in before you can comment on or make changes to this bug.