Add zh-CN (Chinese Simplified) translation#413
Conversation
|
@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 SummaryAdds a complete Simplified Chinese (zh-CN) translation and registers the locale in the
Confidence Score: 5/5This 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
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]
Reviews (2): Last reviewed commit: "fix(i18n): register zh-CN in languages.t..." | Re-trigger Greptile |
| @@ -0,0 +1,278 @@ | |||
| { | |||
There was a problem hiding this comment.
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.
|
The zh-CN language registration has already been added in |
|
Hi maintainers 👋 This PR adds a complete zh-CN translation (276 keys) and properly registers the locale in The PR is currently blocked due to a Vercel deployment authorization issue ( Could someone please:
The translation bounty ($200 USDC) is pending merge. Happy to address any code review feedback! |
|
Hi @greptile-apps[bot], the { language: '''简体中文 (CN)''', key: '''zh-CN''', icon: ChinaFlag, englishLanguage: '''Chinese Simplified''' },The The PR is currently blocked due to a Vercel deployment authorization issue, not a code problem. |
|
Thanks for the clarification — you're right. Since 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 |
Translation Bounty Submission
This PR adds a complete zh-CN (Chinese Simplified) translation for the EFP app.
Translation Details
public/locales/zh-CN/translations.jsonTranslation Approach
Bounty Reference
Translation bounty page: https://docs.efp.app/translationbounty/
Reward Information
Notes
zh(generic Chinese) andzh-TW(Traditional Chinese) locales already in the repository