[MSU Capstone] Port toolkit/chrome/global/wizard.dtd to Fluent
Categories
(Toolkit :: XUL Widgets, task)
Tracking
()
People
(Reporter: mconley, Assigned: shomalij)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
Filing this for some upcoming MSU capstone student work that we hope to do this semester.
This file is used here: https://searchfox.org/mozilla-central/rev/ba4fab1cc2f1c9c4e07cdb71542b8d441707c577/toolkit/content/widgets/wizard.js
You can bring up a wizard by going to File > Import from Another Browser.
Reporter | ||
Comment 1•5 years ago
|
||
This might suffer the same difficulty as bug 1608165 (since the profile creation wizard uses this), so let's wait for the needinfo to come back from gandalf for bug 1608165 comment 1 before digging into this.
Reporter | ||
Comment 2•5 years ago
|
||
(In reply to Mike Conley (:mconley) (:⚙️) (PTO until Feb 10) from comment #1)
This might suffer the same difficulty as bug 1608165 (since the profile creation wizard uses this), so let's wait for the needinfo to come back from gandalf for bug 1608165 comment 1 before digging into this.
Per bug 1608165 comment 4, this should be fine to work on now.
Comment 3•5 years ago
|
||
Note: this is a fairly small file ( https://searchfox.org/mozilla-central/source/toolkit/locales/en-US/chrome/global/wizard.dtd ) . The trick is that right now, for each of the buttons (back, next, finish, cancel), we currently have 3 labels (and entities), one for macOS, one for Windows, and one for Linux/*nix systems. In fluent, we should end up with just 1 entity for each of these buttons. You can use the PLATFORM()
function as a selector to then have different values in the FTL file for that one entity. So where the DTD has:
<!ENTITY button-back-mac.label "Go Back">
<!ENTITY button-back-unix.label "Back">
<!ENTITY button-back-win.label "< Back">
in fluent we can just do:
wizard-button-back =
.label = {
PLATFORM() ->
[macos] Go Back
[linux] Back
*[windows] < Back
}
.accesskey = B
and use data-l10n-id="wizard-button-back"
in the markup being generated by wizard.js . It's possible that the massive if statement there can be simplified a bit based on this, too.
Comment 4•5 years ago
|
||
Oh, and last but not least, you're going to want to insert the FTL file into the wizard document. The way to do that is by calling MozXULElement.insertFTLIfNeeded()
, like so: https://searchfox.org/mozilla-central/source/toolkit/content/editMenuOverlay.js#112 .
The FTL file should probably live at toolkit/locales/en-US/toolkit/global/wizard.ftl
Assignee | ||
Comment 5•5 years ago
|
||
Comment 7•5 years ago
|
||
bugherder |
Comment 8•5 years ago
|
||
Verified fixed as part of PI 551; tested with Nightly 77 across platforms (Windows 10, macOS 10.15 and Ubuntu 18.04).
Description
•