Skip to content

feat: Improve the Chinese translation - #855

Closed
only4copilot wants to merge 1 commit into
diegosouzapw:mainfrom
only4copilot:main
Closed

only4copilot wants to merge 1 commit into
diegosouzapw:mainfrom
only4copilot:main

Conversation

@only4copilot

Copy link
Copy Markdown
Contributor

No description provided.

@kilo-code-bot

kilo-code-bot Bot commented Mar 31, 2026

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Overview

This PR improves Chinese (zh-CN) translations across the application. The changes include:

  • Updated .gitignore to exclude .idea/ directory
  • Translated remaining untranslated UI strings in the Chinese locale
  • Added new translations for cache management and auto-disable banned accounts features

Files Reviewed (2 files)

  • .gitignore - Minor configuration change
  • src/i18n/messages/zh-CN.json - Translation improvements

Assessment

The translation improvements are appropriate and consistent with Chinese localization best practices. The .idea/ directory addition to .gitignore is a standard practice for JetBrains IDE users. No code logic changes were made - this is a pure translation/-configuration PR with no functional impact.

No issues found.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the .gitignore to exclude IDEA configuration files and provides comprehensive Chinese (zh-CN) translation improvements. Key changes include the full localization of the cache management section, standardization of technical terms like "Tokens" and "策略" (Policy), and the addition of new strings for account auto-disabling features. Feedback was provided regarding translation consistency for API key labels, proper capitalization of brand names, and fixing rich text tag syntax in the cache behavior descriptions to prevent rendering issues in the UI.

"accountId": "账户 ID",
"alias": "别名",
"apiKeyId": "API Key ID",
"apiKeyId": "API 密钥 ID",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The translation of "API Key" has been updated to "API 密钥" in this line, but the adjacent keys apiKeyName (line 66) and apiKeySecret (line 67) still use the English term "API Key". It is recommended to update them as well to maintain consistency across the UI.

"providerTimeoutAria": "{provider} 超时毫秒",
"removeProviderOverrideAria": "删除 {provider} 覆盖",
"newProviderNamePlaceholder": "例如谷歌、开放式...",
"newProviderNamePlaceholder": "例如 google、openai...",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Brand names like "Google" and "OpenAI" should follow proper capitalization to be consistent with other parts of the translation (e.g., lines 2423 and 2784).

Suggested change
"newProviderNamePlaceholder": "例如 google、openai...",
"newProviderNamePlaceholder": "例如 Google、OpenAI...",

"misses": "未命中次数",
"total": "总计",
"behaviorDeterministic": "仅缓存 temperature=0 的非流式请求。",
"behaviorBypass": "通过请求头 {header} 绕过缓存。",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This key is used with t.rich in src/app/(dashboard)/dashboard/cache/page.tsx (line 514), which expects a rich text tag (e.g., <header />) instead of a variable placeholder ({header}). The current syntax will cause the literal string {header} to be displayed in the UI instead of the intended code block.

Suggested change
"behaviorBypass": "通过请求头 {header} 绕过缓存。",
"behaviorBypass": "通过请求头 <header /> 绕过缓存。",

"behaviorDeterministic": "仅缓存 temperature=0 的非流式请求。",
"behaviorBypass": "通过请求头 {header} 绕过缓存。",
"behaviorTwoTier": "双层存储:内存 LRU(快速)+ SQLite(重启后持久化)。",
"behaviorTtl": "默认 TTL:30 分钟。可通过 {envVar} 配置。",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This key is used with t.rich in src/app/(dashboard)/dashboard/cache/page.tsx (line 524), which expects a rich text tag (e.g., <envVar />) instead of a variable placeholder ({envVar}). The current syntax will cause the literal string {envVar} to be displayed in the UI instead of the intended code block.

Suggested change
"behaviorTtl": "默认 TTL:30 分钟。可通过 {envVar} 配置。",
"behaviorTtl": "默认 TTL:30 分钟。可通过 <envVar /> 配置。",

@diegosouzapw

Copy link
Copy Markdown
Owner

Thanks @only4copilot for this great contribution! 🎉 The improvements have been integrated into the release/v3.4.0 branch and will be part of the next release. We appreciate your effort!

@diegosouzapw diegosouzapw mentioned this pull request Apr 22, 2026
This was referenced Apr 30, 2026
Poid-ZA pushed a commit to Poid-ZA/OmniRoute that referenced this pull request Aug 5, 2026
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
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.

3 participants