Skip to content

Add Chinese (zh) language support#2009

Open
RootInsect wants to merge 4 commits intoAndyMik90:developfrom
RootInsect:feature/zh-cn
Open

Add Chinese (zh) language support#2009
RootInsect wants to merge 4 commits intoAndyMik90:developfrom
RootInsect:feature/zh-cn

Conversation

@RootInsect
Copy link
Copy Markdown

@RootInsect RootInsect commented Apr 13, 2026

Summary

  • Add Chinese translation files for all 11 namespaces (common, navigation, settings, tasks, welcome, onboarding, dialogs, gitlab, taskReview, terminal, errors)
  • Register zh language in i18n configuration

Test plan

  • Verify Chinese language appears in language selector in Settings
  • Test that all UI text displays correctly in Chinese

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added Simplified Chinese localization across the desktop app, covering navigation, settings, onboarding, tasks, dialogs, terminal/PR flows, error messages, GitLab integration, and welcome screens.

- Add Chinese translation files for all 11 namespaces
- Register zh language in i18n configuration
- Follow existing translation structure (en, fr pattern)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 13, 2026

📝 Walkthrough

Walkthrough

Added Simplified Chinese (zh) translations and registered them in the desktop app i18n resources, introducing 11 new locale JSON files and updating the i18n index to include the zh namespace with multiple translation modules.

Changes

Cohort / File(s) Summary
i18n Index Registration
apps/desktop/src/shared/i18n/index.ts
Imported and registered the zh locale namespace, adding sub-namespaces: common, navigation, settings, tasks, welcome, onboarding, dialogs, gitlab, taskReview, terminal, and errors.
Navigation & Welcome
apps/desktop/src/shared/i18n/locales/zh/navigation.json, apps/desktop/src/shared/i18n/locales/zh/welcome.json
Added Chinese translations for navigation (sections, items, actions, tooltips, update banner, Claude Code) and welcome screen copy (hero, actions, recent projects).
Core UI, Tasks & Dialogs
apps/desktop/src/shared/i18n/locales/zh/common.json, apps/desktop/src/shared/i18n/locales/zh/tasks.json, apps/desktop/src/shared/i18n/locales/zh/dialogs.json
Added Chinese UI strings for common components, task lifecycle/queue/kanban flows, image & file workflows, and terminal/dialog copy with interpolation and plural variants.
Settings & Onboarding
apps/desktop/src/shared/i18n/locales/zh/settings.json, apps/desktop/src/shared/i18n/locales/zh/onboarding.json
Added large, structured Chinese translations for settings panels, provider/account/configuration pages, and onboarding/setup wizard (accounts, memory, developer tools, Claude CLI/installation).
Integrations, Task Review, Terminal & Errors
apps/desktop/src/shared/i18n/locales/zh/gitlab.json, apps/desktop/src/shared/i18n/locales/zh/taskReview.json, apps/desktop/src/shared/i18n/locales/zh/terminal.json, apps/desktop/src/shared/i18n/locales/zh/errors.json
Added Chinese strings for GitLab issues/MRs and AI MR review flows, task review/worktree management, terminal/merge/PR/merge-progress messages, and task-related error messages (JSON/implementation plan parsing).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 I nibble keys and stitch each line,
zh phrases tucked where interfaces shine,
Eleven files, a language thread,
Now menus, dialogs, and tips are said,
Hop—translations bloom across the app 🌱

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add Chinese (zh) language support' directly and clearly describes the main change: adding Chinese language translations across 11 namespaces and registering the zh locale in i18n configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

🎉 Thanks for your first PR!

A maintainer will review it soon. Please make sure:

  • Your branch is synced with develop
  • CI checks pass
  • You've followed our contribution guide

Welcome to the Auto Claude community!

Comment on lines +74 to 84
navigation: zhNavigation,
settings: zhSettings,
tasks: zhTasks,
welcome: zhWelcome,
onboarding: zhOnboarding,
dialogs: zhDialogs,
gitlab: zhGitlab,
taskReview: zhTaskReview,
terminal: zhTerminal,
errors: zhErrors
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: The new Chinese (zh) language is not added to the SupportedLanguage type and AVAILABLE_LANGUAGES constant, making it unavailable for selection in the UI.
Severity: HIGH

Suggested Fix

Update apps/desktop/src/shared/constants/i18n.ts. Add 'zh' to the SupportedLanguage type. Add a new object for the Chinese language to the AVAILABLE_LANGUAGES array, for example: { value: 'zh' as const, label: 'Chinese', nativeLabel: '中文' }.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: apps/desktop/src/shared/i18n/index.ts#L72-L84

Potential issue: The pull request adds Chinese (`zh`) translation resources but fails to
register the new language in `apps/desktop/src/shared/constants/i18n.ts`. Specifically,
the `SupportedLanguage` type is not updated to include `'zh'`, and the
`AVAILABLE_LANGUAGES` array is missing an entry for Chinese. As a result, the language
selector component will not render an option for Chinese, and the application's type
system will prevent the language from being set, rendering the new translations
inaccessible to users.

Did we get this right? 👍 / 👎 to inform future reviews.

