Remove toolbox.dtd and migrate strings to ftl for toolbox-options.xhtml
Categories
(DevTools :: Framework, task, P2)
Tracking
(firefox74 fixed)
Tracking | Status | |
---|---|---|
firefox74 | --- | fixed |
People
(Reporter: bgrins, Assigned: bgrins)
References
(Blocks 1 open bug)
Details
Attachments
(4 files)
https://searchfox.org/mozilla-central/search?q=toolbox.dtd&path=
A few notes:
- It's loaded in
devtools/client/framework/toolbox.xul
but that file appears to use no entities (it also loads globalKeys.dtd). I think the following lines can just be removed: https://searchfox.org/mozilla-central/rev/11d9c7b7fa82fdfb8ac2a8f0864e9d8d5fe2b926/devtools/client/framework/toolbox.xul#10-15. - So that leaves toolbox-options.xhtml - it's possible some of the entities in toolbox.dtd are unused (although a first pass in Bug 1580981 should have caught this).
- Zibi has a script to help automate this in https://github.com/zbraniecki/convert_xul_to_fluent. There aren't many docs yet, but he can help get started if someone gives this a shot.
Comment 2•5 years ago
|
||
(In reply to Brian Grinstead [:bgrins] from comment #0)
- Zibi has a script to help automate this in https://github.com/zbraniecki/convert_xul_to_fluent. There aren't many docs yet, but he can help get started if someone gives this a shot.
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)
Updated•5 years ago
|
Assignee | ||
Comment 3•5 years ago
|
||
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).
Assignee | ||
Comment 4•5 years ago
|
||
I got far enough along testing this that I'll send up some patches.
Assignee | ||
Comment 5•5 years ago
|
||
Assignee | ||
Comment 6•5 years ago
|
||
Depends on D59000
Assignee | ||
Comment 7•5 years ago
|
||
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
Assignee | ||
Comment 8•5 years ago
|
||
Depends on D59003
Comment 10•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c9c0d42603ba
https://hg.mozilla.org/mozilla-central/rev/0570d7ff220f
https://hg.mozilla.org/mozilla-central/rev/fc1aa6e85939
https://hg.mozilla.org/mozilla-central/rev/5cbf5bb11c58
Description
•