Move tab context menu-related strings out of browser.dtd and into a Fluent file
Categories
(Firefox :: Tabbed Browser, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: jaws, Assigned: chenbri2, Mentored)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
text/x-phabricator-request
|
Details |
The tab context menu strings aren't required to be in browser.dtd. We can move them out of browser.dtd and into a Fluent file.
The string resource IDs will still get hard-coded on the context menu items but we will not load the localization resource until it is necessary, which will remove any potential startup delays that Fluent might introduce.
The attached patch shows a rough proof-of-concept of how this can work.
The new Fluent file should be created at:
/browser/locales/en-US/browser/tabContextMenu.ftl
The migration script should be created at:
/python/l10n/fluent_migrations
/browser/base/content/browser.xul will need to be updated to replace the label
and accesskey
attributes with a data-1l0n-id
attribute.
tabbrowser.js will need to insert the .ftl file when the tab gets a mouseover event or a focus event.
Reporter | ||
Comment 1•6 years ago
|
||
Updated•6 years ago
|
Updated•6 years ago
|
Reporter | ||
Comment 2•6 years ago
|
||
insertFTLIfNeeded should be used instead of the manual createElement calls that I have in the attached POC.
Reporter | ||
Comment 3•6 years ago
|
||
Reporter | ||
Updated•6 years ago
|
Assignee | ||
Comment 4•6 years ago
|
||
Moved tab context menu out of browser.dtd to browser.xul except for sendPageToDevice, sendLinkToDevice, moveTabOptions, moveSelectedTabOptions, undoCloseTab. Not sure if tabbrowser.js and tabbrowser.xul are working as intended.
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Comment 6•6 years ago
|
||
bugherder |
Description
•