Closed Bug 1592043 Opened 4 months ago Closed 2 months ago

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


(DevTools :: Framework, task, P2)



(firefox74 fixed)

Firefox 74
Tracking Status
firefox74 --- fixed


(Reporter: bgrins, Assigned: bgrins)


(Blocks 2 open bugs)



(4 files)

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 --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 && 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 --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: 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

Generated with and:

python3 --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
Part 1 - Reformat toolbox-options.xhtml to support the fluent converter tool r=jdescottes
Part 2 - Introduce a toolbox-options.ftl file and reference it from toolbox-options.xhtml r=fluent-reviewers,jdescottes,flod
Part 3 - Automated ftl conversion for toolbox.dtd strings in toolbox-options.xhtml r=fluent-reviewers,jdescottes,flod
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.