Skip to content

feat(portal): dev.cardputer.cc 多语言(中/英/日)#18

Merged
eggfly merged 1 commit into
mainfrom
feat/portal-i18n
Jul 23, 2026
Merged

feat(portal): dev.cardputer.cc 多语言(中/英/日)#18
eggfly merged 1 commit into
mainfrom
feat/portal-i18n

Conversation

@eggfly

@eggfly eggfly commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

开发者门户 dev.cardputer.cc 现在支持简体中文 / English / 日本語,和 cardputer.cc 其他页面一致。

改动

  • 新增 site/i18n/{zh-CN,en,ja}.json,覆盖全部 UI 文案。
  • header 加语言下拉切换;选择记在 localStoragedev.locale),否则跟随浏览器语言,默认 zh-CN。
  • app.js 增加轻量 i18n 运行时(loadLocale / t / applyStaticI18n),静态与动态文案(预览、检查报告、商店信息表单、我的软件包、状态/错误提示)全部走 key;切换语言即时重渲染。

验证

  • node --check site/app.js 通过;三份 JSON 均合法。
  • 脚本核对:66 个真实 i18n key 在三种语言中全部存在,无缺失。

Made with Cursor

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>
@eggfly
eggfly merged commit 86d1eaf into main Jul 23, 2026
1 check passed
@eggfly
eggfly deleted the feat/portal-i18n branch July 23, 2026 10:21
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