fix(locale): use the endonym for Hindi and close the Chinese bracket - #367
Merged
Conversation
Ports the native-name half of nuxt/ui e333e8d (#6823): the `name` field is
rendered by the locale switcher (`labelKey: 'name'`), so it should carry the
language's own name, not its English one.
Audited all 20 locales. Nineteen already carry proper endonyms; `in.ts` said
`Indian` — which is not a language, while the file's messages are Hindi
(`कोड`, `गुण`). This is upstream's `hi.ts` fix verbatim, same replacement
value. The repository already knew: its comments read `// Indian (हिन्दी)`.
Only the rendered field disagreed.
Three fork-only fixes in the same field, found while auditing:
- `dictionary/i18n.ts` listed `{ code: 'in', name: 'भारतीय' }` — Devanagari for
"Indian", the same non-language label just translated. Now `हिन्दी`, so the
dictionary and the locale agree.
- `locale/tc.ts` had `中文(繁體)` — a full-width `(` closed with a half-width
`)`, while the dictionary already had it right. Fixed at the source and in
the three comments repeating it.
- Comments reading `// Indian (हिन्दी)` now read `// Hindi (हिन्दी)`.
The commit's other half — Tajik `tj` -> `tg` — is deliberately not mirrored.
Our locale codes are Bitrix24 portal codes, not ISO 639-1 (`in`, `kz`, `ua`,
`vn`, `sc`, `tc`, `br`, `la`), which is why the repository carries an explicit
ISO<->Bitrix24 mapping. Renaming any of them would break every consumer
passing a Bitrix24 language code.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JS8ypVfQSFzYVZzkTHhURb
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.
Sync with
nuxt/ui— portse333e8d(nuxt/ui#6823).Upstream bundled two unrelated corrections. One half applies here; the other deliberately must not.
✅ The
namefield should be the endonymnameis what the locale switcher renders (labelKey: 'name'inLocaleSelect.vue), so it should carry the language's own name. Upstream fixed eight locales that carried the English one (Danish→Dansk,Hebrew→עברית,Hindi→हिन्दी,Icelandic→Íslenska, …).Audited all 20 of our locales. Nineteen already carry proper endonyms —
العربية,Português (Brasil),Deutsch,English,Français,Bahasa Indonesia,Italiano,日本語,Қазақша,Español,Bahasa Melayu,Polski,Русский,中文(简体),ภาษาไทย,Türkçe,Українська,Tiếng Việt. One did not:This is upstream's
hi.tsfix verbatim — same language, same replacement value. Indian is not a language, and the file's own messages are Hindi (कोड,गुण). The repository already knew this; its comments readhi: 'in' // Indian (हिन्दी). Only the rendered field disagreed.❌ The Tajik
tj→tghalf — not mirrored, on purposeUpstream renamed
tj.ts→tg.tsbecausetgis Tajik's ISO 639-1 code whiletjis the ISO 3166 code for Tajikistan — a country code where a language code belongs.That reasoning must not be generalised here. Our locale codes are Bitrix24 portal language codes, not ISO 639-1:
in,kz,ua,vn,sc,tc,br,la. Several look like exactly the mistake upstream just fixed (uavs ISOuk,kzvskk,vnvsvi) — but they are the identifiers the platform this library integrates with actually uses, which is why the repo already carries an explicit ISO↔Bitrix24 mapping (LocaleSelect.vueandSupportedLanguages.vueboth maphi: 'in',tc: 'tw', …). Renaming any of them would break every consumer passing a Bitrix24 language code.Three fork-only fixes in the same field
Found while auditing — same defect class, none of them from upstream:
src/runtime/dictionary/i18n.ts{ code: 'in', name: 'भारतीय' }— Devanagari for "Indian", the same non-language label just translatedहिन्दी, so the dictionary and the locale agreesrc/runtime/locale/tc.ts中文(繁體)— full-width(closed with a half-width); the dictionary already had it right, so the two disagreed中文(繁體), fixed at the source and in the three comments repeating itlocale/index.ts,LocaleSelect.vue,SupportedLanguages.vue// Indian (हिन्दी)// Hindi (हिन्दी)Observed, left alone
ar.tssays'العربية'while the dictionary says'عربي'. Both are legitimate Arabic endonyms and upstream does not touch Arabic, so picking one is a call for someone who reads the language — flagged rather than changed.Verify (
CI=true)lint·test·typecheck·build— all green. No snapshot contains any of these strings and no test asserts on localename; tests 5878 passed | 6 skipped across 262 files, unchanged.User-visible effect: the locale switcher's Hindi entry stops reading Indian among nineteen endonyms, and the Traditional Chinese entry closes its bracket.
Ledger: cursor →
e333e8d; the three no-op entries (094fb57,10ec237,795c353) are reconciled to PR #361 /c31d250.Generated by Claude Code