Skip to content

Upd/english translation#43

Merged
dwgx merged 14 commits into
dwgx:masterfrom
smeinecke:upd/english-translation
Apr 24, 2026
Merged

Upd/english translation#43
dwgx merged 14 commits into
dwgx:masterfrom
smeinecke:upd/english-translation

Conversation

@smeinecke
Copy link
Copy Markdown
Contributor

@smeinecke smeinecke commented Apr 23, 2026

改了什么 / What changed

Fully translated the WindsurfAPI dashboard interface from Chinese to English using the I18n system. Replaced all hardcoded Chinese strings in JavaScript with I18n.t() calls and HTML with data-i18n attributes. Added missing translation keys to en.json and zh-CN.json. Add check-i18n.js script to detect missing I18n.t() keys referenced in JavaScript code.

为什么 / Why

To provide a complete English user experience for international users. Ensures all UI strings are properly internationalized and maintainable. Prevents regression by adding automated detection of missing translation keys that the original script missed (e.g., toast.credits.refreshed, toast.probe.doing).

测试 / Testing

  • Ran check-i18n.js script: all I18n.t() keys now exist in locales (0 missing)
  • Manually tested probe button toast messages in English mode - displays correctly
  • Manually tested credits refresh toast messages in English mode - displays correctly
  • Verified dynamic content (modals, toasts, tables) displays in English when locale is set to English
  • No automated tests run (project currently has no test suite)

Checklist

  • 代码风格和现有文件一致 / Code style matches existing files
  • 没有引入 npm 依赖 / No new npm dependencies (project is zero-dep)
  • 涉及 LS binary 协议改动时 在 PR 描述里注明字段号来源 / If touching LS protocol, document field-number source in the PR description
  • 涉及 dashboard UI 用 App.confirm / App.prompt 不用浏览器原生 alert/confirm / Uses App.confirm / App.prompt, not native dialogs (if dashboard)

- api.js: convert all Chinese error strings to ERR_* codes (e.g., '缺少 host 或 port' → 'ERR_HOST_PORT_REQUIRED')
- i18n: add error code translations to en.json and zh-CN.json
- dashboard: replace hardcoded Chinese UI strings with I18n.t() calls in overview cards, stats cards, pool cards, system prompts editor, and identity prompts editor
- i18n: add missing translation keys for card subtitles, experimental section labels
- check-i18n.js: automated checker for hardcoded Chinese text, missing translation keys, locale file synchronization, and data-i18n attribute validation
- dashboard-i18n.md: complete guide covering architecture, key naming conventions, placeholder syntax, best practices, CI integration examples, and troubleshooting
- i18n/en.json: add missing translation keys for health status section, add account hint, batch import messages, and various
…ross dashboard

- add tooltip keys: probeTitle, copyTitle, refreshTitle, editModels
- add time unit keys: day, hour, minute, second
- add tier filter label and empty state messages (noRequestData, noAccountRequestData, noData)
- add batch import and proxy configuration feedback messages
- add login result section keys (successTitle, addedToPool, fields.*)
- expand cascadeReuse.desc with detailed explanation of cache behavior and
…robe/credits operations

- check-i18n.js: add I18n.t() call extraction and validation, check both string literals and variable expressions, deduplicate and verify all keys exist in locale files
- i18n: add button keys
@dwgx dwgx merged commit e5c135c into dwgx:master Apr 24, 2026
@dwgx
Copy link
Copy Markdown
Owner

dwgx commented Apr 24, 2026

已合并。完整的 i18n 国际化——14 个 commit 把 Dashboard 全部中英文覆盖,还加了 check-i18n.js 校验工具。工程量大且质量高。感谢 @smeinecke 🌍

@smeinecke smeinecke deleted the upd/english-translation branch April 24, 2026 13:11
dwgx added a commit that referenced this pull request Apr 25, 2026
The Pages site at dwgx.github.io/WindsurfAPI/ had only 4 names listed
in the footer (dd373156, colin1112a, motto1, youfak). 8 contributors
were missing from the public site even though most of them landed
S+/S level fixes (aict666 #44/#51/#53/#54, baily-zhang #36/#45/#61,
smeinecke #43, abwuge #58).

Adds a dedicated `#contributors` section before the footer with one
card per contributor: avatar, GitHub link, weight badge (S+/S/A+/A/B+),
PR list, and a one-paragraph 繁體中文 description of what each fix
actually solved. Cards reuse the existing panel-card warm/coral
palette to fit the site's aesthetic.

Footer one-liner is also expanded to all 8 names ordered by weight,
with a "完整名單 ↑" anchor back to the new section.

CSS additions: contrib-grid, contrib-card, contrib-avatar,
contrib-weight + 5 weight-tier classes (-S-plus, -S, -A-plus, -A,
-B-plus). All gradient/hover behaviour matches the existing
panel-card styling.
huanchen pushed a commit to huanchen/WindsurfAPI that referenced this pull request May 3, 2026
huanchen pushed a commit to huanchen/WindsurfAPI that referenced this pull request May 3, 2026
The Pages site at dwgx.github.io/WindsurfAPI/ had only 4 names listed
in the footer (dd373156, colin1112a, motto1, youfak). 8 contributors
were missing from the public site even though most of them landed
S+/S level fixes (aict666 dwgx#44/dwgx#51/dwgx#53/dwgx#54, baily-zhang dwgx#36/dwgx#45/dwgx#61,
smeinecke dwgx#43, abwuge dwgx#58).

Adds a dedicated `#contributors` section before the footer with one
card per contributor: avatar, GitHub link, weight badge (S+/S/A+/A/B+),
PR list, and a one-paragraph 繁體中文 description of what each fix
actually solved. Cards reuse the existing panel-card warm/coral
palette to fit the site's aesthetic.

Footer one-liner is also expanded to all 8 names ordered by weight,
with a "完整名單 ↑" anchor back to the new section.

CSS additions: contrib-grid, contrib-card, contrib-avatar,
contrib-weight + 5 weight-tier classes (-S-plus, -S, -A-plus, -A,
-B-plus). All gradient/hover behaviour matches the existing
panel-card styling.
dwgx added a commit that referenced this pull request May 9, 2026
The Pages site at dwgx.github.io/WindsurfAPI/ had only 4 names listed
in the footer (dd373156, colin1112a, motto1, youfak). 8 contributors
were missing from the public site even though most of them landed
S+/S level fixes (aict666 #44/#51/#53/#54, baily-zhang #36/#45/#61,
smeinecke #43, abwuge #58).

Adds a dedicated `#contributors` section before the footer with one
card per contributor: avatar, GitHub link, weight badge (S+/S/A+/A/B+),
PR list, and a one-paragraph 繁體中文 description of what each fix
actually solved. Cards reuse the existing panel-card warm/coral
palette to fit the site's aesthetic.

Footer one-liner is also expanded to all 8 names ordered by weight,
with a "完整名單 ↑" anchor back to the new section.

CSS additions: contrib-grid, contrib-card, contrib-avatar,
contrib-weight + 5 weight-tier classes (-S-plus, -S, -A-plus, -A,
-B-plus). All gradient/hover behaviour matches the existing
panel-card styling.
MYMDO added a commit to MYMDO/WindsurfAPI that referenced this pull request May 14, 2026
Operational/navigation links updated to MYMDO/WindsurfAPI:
- package.json: homepage, repository.url, bugs.url
- install-ls.sh: OUR_RELEASE
- update.sh: RELEASE_URL
- docker-compose.yml: ghcr.io/mymdo/windsurf-api:latest (lowercased per GHCR)
- SECURITY.md: 2x security advisory URLs
- .github/ISSUE_TEMPLATE/config.yml: security advisory URL
- .github/workflows/release.yml: comment
- README.{md,en,ua,zh}.md: clone URLs, GitHub Pages catalog, Issues/PR CTAs
- docs/index.html: nav GitHub, hero CTA, deploy clone, contributors CTA, footer (GitHub/Releases/Issues/Security/READMEs/CONTRIBUTING)
- src/dashboard/index.html + index-sketch.html: Issue/PR CTA buttons, RELEASE_NOTES blob link

KEPT at dwgx (intentional):
- Historical PR references (PR dwgx#1, dwgx#13, dwgx#36, dwgx#43, dwgx#44, dwgx#45) — they exist only in dwgx/WindsurfAPI
- @dwgx profile link in footer (attribution)
- (c) 2026 dwgx (copyright attribution per MIT)
- package.json author field (original creator)
- bydwgx1337 brand strings in dashboard UI / server provider / version BRAND
- contributors.json (login + historical narrative)
- test fixtures and code comments referencing dwgx
- docs/releases/RELEASE_NOTES_*.md (historical archives)
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.

2 participants