mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-02-24 01:27:42 +00:00
Merge pull request #327 from NobitaYuan/feat/add-i18n
update: Add translations for more components
This commit is contained in:
@@ -19,12 +19,14 @@ import enSettings from './locales/en/settings.json';
|
||||
import enAuth from './locales/en/auth.json';
|
||||
import enSidebar from './locales/en/sidebar.json';
|
||||
import enChat from './locales/en/chat.json';
|
||||
import enCodeEditor from './locales/en/codeEditor.json';
|
||||
|
||||
import zhCommon from './locales/zh-CN/common.json';
|
||||
import zhSettings from './locales/zh-CN/settings.json';
|
||||
import zhAuth from './locales/zh-CN/auth.json';
|
||||
import zhSidebar from './locales/zh-CN/sidebar.json';
|
||||
import zhChat from './locales/zh-CN/chat.json';
|
||||
import zhCodeEditor from './locales/zh-CN/codeEditor.json';
|
||||
|
||||
// Import supported languages configuration
|
||||
import { languages } from './languages.js';
|
||||
@@ -56,6 +58,7 @@ i18n
|
||||
auth: enAuth,
|
||||
sidebar: enSidebar,
|
||||
chat: enChat,
|
||||
codeEditor: enCodeEditor,
|
||||
},
|
||||
'zh-CN': {
|
||||
common: zhCommon,
|
||||
@@ -63,6 +66,7 @@ i18n
|
||||
auth: zhAuth,
|
||||
sidebar: zhSidebar,
|
||||
chat: zhChat,
|
||||
codeEditor: zhCodeEditor,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -76,7 +80,7 @@ i18n
|
||||
debug: import.meta.env.DEV,
|
||||
|
||||
// Namespaces - load only what's needed
|
||||
ns: ['common', 'settings', 'auth', 'sidebar', 'chat'],
|
||||
ns: ['common', 'settings', 'auth', 'sidebar', 'chat', 'codeEditor'],
|
||||
defaultNS: 'common',
|
||||
|
||||
// Key separator for nested keys (default: '.')
|
||||
|
||||
@@ -143,5 +143,63 @@
|
||||
}
|
||||
},
|
||||
"buttonTitle": "Thinking mode: {{mode}}"
|
||||
},
|
||||
"providerSelection": {
|
||||
"title": "Choose Your AI Assistant",
|
||||
"description": "Select a provider to start a new conversation",
|
||||
"selectModel": "Select Model",
|
||||
"providerInfo": {
|
||||
"anthropic": "by Anthropic",
|
||||
"openai": "by OpenAI",
|
||||
"cursorEditor": "AI Code Editor"
|
||||
},
|
||||
"readyPrompt": {
|
||||
"claude": "Ready to use Claude with {{model}}. Start typing your message below.",
|
||||
"cursor": "Ready to use Cursor with {{model}}. Start typing your message below.",
|
||||
"codex": "Ready to use Codex with {{model}}. Start typing your message below.",
|
||||
"default": "Select a provider above to begin"
|
||||
}
|
||||
},
|
||||
"session": {
|
||||
"continue": {
|
||||
"title": "Continue your conversation",
|
||||
"description": "Ask questions about your code, request changes, or get help with development tasks"
|
||||
},
|
||||
"loading": {
|
||||
"olderMessages": "Loading older messages...",
|
||||
"sessionMessages": "Loading session messages..."
|
||||
},
|
||||
"messages": {
|
||||
"showingOf": "Showing {{shown}} of {{total}} messages",
|
||||
"scrollToLoad": "Scroll up to load more",
|
||||
"showingLast": "Showing last {{count}} messages ({{total}} total)",
|
||||
"loadEarlier": "Load earlier messages"
|
||||
}
|
||||
},
|
||||
"shell": {
|
||||
"selectProject": {
|
||||
"title": "Select a Project",
|
||||
"description": "Choose a project to open an interactive shell in that directory"
|
||||
},
|
||||
"status": {
|
||||
"newSession": "New Session",
|
||||
"initializing": "Initializing...",
|
||||
"restarting": "Restarting..."
|
||||
},
|
||||
"actions": {
|
||||
"disconnect": "Disconnect",
|
||||
"disconnectTitle": "Disconnect from shell",
|
||||
"restart": "Restart",
|
||||
"restartTitle": "Restart Shell (disconnect first)",
|
||||
"connect": "Continue in Shell",
|
||||
"connectTitle": "Connect to shell"
|
||||
},
|
||||
"loading": "Loading terminal...",
|
||||
"connecting": "Connecting to shell...",
|
||||
"startSession": "Start a new Claude session",
|
||||
"resumeSession": "Resume session: {{displayName}}...",
|
||||
"runCommand": "Run {{command}} in {{projectName}}",
|
||||
"startCli": "Starting Claude CLI in {{projectName}}",
|
||||
"defaultCommand": "command"
|
||||
}
|
||||
}
|
||||
|
||||
30
src/i18n/locales/en/codeEditor.json
Normal file
30
src/i18n/locales/en/codeEditor.json
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"toolbar": {
|
||||
"changes": "changes",
|
||||
"previousChange": "Previous change",
|
||||
"nextChange": "Next change",
|
||||
"hideDiff": "Hide diff highlighting",
|
||||
"showDiff": "Show diff highlighting",
|
||||
"settings": "Editor Settings",
|
||||
"collapse": "Collapse editor",
|
||||
"expand": "Expand editor to full width"
|
||||
},
|
||||
"loading": "Loading {{fileName}}...",
|
||||
"header": {
|
||||
"showingChanges": "Showing changes"
|
||||
},
|
||||
"actions": {
|
||||
"download": "Download file",
|
||||
"save": "Save",
|
||||
"saving": "Saving...",
|
||||
"saved": "Saved!",
|
||||
"exitFullscreen": "Exit fullscreen",
|
||||
"fullscreen": "Fullscreen",
|
||||
"close": "Close"
|
||||
},
|
||||
"footer": {
|
||||
"lines": "Lines:",
|
||||
"characters": "Characters:",
|
||||
"shortcuts": "Press Ctrl+S to save • Esc to close"
|
||||
}
|
||||
}
|
||||
@@ -186,5 +186,33 @@
|
||||
"providePath": "Please provide a workspace path",
|
||||
"failedToCreate": "Failed to create workspace"
|
||||
}
|
||||
},
|
||||
"versionUpdate": {
|
||||
"title": "Update Available",
|
||||
"newVersionReady": "A new version is ready",
|
||||
"currentVersion": "Current Version",
|
||||
"latestVersion": "Latest Version",
|
||||
"whatsNew": "What's New:",
|
||||
"viewFullRelease": "View full release",
|
||||
"updateProgress": "Update Progress:",
|
||||
"manualUpgrade": "Manual upgrade:",
|
||||
"manualUpgradeHint": "Or click \"Update Now\" to run the update automatically.",
|
||||
"updateCompleted": "Update completed successfully!",
|
||||
"restartServer": "Please restart the server to apply changes.",
|
||||
"updateFailed": "Update failed",
|
||||
"buttons": {
|
||||
"close": "Close",
|
||||
"later": "Later",
|
||||
"copyCommand": "Copy Command",
|
||||
"updateNow": "Update Now",
|
||||
"updating": "Updating..."
|
||||
},
|
||||
"ariaLabels": {
|
||||
"closeModal": "Close version upgrade modal",
|
||||
"showSidebar": "Show sidebar",
|
||||
"settings": "Settings",
|
||||
"updateAvailable": "Update available",
|
||||
"closeSidebar": "Close sidebar"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,24 @@
|
||||
"showThinking": "Show thinking",
|
||||
"autoScrollToBottom": "Auto-scroll to bottom",
|
||||
"sendByCtrlEnter": "Send by Ctrl+Enter",
|
||||
"sendByCtrlEnterDescription": "When enabled, pressing Ctrl+Enter will send the message instead of just Enter. This is useful for IME users to avoid accidental sends."
|
||||
"sendByCtrlEnterDescription": "When enabled, pressing Ctrl+Enter will send the message instead of just Enter. This is useful for IME users to avoid accidental sends.",
|
||||
"dragHandle": {
|
||||
"dragging": "Dragging handle",
|
||||
"closePanel": "Close settings panel",
|
||||
"openPanel": "Open settings panel",
|
||||
"draggingStatus": "Dragging...",
|
||||
"toggleAndMove": "Click to toggle, drag to move"
|
||||
},
|
||||
"whisper": {
|
||||
"modes": {
|
||||
"default": "Default Mode",
|
||||
"defaultDescription": "Direct transcription of your speech",
|
||||
"prompt": "Prompt Enhancement",
|
||||
"promptDescription": "Transform rough ideas into clear, detailed AI prompts",
|
||||
"vibe": "Vibe Mode",
|
||||
"vibeDescription": "Format ideas as clear agent instructions with details"
|
||||
}
|
||||
}
|
||||
},
|
||||
"mainTabs": {
|
||||
"agents": "Agents",
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
"newSession": "New Session",
|
||||
"codexSession": "Codex Session",
|
||||
"fetchingProjects": "Fetching your Claude projects and sessions",
|
||||
"projects": "projects",
|
||||
"noMatchingProjects": "No matching projects",
|
||||
"tryDifferentSearch": "Try adjusting your search term",
|
||||
"runClaudeCli": "Run Claude CLI in a project directory to get started"
|
||||
|
||||
@@ -143,5 +143,63 @@
|
||||
}
|
||||
},
|
||||
"buttonTitle": "思考模式:{{mode}}"
|
||||
},
|
||||
"providerSelection": {
|
||||
"title": "选择您的 AI 助手",
|
||||
"description": "选择一个供应商以开始新对话",
|
||||
"selectModel": "选择模型",
|
||||
"providerInfo": {
|
||||
"anthropic": "Anthropic",
|
||||
"openai": "OpenAI",
|
||||
"cursorEditor": "AI 代码编辑器"
|
||||
},
|
||||
"readyPrompt": {
|
||||
"claude": "已准备好使用 Claude {{model}}。在下方输入您的消息。",
|
||||
"cursor": "已准备好使用 Cursor {{model}}。在下方输入您的消息。",
|
||||
"codex": "已准备好使用 Codex {{model}}。在下方输入您的消息。",
|
||||
"default": "请在上方选择一个供应商以开始"
|
||||
}
|
||||
},
|
||||
"session": {
|
||||
"continue": {
|
||||
"title": "继续您的对话",
|
||||
"description": "询问有关代码的问题、请求更改或获取开发任务的帮助"
|
||||
},
|
||||
"loading": {
|
||||
"olderMessages": "正在加载更早的消息...",
|
||||
"sessionMessages": "正在加载会话消息..."
|
||||
},
|
||||
"messages": {
|
||||
"showingOf": "显示 {{shown}} / {{total}} 条消息",
|
||||
"scrollToLoad": "向上滚动以加载更多",
|
||||
"showingLast": "显示最近 {{count}} 条消息(共 {{total}} 条)",
|
||||
"loadEarlier": "加载更早的消息"
|
||||
}
|
||||
},
|
||||
"shell": {
|
||||
"selectProject": {
|
||||
"title": "选择项目",
|
||||
"description": "选择一个项目以在该目录中打开交互式 Shell"
|
||||
},
|
||||
"status": {
|
||||
"newSession": "新会话",
|
||||
"initializing": "初始化中...",
|
||||
"restarting": "重启中..."
|
||||
},
|
||||
"actions": {
|
||||
"disconnect": "断开连接",
|
||||
"disconnectTitle": "断开 Shell 连接",
|
||||
"restart": "重启",
|
||||
"restartTitle": "重启 Shell(请先断开连接)",
|
||||
"connect": "在 Shell 中继续",
|
||||
"connectTitle": "连接到 Shell"
|
||||
},
|
||||
"loading": "正在加载终端...",
|
||||
"connecting": "正在连接到 Shell...",
|
||||
"startSession": "启动新的 Claude 会话",
|
||||
"resumeSession": "恢复会话:{{displayName}}...",
|
||||
"runCommand": "在 {{projectName}} 中运行 {{command}}",
|
||||
"startCli": "在 {{projectName}} 中启动 Claude CLI",
|
||||
"defaultCommand": "命令"
|
||||
}
|
||||
}
|
||||
|
||||
30
src/i18n/locales/zh-CN/codeEditor.json
Normal file
30
src/i18n/locales/zh-CN/codeEditor.json
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"toolbar": {
|
||||
"changes": "个更改",
|
||||
"previousChange": "上一个更改",
|
||||
"nextChange": "下一个更改",
|
||||
"hideDiff": "隐藏差异高亮",
|
||||
"showDiff": "显示差异高亮",
|
||||
"settings": "编辑器设置",
|
||||
"collapse": "折叠编辑器",
|
||||
"expand": "展开编辑器到全宽"
|
||||
},
|
||||
"loading": "正在加载 {{fileName}}...",
|
||||
"header": {
|
||||
"showingChanges": "显示更改"
|
||||
},
|
||||
"actions": {
|
||||
"download": "下载文件",
|
||||
"save": "保存",
|
||||
"saving": "保存中...",
|
||||
"saved": "已保存!",
|
||||
"exitFullscreen": "退出全屏",
|
||||
"fullscreen": "全屏",
|
||||
"close": "关闭"
|
||||
},
|
||||
"footer": {
|
||||
"lines": "行数:",
|
||||
"characters": "字符数:",
|
||||
"shortcuts": "按 Ctrl+S 保存 • Esc 关闭"
|
||||
}
|
||||
}
|
||||
@@ -186,5 +186,33 @@
|
||||
"providePath": "请提供工作区路径",
|
||||
"failedToCreate": "创建工作区失败"
|
||||
}
|
||||
},
|
||||
"versionUpdate": {
|
||||
"title": "有可用更新",
|
||||
"newVersionReady": "新版本已准备就绪",
|
||||
"currentVersion": "当前版本",
|
||||
"latestVersion": "最新版本",
|
||||
"whatsNew": "新内容:",
|
||||
"viewFullRelease": "查看完整发布",
|
||||
"updateProgress": "更新进度:",
|
||||
"manualUpgrade": "手动升级:",
|
||||
"manualUpgradeHint": "或点击'立即更新'以自动运行更新。",
|
||||
"updateCompleted": "更新成功完成!",
|
||||
"restartServer": "请重启服务器以应用更改。",
|
||||
"updateFailed": "更新失败",
|
||||
"buttons": {
|
||||
"close": "关闭",
|
||||
"later": "稍后",
|
||||
"copyCommand": "复制命令",
|
||||
"updateNow": "立即更新",
|
||||
"updating": "更新中..."
|
||||
},
|
||||
"ariaLabels": {
|
||||
"closeModal": "关闭版本升级模态框",
|
||||
"showSidebar": "显示侧边栏",
|
||||
"settings": "设置",
|
||||
"updateAvailable": "有可用更新",
|
||||
"closeSidebar": "关闭侧边栏"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,24 @@
|
||||
"showThinking": "显示思考过程",
|
||||
"autoScrollToBottom": "自动滚动到底部",
|
||||
"sendByCtrlEnter": "使用 Ctrl+Enter 发送",
|
||||
"sendByCtrlEnterDescription": "启用后,按 Ctrl+Enter 发送消息,而不是仅按 Enter。这对于使用输入法的用户可以避免意外发送。"
|
||||
"sendByCtrlEnterDescription": "启用后,按 Ctrl+Enter 发送消息,而不是仅按 Enter。这对于使用输入法的用户可以避免意外发送。",
|
||||
"dragHandle": {
|
||||
"dragging": "正在拖拽手柄",
|
||||
"closePanel": "关闭设置面板",
|
||||
"openPanel": "打开设置面板",
|
||||
"draggingStatus": "正在拖拽...",
|
||||
"toggleAndMove": "点击切换,拖拽移动"
|
||||
},
|
||||
"whisper": {
|
||||
"modes": {
|
||||
"default": "默认模式",
|
||||
"defaultDescription": "直接转录您的语音",
|
||||
"prompt": "提示词增强",
|
||||
"promptDescription": "将粗略的想法转化为清晰、详细的 AI 提示词",
|
||||
"vibe": "Vibe 模式",
|
||||
"vibeDescription": "将想法格式化为带有详细说明的清晰智能体指令"
|
||||
}
|
||||
}
|
||||
},
|
||||
"mainTabs": {
|
||||
"agents": "智能体",
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
"newSession": "新会话",
|
||||
"codexSession": "Codex 会话",
|
||||
"fetchingProjects": "正在获取您的 Claude 项目和会话",
|
||||
"projects": "项目",
|
||||
"noMatchingProjects": "未找到匹配的项目",
|
||||
"tryDifferentSearch": "尝试调整您的搜索词",
|
||||
"runClaudeCli": "在项目目录中运行 Claude CLI 以开始使用"
|
||||
|
||||
Reference in New Issue
Block a user