Closed Bug 1592043 Opened 4 months ago Closed 2 months ago

Remove toolbox.dtd and migrate strings to ftl for toolbox-options.xhtml

Categories

(DevTools :: Framework, task, P2)

task

Tracking

(firefox74 fixed)

RESOLVED FIXED
Firefox 74
Tracking Status
firefox74 --- fixed

People

(Reporter: bgrins, Assigned: bgrins)

References

(Blocks 2 open bugs)

Details

Attachments

(4 files)

https://searchfox.org/mozilla-central/search?q=toolbox.dtd&path=

A few notes:

Duplicate of this bug: 1294184

(In reply to Brian Grinstead [:bgrins] from comment #0)

Zibi mentioned this command line on Slack:
python3 convert.py --mc ~/projects/mozilla-unified/ --dom ./devtools/client/framework/toolbox-options.xhtml --dtd devtools/client/locales/en-US/toolbox.dtd --ftl devtools/client/locales/en-US/toolbox.ftl
(you'll need --bug-id and --description too)

Priority: -- → P2

A couple notes from a quick dry run here:

I did git clone https://github.com/zbraniecki/convert_xul_to_fluent.git && cd convert_xul_to_fluent then:

pip3 install fluent.syntax
pip3 install six

Then to run it:

touch ~/Code/mozilla-central/devtools/client/locales/en-US/toolbox.ftl && python3 convert.py --bug_id 1592043 --description "Migrate toolbox options strings from DTD to FTL" --mc ~/Code/mozilla-central --dom ./devtools/client/framework/toolbox-options.xhtml --dtd devtools/client/locales/en-US/toolbox.dtd --ftl devtools/client/locales/en-US/toolbox.ftl

This line's formatting messes up the scripts detection so it gets skipped: https://searchfox.org/mozilla-central/rev/4537228c0a18bc0ebba2eb7f5cbebb6ea9ab211c/devtools/client/framework/toolbox-options.xhtml#23. Probably easiest to first rewrite this to one line before starting.

After this, will need to:

  • manually move or remove the LOCALIZATION NOTE comments from devtools/client/locales/en-US/toolbox.dtd into the ftl file
  • remove the reference to toolbox.dtd in toolbox-options.xhtml
  • add the link to toolbox-options.ftl (may require registering the directory if this is the first ftl file in devtools).

I got far enough along testing this that I'll send up some patches.

Assignee: nobody → bgrinstead
Status: NEW → ASSIGNED

Generated with https://github.com/zbraniecki/convert_xul_to_fluent and:

python3 convert.py --bug_id 1592043 --description "Migrate toolbox options strings from DTD to FTL" --mc ~/Code/mozilla-central --dom devtools/client/framework/toolbox-options.xhtml --dtd devtools/client/locales/en-US/toolbox.dtd --ftl devtools/client/locales/en-US/toolbox-options.ftl

Depends on D59002

Pushed by bgrinstead@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c9c0d42603ba
Part 1 - Reformat toolbox-options.xhtml to support the fluent converter tool r=jdescottes
https://hg.mozilla.org/integration/autoland/rev/0570d7ff220f
Part 2 - Introduce a toolbox-options.ftl file and reference it from toolbox-options.xhtml r=fluent-reviewers,jdescottes,flod
https://hg.mozilla.org/integration/autoland/rev/fc1aa6e85939
Part 3 - Automated ftl conversion for toolbox.dtd strings in toolbox-options.xhtml r=fluent-reviewers,jdescottes,flod
https://hg.mozilla.org/integration/autoland/rev/5cbf5bb11c58
Part 4 - Port comments from dtd to ftl, move ftl into sections, and remove reference to the dtd file in toolbox-options.xhtml r=fluent-reviewers,jdescottes,flod
Blocks: 1607948
Blocks: 1607950
You need to log in before you can comment on or make changes to this bug.