Closed Bug 1226858 Opened 10 years ago Closed 9 years ago

[l10n] Improve mechanism to determine locales shipping in release builds

Categories

(Firefox for iOS :: Build & Test, defect)

All
iOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
fxios 3.0+ ---

People

(Reporter: flod, Assigned: flod)

References

Details

Attachments

(1 file)

Current system: if the import-locales.sh script is called with the parameter --only-complete, it removes a hard-coded list of locales from the build. https://github.com/mozilla/firefox-ios/blob/master/scripts/import-locales.sh#L20-L37 In the past I proposed an update to this mechanism, that would at least prevent us from shipping incomplete locales https://github.com/mozilla/firefox-ios/pull/961 But that doesn't prevent us from shipping a locale added, completed but never tested or signed off. And that's what happened in 1.2 (ar and rm are an example). I think it would be a lot safer to have a list of locales in a simple TXT file, and use if to determine what ships in a release build. A locale is added *after* an explicit sign-off. We could go as far as having a different TXT file for each version. That would also give us the information "which locale did we ship in version X?".
Depends on: 1227618
Adding this as 1.3 because we need to deal with this before we cut a release.
Could you tighten up your Comment 0 into a concrete proposal? Is this bug just "add an equivalent of maemo-locales"?
Rank: 9
Flags: needinfo?(francesco.lodolo)
(In reply to Richard Newman [:rnewman] from comment #2) > Is this bug just "add an equivalent of maemo-locales"? Basically yes, with the difference that I'd even suggest to have one file for each major version (shipping_locales_1_x.txt, shipping_locales_2_x.txt, etc.). Then drop this piece of code and read the .txt file when the flag --only-complete is set https://github.com/mozilla/firefox-ios-build-tools/blob/master/scripts/import-locales.sh#L22-L39
Flags: needinfo?(francesco.lodolo)
Component: General → Build & Test
Hardware: Other → All
Assignee: nobody → francesco.lodolo
Status: NEW → ASSIGNED
Attached file Pull request on GitHub
Initial work, still need proper testing before review.
Comment on attachment 8720773 [details] [review] Pull request on GitHub This should be ready for review, but at this point I confess I'm pretty lost on how this script was/is used. The script searches for Client.xcodeproj at the beginning, which means it's built to run from the firefox-ios main code check-out. | |_ firefox-ios |_ firefox-ios-build-tools So, from the firefox-ios folder, run ../firefox-ios-build-tools/scripts/import-locales.sh If that's the case, all the calls with relative paths like scripts/update-xliff.py should fail. I've also changed the command line flag from --only-complete to --release. Code is not really efficient, but given the small number of locales it shouldn't be an issue. The alternative would be to have another Python script to clean up locales (it would be a lot shorter than the bash equivalent).
Attachment #8720773 - Flags: review?(sarentz)
Comment on attachment 8720773 [details] [review] Pull request on GitHub Looks good. Thank you for this patch. I've also added shipping_locales.txt to the v3.x branch already: https://github.com/mozilla/firefox-ios/commit/9109d11a44be78da44ccb9648f61bd419941b02d
Attachment #8720773 - Flags: review?(sarentz) → review+
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: