Skip to content

fix(models): translate the sign-in and API key prompts - #1383

Merged
agegr merged 2 commits into
agegr:mainfrom
Zhangs-11:fix/models-i18n
Oct 29, 2026
Merged

agegr merged 2 commits into
agegr:mainfrom
Zhangs-11:fix/models-i18n

Conversation

@Zhangs-11

Copy link
Copy Markdown
Contributor

Problem

Settings › Models is translated almost everywhere, but with the UI set to 简体中文 or 繁體中文 a few texts stay English:

Where English text
Add provider cards (API key providers) 193 models
An OAuth provider before sign-in Connect your GitHub Copilot account.
Browser sign-in Complete sign-in in the browser, then copy the redirect URL…, If the browser window did not open, click here to open the login page., Enter value…
Device-code sign-in Open the verification page and enter this code:
An API key provider Enter your Ant Ling API key to enable 3 models.
A custom provider's headers + Add header
A custom model Display name placeholder; the thinking level map's Default / Disabled / Custom buttons

The surrounding labels (订阅, 未连接, 登录, 添加 Provider, 思考等级映射, …) are already translated.

Fix

The texts go through new models.* messages in en, zh-CN and zh-TW, with {provider} and {count} as parameters. The thinking level buttons reuse the existing i18n.default, i18n.disabled and i18n.custom messages, which were already used elsewhere on this page. ThinkingLevelMapEditor and HeaderListEditor now call useI18n() like the other components in the file.

The English text is unchanged except for one grammar fix: a provider with a single model now reads 1 model instead of 1 models (separate …One messages, like codemode.callCountOne). The browser sign-in hint keeps its link in the middle of the sentence by splitting it into the text before the link, the link, and the closing punctuation (. / 。), the same label-then-link shape the MCP sign-in hint uses.

Checks

  • npm test (2869 passed, 0 failed), node_modules/.bin/tsc --noEmit, npm run lint.
  • In headless Chrome with 简体中文: the cards show 193 个模型; GitHub Copilot shows 连接你的 GitHub Copilot 账号。; Ant Ling shows 输入 Ant Ling 的 API Key,即可启用 3 个模型。; a new custom provider shows + 添加请求头, the model name placeholder 显示名称, and the thinking level map's 默认 / 已禁用 / 自定义 buttons. Nothing was saved.
  • The browser and device-code sign-in texts were checked in code only: reaching them starts a real sign-in with the provider.

🤖 Generated with Claude Code

Zhangs-11 and others added 2 commits October 21, 2026 17:00
Settings › Models is translated, but a few of its texts were still
hard-coded English: the provider cards' model count, "Connect your …
account.", the browser and device-code sign-in instructions, "Enter your …
API key to enable N models.", the thinking level map's Default / Disabled /
Custom buttons, "+ Add header" and the model name placeholder. They now go
through models.* messages (and the existing i18n.default / disabled /
custom) in en, zh-CN and zh-TW. The English text is unchanged, except that
a provider with one model now reads "1 model" instead of "1 models".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Models panel keeps Header in English (models.headers, models.headersHelp),
so its add button does too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@agegr

agegr commented Oct 29, 2026

Copy link
Copy Markdown
Owner

Thanks. I checked it: English is unchanged apart from the 1 model fix, the new keys are in all three languages with {provider}/{count}, and the thinking-level buttons reuse the existing i18n.* keys.

I pushed one wording change. In Chinese this editor's field is labelled Headers and its help text says 同名 Header, so the add button now reads 添加 Header / 新增 Header instead of 请求头 / 請求標頭, to keep the panel consistent. tsc, lint and tests pass.

@agegr
agegr merged commit 444ac1c into agegr:main Oct 29, 2026
2 checks passed
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