Closed Bug 1608200 Opened 4 years ago Closed 4 years ago

[MSU Capstone] Port toolkit/chrome/global/wizard.dtd to Fluent

Categories

(Toolkit :: UI Widgets, task)

task
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla76
Tracking Status
firefox76 --- fixed
firefox77 --- verified

People

(Reporter: mconley, Assigned: shomalij)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

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.

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.

See Also: → 1608165

(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.

See Also: 1608165

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        "&lt; 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.

Assignee: nobody → shomalij
Status: NEW → ASSIGNED

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

Pushed by gijskruitbosch@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/20b1cf25be1b
port toolkit/chrome/global/wizard.dtd to Fluent r=Gijs,fluent-reviewers,flod
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
Regressions: 1625938
Regressions: 1626694

Verified fixed as part of PI 551; tested with Nightly 77 across platforms (Windows 10, macOS 10.15 and Ubuntu 18.04).

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: