Skip to content

Fix langToLocale() Czech key: cz → cs - #6769

Open
TheAgencyMGE wants to merge 2 commits into
OpenSlides:mainfrom
TheAgencyMGE:patch-1
Open

TheAgencyMGE wants to merge 2 commits into
OpenSlides:mainfrom
TheAgencyMGE:patch-1

Conversation

@TheAgencyMGE

Copy link
Copy Markdown

Fixes #6641. langToLocale() handled cz, but the client's Czech language key is cs (see client/src/app/domain/definitions/languages.ts). With the language set to Czech, langToLocale('cs') fell through to the default branch and returned lt-LT instead of cs-CZ. This changes the case to cs; the return value cs-CZ was already correct, and langToTimeLocale() in the same file already uses cs. Test: npx ng test --watch=false --browsers=ChromiumHeadlessNoSandbox --include='**/lang-to-locale.spec.ts' — 4 of 4 SUCCESS.

Add unit tests for langToLocale function to verify locale mappings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

langToLocale() handles cz, but the Czech language key is cs

1 participant