Migrate autohide-context to Fluent using convert script
Categories
(Firefox :: General, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox71 | --- | fixed |
People
(Reporter: zbraniecki, Assigned: zbraniecki)
References
Details
Attachments
(1 file)
I wrote an updated version of the conversion script and want to test it on a simple conversion: https://searchfox.org/mozilla-central/rev/01d1011ca4a460f751da030d455d35c267c3e210/browser/base/content/browser.xhtml#485-494
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 1•6 years ago
|
||
Assignee | ||
Comment 2•6 years ago
|
||
I was able to generate this patch using https://github.com/zbraniecki/convert_xul_to_fluent with the following call:
python3 convert.py --bug_id 1586246 --description "Convert autohide-context to Fluent" --mc ~/projects/mozilla-unified/ --dom ./browser/base/content/browser.xhtml:485:494 --dtd ./browser/locales/en-US/chrome/browser/browser.dtd --ftl ./browser/locales/en-US/browser/browser.ftl
the script is very simple for now (no replacements, no handling for placeholders, values etc.), but adding features should be easy.
Comment hidden (obsolete) |
Comment hidden (obsolete) |
Assignee | ||
Comment 5•6 years ago
|
||
:flod helped me on slack and I updated the patch and the script!
Now the output of the test is:
Zibis-MBP:mozilla-unified (convert-1)$ ./mach fluent-migration-test python/l10n/fluent_migrations/bug_1586246_migration.py
0:00.52 hg pull -u
0:04.46 /Users/zbraniecki/projects/mozilla-unified/obj-x86_64-apple-darwin18.7.0-opt/_virtualenvs/init/bin/python -m fluent.migrate.tool --lang en-US --reference-dir /Users/zbraniecki/projects/mozilla-unified/obj-x86_64-apple-darwin18.7.0-opt/python/l10n/bug_1586246_migration/reference --localization-dir /Users/zbraniecki/projects/mozilla-unified/obj-x86_64-apple-darwin18.7.0-opt/python/l10n/bug_1586246_migration/en-US --dry-run fluent_migrations.bug_1586246_migration
Running migration fluent_migrations.bug_1586246_migration for en-US
Writing to /Users/zbraniecki/projects/mozilla-unified/obj-x86_64-apple-darwin18.7.0-opt/python/l10n/bug_1586246_migration/en-US/browser/browser/browser.ftl
Committing changeset: Bug 1586246 - Convert autohide-context to Fluent, part 1
0:05.60 /Users/zbraniecki/projects/mozilla-unified/obj-x86_64-apple-darwin18.7.0-opt/_virtualenvs/init/bin/python -m fluent.migrate.tool --lang en-US --reference-dir /Users/zbraniecki/projects/mozilla-unified/obj-x86_64-apple-darwin18.7.0-opt/python/l10n/bug_1586246_migration/reference --localization-dir /Users/zbraniecki/projects/mozilla-unified/obj-x86_64-apple-darwin18.7.0-opt/python/l10n/bug_1586246_migration/en-US fluent_migrations.bug_1586246_migration
Running migration fluent_migrations.bug_1586246_migration for en-US
Writing to /Users/zbraniecki/projects/mozilla-unified/obj-x86_64-apple-darwin18.7.0-opt/python/l10n/bug_1586246_migration/en-US/browser/browser/browser.ftl
Committing changeset: Bug 1586246 - Convert autohide-context to Fluent, part 1
WARNING: hg commit failed ((1, 'committing files:\nbrowser/browser/browser.ftl\ncommitting manifest\ncommitting changelog\nupdating the branch cache\nnothing changed', ''))
0:07.16 diff -u -B /Users/zbraniecki/projects/mozilla-unified/obj-x86_64-apple-darwin18.7.0-opt/python/l10n/bug_1586246_migration/reference/browser/browser/browser.ftl /Users/zbraniecki/projects/mozilla-unified/obj-x86_64-apple-darwin18.7.0-opt/python/l10n/bug_1586246_migration/en-US/browser/browser/browser.ftl
Comment 6•6 years ago
|
||
I think that's an error that someone else was getting (mstriemer), but pike nor I were able to reproduce locally.
Comment 9•6 years ago
|
||
![]() |
||
Comment 10•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c6c4ca4c944f
https://hg.mozilla.org/mozilla-central/rev/fd5d1817233b
Description
•