From 73375d76536436821a13128443ac54257630ef2f Mon Sep 17 00:00:00 2001 From: YuanNiancai Date: Wed, 21 Jan 2026 14:29:16 +0800 Subject: [PATCH] fix: improve i18n translation strings based on code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refactored translation strings to follow best practices: 1. Removed HTML tags from translation strings (en/chat.json) - Changed "Adds {{entry}}" to "Adds {{entry}}" 2. Simplified TasksSettings.jsx component (TasksSettings.jsx) - Moved command code directly into translation file 3. Updated both English and Chinese translation files - en/chat.json: Removed HTML markup from permissions.addTo - zh-CN/chat.json: Corresponding Chinese translation update - en/settings.json: Added task-master init command -zh-CN/settings.json: Added task-master init command in Chinese 根据代码审查改进 i18n 翻译字符串: 1. 从翻译字符串中移除 HTML 标签(en/chat.json) - 将 "Adds {{entry}}" 改为 "Adds {{entry}}" 2. 简化 TasksSettings.jsx 组件 - 将命令代码直接移到翻译文件中 3. 更新英文和中文翻译文件 - en/chat.json: 从 permissions.addTo 移除 HTML 标记 - zh-CN/chat.json: 对应的中文翻译更新 - en/settings.json: 添加 task-master init 命令 - zh-CN/settings.json: 添加 task-master init 命令的中文翻译 --- src/components/TasksSettings.jsx | 2 +- src/i18n/locales/en/chat.json | 2 +- src/i18n/locales/en/settings.json | 2 +- src/i18n/locales/zh-CN/chat.json | 2 +- src/i18n/locales/zh-CN/settings.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/TasksSettings.jsx b/src/components/TasksSettings.jsx index dda0cf1..99f35c3 100644 --- a/src/components/TasksSettings.jsx +++ b/src/components/TasksSettings.jsx @@ -65,7 +65,7 @@ function TasksSettings() {
  1. {t('tasks.notInstalled.steps.restart')}
  2. {t('tasks.notInstalled.steps.autoAvailable')}
  3. -
  4. Use task-master init {t('tasks.notInstalled.steps.initCommand')}
  5. +
  6. {t('tasks.notInstalled.steps.initCommand')}
diff --git a/src/i18n/locales/en/chat.json b/src/i18n/locales/en/chat.json index 4083a49..d612791 100644 --- a/src/i18n/locales/en/chat.json +++ b/src/i18n/locales/en/chat.json @@ -61,7 +61,7 @@ "permissions": { "grant": "Grant permission for {{tool}}", "added": "Permission added", - "addTo": "Adds {{entry}} to Allowed Tools.", + "addTo": "Adds {{entry}} to Allowed Tools.", "retry": "Permission saved. Retry the request to use the tool.", "error": "Unable to update permissions. Please try again.", "openSettings": "Open settings" diff --git a/src/i18n/locales/en/settings.json b/src/i18n/locales/en/settings.json index b8a5f71..c015592 100644 --- a/src/i18n/locales/en/settings.json +++ b/src/i18n/locales/en/settings.json @@ -168,7 +168,7 @@ }, "git": { "title": "Git Configuration", - "description": "Configure your git identity for commits. These settings will be applied globally via git config --global", + "description": "Configure your git identity for commits. These settings will be applied globally via git config --global", "name": { "label": "Git Name", "help": "Your name for git commits" diff --git a/src/i18n/locales/zh-CN/chat.json b/src/i18n/locales/zh-CN/chat.json index 6f20225..ef73178 100644 --- a/src/i18n/locales/zh-CN/chat.json +++ b/src/i18n/locales/zh-CN/chat.json @@ -61,7 +61,7 @@ "permissions": { "grant": "授予 {{tool}} 权限", "added": "权限已添加", - "addTo": "将 {{entry}} 添加到允许的工具。", + "addTo": "将 {{entry}} 添加到允许的工具。", "retry": "权限已保存。重试请求以使用该工具。", "error": "无法更新权限。请重试。", "openSettings": "打开设置" diff --git a/src/i18n/locales/zh-CN/settings.json b/src/i18n/locales/zh-CN/settings.json index f8a60f2..9aaaec9 100644 --- a/src/i18n/locales/zh-CN/settings.json +++ b/src/i18n/locales/zh-CN/settings.json @@ -168,7 +168,7 @@ }, "git": { "title": "Git 配置", - "description": "配置您的 git 提交身份。这些设置将通过 git config --global 全局应用", + "description": "配置您的 git 提交身份。这些设置将通过 git config --global 全局应用", "name": { "label": "Git 名称", "help": "您的 git 提交名称"