port [bug 1519923 - Migrate about:rights to Fluent] to thunderbird
Categories
(Thunderbird :: General, task, P3)
Tracking
(Not tracked)
People
(Reporter: mkmelin, Assigned: khushil324)
References
(Blocks 1 open bug)
Details
(Whiteboard: [tb-fluent])
Attachments
(2 files, 3 obsolete files)
|
30.04 KB,
patch
|
mkmelin
:
review-
|
Details | Diff | Splinter Review |
|
27.35 KB,
patch
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #1519923 +++
Bug 1519923 converted toolkit about:rights to Fluent. The Thunderbird aboutRights.xhtml also needs to be migrated.
At the moment, if you open about:rights from the about dialog you'll see
JavaScript error: chrome://global/content/aboutRights.js, line 17: TypeError: rightsIntro is null
... because the scripts expect fluent l10n in the page - https://searchfox.org/mozilla-central/source/toolkit/content/aboutRights-unbranded.xhtml
The (small) things done here is thus broken for Thunderbird: https://searchfox.org/mozilla-central/source/toolkit/content/aboutRights.js
| Reporter | ||
Updated•6 years ago
|
| Assignee | ||
Comment 1•6 years ago
|
||
| Assignee | ||
Updated•6 years ago
|
| Reporter | ||
Comment 2•6 years ago
|
||
| Assignee | ||
Comment 3•6 years ago
|
||
| Reporter | ||
Comment 4•6 years ago
|
||
| Assignee | ||
Comment 5•6 years ago
|
||
| Assignee | ||
Comment 6•6 years ago
|
||
| Reporter | ||
Comment 7•6 years ago
|
||
| Reporter | ||
Comment 8•6 years ago
|
||
To check this I did this:
@ https://searchfox.org/mozilla-central/source/python/l10n/test_fluent_migrations/fmt.py#63
- l10n_toml = mozpath.join(cmd.topsrcdir, 'browser', 'locales', 'l10n.toml')
+ l10n_toml = mozpath.join(cmd.topsrcdir, 'comm', 'mail', 'locales', 'l10n.toml')
- mozilla = "mozilla"
+ mozilla = ".."
Moved the new recipe over to the m-c location (python/l10n/fluent_migrations/Bug_1567070_aboutRights.py) instead, otherwise it doesn't work.
So what do we want to do with recipes? It doesn't seem ideal to put them in m-c. For the fmt.py change, maybe we can add a command line argument to override which l10n.toml file to use.
As for the l10n.toml change needed, so this is still using the old backward way where mozilla was a subdir under comm-central and not the other way around?
Run
./mach fluent-migration-test python/l10n/fluent_migrations/Bug_1567070_aboutRights.py
That does show some problems (not sure how it was smart enough to find them!).
For reference, in normal cases (this bug isn't super normal) I assume the way to create recipes is like so:
pip install lxml fluent
python python/l10n/convert_xul_to_fluent/convert.py 1567070 comm/mail/base/content/aboutRights.xhtml comm/mail/locales/en-US/messenger/aboutRights.ftl ./ comm/mail/locales/en-US/chrome/messenger/aboutRights.dtd "Migrate about:rights to Fluent"
Flod, any input on direction here?
Comment 9•6 years ago
|
||
I won't be back online until Monday, so leaving the NI open. In the meantime, pointing out that you can also run the migrations without mach (that's how I run them), although it requires to install Python packages on your own.
https://github.com/flodolo/fluent-migrations
Having said that, there are non technical questions to answer here. Who would run these migrations? It requires to:
- Generate the cross-channel quarantine repository.
- Stop sync in Pontoon for all projects relying on
l10n-central. - Push the quarantine repository to
gecko-strings. - Run the migration on all
l10n-centralrepositories. - Re-enable sync for Pontoon.
Overall it takes almost 2 hours for every batch of migrations, not including reviewing migrations (not sure I'd like to run something that I didn't review). That's a non trivial amount of work and, to be honest, not something I'd like to be responsible for. At the same time, it also requires a level of access to Pontoon that I don't think we're comfortable in providing.
The conversation would be completely different with Thunderbird having its own repository. We would only need to stop the sync for Thunderbird, and it wouldn't affect any other project.
Comment 10•6 years ago
|
||
From a very quick look at the patch:
- The migration filename should be lowercase (
bug_1567070_aboutrights.py). You're also not migratingrights-intro-point-5. rights-webserviceshas an extra;at the end in your FTL. Also not sure why you're moving the RTL/LTR direction over to Fluent.
As for comment 8:
- Pike can answer questions around changes to
fmt.pyto better support Thunderbird. - Where to store these recipes depends on answer to the question above: who's on point to verify and run these recipes on all l10n repositories?
If it's unclear from my previous comment, all those steps are needed, and in that precise order. If you run the migration without stopping sync, you clog sync for all projects. If you do it without pushing changes to gecko-strings, Pontoon will ignore the new strings in the l10n repositories for the time being.
Comment 11•6 years ago
|
||
Random notes:
The browser could probably be replaced with cmd.substs['MOZ_BUILD_APP'].
Changing the default for mozilla in mail/locales/l10n.toml should be OK. There's a couple in-tree places that overwrite this, which you want to look at.
The recipe tester assumes the module in https://searchfox.org/mozilla-central/rev/d7537a9cd2974efa45141d974e5fc7c727f1a78f/python/l10n/test_fluent_migrations/fmt.py#105. That could also be taken from the file path. Then you'd need to make sure that the in-comm location for the migrations is added to the build virtualenv, so that mach can find it.
| Reporter | ||
Comment 12•6 years ago
|
||
With this patch and the patches in bug 1621633, I now get a reasonable result running
./mach fluent-migration-test comm/python/l10n/tb_fluent_migrations/bug_1567070_aboutrights.py
I'm migrating it from the firefox copy instead. We only had small changes.
I don't quite understand why the path should start with from_path="toolkit/toolkit/......" but it works.
Comment 13•6 years ago
|
||
| Reporter | ||
Comment 14•6 years ago
|
||
Thanks. We'd not migrate this point when that's the case. (Well, the patch doesn't it just adds that comment as a note on differences to firefox.)
| Reporter | ||
Updated•6 years ago
|
Comment 15•6 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/894c67ced89c
Migrate about:rights to Fluent. r=mkmelin
| Reporter | ||
Updated•6 years ago
|
Description
•