Closed Bug 1730893 Opened 11 months ago Closed 10 months ago

Localize the popup's button tooltip when changing state


(DevTools :: Performance Tools (Profiler/Timeline), defect, P2)



(firefox95 fixed)

95 Branch
Tracking Status
firefox95 --- fixed


(Reporter: julienw, Assigned: julienw)




(3 files)

Currently, when the profiler's state changes, the tooltip's text is hardcoded:

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:

Basically we need to move from "tooltiptext" to "l10nId" when defining the popup, and replace the existing translations in by new ones in a FTL file (possibly browser.ftl).

Then we can use these translations on the button with l10n.setAttributes.

Assignee: nobody → felash

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.

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

Pushed by
[devtools profiler] Localize the profiler button using Fluent instead of properties r=jdescottes,fluent-reviewers,nbaumgardner,flod
[devtools profiler] Properly localize buttons in the profiler popup r=jdescottes,fluent-reviewers,desktop-theme-reviewers,nbaumgardner,harry,flod
[devtools profiler] Add a migration script for the localization changes r=flod
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
Regressions: 1738871
You need to log in before you can comment on or make changes to this bug.