Skip to content

Add zh-CN (Chinese Simplified) translation#413

Open
maojianian25-png wants to merge 2 commits into
ethereumfollowprotocol:mainfrom
maojianian25-png:add-zh-CN-translation
Open

Add zh-CN (Chinese Simplified) translation#413
maojianian25-png wants to merge 2 commits into
ethereumfollowprotocol:mainfrom
maojianian25-png:add-zh-CN-translation

Conversation

@maojianian25-png

Copy link
Copy Markdown

Translation Bounty Submission

This PR adds a complete zh-CN (Chinese Simplified) translation for the EFP app.

Translation Details

  • Language: Chinese Simplified (zh-CN)
  • Locale code: zh-CN
  • File added: public/locales/zh-CN/translations.json

Translation Approach

  • All English values have been translated to natural, fluent Simplified Chinese
  • Technical terms kept in English: EFP, Ethereum, NFT, ENS, POAP, Gas, ETH, API, etc.
  • JSON structure matches the English source exactly
  • All keys preserved, only values translated
  • Code blocks, URLs, and formatting preserved

Bounty Reference

Translation bounty page: https://docs.efp.app/translationbounty/

Reward Information

  • ENS: maojianian25-png.eth
  • Email: Please contact via GitHub for POAP delivery

Notes

  • zh-CN is the standard locale code for Simplified Chinese, distinct from the existing zh (generic Chinese) and zh-TW (Traditional Chinese) locales already in the repository
  • Chinese has one of the largest crypto user bases globally, making this a high-impact translation
  • All ~200+ translation keys from the English source have been translated

@vercel

vercel Bot commented Jun 9, 2026

Copy link
Copy Markdown

@maojianian25-png is attempting to deploy a commit to the EthID Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps

greptile-apps Bot commented Jun 9, 2026

Copy link
Copy Markdown

Greptile Summary

Adds a complete Simplified Chinese (zh-CN) translation and registers the locale in the LANGUAGES constant so it is surfaced in i18next and the language-selector UI.

  • public/locales/zh-CN/translations.json: All 276 keys from the English source are translated. The phrasing deliberately differs from the existing zh locale in several places (e.g., uses 静音 instead of 禁言 for "mute"), making it a genuine separate locale rather than a duplicate.
  • src/lib/constants/languages.ts: A new entry { language: '简体中文 (CN)', key: 'zh-CN', icon: ChinaFlag, englishLanguage: 'Chinese Simplified' } is inserted right after the zh row and wired into languageKeys, so i18next will load and serve this locale correctly.

Confidence Score: 5/5

This PR adds a static translation JSON file and a single array entry in a constants file — no runtime logic is changed and both files are well-formed.

The translation covers all 276 keys, the LANGUAGES registration is correct, and no existing locale or code path is modified. The only finding is a minor self-label inconsistency inside the new JSON file that has no runtime impact today.

No files require special attention.

Important Files Changed

Filename Overview
public/locales/zh-CN/translations.json New Simplified Chinese (zh-CN) translation file; all 276 keys from the English source are present and translated. Minor: the self-label key "language name in language" is "简体中文" rather than "简体中文 (CN)" used in the LANGUAGES entry.
src/lib/constants/languages.ts Adds zh-CN entry to the LANGUAGES array with correct ChinaFlag icon, placed right after the existing zh entry, and wired into languageKeys.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User opens Language Selector] --> B[LANGUAGES array filtered]
    B --> C{User selects zh-CN}
    C --> D[changeLanguage sets i18next lng to 'zh-CN']
    D --> E[i18next looks up supportedLngs via languageKeys]
    E --> F{'zh-CN' in languageKeys?}
    F -- Yes --> G[Load public/locales/zh-CN/translations.json]
    F -- No --> H[Fallback to 'en']
    G --> I[UI renders in Simplified Chinese CN]
Loading

Fix All in Conductor Fix All in Cursor Fix All in Codex Fix All in Claude Code

Reviews (2): Last reviewed commit: "fix(i18n): register zh-CN in languages.t..." | Re-trigger Greptile

@@ -0,0 +1,278 @@
{

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Language not registered — translation is unreachable

The zh-CN entry was never added to the LANGUAGES array in src/lib/constants/languages.ts. The languageKeys derived from that array is passed directly to i18next as supportedLngs, so i18next will never load or serve this locale. The language will not appear in the UI switcher, and even if a browser signals zh-CN as preferred, i18next will silently fall back to English.

To make the translation functional, a new entry such as { language: '简体中文 (CN)', key: 'zh-CN', icon: ChinaFlag, englishLanguage: 'Chinese Simplified' } must be added to LANGUAGES in src/lib/constants/languages.ts.

Fix in Conductor Fix in Cursor Fix in Codex Fix in Claude Code

@maojianian25-png

Copy link
Copy Markdown
Author

The zh-CN language registration has already been added in src/lib/constants/languages.ts, and Greptile’s latest summary confirms the locale is now registered and reachable through LANGUAGES / supportedLngs.

@maojianian25-png

Copy link
Copy Markdown
Author

Hi maintainers 👋

This PR adds a complete zh-CN translation (276 keys) and properly registers the locale in src/lib/constants/languages.ts.

The PR is currently blocked due to a Vercel deployment authorization issue (Authorization required to deploy). This is a Vercel team configuration issue, not a code issue.

Could someone please:

  1. Authorize the Vercel deployment for this PR, or
  2. Bypass the Vercel check so the PR can proceed to review/merge?

The translation bounty ($200 USDC) is pending merge. Happy to address any code review feedback!

@ethereumfollowprotocol

@maojianian25-png

Copy link
Copy Markdown
Author

Hi @greptile-apps[bot], the zh-CN entry is already registered in src/lib/constants/languages.ts at line 83:

{ language: '''简体中文 (CN)''', key: '''zh-CN''', icon: ChinaFlag, englishLanguage: '''Chinese Simplified''' },

The languageKeys array derived from LANGUAGES will include zh-CN, so i18next will load and serve this locale correctly.

The PR is currently blocked due to a Vercel deployment authorization issue, not a code problem.

@greptile-apps

greptile-apps Bot commented Jun 14, 2026

Copy link
Copy Markdown

Thanks for the clarification — you're right. Since zh-CN is already present in LANGUAGES at line 83 of src/lib/constants/languages.ts, i18next will pick up the locale automatically once the translation file is in place. No additional wiring needed.

The PR looks good on the code side. Hope the Vercel authorization gets resolved soon.

Tip: You can customize Greptile's behavior for this repo with .greptile/rules.md and .greptile/config.json.

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