Closed
Bug 1580978
Opened 5 years ago
Closed 5 years ago
Migrate the notification-popup-box element to ftl
Categories
(Firefox :: Site Identity, task, P1)
Firefox
Site Identity
Tracking
()
RESOLVED
FIXED
Firefox 71
Tracking | Status | |
---|---|---|
firefox71 | --- | fixed |
People
(Reporter: bgrins, Assigned: bgrins)
References
Details
Attachments
(2 files)
I'd like to try this as a follow on to Bug 1579540 to see how much we can automate a single element + children within browser.xhtml.
Assignee | ||
Comment 1•5 years ago
|
||
Updated•5 years ago
|
Component: General → Site Identity and Permission Panels
Priority: -- → P1
Assignee | ||
Comment 2•5 years ago
|
||
Depends on D45758
Pushed by bgrinstead@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4f4d06a264e6
Migrate the notification-popup-box element to ftl r=fluent-reviewers,flod,johannh
https://hg.mozilla.org/integration/autoland/rev/4aff09a9a1c8
Rename browser-urlbar-identity-button to urlbar-identity-button r=fluent-reviewers,flod
Assignee | ||
Comment 4•5 years ago
|
||
Overall this script worked well and saved a bunch of time compared with doing this by hand. Here are some notes about the process here, including some things that should be fixed in the automation:
Steps to build:
- Copy
<box id="notification-popup-box">
markup from browser.xhtml into a new file (./temp-notification-box.xhtml) python python/l10n/convert_xul_to_fluent/convert.py 1580978 ./temp-notification-box.xhtml ./browser/locales/en-US/browser/browser.ftl ./ ./browser/locales/en-US/chrome/browser/browser.dtd "Migrate the notification-popup-box element to ftl"
Extra steps for the markup:
- Take the output from command and replace "-anchor-tooltip" with "-anchor". This is a bug-specific change that is probably not automatable (it's just that the dtd entities included tooltip in the name but now we want to target only the element with the ftl id).
- Properly reformat the generated markup from stdout (newlines were removed, alignment is off in certain cases).
- Paste the cleaned up markup back into browser.xhtml.
Extra steps for the FTL file:
- Find/replace "-anchor-tooltip" with "-anchor" as per (1) above.
- This command overwrote the existing browser.ftl. I had to revert that and then re-add the new part only. We should append instead of overwriting ftl files.
Extra steps for the generated migration script:
- Find/replace "-anchor-tooltip" with "-anchor" as per (1) above.
- Cleanup trailing whitespace from the migration script (
./mach lint --outgoing --fix
). We should avoid adding them in the first place - Replace "./browser/chrome/browser/browser.dtd" -> "browser/chrome/browser/browser.dtd". We should use the right path in the first place.
- Replace "./browser/browser/browser.ftl" -> "browser/browser/browser.ftl". We should use the right path in the first place.
- Confirm it worked with `./mach fluent-migration-test python/l10n/fluent_migrations/bug_1579540_migrate-the-notification-popup-box-to-ftl.py
Comment 5•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/4f4d06a264e6
https://hg.mozilla.org/mozilla-central/rev/4aff09a9a1c8
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
status-firefox71:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 71
You need to log in
before you can comment on or make changes to this bug.
Description
•