Skip to content

馃悰(frontend) switch language when the current one is untranslated - #2790

Merged
AntoLC merged 1 commit into
mainfrom
fix/language-picker-untranslated
Oct 13, 2026
Merged

AntoLC merged 1 commit into
mainfrom
fix/language-picker-untranslated

Conversation

@AntoLC

@AntoLC AntoLC commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Purpose

With zh-tw as the current language, selecting English in the language picker did nothing. The zh-tw bundle is still empty, so i18next reports resolvedLanguage as en while language is zh-tw, and the synchronization hook took the interface for already being in English.

Proposal

  • compare the target with i18n.language instead of resolvedLanguage in useSynchronizedLanguage
  • add unit tests on LanguagePicker and LanguagePickerLegacy (single selection, switch from zh-tw to English)

Demo problem

image

@AntoLC AntoLC added bug Something isn't working frontend i18n labels Oct 7, 2026
@AntoLC AntoLC self-assigned this Oct 7, 2026
@AntoLC
AntoLC force-pushed the fix/language-picker-untranslated branch from f675517 to d0d7525 Compare October 7, 2026 13:14
@AntoLC
AntoLC requested a review from Ovgodd October 7, 2026 13:15
@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Size Change: 0 B

Total Size: 4.06 MB

馃摝 View Changed
Filename Size Change
apps/impress/out/_next/static/19f1edca/_buildManifest.js 701 B +701 B (new file) 馃啎
apps/impress/out/_next/static/342dd61f/_buildManifest.js 0 B -701 B (removed) 馃弳

compressed-size-action

@Ovgodd Ovgodd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

馃挴

@AntoLC
AntoLC force-pushed the fix/language-picker-untranslated branch from d0d7525 to d4402f8 Compare October 13, 2026 06:51
With zh-tw active, selecting English did nothing: its bundle is empty, so
i18next reports `resolvedLanguage` as en while `language` is zh-tw, and
the hook skipped the change. Compare with `language` instead, and add
unit tests on the language pickers.
@AntoLC
AntoLC force-pushed the fix/language-picker-untranslated branch from d4402f8 to c5f97ab Compare October 13, 2026 06:56
@AntoLC
AntoLC merged commit c5f97ab into main Oct 13, 2026
51 checks passed
@AntoLC
AntoLC deleted the fix/language-picker-untranslated branch October 13, 2026 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working frontend i18n

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants