Open Bug 2083850 Opened 1 month ago Updated 1 month ago

Add tests for bidi live-reload gating in the Languages pane Browser language setting

Categories

(Firefox :: Settings UI, task)

task

Tracking

()

People

(Reporter: akulyk, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [recomp])

Bug 2081814 removes browser_browser_languages_subdialog.js, including testLiveLanguageReloadingBidiOff and testLiveLanguageReloadingBidiOn. These were the only tests covering browser language changes between scripts with different text directions, such as en-US to he.

The redesigned Settings still support this behavior through Multilingual.getTransitionType() in browser/components/preferences/config/languages.mjs. With intl.multilingual.liveReload enabled, a direction change requires a restart unless intl.multilingual.liveReloadBidirectional is also enabled. The existing testLanguageChangeLiveReload only switches from en-US to fr, so it doesn't cover either case.

Add coverage to browser/components/preferences/tests/languages/browser_browser_languages_preferred.js, using the existing helpers in head.js, to verify that switching from en-US to he:

  • Shows the restart message and leaves Services.locale.appLocaleAsBCP47 as en-US when live reload is enabled but bidirectional live reload is disabled.
  • Applies immediately, includes he in Services.locale.requestedLocales, and keeps the restart message hidden when both prefs are enabled.
Whiteboard: [recomp]

Hi akulyk,
To help whoever picks up this task, would it be beneficial to pull the historical logic from the deleted browser_browser_languages_subdialog.js (from Bug 2081814) to use as a baseline reference for the new testLiveLanguageReloadingBidi assertions?
If anyone is looking to pick this up, having a link to that specific file diff from the previous patch will save a lot of reverse-engineering time.

(In reply to Max Van Massey from comment #1)

Hi akulyk,
To help whoever picks up this task, would it be beneficial to pull the historical logic from the deleted browser_browser_languages_subdialog.js (from Bug 2081814) to use as a baseline reference for the new testLiveLanguageReloadingBidi assertions?
If anyone is looking to pick this up, having a link to that specific file diff from the previous patch will save a lot of reverse-engineering time.

Hi Max,
That's a great point. I've added a permalink to the browser_browser_languages_subdialog.js in the bug description for this exact reason.

You need to log in before you can comment on or make changes to this bug.