Skip to content

Bug 41143: Add Firefox's localization files also to GeckoView.

Pier Angelo Vendrame requested to merge pierov/tor-browser-build:bug_41143 into main

Merge Info

Related Issues

Backporting

Timeline

  • Immediate: patchset needed as soon as possible
  • Next Minor Stable Release: patchset that needs to be verified in nightly before backport
  • Eventually: patchset that needs to be verified in alpha before backport
  • No Backport (preferred): patchset for the next major stable

(Optional) Justification

  • Emergency security update: patchset fixes CVEs, 0-days, etc
  • Censorship event: patchset enables censorship circumvention
  • Critical bug-fix: patchset fixes a bug in core-functionality
  • Consistency: patchset which would make development easier if it were in both the alpha and release branches; developer tools, build system changes, etc
  • Sponsor required: patchset required for sponsor
  • Other: please explain

Issue Tracking

Review

Request Reviewer

  • Request review from an applications developer depending on modified system:
    • NOTE: if the MR modifies multiple areas, please /cc all the relevant reviewers (since gitlab only allows 1 reviewer)
    • accessibility : henry
    • android : clairehurst, dan
    • build system : boklm
    • extensions : ma1
    • firefox internals (XUL/JS/XPCOM) : jwilde, ma1
    • fonts : pierov
    • frontend (implementation) : henry
    • frontend (review) : donuts, richard
    • localization : henry, pierov
    • macOS : clairehurst, dan
    • nightly builds : boklm
    • rebases/release-prep : boklm, dan, ma1, pierov, richard
    • security : jwilde, ma1
    • signing : boklm, richard
    • updater : pierov
    • windows : jwilde, richard
    • misc/other : pierov, richard

Change Description

In ESR115, Mozilla enabled multi-locale builds for GeckoView.

Initially we didn't enable them, but then we found that some features use en-US as a result, including the formatting API.

Moreover, having the localization could help for the country names in the connection assist.

Merging the localized files is easy enough, but it has one caveat: on desktop we support a couple of additional languages, that we can't support on mobile because there isn't any support upstream (probably it's scarce also for desktop). But var/locales_mobile uses Android conventions, that are different from Firefox's.

So, I had to adapt a few lines to handle also Android.

I didn't include our translations, as eventually we're not showing any frontend from GeckoView (this could be a problem for brand.ftl at most).

Finally, I was a bit worried about sizes. My nightly build saw an increase of about 1MB for x86 (108813159 vs. 107961191). However, in #41066 (closed) we saw that we managed to get a 110387430 APK approved.

If my theory is correct, resources.arsc should not be counted in the 100MB limit (as Google forces you not to compress it for their technical reasons), and the one from my nightly build was 10997888. So, for any definition of MB (both 10^6 and 2^20) we are below 100MB if we can exclude it (97815271).

Otherwise, let's hope everything goes well 😂.

How Tested

I built a custom nightly: https://tb-build-03.torproject.org/~pierov/torbrowser/nightly/tbb-nightly.2024.05.14/.

I tested in in an emulator set in Italian, and I got it everywhere in TZP, whereas we used to get en-US in the last field.

Merge request reports

Loading