Fluent content is not localized on Fennec
Categories
(Firefox Build System :: Android Studio and Gradle Integration, defect)
Tracking
(firefox66 fixed)
Tracking | Status | |
---|---|---|
firefox66 | --- | fixed |
People
(Reporter: flod, Assigned: Pike)
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
Comment 1•6 years ago
|
||
Is brand.ftl for Fennec localized? If not, we're likely hitting the scenario where a missing file makes us reject the bundle.
Comment 2•6 years ago
|
||
(In reply to Zibi Braniecki [:gandalf][:zibi] from comment #1)
Is brand.ftl for Fennec localized? If not, we're likely hitting the scenario where a missing file makes us reject the bundle.I
I don't really know, but it shouldn't be: Fennec branding is never localized. See, e.g.,
I remember being surprised by this, i.e.,
Comment 3•6 years ago
|
||
You're right. I confirmed that the issue is not related to brand.ftl.
I opened today's Fennec, connected to it via WebIDE, selected Italian and Polish as my languages and loaded L10nRegistry to look at its cache:
const { L10nRegistry } = ChromeUtils.import("resource://gre/modules/L10nRegistry.jsm", {});
console.dir(L10nRegistry.sources.get("toolkit").cache)
result:
"resource://gre/localization/en-US/branding/brand.ftl": Map { "-brand-short-name" → "Nightly", "-brand-full-name" → "Mozilla Nightly" }
"resource://gre/localization/en-US/toolkit/about/aboutSupport.ftl": Map(203) { "page-title" → "Troubleshooting Information", "crashes-title" → "Crash Reports", "crashes-id" → "Report ID", … }
"resource://gre/localization/it/branding/brand.ftl": Map { "-brand-short-name" → "Nightly", "-brand-full-name" → "Mozilla Nightly" }
"resource://gre/localization/it/toolkit/about/aboutSupport.ftl": false
"resource://gre/localization/pl/branding/brand.ftl": Map { "-brand-short-name" → "Nightly", "-brand-full-name" → "Mozilla Nightly" }
"resource://gre/localization/pl/toolkit/about/aboutSupport.ftl": false
Then, I loaded resource://gre/localization/it/toolkit/
into Fennec and it shows two files: aboutAbout.ftl
and aboutSupport.ftl
.
While resource://gre/localization/en-US/toolkit/
shows four directories: 'about'/'main-window'/'preferences'/'updates', and the 'about' directory has 10 files in it including aboutAbout.ftl and aboutSupport.ftl.
This tells me that we're doing a bad job with packaging ftl resources into Fennec and it should affect other pages which use FTL as well :(
Assignee | ||
Comment 4•6 years ago
|
||
This is the chrome-% target doing things wrong, because %toolkit/about/about*.ftl isn't the same as %toolkit/**/*.ftl, the about
directory get's dropped.
Assignee | ||
Comment 5•6 years ago
|
||
Assignee | ||
Comment 6•6 years ago
|
||
Assignee | ||
Comment 7•6 years ago
|
||
PS: There are two ways to fix this:
toolkit/about (%toolkit/about/*About.ftl)
or
toolkit (%toolkit/about*/*About.ftl)
I've went for the first, because the latter looks even weirder, and it would also involve changing the path at least in l10n.toml, just to be consistent. I found that ugly.
So I went for the slightly confusing but correct "if you're using wildcards in toolkit and copy out of directories in mobile, copy to a directory" story.
Assignee | ||
Comment 8•6 years ago
|
||
I inspected the omni.ja in the apk from try, and that looks promising:
...
524 01-01-2010 00:00 localization/en-CA/branding/brand.ftl
524 01-01-2010 00:00 localization/en-GB/branding/brand.ftl
524 01-01-2010 00:00 localization/en-US/branding/brand.ftl
524 01-01-2010 00:00 localization/en-ZA/branding/brand.ftl
524 01-01-2010 00:00 localization/eo/branding/brand.ftl
524 01-01-2010 00:00 localization/es-AR/branding/brand.ftl
...
460 01-01-2010 00:00 localization/en-CA/toolkit/about/aboutAbout.ftl
460 01-01-2010 00:00 localization/en-GB/toolkit/about/aboutAbout.ftl
460 01-01-2010 00:00 localization/en-US/toolkit/about/aboutAbout.ftl
448 01-01-2010 00:00 localization/en-ZA/toolkit/about/aboutAbout.ftl
447 01-01-2010 00:00 localization/eo/toolkit/about/aboutAbout.ftl
499 01-01-2010 00:00 localization/es-AR/toolkit/about/aboutAbout.ftl
506 01-01-2010 00:00 localization/es-CL/toolkit/about/aboutAbout.ftl
496 01-01-2010 00:00 localization/es-ES/toolkit/about/aboutAbout.ftl
...
15735 01-01-2010 00:00 localization/el/toolkit/about/aboutSupport.ftl
10607 01-01-2010 00:00 localization/en-CA/toolkit/about/aboutSupport.ftl
10606 01-01-2010 00:00 localization/en-GB/toolkit/about/aboutSupport.ftl
10622 01-01-2010 00:00 localization/en-US/toolkit/about/aboutSupport.ftl
6545 01-01-2010 00:00 localization/en-ZA/toolkit/about/aboutSupport.ftl
10976 01-01-2010 00:00 localization/eo/toolkit/about/aboutSupport.ftl
11614 01-01-2010 00:00 localization/es-AR/toolkit/about/aboutSupport.ftl
11693 01-01-2010 00:00 localization/es-CL/toolkit/about/aboutSupport.ftl
Reporter | ||
Comment 9•6 years ago
|
||
Talking about brand.ftl: are we going to fail localizing about:support since we can't localize that file on Fennec?
Comment 10•6 years ago
|
||
No. It's autopopulated from en-us and in result it's present in the build
Updated•6 years ago
|
Comment 11•6 years ago
|
||
Comment 12•6 years ago
|
||
bugherder |
Updated•5 years ago
|
Description
•