Skip to content

Add Chinese (zh) locale - #46

Merged
Creylay merged 3 commits into
mainfrom
feat/add-chinese-locale
Jul 8, 2026
Merged

Add Chinese (zh) locale#46
Creylay merged 3 commits into
mainfrom
feat/add-chinese-locale

Conversation

@Creylay

@Creylay Creylay commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds Simplified Chinese as a fourth supported language (alongside es, en, pt), fully translated across all 9 namespaces and wired into the app's language switcher. This mirrors DashAI's main application repo, which already ships a zh loched for consistency).

Changes by file

New translations

  • public/locales/zh/{about,community,contribute,download,footer,home,(new) — full Simplified Chinese translation of all 480 content keys,with exact key parity against the es` source files (verified programmatically — no missing/extra keys in any namespace).
    • Informal register (你, not the formal 您) throughout, matching the site's friendly, community-oriented tone.
    • HTML markup and i18next interpolation placeholders ({{count}}, {{version}}) preserved exactly.
    • Pluralization suffixes (_one/_other) kept in the source files s, even though Chinese has no grammatical plural distinction (CLDR hasno one category for zh) — both forms carry the same text, and the coverage check correctly only requires _other for this locale (268/268 vs. 270/270 for es/en/pt —
      2 fewer required keys, not 2 missing ones).
    • Proper nouns, institution names, model/algorithm names, and code identifiers left unchanged (dashAI, Universidad de Chile, CENIA, BaseModel, RandomForestClassifier,
      etc.).
    • Standard Chinese dev-community conventions followed for technical terms — some kept as English loanwords where that's the norm (PR, Issue, Commit, Branch,
      Marketplace), others translated (插件/plugin, 社区/community, 数据集/d
    • home.json's sho.mock.* UI-chrome strings (fake app-screenshot breadcrumbs like "Models / Tabular /", "Configure", "Catalog") kept in English, matching the existing convention already used for those specific keys in es/en/pt.

App wiring

  • app/i18n.ts — added the zh imports and resources block for all 9 namespaces; added "zh" to supportedLngs.
  • components/community/Navbar.tsx — extended the Lang type and LANG_OPTIONS with { code: 'zh', label: '中文' } so it appears in the language switcher dropdown.
  • app/page.tsx — added 'zh' to the whitelist of languages restorabd.
  • i18next.config.js — added "zh" to the locales array so the translation-coverage CI check (i18next-cli status) validates it too.

Creylay added 2 commits July 8, 2026 11:00
…vbar, and plugins

- Created `download.json` for download page translations.
- Created `footer.json` for footer section translations.
- Created `home.json` for home page translations.
- Created `models.json` for models directory translations.
- Created `navbar.json` for navigation bar translations.
- Created `plugins.json` for plugins section translations.
@Creylay
Creylay merged commit 701ece2 into main Jul 8, 2026
2 of 3 checks passed
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.

1 participant