Localize the popup's button tooltip when changing state
Categories
(DevTools :: Performance Tools (Profiler/Timeline), defect, P2)
Tracking
(firefox95 fixed)
Tracking | Status | |
---|---|---|
firefox95 | --- | fixed |
People
(Reporter: julienw, Assigned: julienw)
References
Details
Attachments
(3 files)
Currently, when the profiler's state changes, the tooltip's text is hardcoded:
See https://searchfox.org/mozilla-central/rev/a82dd14b6bc3d05a6a3facc126607e6d34cc2f53/devtools/client/performance-new/popup/menu-button.jsm.js#268-291
We need to localize this.
The button's label and tooltip are currently handled the old way in a properties file, and we should easily move that to a ftl file instead.
Here is an example:
https://hg.mozilla.org/mozilla-central/rev/33d959e23d7e65bd9f5ca462777d3bbc465ef266
Basically we need to move from "tooltiptext" to "l10nId" when defining the popup, and replace the existing translations in https://searchfox.org/mozilla-central/rev/a82dd14b6bc3d05a6a3facc126607e6d34cc2f53/browser/locales/en-US/chrome/browser/customizableui/customizableWidgets.properties#17-18 by new ones in a FTL file (possibly browser.ftl).
Then we can use these translations on the button with l10n.setAttributes
.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
try: https://treeherder.mozilla.org/jobs?repo=try&revision=96ee1b7836c5d82bab2fcfc9f77d86d9ef06e42d
try with fixes for failures from previous try: https://treeherder.mozilla.org/jobs?repo=try&revision=792288d268a3460221426125e5d4f449b754d9b7
Assignee | ||
Comment 2•3 years ago
|
||
The profiler popup widget was using the old properties-based way of
translating its label and tooltips. Moreover the tooltips weren't
translated anymore when recording/capturing. This patch fixes this by
moving to Fluent and using Fluent to change the button's tooltips when
the state changes.
Assignee | ||
Comment 3•3 years ago
|
||
This fixes a warning when Fluent translates these buttons: previously it
was removing the content, which we don't control. The proper way is
assigning attributes instead.
This also required touching the style a bit.
Depends on D127677
Assignee | ||
Comment 4•3 years ago
|
||
Depends on D127678
Comment 6•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/4aa923342154
https://hg.mozilla.org/mozilla-central/rev/01343fa8b6c5
https://hg.mozilla.org/mozilla-central/rev/86b88ba429a3
Description
•