fix(i18n): correct Irish locale flag and language label#5359
Open
eren-karakus0 wants to merge 2 commits intoNginxProxyManager:developfrom
Open
fix(i18n): correct Irish locale flag and language label#5359eren-karakus0 wants to merge 2 commits intoNginxProxyManager:developfrom
eren-karakus0 wants to merge 2 commits intoNginxProxyManager:developfrom
Conversation
- Fix locale key in lang-list.json from "locale-ie-GA" to "locale-ga-IE" to match the actual locale code used in IntlProvider - Add ga -> ie mapping in getFlagCodeForLocale() so the Ireland flag is shown instead of the Gabon flag - Add missing ["ga", "ga-IE"] entry to check-locales.cjs validation list Fixes NginxProxyManager#5354
Cover standard locales, all special-case mappings (ja, zh, vi, ko, cs, ga), and the undefined/fallback path to prevent future flag regressions.
|
Docker Image for build 2 is available on DockerHub: Note Ensure you backup your NPM instance before testing this image! Especially if there are database changes. Warning Changes and additions to DNS Providers require verification by at least 2 members of the community! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #5354 - Irish locale (
ga-IE) displays the Gabon flag and rawlocale-ga-IEstring instead of the Ireland flag and "Gaeilge" label.Root cause
Two issues were causing this:
Locale key mismatch in
lang-list.json: The key was"locale-ie-GA"(language and country codes swapped) instead of"locale-ga-IE". SinceIntlProviderlooks up the label using the formatlocale-{fullCode}wherefullCodeisga-IE, the lookup failed and the raw message ID was displayed.Missing flag mapping in
getFlagCodeForLocale(): The function derives the country code from the first two characters of the locale (ga), which maps to Gabon (GA). Irish needs a special-case mapping (ga -> ie) similar to how Japanese (ja -> jp) and others are already handled.Changes
frontend/src/locale/src/lang-list.json: Rename key fromlocale-ie-GAtolocale-ga-IEfrontend/src/locale/IntlProvider.tsx: Addga: "ie"tospecialCasesingetFlagCodeForLocale()frontend/check-locales.cjs: Add["ga", "ga-IE"]to validation list (was missing)