Migrate toolbar-context-menu to Fluent
Categories
(Firefox :: General, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox78 | --- | fixed |
People
(Reporter: zbraniecki, Assigned: salniker)
References
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
As part of bug 1579477 we want to migrate https://searchfox.org/mozilla-central/rev/c7b673f443407a359cc0766fb5a4ac323a1d2628/browser/base/content/browser.xhtml#380-451 to Fluent
Updated•5 years ago
|
Comment 1•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Reporter | ||
Updated•5 years ago
|
Comment 2•5 years ago
|
||
Updated link: https://searchfox.org/mozilla-central/rev/54f965e51e4f77866bec42737978d40d4c1fdfc5/browser/base/content/browser.xhtml#402-473
The FTL file is at https://searchfox.org/mozilla-central/source/browser/locales/en-US/browser/toolbarContextMenu.ftl ; you can add to this one.
There's 14 strings:
&customizeMenu.manageExtension.accesskey;
&customizeMenu.manageExtension.label;
&customizeMenu.removeExtension.accesskey;
&customizeMenu.removeExtension.label;
&customizeMenu.reportExtension.accesskey;
&customizeMenu.reportExtension.label;
&customizeMenu.pinToOverflowMenu.accesskey;
&customizeMenu.pinToOverflowMenu.label;
&customizeMenu.autoHideDownloadsButton.accesskey;
&customizeMenu.autoHideDownloadsButton.label;
&customizeMenu.removeFromToolbar.accesskey;
&customizeMenu.removeFromToolbar.label;
&viewCustomizeToolbar.label;
&viewCustomizeToolbar.accesskey;
Some of which are used from other places as well, so you'll want to feed each of these through searchfox to see what other places they get used at.
There's a slight twist here: please put the fluent identifiers in the markup in data-lazy-l10n-id
attributes (there's some there already). The code at https://searchfox.org/mozilla-central/rev/54f965e51e4f77866bec42737978d40d4c1fdfc5/browser/base/content/browser.js#6388-6396 is responsible for making this work.
You'll need to also convert other uses of the strings in this context menu in the similar menu at https://searchfox.org/mozilla-central/rev/54f965e51e4f77866bec42737978d40d4c1fdfc5/browser/components/customizableui/content/panelUI.inc.xhtml#31 . Those will want a similar data-lazy-l10n-id
attribute, and then the code at https://searchfox.org/mozilla-central/rev/54f965e51e4f77866bec42737978d40d4c1fdfc5/browser/components/customizableui/CustomizeMode.jsm#2582-2592 will need a block adding similar to the browser.js code to make them work.
For testing, these items appear in the context menu of the browser toolbar, and the ones in panelUI.inc.xhtml appear in the context menu of the overflow button (to see that, right click a button on the toolbar and click "pin to Overflow Menu").
Updated•5 years ago
|
Comment 5•5 years ago
|
||
bugherder |
Description
•