Copy link
Copy Markdown
Contributor

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

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 introduces Chinese (Simplified) localization by adding a comprehensive set of translation files and registering them within the i18n configuration. The review identified several critical syntax errors where unescaped double quotes within string values resulted in invalid JSON across multiple files, which would prevent the application from loading the translations. Additionally, the feedback suggests improvements for redundant translations, corrections for typos in technical terms like roadmap, and fixes for mistranslated instructions to ensure the quality and accuracy of the localized content.

"oauth": {
"enterCode": "手动代码输入(备用)",
"enterCodeDescription": "仅在浏览器未自动重定向时才需要此对话框。如果验证已在浏览器中完成,您可以关闭此对话框。",
"fallbackNote": "仅在浏览器中看到"将此粘贴到 Claude Code"页面时使用。",
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.

critical

Invalid JSON syntax: unescaped double quotes inside the string value. Double quotes within a JSON string must be escaped with a backslash (e.g., \").

    "fallbackNote": "仅在浏览器中看到\"将此粘贴到 Claude Code\"页面时使用。",

"addAccountsDesc": "添加并验证您的 Claude 账户以使用 AI 功能。",
"multiAccountInfo": "您可以添加多个 Claude 账户。活跃账户将用于 AI 功能。您可以随时切换账户。",
"keychainTitle": "安全存储",
"keychainDescription": "您的身份验证令牌使用系统密钥链加密存储。您可能会看到 macOS 的密码提示 - 点击"始终允许"以避免再次看到。",
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.

critical

Invalid JSON syntax: unescaped double quotes inside the string value.

    "keychainDescription": "您的身份验证令牌使用系统密钥链加密存储。您可能会看到 macOS 的密码提示 - 点击\"始终允许\"以避免再次看到。",

"instructions": "验证此个人资料:",
"step1": "转到设置 > 集成",
"step2": "在 Claude 账户部分找到该个人资料",
"step3": "点击"验证"完成登录",
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.

critical

Invalid JSON syntax: unescaped double quotes inside the string value.

    "step3": "点击\"验证\"完成登录",

"showLessFeatures": "显示更少",
"archiveFeature": "归档",
"archiveFeatureConfirmTitle": "归档功能?",
"archiveFeatureConfirmDescription": "这将从您的路线图中移除"{{title}}"。",
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.

critical

Invalid JSON syntax: unescaped double quotes inside the string value.

    "archiveFeatureConfirmDescription": "这将从您的路线图中移除\"{{title}}\"",

"autoSyncDescription": "项目加载时自动获取问题",
"cli": {
"required": "需要 GitLab CLI",
"notInstalled": "GitLab CLI(glab)需要用于 OAuth 身份验证。安装它以使用"使用 OAuth"选项。",
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.

critical

Invalid JSON syntax: unescaped double quotes inside the string value.

Suggested change
"notInstalled": "GitLab CLI(glab)需要用于 OAuth 身份验证。安装它以使用"使用 OAuth"选项。",
"notInstalled": "GitLab CLI(glab)需要用于 OAuth 身份验证。安装它以使用\"使用 OAuth\"选项。",

"requireReviewDescription": "启用后,系统将提示您审核规格和实施计划,然后再开始编码阶段。这允许您批准、请求更改或提供反馈。",
"fastModeLabel": "快速模式",
"fastModeDescription": "相同的 Opus 4.6 模型,输出更快。每令牌成本更高。",
"fastModeNotice": "需要您的 Claude 订阅启用"额外使用"。",
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.

critical

Invalid JSON syntax: unescaped double quotes inside the string value.

    "fastModeNotice": "需要您的 Claude 订阅启用\"额外使用\"",

"instructions": "重新验证:",
"step1": "转到设置",
"step2": "导航到应用设置 > 集成",
"step3": "点击您个人资料上的"重新验证"",
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.

critical

Invalid JSON syntax: unescaped double quotes inside the string value.

Suggested change
"step3": "点击您个人资料上的"重新验证"",
"step3": "点击您个人资料上的\"重新验证\"",

Comment on lines +617 to +618
"stepReturnAndVerify": "返回此处并点击 <strong>验证验证</strong>",
"verifyAuth": "验证验证",
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 "验证验证" (Verify Verification) is redundant and likely a literal translation error. "身份验证" is the standard term for "Authentication" in software localization.

    "stepReturnAndVerify": "返回此处并点击 <strong>验证身份验证</strong>",
    "verifyAuth": "验证身份验证",

"suggestsFeatures": "建议解决竞争对手产品差距的功能",
"webSearchesTitle": "将执行网络搜索",
"webSearchesDescription": "此功能将执行网络搜索以收集竞争对手信息。您的项目名称和类型将用于搜索查询。不会共享任何代码或敏感数据。",
"optionalInfo": "如果您愿意,可以生成果程图而不进行竞争对手分析。路线图仍将基于您的项目结构和最佳实践。",
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

Typo: "果程图" should be "路线图" (Roadmap).

    "optionalInfo": "如果您愿意,可以生成路线图而不进行竞争对手分析。路线图仍将基于您的项目结构和最佳实践。",

"aiCommitMessage": "AI 生成的提交消息",
"copied": "已复制!",
"copy": "复制",
"editHint": "根据需要编辑,然后复制并配合",
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

Mistranslation: "配合" (coordinate/cooperate) is likely a mistake for "粘贴" (paste) in this context.

    "editHint": "根据需要编辑,然后复制并粘贴",

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/desktop/src/shared/i18n/locales/zh/common.json`:
- Line 595: The JSON is invalid because several values contain unescaped double
quotes; update the string values for keys "fallbackNote", "keychainDescription",
"step3", and "archiveFeatureConfirmDescription" to escape inner quotes (replace
" with \" inside those strings) so the JSON parser can parse the file, ensuring
the surrounding property quotes remain unchanged and the template "{{title}}"
remains correctly escaped as needed.

In `@apps/desktop/src/shared/i18n/locales/zh/dialogs.json`:
- Around line 1-58: The zh locale is incomplete and several files contain JSON
syntax errors; either remove "zh" from AVAILABLE_LANGUAGES or fully complete and
validate the locale to match en/fr parity (≈207 keys). Fix the missing dialog
sections (e.g., add keys like addProject, appUpdate, competitorAnalysis,
initialize, removeProject) in the dialogs.json where only keys such as "expand",
"resume", "auth", "swap", and "worktree" are present, correct JSON syntax errors
in common.json, gitlab.json, onboarding.json, settings.json, taskReview.json,
tasks.json, and terminal.json, and run a JSON linter and the repository i18n
parity check to ensure all keys match the canonical English translations before
re-adding "zh" to AVAILABLE_LANGUAGES.

In `@apps/desktop/src/shared/i18n/locales/zh/taskReview.json`:
- Around line 1-239: The Chinese locale
file/apps/desktop/src/shared/i18n/locales/zh/taskReview.json is missing the
"terminal" section used by TerminalDropdown.tsx (it calls
useTranslation('taskReview') and t('terminal.openTerminal') /
t('terminal.openInbuilt') / t('terminal.openExternal')), causing fallback to
English; add a "terminal" object with keys openTerminal, openInbuilt, and
openExternal (you can copy the corresponding translations from zh/terminal.json)
into taskReview.json near the top so the component finds the Chinese strings.

In `@apps/desktop/src/shared/i18n/locales/zh/tasks.json`:
- Line 130: The JSON contains unescaped ASCII double quotes inside string values
(e.g., the "description" entry that currently includes "进行中" with quotes), which
breaks parsing; update each affected value (lines referenced in the review) to
either escape the internal double quotes (replace " with \") or substitute them
with Chinese/fullwidth quotes (e.g., “ and ”) so the JSON string is valid, apply
the same fix for the other occurrences (the entries at the other flagged lines),
and re-run Biome/JSON lint to ensure the file parses before committing.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: dd78e259-cae2-40c4-b09a-638b1f391fc1

📥 Commits

Reviewing files that changed from the base of the PR and between cba7a02 and 4a2aa9f.

📒 Files selected for processing (12)
  • apps/desktop/src/shared/i18n/index.ts
  • apps/desktop/src/shared/i18n/locales/zh/common.json
  • apps/desktop/src/shared/i18n/locales/zh/dialogs.json
  • apps/desktop/src/shared/i18n/locales/zh/errors.json
  • apps/desktop/src/shared/i18n/locales/zh/gitlab.json
  • apps/desktop/src/shared/i18n/locales/zh/navigation.json
  • apps/desktop/src/shared/i18n/locales/zh/onboarding.json
  • apps/desktop/src/shared/i18n/locales/zh/settings.json
  • apps/desktop/src/shared/i18n/locales/zh/taskReview.json
  • apps/desktop/src/shared/i18n/locales/zh/tasks.json
  • apps/desktop/src/shared/i18n/locales/zh/terminal.json
  • apps/desktop/src/shared/i18n/locales/zh/welcome.json

Comment on lines +1 to +58
{
"expand": {
"expand": "展开终端",
"collapse": "折叠终端"
},
"resume": {
"pending": "可恢复",
"pendingTooltip": "点击以恢复之前的 Claude 会话",
"resumeAllSessions": "恢复全部"
},
"auth": {
"terminalTitle": "验证:{{profileName}}",
"maxTerminalsReached": "无法打开验证终端:已达到最大终端数。请先关闭一个终端。"
},
"swap": {
"inProgress": "正在切换个人资料...",
"resumingSession": "正在恢复 Claude 会话...",
"sessionResumed": "会话已在新的个人资料下恢复",
"resumeFailed": "无法恢复会话。您可以开始一个新的会话。",
"noSession": "个人资料已切换。没有要恢复的活跃会话。",
"migrationFailed": "个人资料已切换,但会话迁移失败。开始新的终端。"
},
"worktree": {
"create": "工作树",
"createNew": "新建工作树",
"existing": "终端工作树",
"taskWorktrees": "任务工作树",
"otherWorktrees": "其他",
"createTitle": "创建终端工作树",
"createDescription": "为此终端创建一个隔离的工作空间。所有工作将在工作树目录中进行。",
"name": "工作树名称",
"namePlaceholder": "my-feature",
"nameRequired": "工作树名称是必填项",
"nameInvalid": "名称必须以字母或数字开头和结尾",
"nameHelp": "小写字母、数字、连字符和下划线(空格变为连字符)",
"associateTask": "关联到任务",
"selectTask": "选择任务...",
"noTask": "无任务(独立工作树)",
"createBranch": "创建 Git 分支",
"branchHelp": "创建分支:{{branch}}",
"baseBranch": "基础分支",
"selectBaseBranch": "选择基础分支...",
"searchBranch": "搜索分支...",
"noBranchFound": "未找到分支",
"useProjectDefault": "使用项目默认值({{branch}})",
"baseBranchHelp": "创建工作树的分支",
"openInIDE": "在 IDE 中打开",
"maxReached": "已达到 12 个终端工作树的最大数量",
"alreadyExists": "此名称的工作树已存在",
"searchPlaceholder": "搜索工作树...",
"noResults": "未找到工作树",
"deleteTitle": "删除工作树?",
"deleteDescription": "这将永久删除工作树及其分支。任何未提交的更改都将丢失。",
"detached": "(分离的)",
"remotePushFailed": "远程跟踪未设置",
"remotePushFailedDescription": "工作树已创建,但无法将分支推送到远程。您可能需要手动运行 git push -u。"
}
}
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.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

python - <<'PY'
import json
from pathlib import Path

base = Path("apps/desktop/src/shared/i18n/locales")
langs = ["en", "fr", "zh"]

def flatten(d, prefix=""):
    out = set()
    if isinstance(d, dict):
        for k, v in d.items():
            p = f"{prefix}.{k}" if prefix else k
            out |= flatten(v, p)
    else:
        out.add(prefix)
    return out

files = sorted((base / "zh").glob("*.json"))
failed = False

for zh_file in files:
    ns = zh_file.name
    data = {}
    for lang in langs:
        p = base / lang / ns
        if not p.exists():
            print(f"[MISSING_FILE] {lang}/{ns}")
            failed = True
            continue
        with p.open("r", encoding="utf-8") as f:
            data[lang] = flatten(json.load(f))

    if len(data) < 2:
        continue

    ref = data.get("en") or next(iter(data.values()))
    for lang, keys in data.items():
        if lang == "en":
            continue
        miss = sorted(ref - keys)
        extra = sorted(keys - ref)
        if miss or extra:
            failed = True
            print(f"\n[DIFF] {ns} :: en vs {lang}")
            if miss:
                print(f"  missing_in_{lang}: {len(miss)}")
                for k in miss[:20]:
                    print(f"    - {k}")
            if extra:
                print(f"  extra_in_{lang}: {len(extra)}")
                for k in extra[:20]:
                    print(f"    + {k}")

if failed:
    raise SystemExit(1)
print("Locale key parity check passed.")
PY

Repository: AndyMik90/Aperant

Length of output: 804


🏁 Script executed:

#!/bin/bash
# Find which JSON file has syntax errors in the locale directory
base="apps/desktop/src/shared/i18n/locales"

for langdir in "$base"/{en,fr,zh}; do
  if [ ! -d "$langdir" ]; then
    echo "[MISSING] $langdir"
    continue
  fi
  for jsonfile in "$langdir"/*.json; do
    if ! python3 -m json.tool "$jsonfile" > /dev/null 2>&1; then
      echo "[INVALID_JSON] $jsonfile"
      python3 -m json.tool "$jsonfile" 2>&1 | head -5
    fi
  done
done

Repository: AndyMik90/Aperant

Length of output: 932


🏁 Script executed:

#!/bin/bash
# Verify the zh/dialogs.json file specifically
if python3 -m json.tool "apps/desktop/src/shared/i18n/locales/zh/dialogs.json" > /dev/null 2>&1; then
  echo "[VALID] zh/dialogs.json is syntactically correct"
else
  echo "[INVALID] zh/dialogs.json has syntax errors"
  python3 -m json.tool "apps/desktop/src/shared/i18n/locales/zh/dialogs.json" 2>&1 | head -10
fi

Repository: AndyMik90/Aperant

Length of output: 109


🏁 Script executed:

#!/bin/bash
# Check parity for dialogs.json specifically
python3 << 'PYEND'
import json
from pathlib import Path

base = Path("apps/desktop/src/shared/i18n/locales")
ns = "dialogs.json"

def flatten(d, prefix=""):
    out = set()
    if isinstance(d, dict):
        for k, v in d.items():
            p = f"{prefix}.{k}" if prefix else k
            out |= flatten(v, p)
    else:
        out.add(prefix)
    return out

data = {}
for lang in ["en", "fr", "zh"]:
    p = base / lang / ns
    if p.exists():
        with p.open("r", encoding="utf-8") as f:
            data[lang] = flatten(json.load(f))
        print(f"✓ {lang}/{ns} loaded: {len(data[lang])} keys")
    else:
        print(f"✗ {lang}/{ns} NOT FOUND")

if len(data) >= 2:
    print("\n=== Parity Check ===")
    en_keys = data.get("en", set())
    for lang in ["fr", "zh"]:
        if lang in data:
            missing = sorted(en_keys - data[lang])
            extra = sorted(data[lang] - en_keys)
            if missing or extra:
                print(f"\n{lang} vs en:")
                if missing:
                    print(f"  Missing in {lang}: {missing}")
                if extra:
                    print(f"  Extra in {lang}: {extra}")
            else:
                print(f"\n{lang}: ✓ All keys match en")
PYEND

Repository: AndyMik90/Aperant

Length of output: 7483


Do not ship zh locale support—it is incomplete and contains syntax errors across multiple files.

The zh locale cannot be deployed as-is:

  • zh/dialogs.json contains only 46 of 207 required keys (22% complete)—missing entire dialog sections: addProject, appUpdate, competitorAnalysis, initialize, removeProject, and 10+ others
  • 7 additional zh locale files contain JSON syntax errors: common.json, gitlab.json, onboarding.json, settings.json, taskReview.json, tasks.json, terminal.json

Either complete all zh translations to match en/fr parity (207 keys) and fix JSON syntax errors, or remove zh from AVAILABLE_LANGUAGES until translations are ready.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/desktop/src/shared/i18n/locales/zh/dialogs.json` around lines 1 - 58,
The zh locale is incomplete and several files contain JSON syntax errors; either
remove "zh" from AVAILABLE_LANGUAGES or fully complete and validate the locale
to match en/fr parity (≈207 keys). Fix the missing dialog sections (e.g., add
keys like addProject, appUpdate, competitorAnalysis, initialize, removeProject)
in the dialogs.json where only keys such as "expand", "resume", "auth", "swap",
and "worktree" are present, correct JSON syntax errors in common.json,
gitlab.json, onboarding.json, settings.json, taskReview.json, tasks.json, and
terminal.json, and run a JSON linter and the repository i18n parity check to
ensure all keys match the canonical English translations before re-adding "zh"
to AVAILABLE_LANGUAGES.

Comment on lines +1 to +239
{
"initialize": {
"title": "初始化 Aperant",
"description": "此项目未初始化 Aperant。您想现在设置吗?",
"willDo": "这将:",
"createFolder": "在您的项目中创建 .auto-claude 文件夹",
"copyFramework": "复制 Aperant 框架文件",
"setupSpecs": "为您的任务设置 specs 目录",
"sourcePathNotConfigured": "未配置源路径",
"sourcePathNotConfiguredDescription": "请在应用设置中设置 Aperant 源路径,然后再初始化。",
"initFailed": "初始化失败",
"initFailedDescription": "初始化 Aperant 失败。请重试。"
},
"gitSetup": {
"title": "需要 Git 仓库",
"description": "Aperant 使用 git 在隔离的工作空间中安全地构建功能",
"notGitRepo": "此文件夹不是 git 仓库",
"noCommits": "Git 仓库没有提交",
"needsInit": "需要先初始化 git,然后 Aperant 才能管理您的代码。",
"needsCommit": "Aperant 创建工作树至少需要一个提交。",
"willSetup": "我们将为您设置 git:",
"initRepo": "初始化新的 git 仓库",
"createCommit": "使用当前文件创建初始提交",
"manual": "更喜欢手动操作?",
"settingUp": "正在设置 Git",
"initializingRepo": "正在初始化 git 仓库并创建初始提交...",
"success": "Git 已初始化",
"readyToUse": "您的项目现在可以与 Aperant 一起使用了!"
},
"githubSetup": {
"connectTitle": "连接到 GitHub",
"connectDescription": "Aperant 需要 GitHub 来管理您的代码分支并保持任务最新。",
"claudeTitle": "连接到 Claude AI",
"claudeDescription": "Aperant 使用 Claude AI 来实现智能功能,如路线图生成、任务自动化和创意。",
"aiProviderTitle": "连接到 AI",
"aiProviderDescription": "添加 AI 提供商账户以为路线图生成、任务自动化和创意等功能提供支持。",
"aiProviderReady": "您已配置至少一个 AI 提供商。您可以继续下一步。",
"skipForNow": "暂时跳过",
"continue": "继续",
"selectRepo": "选择仓库",
"repoDescription": "Aperant 将使用此仓库来管理任务分支并保持您的代码最新。",
"selectBranch": "选择基础分支",
"branchDescription": "选择 Aperant 用作创建任务分支基础的分支。",
"whyBranch": "为什么要选择分支?",
"branchExplanation": "Aperant 为每个任务创建隔离的工作空间。选择正确的基础分支可确保您的任务从主开发线的最新代码开始。",
"ready": "Aperant 已准备好使用!您现在可以创建将自动基于 {{branchName}} 分支的任务。",
"createRepoAriaLabel": "在 GitHub 上创建新仓库",
"linkRepoAriaLabel": "链接到现有仓库",
"goBackAriaLabel": "返回仓库选择",
"selectOwnerAriaLabel": "选择 {{owner}} 作为仓库所有者",
"selectOrgAriaLabel": "选择 {{org}} 作为仓库所有者",
"selectVisibilityAriaLabel": "将仓库可见性设置为 {{visibility}}"
},
"worktrees": {
"title": "工作树",
"description": "管理您的 Aperant 任务的隔离工作空间",
"empty": "无工作树",
"emptyDescription": "工作树会在 Aperant 构建功能时自动创建。它们为每个任务提供隔离的工作空间。",
"merge": "合并工作树",
"mergeDescription": "将更改从此工作树合并到基础分支。",
"delete": "删除工作树?",
"deleteDescription": "这将永久删除工作树及其所有未提交的更改。此操作无法撤销。",
"bulkDeleteTitle": "删除 {{count}} 个工作树?",
"bulkDeleteDescription": "这将永久删除所选工作树及其所有未提交的更改。此操作无法撤销。",
"deleting": "删除中...",
"deleteSelected": "删除所选"
},
"worktreeCleanup": {
"title": "完成任务",
"hasWorktree": "任务 <strong>\"{{taskTitle}}\"</strong> 仍有隔离的工作空间(工作树)。",
"willDelete": "要将此任务标记为完成,工作树及其关联的分支将被删除。",
"warning": "在继续之前,请确保已合并或保存了您要保留的任何更改。",
"confirm": "删除工作树并完成",
"completing": "完成中...",
"retry": "重试",
"errorTitle": "清理失败",
"errorDescription": "清理工作树失败。请重试。"
},
"update": {
"title": "Aperant",
"projectInitialized": "项目已初始化。"
},
"addFeature": {
"title": "添加功能",
"description": "为您的路线图添加新功能。提供有关您想要构建的内容及其如何适应产品策略的详细信息。",
"featureTitle": "功能标题",
"featureTitlePlaceholder": "例如用户身份验证、深色模式支持",
"featureDescription": "描述",
"featureDescriptionPlaceholder": "描述此功能的用途及其对用户的重要性。",
"rationale": "理由",
"optional": "可选",
"rationalePlaceholder": "解释为什么应该构建此功能以及它如何适应产品愿景。",
"phase": "阶段",
"selectPhase": "选择阶段",
"priority": "优先级",
"selectPriority": "选择优先级",
"complexity": "复杂性",
"selectComplexity": "选择复杂性",
"impact": "影响",
"selectImpact": "选择影响",
"lowComplexity": "低",
"mediumComplexity": "中",
"highComplexity": "高",
"lowImpact": "低影响",
"mediumImpact": "中影响",
"highImpact": "高影响",
"titleRequired": "标题是必填项",
"descriptionRequired": "描述是必填项",
"phaseRequired": "请选择一个阶段",
"cancel": "取消",
"adding": "添加中...",
"addFeature": "添加功能",
"failedToAdd": "添加功能失败。请重试。"
},
"addProject": {
"title": "添加项目",
"description": "选择您想要添加项目的方式",
"openExisting": "打开现有文件夹",
"openExistingDescription": "浏览到您计算机上的现有项目",
"createNew": "创建新项目",
"createNewDescription": "使用新项目文件夹重新开始",
"createNewTitle": "创建新项目",
"createNewSubtitle": "设置新的项目文件夹",
"projectName": "项目名称",
"projectNamePlaceholder": "my-awesome-project",
"projectNameHelp": "这将是文件夹名称。使用小写和连字符。",
"location": "位置",
"locationPlaceholder": "选择文件夹...",
"willCreate": "将创建:",
"browse": "浏览",
"initGit": "初始化 git 仓库",
"back": "返回",
"creating": "创建中...",
"createProject": "创建项目",
"nameRequired": "请输入项目名称",
"locationRequired": "请选择一个位置",
"failedToOpen": "打开项目失败",
"failedToCreate": "创建项目失败",
"openExistingAriaLabel": "打开现有项目文件夹",
"createNewAriaLabel": "创建新项目"
},
"customModel": {
"title": "自定义模型配置",
"description": "配置此聊天会话的模型和思维级别。",
"model": "模型",
"thinkingLevel": "思维级别",
"cancel": "取消",
"apply": "应用"
},
"removeProject": {
"title": "移除项目?",
"description": "这将从应用中移除\"{{projectName}}\"。您的文件将保留在磁盘上,您可以稍后重新添加项目。",
"cancel": "取消",
"remove": "移除",
"error": "移除项目失败"
},
"appUpdate": {
"title": "有可用应用更新",
"description": "新版本的 Aperant 已准备好下载",
"newVersion": "新版本",
"released": "发布于",
"downloading": "下载中...",
"downloadUpdate": "下载更新",
"installAndRestart": "安装并重启",
"installLater": "稍后安装",
"remindMeLater": "稍后提醒我",
"updateDownloaded": "更新已成功下载!点击安装以重启并应用更新。",
"downloadError": "下载更新失败",
"claudeCodeChangelog": "查看 Claude Code 更新日志",
"claudeCodeChangelogAriaLabel": "查看 Claude Code 更新日志(在新窗口中打开)",
"readOnlyVolumeTitle": "无法从磁盘映像安装",
"readOnlyVolumeDescription": "请将 Aperant 移动到应用程序文件夹,然后再更新。"
},
"addCompetitor": {
"title": "添加竞争对手",
"description": "添加您已知的竞争对手进行分析...",
"competitorName": "竞争对手名称",
"competitorNamePlaceholder": "例如 Slack、Notion、Figma",
"competitorUrl": "网站 URL",
"competitorUrlPlaceholder": "例如 https://example.com",
"competitorDescription": "描述",
"competitorDescriptionPlaceholder": "简要描述此竞争对手做什么...",
"relevance": "相关性",
"selectRelevance": "选择相关性",
"highRelevance": "高 - 直接竞争对手",
"mediumRelevance": "中 - 部分重叠",
"lowRelevance": "低 - 间接",
"nameRequired": "竞争对手名称是必填项",
"urlRequired": "网站 URL 是必填项",
"invalidUrl": "请输入有效的 URL",
"optional": "可选",
"cancel": "取消",
"adding": "添加中...",
"addCompetitor": "添加竞争对手",
"failedToAdd": "添加竞争对手失败"
},
"competitorAnalysis": {
"title": "启用竞争对手分析?",
"description": "通过竞争对手产品的洞察增强您的路线图",
"whatItDoes": "竞争对手分析的作用:",
"identifiesCompetitors": "根据您的项目类型识别 3-5 个主要竞争对手",
"searchesAppStores": "搜索应用商店、论坛和社交媒体以获取用户反馈和痛点",
"suggestsFeatures": "建议解决竞争对手产品差距的功能",
"webSearchesTitle": "将执行网络搜索",
"webSearchesDescription": "此功能将执行网络搜索以收集竞争对手信息。您的项目名称和类型将用于搜索查询。不会共享任何代码或敏感数据。",
"optionalInfo": "如果您愿意,可以生成果程图而不进行竞争对手分析。路线图仍将基于您的项目结构和最佳实践。",
"skipAnalysis": "不,进行分析",
"enableAnalysis": "是,启用分析",
"knowYourCompetitors": "已经知道您的竞争对手?",
"addThemDirectly": "直接添加它们以提高分析准确性",
"addKnownCompetitors": "添加已知竞争对手",
"addKnownCompetitorsDescription": "手动添加您已知的竞争对手到现有分析中。",
"competitorsAdded": "已添加 {{count}} 个"
},
"existingCompetitorAnalysis": {
"title": "竞争对手分析选项",
"description": "此项目有来自 {{date}} 的现有竞争对手分析",
"recently": "最近",
"useExistingTitle": "使用现有分析",
"recommended": "(推荐)",
"useExistingDescription": "重用您已有的竞争对手洞察。更快且无需额外的网络搜索。",
"runNewTitle": "运行新分析",
"runNewDescription": "执行新的网络搜索以获取最新的竞争对手信息。需要更长时间。",
"skipTitle": "跳过竞争对手分析",
"skipDescription": "在不进行任何竞争对手洞察的情况下生成路线图。",
"cancel": "取消"
},
"versionWarning": {
"title": "需要操作",
"subtitle": "版本 2.7.5 更新",
"description": "由于此版本的身份验证更改,您需要重新验证您的 Claude 个人资料。",
"instructions": "重新验证:",
"step1": "转到设置",
"step2": "导航到应用设置 > 集成",
"step3": "点击您个人资料上的"重新验证"",
"gotIt": "知道了",
"goToSettings": "转到设置"
}
}
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.

⚠️ Potential issue | 🟠 Major

Missing terminal section - will cause translation fallback for Chinese users.

The English taskReview.json contains a terminal section with keys openTerminal, openInbuilt, and openExternal (see apps/desktop/src/shared/i18n/locales/en/taskReview.json lines 2-6). The TerminalDropdown.tsx component uses useTranslation('taskReview') and accesses these keys via t('terminal.openTerminal'), etc.

This Chinese taskReview.json is missing this terminal section, which will cause i18next to fall back to English for these strings when users select Chinese.

🛠️ Proposed fix - add the terminal section

Add the following at the beginning of the JSON object (after line 1):

 {
+  "terminal": {
+    "openTerminal": "打开终端",
+    "openInbuilt": "在内置终端中打开",
+    "openExternal": "在外部终端中打开"
+  },
   "initialize": {

Note: These translations already exist in zh/terminal.json lines 2-6, so you can copy them from there to maintain consistency.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/desktop/src/shared/i18n/locales/zh/taskReview.json` around lines 1 -
239, The Chinese locale
file/apps/desktop/src/shared/i18n/locales/zh/taskReview.json is missing the
"terminal" section used by TerminalDropdown.tsx (it calls
useTranslation('taskReview') and t('terminal.openTerminal') /
t('terminal.openInbuilt') / t('terminal.openExternal')), causing fallback to
English; add a "terminal" object with keys openTerminal, openInbuilt, and
openExternal (you can copy the corresponding translations from zh/terminal.json)
into taskReview.json near the top so the component finds the Chinese strings.

RootInsect and others added 3 commits April 14, 2026 00:03
Fixed 4 JSON syntax errors caused by unescaped curly quotes in string values:
- oauth.fallbackNote: escaped "将此粘贴到 Claude Code"
- oauth.keychainDescription: escaped "始终允许"
- profileCreated.step3: escaped "验证"
- roadmap.archiveFeatureConfirmDescription: escaped "{{title}}"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix JSON parse errors in 6 zh locale files by replacing unescaped
ASCII double quotes inside string values with Unicode escape sequences
(\u201C / \u201D curly quotes):

- gitlab.json: "notInstalled" - \u201C使用 OAuth\u201D
- onboarding.json: "keychainDescription" - \u201C始终允许\u201D
- settings.json: "helpText" - \u201C复制调试信息\u201D (ASCII → corner brackets)
- taskReview.json: "step3" - \u201C重新验证\u201D (ASCII → corner brackets)
- tasks.json: "description", "hint", "fastModeNotice" - \u201C进行中\u201D,
  \u201C额外使用\u201D
- terminal.json: "description", "worktreeExplanation" -
  \u201C{{taskTitle}}\u201D, \u201C删除工作树...\u201D, \u201C仅标记完成\u201D

All zh locale files now parse as valid JSON.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
apps/desktop/src/shared/i18n/locales/zh/taskReview.json (1)

1-13: ⚠️ Potential issue | 🟠 Major

taskReview still missing required terminal subsection

This file still lacks terminal.openTerminal, terminal.openInbuilt, and terminal.openExternal, so consumers of taskReview terminal keys will fallback or miss zh text.

Based on learnings: "Before adding a new language to AVAILABLE_LANGUAGES, ensure UI translations exist and are complete ... and validated."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/desktop/src/shared/i18n/locales/zh/taskReview.json` around lines 1 - 13,
The taskReview locale JSON is missing the terminal subsection keys used by the
UI; add a "terminal" object containing "openTerminal", "openInbuilt", and
"openExternal" with appropriate Chinese translations to the existing taskReview
structure so consumers don't fallback or show missing text—update the taskReview
JSON entry to include terminal.openTerminal, terminal.openInbuilt, and
terminal.openExternal with validated zh strings that match the tone of other
entries (e.g., similar style to "initialize.title"/"description").
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/desktop/src/shared/i18n/locales/zh/taskReview.json`:
- Around line 206-208: The translation for the key skipAnalysis is inverted (it
currently reads "不,进行分析"); update the value for "skipAnalysis" to correctly
indicate skipping (e.g., "不,跳过分析" or similar), ensure "enableAnalysis" remains
the affirmative option ("是,启用分析"), and verify the two labels now correctly
reflect opposite choices so the UI decision button is not misleading.

---

Duplicate comments:
In `@apps/desktop/src/shared/i18n/locales/zh/taskReview.json`:
- Around line 1-13: The taskReview locale JSON is missing the terminal
subsection keys used by the UI; add a "terminal" object containing
"openTerminal", "openInbuilt", and "openExternal" with appropriate Chinese
translations to the existing taskReview structure so consumers don't fallback or
show missing text—update the taskReview JSON entry to include
terminal.openTerminal, terminal.openInbuilt, and terminal.openExternal with
validated zh strings that match the tone of other entries (e.g., similar style
to "initialize.title"/"description").
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: ec7f074c-19e5-4600-855b-382e70ad42f7

📥 Commits

Reviewing files that changed from the base of the PR and between 4a2aa9f and c263e17.

📒 Files selected for processing (7)
  • apps/desktop/src/shared/i18n/locales/zh/common.json
  • apps/desktop/src/shared/i18n/locales/zh/gitlab.json
  • apps/desktop/src/shared/i18n/locales/zh/onboarding.json
  • apps/desktop/src/shared/i18n/locales/zh/settings.json
  • apps/desktop/src/shared/i18n/locales/zh/taskReview.json
  • apps/desktop/src/shared/i18n/locales/zh/tasks.json
  • apps/desktop/src/shared/i18n/locales/zh/terminal.json

Comment on lines +206 to +208
"optionalInfo": "如果您愿意,可以生成果程图而不进行竞争对手分析。路线图仍将基于您的项目结构和最佳实践。",
"skipAnalysis": "不,进行分析",
"enableAnalysis": "是,启用分析",
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.

⚠️ Potential issue | 🟠 Major

skipAnalysis translation is semantically inverted

"skipAnalysis": "不,进行分析" says the opposite of the key. This will mislead users on a decision button.

Proposed fix
-    "skipAnalysis": "不,进行分析",
+    "skipAnalysis": "不,跳过分析",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"optionalInfo": "如果您愿意,可以生成果程图而不进行竞争对手分析。路线图仍将基于您的项目结构和最佳实践。",
"skipAnalysis": "不,进行分析",
"enableAnalysis": "是,启用分析",
"optionalInfo": "如果您愿意,可以生成果程图而不进行竞争对手分析。路线图仍将基于您的项目结构和最佳实践。",
"skipAnalysis": "不,跳过分析",
"enableAnalysis": "是,启用分析",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/desktop/src/shared/i18n/locales/zh/taskReview.json` around lines 206 -
208, The translation for the key skipAnalysis is inverted (it currently reads
"不,进行分析"); update the value for "skipAnalysis" to correctly indicate skipping
(e.g., "不,跳过分析" or similar), ensure "enableAnalysis" remains the affirmative
option ("是,启用分析"), and verify the two labels now correctly reflect opposite
choices so the UI decision button is not misleading.

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