Closed Bug 1581185 Opened 5 years ago Closed 5 years ago

Migrate pageActionContextMenu in browser.xhtml to Fluent

Categories

(Firefox :: General, task, P1)

task

Tracking

()

RESOLVED FIXED
Firefox 71
Tracking Status
firefox71 --- fixed

People

(Reporter: zbraniecki, Assigned: zbraniecki)

References

Details

Attachments

(2 files)

Assignee: nobody → gandalf
Blocks: 1579477
Status: NEW → ASSIGNED
Attachment #9092730 - Attachment description: Bug 1581185 - Fix relative paths in migration script generation. r?bgrins → Bug 1581185 - Fix relative paths in migration script generation and append to existing FTL files. r?bgrins

This was much easier than https://bugzilla.mozilla.org/show_bug.cgi?id=1580978#c4

I updated the script to fix two issues listed there:

  • Remove leading "./" from the paths in migration script
  • Append to FTL file if one already exists instead of creating a new one

My steps were:

  • Extract the piece to a new file "./browser_pageAction.xhtml"

  • Launch python python/l10n/convert_xul_to_fluent/convert.py 1581185 ./browser_pageAction.xhtml ./browser/locales/en-US/browser/browser.ftl ./ ./browser/locales/en-US/chrome/browser/browser.dtd "Migrate the pageActionContextMenu to FTL."

  • Paste the resulting ./browser_pageAction.xhtml into browser.xhtml in place of the old chunk

  • Manually remove the strings from DTD

(In reply to Zibi Braniecki [:zbraniecki][:gandalf] from comment #3)

This was much easier than https://bugzilla.mozilla.org/show_bug.cgi?id=1580978#c4

I updated the script to fix two issues listed there:

  • Remove leading "./" from the paths in migration script
  • Append to FTL file if one already exists instead of creating a new one

My steps were:

  • Extract the piece to a new file "./browser_pageAction.xhtml"

  • Launch python python/l10n/convert_xul_to_fluent/convert.py 1581185 ./browser_pageAction.xhtml ./browser/locales/en-US/browser/browser.ftl ./ ./browser/locales/en-US/chrome/browser/browser.dtd "Migrate the pageActionContextMenu to FTL."

  • Paste the resulting ./browser_pageAction.xhtml into browser.xhtml in place of the old chunk

  • Manually remove the strings from DTD

Thanks, that's much better!

One thing I did in the previous patch was to manually fix up the markup. For instance here we went from:

      <menuitem class="pageActionContextMenuItem extensionPinned"
                label="&pageAction.removeFromUrlbar.label;"
                oncommand="BrowserPageActions.togglePinningForContextAction();"/>

To:

      <menuitem class="pageActionContextMenuItem extensionPinned"
                oncommand="BrowserPageActions.togglePinningForContextAction();" data-l10n-id="page-action-remove-from-urlbar"/>

In some cases the new form is probably fine (if the attributes preceeding it were short enough), but in general we try to put each one on a new line, aligned with the previous one. Does that seem fixable within the current script? Removing the extra manual step that would be great.

Does that seem fixable within the current script? Removing the extra manual step that would be great.

Yep! Fixed!

Attachment #9092730 - Attachment description: Bug 1581185 - Fix relative paths in migration script generation and append to existing FTL files. r?bgrins → Bug 1581185 - Fix relative paths in migration script generation. r?bgrins
Attachment #9092730 - Attachment description: Bug 1581185 - Fix relative paths in migration script generation. r?bgrins → Bug 1581185 - Fix relative paths in migration script generation, append to existing FTL files and improve XML generation. r?bgrins
Priority: -- → P1
Attachment #9092730 - Attachment description: Bug 1581185 - Fix relative paths in migration script generation, append to existing FTL files and improve XML generation. r?bgrins → Bug 1581185 - Fix relative paths in migration script generation. r?bgrins
Pushed by zbraniecki@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5bb71874a9f3
Fix relative paths in migration script generation. r=bgrins
https://hg.mozilla.org/integration/autoland/rev/86f77b5cc705
Migrate pageActionContextMenu in browser.xhtml to Fluent. r=fluent-reviewers,bgrins,flod
Pushed by zbraniecki@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d336ff588e4b
Fix relative paths in migration script generation. r=bgrins
https://hg.mozilla.org/integration/autoland/rev/f8223f3c02b0
Migrate pageActionContextMenu in browser.xhtml to Fluent. r=fluent-reviewers,bgrins,flod
Flags: needinfo?(gandalf)
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 71
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: