feat(portal): dev.cardputer.cc 多语言(中/英/日)#18
Merged
Merged
Conversation
The developer portal (dev.cardputer.cc) now supports Simplified Chinese,
English, and Japanese, matching the rest of cardputer.cc.
- Add site/i18n/{zh-CN,en,ja}.json with all UI strings.
- Add a language switcher in the header; choice persists in localStorage
(dev.locale) and otherwise follows the browser language, defaulting to
zh-CN.
- app.js gains a small i18n runtime (loadLocale/t/applyStaticI18n) and all
static + dynamic strings (preview, checks, store form, my-packages,
status/error messages) are keyed. Switching language re-renders live.
Co-authored-by: Cursor <cursoragent@cursor.com>
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.
开发者门户 dev.cardputer.cc 现在支持简体中文 / English / 日本語,和 cardputer.cc 其他页面一致。
改动
site/i18n/{zh-CN,en,ja}.json,覆盖全部 UI 文案。localStorage(dev.locale),否则跟随浏览器语言,默认 zh-CN。app.js增加轻量 i18n 运行时(loadLocale/t/applyStaticI18n),静态与动态文案(预览、检查报告、商店信息表单、我的软件包、状态/错误提示)全部走 key;切换语言即时重渲染。验证
node --check site/app.js通过;三份 JSON 均合法。Made with Cursor