Skip to content

fix(i18n): correct Irish locale flag and language label#5359

Open
eren-karakus0 wants to merge 2 commits intoNginxProxyManager:developfrom
eren-karakus0:fix/irish-locale-flag-and-label
Open

fix(i18n): correct Irish locale flag and language label#5359
eren-karakus0 wants to merge 2 commits intoNginxProxyManager:developfrom
eren-karakus0:fix/irish-locale-flag-and-label

Conversation

@eren-karakus0
Copy link

Summary

Fixes #5354 - Irish locale (ga-IE) displays the Gabon flag and raw locale-ga-IE string instead of the Ireland flag and "Gaeilge" label.

Root cause

Two issues were causing this:

  1. Locale key mismatch in lang-list.json: The key was "locale-ie-GA" (language and country codes swapped) instead of "locale-ga-IE". Since IntlProvider looks up the label using the format locale-{fullCode} where fullCode is ga-IE, the lookup failed and the raw message ID was displayed.

  2. 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 from locale-ie-GA to locale-ga-IE
  • frontend/src/locale/IntlProvider.tsx: Add ga: "ie" to specialCases in getFlagCodeForLocale()
  • frontend/check-locales.cjs: Add ["ga", "ga-IE"] to validation list (was missing)

- 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.
@nginxproxymanagerci
Copy link

Docker Image for build 2 is available on DockerHub:

nginxproxymanager/nginx-proxy-manager-dev:pr-5359

Note

Ensure you backup your NPM instance before testing this image! Especially if there are database changes.
This is a different docker image namespace than the official image.

Warning

Changes and additions to DNS Providers require verification by at least 2 members of the community!

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.

Bug: Irish locale (ga-IE) shows Gabon flag and incorrect language label

1 participant