Closed Bug 1586246 Opened 6 years ago Closed 6 years ago

Migrate autohide-context to Fluent using convert script

Categories

(Firefox :: General, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 71
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: nobody → gandalf
Status: NEW → ASSIGNED

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.

: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
Flags: needinfo?(francesco.lodolo)

I think that's an error that someone else was getting (mstriemer), but pike nor I were able to reproduce locally.

Pushed by zbraniecki@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c6c4ca4c944f Migrate autohide-context to Fluent using convert script. r=fluent-reviewers,bgrins,flod
Pushed by nbeleuzu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fd5d1817233b Fix linting on bug_1586246_migration.py. CLOSED TREE
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 71
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: