mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-01-23 09:57:32 +00:00
fix: improve i18n translation strings based on code review
Refactored translation strings to follow best practices:
1. Removed HTML tags from translation strings (en/chat.json)
- Changed "Adds <span class=\"font-mono\">{{entry}}</span>" 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 <span class=\"font-mono\">{{entry}}</span>" 改为 "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 命令的中文翻译
This commit is contained in:
@@ -65,7 +65,7 @@ function TasksSettings() {
|
||||
<ol className="list-decimal list-inside space-y-1 text-xs">
|
||||
<li>{t('tasks.notInstalled.steps.restart')}</li>
|
||||
<li>{t('tasks.notInstalled.steps.autoAvailable')}</li>
|
||||
<li>Use <code className="bg-orange-100 dark:bg-orange-800 px-1 rounded">task-master init</code> {t('tasks.notInstalled.steps.initCommand')}</li>
|
||||
<li>{t('tasks.notInstalled.steps.initCommand')}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
"permissions": {
|
||||
"grant": "Grant permission for {{tool}}",
|
||||
"added": "Permission added",
|
||||
"addTo": "Adds <span class=\"font-mono\">{{entry}}</span> 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"
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
},
|
||||
"git": {
|
||||
"title": "Git Configuration",
|
||||
"description": "Configure your git identity for commits. These settings will be applied globally via <code />git config --global<code />",
|
||||
"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"
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
"permissions": {
|
||||
"grant": "授予 {{tool}} 权限",
|
||||
"added": "权限已添加",
|
||||
"addTo": "将 <span class=\"font-mono\">{{entry}}</span> 添加到允许的工具。",
|
||||
"addTo": "将 {{entry}} 添加到允许的工具。",
|
||||
"retry": "权限已保存。重试请求以使用该工具。",
|
||||
"error": "无法更新权限。请重试。",
|
||||
"openSettings": "打开设置"
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
},
|
||||
"git": {
|
||||
"title": "Git 配置",
|
||||
"description": "配置您的 git 提交身份。这些设置将通过 <code />git config --global<code /> 全局应用",
|
||||
"description": "配置您的 git 提交身份。这些设置将通过 git config --global 全局应用",
|
||||
"name": {
|
||||
"label": "Git 名称",
|
||||
"help": "您的 git 提交名称"
|
||||
|
||||
Reference in New Issue
Block a user