Closed Bug 1805490 Opened 1 year ago Closed 1 year ago

Support fluent pseudo locales in Storybook

Categories

(Toolkit :: UI Widgets, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
112 Branch
Tracking Status
firefox112 --- fixed

People

(Reporter: mstriemer, Assigned: hjones)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fidefe-reusable-components-ms2])

Attachments

(1 file)

We should add pseudo-localization to Storybook. The devtools team has this support in perf-html [1] which we can hopefully copy into our storybook folder. We should add a toolbar button to Storybook (and also in the Fluent panel if that exists from bug 1805487) to switch between English, accented and RTL versions

[1] https://github.com/julienw/perf.html/blob/25b6e14c66fdb38a2386f0f04252e18ab4a3d9cf/src/utils/l10n-pseudo.js

The Bugbug bot thinks this bug should belong to the 'Toolkit::XUL Widgets' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: General → XUL Widgets
Product: Firefox → Toolkit
Whiteboard: [fidefe-reusable-components-ms1] → [fidefe-reusable-components-ms2]

This patch does a few things:

  • creates a storybook addon for pseudo localization, which adds a button to the storybook toolbar and kicks off generating/connecting a new Fluent bundle when the pseudo localization strategy changes
  • pulls in l10n-pseudo.js from the devtools profiler
  • moves the fluent logic out of preview.js into a separate file (possibly a precursor to some moves we'll make when we create a proper fluent addon)
Assignee: nobody → hjones
Status: NEW → ASSIGNED
Pushed by hjones@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6d4c269468a5
storybook addon for psuedo localization r=mstriemer
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: