From f84509c824f2bb9d1e8b7b89893013e154560189 Mon Sep 17 00:00:00 2001 From: one Date: Wed, 16 Jul 2025 17:44:07 +0800 Subject: [PATCH] chore: update check-i18n scripts and remove duplicate keys (#8203) --- scripts/check-i18n.js | 119 ++++++++-- scripts/check-i18n.ts | 47 +++- src/renderer/src/i18n/locales/en-us.json | 204 +---------------- src/renderer/src/i18n/locales/ja-jp.json | 213 +----------------- src/renderer/src/i18n/locales/ru-ru.json | 211 +---------------- src/renderer/src/i18n/locales/zh-cn.json | 206 +---------------- src/renderer/src/i18n/locales/zh-tw.json | 211 +---------------- .../src/pages/settings/GeneralSettings.tsx | 2 +- 8 files changed, 173 insertions(+), 1040 deletions(-) diff --git a/scripts/check-i18n.js b/scripts/check-i18n.js index dd36c2670d..9c99fc9ae0 100644 --- a/scripts/check-i18n.js +++ b/scripts/check-i18n.js @@ -1,9 +1,60 @@ 'use strict' +var __createBinding = + (this && this.__createBinding) || + (Object.create + ? function (o, m, k, k2) { + if (k2 === undefined) k2 = k + var desc = Object.getOwnPropertyDescriptor(m, k) + if (!desc || ('get' in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { + enumerable: true, + get: function () { + return m[k] + } + } + } + Object.defineProperty(o, k2, desc) + } + : function (o, m, k, k2) { + if (k2 === undefined) k2 = k + o[k2] = m[k] + }) +var __setModuleDefault = + (this && this.__setModuleDefault) || + (Object.create + ? function (o, v) { + Object.defineProperty(o, 'default', { enumerable: true, value: v }) + } + : function (o, v) { + o['default'] = v + }) +var __importStar = + (this && this.__importStar) || + (function () { + var ownKeys = function (o) { + ownKeys = + Object.getOwnPropertyNames || + function (o) { + var ar = [] + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k + return ar + } + return ownKeys(o) + } + return function (mod) { + if (mod && mod.__esModule) return mod + var result = {} + if (mod != null) + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== 'default') __createBinding(result, mod, k[i]) + __setModuleDefault(result, mod) + return result + } + })() Object.defineProperty(exports, '__esModule', { value: true }) -var fs = require('fs') -var path = require('path') +var fs = __importStar(require('fs')) +var path = __importStar(require('path')) var translationsDir = path.join(__dirname, '../src/renderer/src/i18n/locales') -var baseLocale = 'en-us' +var baseLocale = 'zh-cn' var baseFileName = ''.concat(baseLocale, '.json') var baseFilePath = path.join(translationsDir, baseFileName) /** @@ -48,12 +99,43 @@ function syncRecursively(target, template) { } return isUpdated } +/** + * 检查 JSON 对象中是否存在重复键,并收集所有重复键 + * @param obj 要检查的对象 + * @returns 返回重复键的数组(若无重复则返回空数组) + */ +function checkDuplicateKeys(obj) { + var keys = new Set() + var duplicateKeys = [] + var checkObject = function (obj, path) { + if (path === void 0) { + path = '' + } + for (var key in obj) { + var fullPath = path ? ''.concat(path, '.').concat(key) : key + if (keys.has(fullPath)) { + // 发现重复键时,添加到数组中(避免重复添加) + if (!duplicateKeys.includes(fullPath)) { + duplicateKeys.push(fullPath) + } + } else { + keys.add(fullPath) + } + // 递归检查子对象 + if (typeof obj[key] === 'object' && obj[key] !== null) { + checkObject(obj[key], fullPath) + } + } + } + checkObject(obj) + return duplicateKeys +} function syncTranslations() { if (!fs.existsSync(baseFilePath)) { console.error( '\u4E3B\u6A21\u677F\u6587\u4EF6 '.concat( baseFileName, - ' \u4E0D\u5B58\u5728\uFF0C\u8BF7\u68C0\u67E5\u8DEF\u5F84\u6216\u6587\u4EF6\u540D\u3002' + ' \u4E0D\u5B58\u5728\uFF0C\u8BF7\u68C0\u67E5\u8DEF\u5F84\u6216\u6587\u4EF6\u540D' ) ) return @@ -63,9 +145,18 @@ function syncTranslations() { try { baseJson = JSON.parse(baseContent) } catch (error) { - console.error('\u89E3\u6790 '.concat(baseFileName, ' \u51FA\u9519:'), error) + console.error('\u89E3\u6790 '.concat(baseFileName, ' \u51FA\u9519\u3002').concat(error)) return } + // 检查主模板是否存在重复键 + var duplicateKeys = checkDuplicateKeys(baseJson) + if (duplicateKeys.length > 0) { + throw new Error( + '\u4E3B\u6A21\u677F\u6587\u4EF6 ' + .concat(baseFileName, ' \u5B58\u5728\u4EE5\u4E0B\u91CD\u590D\u952E\uFF1A\n') + .concat(duplicateKeys.join('\n')) + ) + } var files = fs.readdirSync(translationsDir).filter(function (file) { return file.endsWith('.json') && file !== baseFileName }) @@ -77,27 +168,19 @@ function syncTranslations() { var fileContent = fs.readFileSync(filePath, 'utf-8') targetJson = JSON.parse(fileContent) } catch (error) { - console.error( - '\u89E3\u6790 '.concat( - file, - ' \u51FA\u9519\uFF0C\u8DF3\u8FC7\u6B64\u6587\u4EF6\u3002\u9519\u8BEF\u4FE1\u606F:' - ), - error - ) + console.error('\u89E3\u6790 '.concat(file, ' \u51FA\u9519\uFF0C\u8DF3\u8FC7\u6B64\u6587\u4EF6\u3002'), error) continue } var isUpdated = syncRecursively(targetJson, baseJson) if (isUpdated) { try { - fs.writeFileSync(filePath, JSON.stringify(targetJson, null, 2), 'utf-8') - console.log( - '\u6587\u4EF6 '.concat(file, ' \u5DF2\u66F4\u65B0\u540C\u6B65\u4E3B\u6A21\u677F\u7684\u5185\u5BB9\u3002') - ) + fs.writeFileSync(filePath, JSON.stringify(targetJson, null, 2) + '\n', 'utf-8') + console.log('\u6587\u4EF6 '.concat(file, ' \u5DF2\u66F4\u65B0\u540C\u6B65\u4E3B\u6A21\u677F\u7684\u5185\u5BB9')) } catch (error) { - console.error('\u5199\u5165 '.concat(file, ' \u51FA\u9519:'), error) + console.error('\u5199\u5165 '.concat(file, ' \u51FA\u9519\u3002').concat(error)) } } else { - console.log('\u6587\u4EF6 '.concat(file, ' \u65E0\u9700\u66F4\u65B0\u3002')) + console.log('\u6587\u4EF6 '.concat(file, ' \u65E0\u9700\u66F4\u65B0')) } } } diff --git a/scripts/check-i18n.ts b/scripts/check-i18n.ts index 915aa31f4f..238b3ca99f 100644 --- a/scripts/check-i18n.ts +++ b/scripts/check-i18n.ts @@ -2,7 +2,7 @@ import * as fs from 'fs' import * as path from 'path' const translationsDir = path.join(__dirname, '../src/renderer/src/i18n/locales') -const baseLocale = 'zh-CN' +const baseLocale = 'zh-cn' const baseFileName = `${baseLocale}.json` const baseFilePath = path.join(translationsDir, baseFileName) @@ -52,6 +52,39 @@ function syncRecursively(target: any, template: any): boolean { return isUpdated } +/** + * 检查 JSON 对象中是否存在重复键,并收集所有重复键 + * @param obj 要检查的对象 + * @returns 返回重复键的数组(若无重复则返回空数组) + */ +function checkDuplicateKeys(obj: Record): string[] { + const keys = new Set() + const duplicateKeys: string[] = [] + + const checkObject = (obj: Record, path: string = '') => { + for (const key in obj) { + const fullPath = path ? `${path}.${key}` : key + + if (keys.has(fullPath)) { + // 发现重复键时,添加到数组中(避免重复添加) + if (!duplicateKeys.includes(fullPath)) { + duplicateKeys.push(fullPath) + } + } else { + keys.add(fullPath) + } + + // 递归检查子对象 + if (typeof obj[key] === 'object' && obj[key] !== null) { + checkObject(obj[key], fullPath) + } + } + } + + checkObject(obj) + return duplicateKeys +} + function syncTranslations() { if (!fs.existsSync(baseFilePath)) { console.error(`主模板文件 ${baseFileName} 不存在,请检查路径或文件名`) @@ -63,10 +96,16 @@ function syncTranslations() { try { baseJson = JSON.parse(baseContent) } catch (error) { - console.error(`解析 ${baseFileName} 出错:`, error) + console.error(`解析 ${baseFileName} 出错。${error}`) return } + // 检查主模板是否存在重复键 + const duplicateKeys = checkDuplicateKeys(baseJson) + if (duplicateKeys.length > 0) { + throw new Error(`主模板文件 ${baseFileName} 存在以下重复键:\n${duplicateKeys.join('\n')}`) + } + const files = fs.readdirSync(translationsDir).filter((file) => file.endsWith('.json') && file !== baseFileName) for (const file of files) { @@ -76,7 +115,7 @@ function syncTranslations() { const fileContent = fs.readFileSync(filePath, 'utf-8') targetJson = JSON.parse(fileContent) } catch (error) { - console.error(`解析 ${file} 出错,跳过此文件。错误信息:`, error) + console.error(`解析 ${file} 出错,跳过此文件。`, error) continue } @@ -87,7 +126,7 @@ function syncTranslations() { fs.writeFileSync(filePath, JSON.stringify(targetJson, null, 2) + '\n', 'utf-8') console.log(`文件 ${file} 已更新同步主模板的内容`) } catch (error) { - console.error(`写入 ${file} 出错:`, error) + console.error(`写入 ${file} 出错。${error}`) } } else { console.log(`文件 ${file} 无需更新`) diff --git a/src/renderer/src/i18n/locales/en-us.json b/src/renderer/src/i18n/locales/en-us.json index db307f3b8f..20aa889fff 100644 --- a/src/renderer/src/i18n/locales/en-us.json +++ b/src/renderer/src/i18n/locales/en-us.json @@ -265,14 +265,6 @@ "select.content.tip": "Selected {{count}} items, text types will be merged and saved as one note" }, "settings.code.title": "Code Block Settings", - "settings.code_cache_max_size": "Max cache size", - "settings.code_cache_max_size.tip": "The maximum number of characters allowed to be cached (thousand characters), calculated according to the highlighted code. The length of the highlighted code is much longer than the pure text.", - "settings.code_cache_threshold": "Cache threshold", - "settings.code_cache_threshold.tip": "The minimum number of characters allowed to be cached (thousand characters), calculated according to the actual code. Only code blocks exceeding the threshold will be cached.", - "settings.code_cache_ttl": "Cache TTL", - "settings.code_cache_ttl.tip": "Cache expiration time (minutes)", - "settings.code_cacheable": "Code block cache", - "settings.code_cacheable.tip": "Caching code blocks can reduce the rendering time of long code blocks, but it will increase memory usage", "settings.code_collapsible": "Code block collapsible", "settings.code_editor": { "autocompletion": "Autocompletion", @@ -2235,9 +2227,8 @@ "system": "System Proxy", "title": "Proxy Mode" }, - "title": "Proxy Settings" + "address": "Proxy Address" }, - "proxy.title": "Proxy Address", "quickAssistant": { "click_tray_to_show": "Click the tray icon to start", "enable_quick_assistant": "Enable Quick Assistant", @@ -2463,199 +2454,6 @@ "show_window": "Show Window", "visualization": "Visualization" }, - "update": { - "title": "Update", - "message": "New version {{version}} is ready, do you want to install it now?", - "later": "Later", - "install": "Install", - "noReleaseNotes": "No release notes" - }, - "selection": { - "name": "Selection Assistant", - "action": { - "builtin": { - "translate": "Translate", - "explain": "Explain", - "summary": "Summarize", - "search": "Search", - "refine": "Refine", - "copy": "Copy", - "quote": "Quote" - }, - "window": { - "pin": "Pin", - "pinned": "Pinned", - "opacity": "Window Opacity", - "original_show": "Show Original", - "original_hide": "Hide Original", - "original_copy": "Copy Original", - "esc_close": "Esc: Close", - "esc_stop": "Esc: Stop", - "c_copy": "C: Copy", - "r_regenerate": "R: Regenerate" - }, - "translate": { - "smart_translate_tips": "Smart Translation: Content will be translated to the target language first; content already in the target language will be translated to the alternative language" - } - }, - "settings": { - "experimental": "Experimental Features", - "enable": { - "title": "Enable", - "description": "Currently only supported on Windows & macOS", - "mac_process_trust_hint": { - "title": "Accessibility Permission", - "description": [ - "Selection Assistant requires Accessibility Permission to work properly.", - "Please click \"Go to Settings\" and click the \"Open System Settings\" button in the permission request popup that appears later. Then find \"Cherry Studio\" in the application list that appears later and turn on the permission switch.", - "After completing the settings, please reopen the selection assistant." - ], - "button": { - "open_accessibility_settings": "Open Accessibility Settings", - "go_to_settings": "Go to Settings" - } - } - }, - "toolbar": { - "title": "Toolbar", - "trigger_mode": { - "title": "Trigger Mode", - "description": "The way to trigger the selection assistant and show the toolbar", - "description_note": { - "windows": "Some applications do not support selecting text with the Ctrl key. If you have remapped the Ctrl key using tools like AHK, it may cause some applications to fail to select text.", - "mac": "If you have remapped the ⌘ key using shortcuts or keyboard mapping tools, it may cause some applications to fail to select text." - }, - "selected": "Selection", - "selected_note": "Show toolbar immediately when text is selected", - "ctrlkey": "Ctrl Key", - "ctrlkey_note": "After selection, hold down the Ctrl key to show the toolbar", - "shortcut": "Shortcut", - "shortcut_note": "After selection, use shortcut to show the toolbar. Please set the shortcut in the shortcut settings page and enable it. ", - "shortcut_link": "Go to Shortcut Settings" - }, - "compact_mode": { - "title": "Compact Mode", - "description": "In compact mode, only icons are displayed without text" - } - }, - "window": { - "title": "Action Window", - "follow_toolbar": { - "title": "Follow Toolbar", - "description": "Window position will follow the toolbar. When disabled, it will always be centered." - }, - "remember_size": { - "title": "Remember Size", - "description": "Window will display at the last adjusted size during the application running" - }, - "auto_close": { - "title": "Auto Close", - "description": "Automatically close the window when it's not pinned and loses focus" - }, - "auto_pin": { - "title": "Auto Pin", - "description": "Pin the window by default" - }, - "opacity": { - "title": "Opacity", - "description": "Set the default opacity of the window, 100% is fully opaque" - } - }, - "actions": { - "title": "Actions", - "custom": "Custom Action", - "reset": { - "button": "Reset", - "tooltip": "Reset to default actions. Custom actions will not be deleted.", - "confirm": "Are you sure you want to reset to default actions? Custom actions will not be deleted." - }, - "add_tooltip": { - "enabled": "Add Custom Action", - "disabled": "Maximum number of custom actions reached ({{max}})" - }, - "delete_confirm": "Are you sure you want to delete this custom action?", - "drag_hint": "Drag to reorder. Move above to enable action ({{enabled}}/{{max}})" - }, - "advanced": { - "title": "Advanced", - "filter_mode": { - "title": "Application Filter", - "description": "Can limit the selection assistant to only work in specific applications (whitelist) or not work (blacklist)", - "default": "Off", - "whitelist": "Whitelist", - "blacklist": "Blacklist" - }, - "filter_list": { - "title": "Filter List", - "description": "Advanced feature, recommended for users with experience" - } - }, - "user_modal": { - "title": { - "add": "Add Custom Action", - "edit": "Edit Custom Action" - }, - "name": { - "label": "Name", - "hint": "Please enter action name" - }, - "icon": { - "label": "Icon", - "placeholder": "Enter Lucide icon name", - "error": "Invalid icon name, please check your input", - "tooltip": "Lucide icon names are lowercase, e.g. arrow-right", - "view_all": "View All Icons", - "random": "Random Icon" - }, - "model": { - "label": "Model", - "tooltip": "Using Assistant: Will use both the assistant's system prompt and model parameters", - "default": "Default Model", - "assistant": "Use Assistant" - }, - "assistant": { - "label": "Select Assistant", - "default": "Default" - }, - "prompt": { - "label": "User Prompt", - "tooltip": "User prompt serves as a supplement to user input and won't override the assistant's system prompt", - "placeholder": "Use placeholder {{text}} to represent selected text. When empty, selected text will be appended to this prompt", - "placeholder_text": "Placeholder", - "copy_placeholder": "Copy Placeholder" - } - }, - "search_modal": { - "title": "Set Search Engine", - "engine": { - "label": "Search Engine", - "custom": "Custom" - }, - "custom": { - "name": { - "label": "Custom Name", - "hint": "Please enter search engine name", - "max_length": "Name cannot exceed 16 characters" - }, - "url": { - "label": "Custom Search URL", - "hint": "Use {{queryString}} to represent the search term", - "required": "Please enter search URL", - "invalid_format": "Please enter a valid URL starting with http:// or https://", - "missing_placeholder": "URL must contain {{queryString}} placeholder" - }, - "test": "Test" - } - }, - "filter_modal": { - "title": "Application Filter List", - "user_tips": { - "windows": "Please enter the executable file name of the application, one per line, case insensitive, can be fuzzy matched. For example: chrome.exe, weixin.exe, Cherry Studio.exe, etc.", - "mac": "Please enter the Bundle ID of the application, one per line, case insensitive, can be fuzzy matched. For example: com.google.Chrome, com.apple.mail, etc." - } - } - } - }, "memory": { "title": "Memories", "actions": "Actions", diff --git a/src/renderer/src/i18n/locales/ja-jp.json b/src/renderer/src/i18n/locales/ja-jp.json index db0ef19f87..a58faf34f2 100644 --- a/src/renderer/src/i18n/locales/ja-jp.json +++ b/src/renderer/src/i18n/locales/ja-jp.json @@ -264,14 +264,6 @@ "select.content.tip": "{{count}}項目が選択されました。テキストタイプは統合されて1つのノートとして保存されます" }, "settings.code.title": "コード設定", - "settings.code_cache_max_size": "キャッシュ上限", - "settings.code_cache_max_size.tip": "キャッシュできる文字数の上限(千字符)。ハイライトされたコードの長さは純粋なテキストよりもはるかに長くなります。", - "settings.code_cache_threshold": "キャッシュ閾値", - "settings.code_cache_threshold.tip": "キャッシュできる最小のコード長(千字符)。キャッシュできる最小のコード長を超えたコードブロックのみがキャッシュされます。", - "settings.code_cache_ttl": "キャッシュ期限", - "settings.code_cache_ttl.tip": "キャッシュの有効期限(分単位)。", - "settings.code_cacheable": "コードブロックキャッシュ", - "settings.code_cacheable.tip": "コードブロックのキャッシュは長いコードブロックのレンダリング時間を短縮できますが、メモリ使用量が増加します", "settings.code_collapsible": "コードブロック折り畳み", "settings.code_editor": { "autocompletion": "自動補完", @@ -1770,6 +1762,13 @@ "addServer.importFrom.invalid": "無効な入力です。JSON形式を確認してください。", "addServer.importFrom.nameExists": "サーバーはすでに存在します: {{name}}", "addServer.importFrom.oneServer": "一度に1つのMCPサーバー設定のみを保存できます", + "addServer.importFrom.method": "インポート方法", + "addServer.importFrom.dxtFile": "DXTパッケージファイル", + "addServer.importFrom.dxtHelp": "MCPサーバーパッケージを含む.dxtファイルを選択", + "addServer.importFrom.selectDxtFile": "DXTファイルを選択", + "addServer.importFrom.noDxtFile": "DXTファイルを選択してください", + "addServer.importFrom.dxtProcessFailed": "DXTファイルの処理に失敗しました", + "addServer.importFrom.dxt": "DXTパッケージをインポート", "addServer.importFrom.placeholder": "MCPサーバーJSON設定を貼り付け", "addServer.importFrom.tooltip": "MCPサーバー紹介ページから設定JSON(NPXまたはUVX設定を優先)をコピーし、入力ボックスに貼り付けてください。", "addSuccess": "サーバーが正常に追加されました", @@ -2228,9 +2227,8 @@ "system": "システムプロキシ", "title": "プロキシモード" }, - "title": "プロキシ設定" + "address": "プロキシアドレス" }, - "proxy.title": "プロキシアドレス", "quickAssistant": { "click_tray_to_show": "トレイアイコンをクリックして起動", "enable_quick_assistant": "クイックアシスタントを有効にする", @@ -2456,199 +2454,6 @@ "show_window": "ウィンドウを表示", "visualization": "可視化" }, - "update": { - "title": "更新", - "message": "新バージョン {{version}} が利用可能です。今すぐインストールしますか?", - "later": "後で", - "install": "今すぐインストール", - "noReleaseNotes": "暫無更新日誌" - }, - "selection": { - "name": "テキスト選択ツール", - "action": { - "builtin": { - "translate": "翻訳", - "explain": "解説", - "summary": "要約", - "search": "検索", - "refine": "最適化", - "copy": "コピー", - "quote": "引用" - }, - "window": { - "pin": "最前面に固定", - "pinned": "固定中", - "opacity": "ウィンドウの透過度", - "original_show": "原文を表示", - "original_hide": "原文を非表示", - "original_copy": "原文をコピー", - "esc_close": "Escで閉じる", - "esc_stop": "Escで停止", - "c_copy": "Cでコピー", - "r_regenerate": "Rで再生成" - }, - "translate": { - "smart_translate_tips": "スマート翻訳:内容は優先的に目標言語に翻訳されます。すでに目標言語の場合は、備用言語に翻訳されます。" - } - }, - "settings": { - "experimental": "実験的機能", - "enable": { - "title": "有効化", - "description": "現在Windows & macOSのみ対応", - "mac_process_trust_hint": { - "title": "アクセシビリティー権限", - "description": [ - "テキスト選択ツールは、アクセシビリティー権限が必要です。", - "「設定に移動」をクリックし、後で表示される権限要求ポップアップで「システム設定を開く」ボタンをクリックします。その後、表示されるアプリケーションリストで「Cherry Studio」を見つけ、権限スイッチをオンにしてください。", - "設定が完了したら、テキスト選択ツールを再起動してください。" - ], - "button": { - "open_accessibility_settings": "アクセシビリティー設定を開く", - "go_to_settings": "設定に移動" - } - } - }, - "toolbar": { - "title": "ツールバー", - "trigger_mode": { - "title": "単語の取り出し方", - "description": "テキスト選択後、取詞ツールバーを表示する方法", - "description_note": { - "windows": "一部のアプリケーションでは、Ctrl キーでテキストを選択できません。AHK などのツールを使用して Ctrl キーを再マップした場合、一部のアプリケーションでテキスト選択が失敗する可能性があります。", - "mac": "一部のアプリケーションでは、⌘ キーでテキストを選択できません。ショートカットキーまたはキーボードマッピングツールを使用して ⌘ キーを再マップした場合、一部のアプリケーションでテキスト選択が失敗する可能性があります。" - }, - "selected": "選択時", - "selected_note": "テキスト選択時に即時表示", - "ctrlkey": "Ctrlキー", - "ctrlkey_note": "テキスト選択後、Ctrlキーを押下して表示", - "shortcut": "ショートカットキー", - "shortcut_note": "テキスト選択後、ショートカットキーを押下して表示。ショートカットキーを設定するには、ショートカット設定ページで有効にしてください。", - "shortcut_link": "ショートカット設定ページに移動" - }, - "compact_mode": { - "title": "コンパクトモード", - "description": "アイコンのみ表示(テキスト非表示)" - } - }, - "window": { - "title": "機能ウィンドウ", - "follow_toolbar": { - "title": "ツールバーに追従", - "description": "ウィンドウ位置をツールバーに連動(無効時は中央表示)" - }, - "remember_size": { - "title": "サイズを記憶", - "description": "アプリケーション実行中、ウィンドウは最後に調整されたサイズで表示されます" - }, - "auto_close": { - "title": "自動閉じる", - "description": "最前面固定されていない場合、フォーカス喪失時に自動閉じる" - }, - "auto_pin": { - "title": "自動で最前面に固定", - "description": "デフォルトで最前面表示" - }, - "opacity": { - "title": "透明度", - "description": "デフォルトの透明度を設定(100%は完全不透明)" - } - }, - "actions": { - "title": "機能設定", - "custom": "カスタム機能", - "reset": { - "button": "リセット", - "tooltip": "デフォルト機能にリセット(カスタム機能は保持)", - "confirm": "デフォルト機能にリセットしますか?\nカスタム機能は削除されません" - }, - "add_tooltip": { - "enabled": "カスタム機能を追加", - "disabled": "カスタム機能の上限に達しました (最大{{max}}個)" - }, - "delete_confirm": "このカスタム機能を削除しますか?", - "drag_hint": "ドラッグで並べ替え (有効{{enabled}}/最大{{max}})" - }, - "advanced": { - "title": "進階", - "filter_mode": { - "title": "アプリケーションフィルター", - "description": "特定のアプリケーションでのみ選択ツールを有効にするか、無効にするかを選択できます。", - "default": "オフ", - "whitelist": "ホワイトリスト", - "blacklist": "ブラックリスト" - }, - "filter_list": { - "title": "フィルターリスト", - "description": "進階機能です。経験豊富なユーザー向けです。" - } - }, - "user_modal": { - "title": { - "add": "カスタム機能追加", - "edit": "カスタム機能編集" - }, - "name": { - "label": "機能名", - "hint": "機能名を入力" - }, - "icon": { - "label": "アイコン", - "placeholder": "Lucideアイコン名を入力", - "error": "無効なアイコン名です", - "tooltip": "例: arrow-right(小文字で入力)", - "view_all": "全アイコンを表示", - "random": "ランダム選択" - }, - "model": { - "label": "モデル", - "tooltip": "アシスタント使用時はシステムプロンプトとモデルパラメータも適用", - "default": "デフォルトモデル", - "assistant": "アシスタントを使用" - }, - "assistant": { - "label": "アシスタント選択", - "default": "デフォルト" - }, - "prompt": { - "label": "ユーザープロンプト", - "tooltip": "アシスタントのシステムプロンプトを上書きせず、入力補助として機能", - "placeholder": "{{text}}で選択テキストを参照(未入力時は末尾に追加)", - "placeholder_text": "プレースホルダー", - "copy_placeholder": "プレースホルダーをコピー" - } - }, - "search_modal": { - "title": "検索エンジン設定", - "engine": { - "label": "検索エンジン", - "custom": "カスタム" - }, - "custom": { - "name": { - "label": "表示名", - "hint": "検索エンジン名(16文字以内)", - "max_length": "16文字以内で入力" - }, - "url": { - "label": "検索URL", - "hint": "{{queryString}}で検索語を表す", - "required": "URLを入力してください", - "invalid_format": "http:// または https:// で始まるURLを入力", - "missing_placeholder": "{{queryString}}を含めてください" - }, - "test": "テスト" - } - }, - "filter_modal": { - "title": "アプリケーションフィルターリスト", - "user_tips": { - "windows": "アプリケーションの実行ファイル名を1行ずつ入力してください。大文字小文字は区別しません。例: chrome.exe, weixin.exe, Cherry Studio.exe, など。", - "mac": "アプリケーションのBundle IDを1行ずつ入力してください。大文字小文字は区別しません。例: com.google.Chrome, com.apple.mail, など。" - } - } - } - }, "memory": { "add_memory": "メモリーを追加", "edit_memory": "メモリーを編集", @@ -2755,4 +2560,4 @@ "stored_memories": "保存された記憶" } } -} \ No newline at end of file +} diff --git a/src/renderer/src/i18n/locales/ru-ru.json b/src/renderer/src/i18n/locales/ru-ru.json index 476d4a8836..f9831b64ef 100644 --- a/src/renderer/src/i18n/locales/ru-ru.json +++ b/src/renderer/src/i18n/locales/ru-ru.json @@ -264,14 +264,6 @@ "select.content.tip": "Выбрано {{count}} элементов, текстовые типы будут объединены и сохранены как одна заметка" }, "settings.code.title": "Настройки кода", - "settings.code_cache_max_size": "Максимальный размер кэша", - "settings.code_cache_max_size.tip": "Максимальное количество символов, которое может быть кэшировано (тысяч символов), рассчитывается по кэшированному коду. Длина кэшированного кода значительно превышает длину чистого текста.", - "settings.code_cache_threshold": "Пороговое значение кэша", - "settings.code_cache_threshold.tip": "Минимальное количество символов для кэширования (тысяч символов), рассчитывается по фактическому коду. Будут кэшированы только те блоки кода, которые превышают пороговое значение", - "settings.code_cache_ttl": "Время жизни кэша", - "settings.code_cache_ttl.tip": "Время жизни кэша (минуты)", - "settings.code_cacheable": "Кэш блока кода", - "settings.code_cacheable.tip": "Кэширование блока кода может уменьшить время рендеринга длинных блоков кода, но увеличит использование памяти", "settings.code_collapsible": "Блок кода свернут", "settings.code_editor": { "autocompletion": "Автодополнение", @@ -1770,6 +1762,13 @@ "addServer.importFrom.invalid": "Неверный ввод, проверьте формат JSON", "addServer.importFrom.nameExists": "Сервер уже существует: {{name}}", "addServer.importFrom.oneServer": "Можно сохранить только один конфигурационный файл MCP", + "addServer.importFrom.method": "Метод импорта", + "addServer.importFrom.dxtFile": "DXT-пакет", + "addServer.importFrom.dxtHelp": "Выберите .dxt файл, содержащий MCP сервер", + "addServer.importFrom.selectDxtFile": "Выбрать DXT-файл", + "addServer.importFrom.noDxtFile": "Пожалуйста, выберите DXT-файл", + "addServer.importFrom.dxtProcessFailed": "Не удалось обработать DXT-файл", + "addServer.importFrom.dxt": "Импорт DXT-пакета", "addServer.importFrom.placeholder": "Вставьте JSON-конфигурацию сервера MCP", "addServer.importFrom.tooltip": "Скопируйте JSON-конфигурацию (приоритет NPX или UVX конфигураций) со страницы введения MCP Servers и вставьте ее в поле ввода.", "addSuccess": "Сервер успешно добавлен", @@ -2228,9 +2227,8 @@ "system": "Системный прокси", "title": "Режим прокси" }, - "title": "Настройки прокси" + "address": "Адрес прокси" }, - "proxy.title": "Адрес прокси", "quickAssistant": { "click_tray_to_show": "Нажмите на иконку трея для запуска", "enable_quick_assistant": "Включить быстрый помощник", @@ -2456,199 +2454,6 @@ "show_window": "Показать окно", "visualization": "Визуализация" }, - "update": { - "title": "Обновление", - "message": "Новая версия {{version}} готова, установить сейчас?", - "later": "Позже", - "install": "Установить", - "noReleaseNotes": "Нет заметок об обновлении" - }, - "selection": { - "name": "Помощник выбора", - "action": { - "builtin": { - "translate": "Перевести", - "explain": "Объяснить", - "summary": "Суммаризировать", - "search": "Поиск", - "refine": "Уточнить", - "copy": "Копировать", - "quote": "Цитировать" - }, - "window": { - "pin": "Закрепить", - "pinned": "Закреплено", - "opacity": "Прозрачность окна", - "original_show": "Показать оригинал", - "original_hide": "Скрыть оригинал", - "original_copy": "Копировать оригинал", - "esc_close": "Esc - закрыть", - "esc_stop": "Esc - остановить", - "c_copy": "C - копировать", - "r_regenerate": "R - перегенерировать" - }, - "translate": { - "smart_translate_tips": "Смарт-перевод: содержимое будет переведено на целевой язык; содержимое уже на целевом языке будет переведено на альтернативный язык" - } - }, - "settings": { - "experimental": "Экспериментальные функции", - "enable": { - "title": "Включить", - "description": "Поддерживается только в Windows & macOS", - "mac_process_trust_hint": { - "title": "Права доступа", - "description": [ - "Помощник выбора требует Права доступа для правильной работы.", - "Пожалуйста, перейдите в \"Настройки\" и нажмите \"Открыть системные настройки\" в запросе разрешения, который появится позже. Затем найдите \"Cherry Studio\" в списке приложений, который появится позже, и включите переключатель разрешения.", - "После завершения настроек, пожалуйста, перезапустите помощник выбора." - ], - "button": { - "open_accessibility_settings": "Открыть системные настройки", - "go_to_settings": "Настройки" - } - } - }, - "toolbar": { - "title": "Панель инструментов", - "trigger_mode": { - "title": "Режим активации", - "description": "Показывать панель сразу при выделении, или только при удержании Ctrl, или только при нажатии на сочетание клавиш", - "description_note": { - "windows": "В некоторых приложениях Ctrl может не работать. Если вы используете AHK или другие инструменты для переназначения Ctrl, это может привести к тому, что некоторые приложения не смогут выделить текст.", - "mac": "В некоторых приложениях ⌘ может не работать. Если вы используете сочетания клавиш или инструменты для переназначения ⌘, это может привести к тому, что некоторые приложения не смогут выделить текст." - }, - "selected": "При выделении", - "selected_note": "После выделения", - "ctrlkey": "По Ctrl", - "ctrlkey_note": "После выделения, удерживайте Ctrl для показа панели. Пожалуйста, установите Ctrl в настройках клавиатуры и активируйте его.", - "shortcut": "По сочетанию клавиш", - "shortcut_note": "После выделения, используйте сочетание клавиш для показа панели. Пожалуйста, установите сочетание клавиш в настройках клавиатуры и активируйте его.", - "shortcut_link": "Перейти к настройкам клавиатуры" - }, - "compact_mode": { - "title": "Компактный режим", - "description": "Отображать только иконки без текста" - } - }, - "window": { - "title": "Окно действий", - "follow_toolbar": { - "title": "Следовать за панелью", - "description": "Окно будет следовать за панелью. Иначе - по центру." - }, - "remember_size": { - "title": "Запомнить размер", - "description": "При отключенном режиме, окно будет восстанавливаться до последнего размера при запуске приложения" - }, - "auto_close": { - "title": "Автозакрытие", - "description": "Закрывать окно при потере фокуса (если не закреплено)" - }, - "auto_pin": { - "title": "Автозакрепление", - "description": "Закреплять окно по умолчанию" - }, - "opacity": { - "title": "Прозрачность", - "description": "Установить прозрачность окна по умолчанию" - } - }, - "actions": { - "title": "Действия", - "custom": "Пользовательское действие", - "reset": { - "button": "Сбросить", - "tooltip": "Сбросить стандартные действия. Пользовательские останутся.", - "confirm": "Сбросить стандартные действия? Пользовательские останутся." - }, - "add_tooltip": { - "enabled": "Добавить действие", - "disabled": "Достигнут лимит ({{max}})" - }, - "delete_confirm": "Удалить это действие?", - "drag_hint": "Перетащите для сортировки. Включено: {{enabled}}/{{max}}" - }, - "advanced": { - "title": "Расширенные", - "filter_mode": { - "title": "Режим фильтрации", - "description": "Можно ограничить выборку по определенным приложениям (белый список) или исключить их (черный список)", - "default": "Выключено", - "whitelist": "Белый список", - "blacklist": "Черный список" - }, - "filter_list": { - "title": "Список фильтрации", - "description": "Расширенная функция, рекомендуется для пользователей с опытом" - } - }, - "user_modal": { - "title": { - "add": "Добавить действие", - "edit": "Редактировать действие" - }, - "name": { - "label": "Название", - "hint": "Введите название" - }, - "icon": { - "label": "Иконка", - "placeholder": "Название иконки Lucide", - "error": "Некорректное название", - "tooltip": "Названия в lowercase, например arrow-right", - "view_all": "Все иконки", - "random": "Случайная" - }, - "model": { - "label": "Модель", - "tooltip": "Использовать ассистента: будут применены его системные настройки", - "default": "По умолчанию", - "assistant": "Ассистент" - }, - "assistant": { - "label": "Ассистент", - "default": "По умолчанию" - }, - "prompt": { - "label": "Промпт", - "tooltip": "Дополняет ввод пользователя, не заменяя системный промпт ассистента", - "placeholder": "Используйте {{text}} для выделенного текста. Если пусто - текст будет добавлен", - "placeholder_text": "Плейсхолдер", - "copy_placeholder": "Копировать плейсхолдер" - } - }, - "search_modal": { - "title": "Поисковая система", - "engine": { - "label": "Поисковик", - "custom": "Свой" - }, - "custom": { - "name": { - "label": "Название", - "hint": "Название поисковика", - "max_length": "Не более 16 символов" - }, - "url": { - "label": "URL поиска", - "hint": "Используйте {{queryString}} для представления поискового запроса", - "required": "Введите URL", - "invalid_format": "URL должен начинаться с http:// или https://", - "missing_placeholder": "Должен содержать {{queryString}}" - }, - "test": "Тест" - } - }, - "filter_modal": { - "title": "Список фильтрации", - "user_tips": { - "windows": "Введите имя исполняемого файла приложения, один на строку, не учитывая регистр, можно использовать подстановку *", - "mac": "Введите Bundle ID приложения, один на строку, не учитывая регистр, можно использовать подстановку *" - } - } - } - }, "memory": { "add_memory": "Добавить память", "edit_memory": "Редактировать память", diff --git a/src/renderer/src/i18n/locales/zh-cn.json b/src/renderer/src/i18n/locales/zh-cn.json index 97c5588786..f520aee3d7 100644 --- a/src/renderer/src/i18n/locales/zh-cn.json +++ b/src/renderer/src/i18n/locales/zh-cn.json @@ -265,14 +265,6 @@ "select.content.tip": "已选择 {{count}} 项内容,文本类型将合并保存为一个笔记" }, "settings.code.title": "代码块设置", - "settings.code_cache_max_size": "缓存上限", - "settings.code_cache_max_size.tip": "允许缓存的字符数上限(千字符),按照高亮后的代码计算。高亮后的代码长度相比于纯文本会长很多", - "settings.code_cache_threshold": "缓存阈值", - "settings.code_cache_threshold.tip": "允许缓存的最小代码长度(千字符),超过阈值的代码块才会被缓存", - "settings.code_cache_ttl": "缓存期限", - "settings.code_cache_ttl.tip": "缓存过期时间(分钟)", - "settings.code_cacheable": "代码块缓存", - "settings.code_cacheable.tip": "缓存代码块可以减少长代码块的渲染时间,但会增加内存占用", "settings.code_collapsible": "代码块可折叠", "settings.code_editor": { "autocompletion": "自动补全", @@ -2235,9 +2227,8 @@ "system": "系统代理", "title": "代理模式" }, - "title": "代理设置" + "address": "代理地址" }, - "proxy.title": "代理地址", "quickAssistant": { "click_tray_to_show": "点击托盘图标启动", "enable_quick_assistant": "启用快捷助手", @@ -2463,199 +2454,6 @@ "show_window": "显示窗口", "visualization": "可视化" }, - "update": { - "title": "更新提示", - "message": "发现新版本 {{version}},是否立即安装?", - "later": "稍后", - "install": "立即安装", - "noReleaseNotes": "暂无更新日志" - }, - "selection": { - "name": "划词助手", - "action": { - "builtin": { - "translate": "翻译", - "explain": "解释", - "summary": "总结", - "search": "搜索", - "refine": "优化", - "copy": "复制", - "quote": "引用" - }, - "window": { - "pin": "置顶", - "pinned": "已置顶", - "opacity": "窗口透明度", - "original_show": "显示原文", - "original_hide": "隐藏原文", - "original_copy": "复制原文", - "esc_close": "Esc 关闭", - "esc_stop": "Esc 停止", - "c_copy": "C 复制", - "r_regenerate": "R 重新生成" - }, - "translate": { - "smart_translate_tips": "智能翻译:内容将优先翻译为目标语言;内容已是目标语言的,将翻译为备选语言" - } - }, - "settings": { - "experimental": "实验性功能", - "enable": { - "title": "启用", - "description": "当前仅支持 Windows & macOS", - "mac_process_trust_hint": { - "title": "辅助功能权限", - "description": [ - "划词助手需「辅助功能权限」才能正常工作。", - "请点击「去设置」,并在稍后弹出的权限请求弹窗中点击 「打开系统设置」 按钮,然后在之后的应用列表中找到 「Cherry Studio」,并打开权限开关。", - "完成设置后,请再次开启划词助手。" - ], - "button": { - "open_accessibility_settings": "打开辅助功能设置", - "go_to_settings": "去设置" - } - } - }, - "toolbar": { - "title": "工具栏", - "trigger_mode": { - "title": "取词方式", - "description": "划词后,触发取词并显示工具栏的方式", - "description_note": { - "windows": "少数应用不支持通过 Ctrl 键划词。若使用了AHK等按键映射工具对 Ctrl 键进行了重映射,可能导致部分应用无法划词。", - "mac": "若使用了快捷键或键盘映射工具对 ⌘ 键进行了重映射,可能导致部分应用无法划词。" - }, - "selected": "划词", - "selected_note": "划词后立即显示工具栏", - "ctrlkey": "Ctrl 键", - "ctrlkey_note": "划词后,再 长按 Ctrl 键,才显示工具栏", - "shortcut": "快捷键", - "shortcut_note": "划词后,使用快捷键显示工具栏。请在快捷键设置页面中设置取词快捷键并启用。", - "shortcut_link": "前往快捷键设置" - }, - "compact_mode": { - "title": "紧凑模式", - "description": "紧凑模式下,只显示图标,不显示文字" - } - }, - "window": { - "title": "功能窗口", - "follow_toolbar": { - "title": "跟随工具栏", - "description": "窗口位置将跟随工具栏显示,禁用后则始终居中显示" - }, - "remember_size": { - "title": "记住大小", - "description": "应用运行期间,窗口会按上次调整的大小显示" - }, - "auto_close": { - "title": "自动关闭", - "description": "当窗口未置顶且失去焦点时,将自动关闭该窗口" - }, - "auto_pin": { - "title": "自动置顶", - "description": "默认将窗口置于顶部" - }, - "opacity": { - "title": "透明度", - "description": "设置窗口的默认透明度,100% 为完全不透明" - } - }, - "actions": { - "title": "功能", - "custom": "自定义功能", - "reset": { - "button": "重置", - "tooltip": "重置为默认功能,自定义功能不会被删除", - "confirm": "确定要重置为默认功能吗?自定义功能不会被删除。" - }, - "add_tooltip": { - "enabled": "添加自定义功能", - "disabled": "自定义功能已达上限 ({{max}} 个)" - }, - "delete_confirm": "确定要删除这个自定义功能吗?", - "drag_hint": "拖拽排序,移动到上方以启用功能 ({{enabled}}/{{max}})" - }, - "advanced": { - "title": "高级", - "filter_mode": { - "title": "应用筛选", - "description": "可以限制划词助手只在特定应用中生效(白名单)或不生效(黑名单)", - "default": "关闭", - "whitelist": "白名单", - "blacklist": "黑名单" - }, - "filter_list": { - "title": "筛选名单", - "description": "高级功能,建议有经验的用户在了解的情况下再进行设置" - } - }, - "user_modal": { - "title": { - "add": "添加自定义功能", - "edit": "编辑自定义功能" - }, - "name": { - "label": "名称", - "hint": "请输入功能名称" - }, - "icon": { - "label": "图标", - "placeholder": "输入 Lucide 图标名称", - "error": "无效的图标名称,请检查输入", - "tooltip": "Lucide 图标名称为小写,如 arrow-right", - "view_all": "查看所有图标", - "random": "随机图标" - }, - "model": { - "label": "模型", - "tooltip": "使用助手:会同时使用助手的系统提示词和模型参数", - "default": "默认模型", - "assistant": "使用助手" - }, - "assistant": { - "label": "选择助手", - "default": "默认" - }, - "prompt": { - "label": "用户提示词 (Prompt)", - "tooltip": "用户提示词,作为用户输入的补充,不会覆盖助手的系统提示词", - "placeholder": "使用占位符 {{text}} 代表选中的文本,不填写时,选中的文本将添加到本提示词的末尾", - "placeholder_text": "占位符", - "copy_placeholder": "复制占位符" - } - }, - "search_modal": { - "title": "设置搜索引擎", - "engine": { - "label": "搜索引擎", - "custom": "自定义" - }, - "custom": { - "name": { - "label": "自定义名称", - "hint": "请输入搜索引擎名称", - "max_length": "名称不能超过 16 个字符" - }, - "url": { - "label": "自定义搜索 URL", - "hint": "用 {{queryString}} 代表搜索词", - "required": "请输入搜索 URL", - "invalid_format": "请输入以 http:// 或 https:// 开头的有效 URL", - "missing_placeholder": "URL 必须包含 {{queryString}} 占位符" - }, - "test": "测试" - } - }, - "filter_modal": { - "title": "应用筛选名单", - "user_tips": { - "windows": "请输入应用的执行文件名,每行一个,不区分大小写,可以模糊匹配。例如:chrome.exe、weixin.exe、Cherry Studio.exe等", - "mac": "请输入应用的Bundle ID,每行一个,不区分大小写,可以模糊匹配。例如:com.google.Chrome、com.apple.mail等" - } - } - } - }, "memory": { "settings": "设置", "statistics": "统计", @@ -2762,4 +2560,4 @@ "stored_memories": "已存储记忆" } } -} \ No newline at end of file +} diff --git a/src/renderer/src/i18n/locales/zh-tw.json b/src/renderer/src/i18n/locales/zh-tw.json index 621dc137e6..baaedbb2da 100644 --- a/src/renderer/src/i18n/locales/zh-tw.json +++ b/src/renderer/src/i18n/locales/zh-tw.json @@ -264,14 +264,6 @@ "select.content.tip": "已選擇 {{count}} 項內容,文本類型將合併儲存為一個筆記" }, "settings.code.title": "程式碼區塊", - "settings.code_cache_max_size": "快取上限", - "settings.code_cache_max_size.tip": "允許快取的字元數上限(千字符),按照高亮後的程式碼計算。高亮後的程式碼長度相比純文字會長很多", - "settings.code_cache_threshold": "快取門檻", - "settings.code_cache_threshold.tip": "允許快取的最小程式碼長度(千字符),超過門檻的程式碼區塊才會被快取", - "settings.code_cache_ttl": "快取期限", - "settings.code_cache_ttl.tip": "快取的存活時間(分鐘)", - "settings.code_cacheable": "程式碼區塊快取", - "settings.code_cacheable.tip": "快取程式碼區塊可以減少長程式碼區塊的渲染時間,但會增加記憶體使用量", "settings.code_collapsible": "程式碼區塊可折疊", "settings.code_editor": { "autocompletion": "自動補全", @@ -1770,6 +1762,13 @@ "addServer.importFrom.invalid": "無效的輸入,請檢查 JSON 格式", "addServer.importFrom.nameExists": "伺服器已存在:{{name}}", "addServer.importFrom.oneServer": "每次只能保存一個 MCP 伺服器配置", + "addServer.importFrom.method": "導入方式", + "addServer.importFrom.dxtFile": "DXT 包文件", + "addServer.importFrom.dxtHelp": "選擇包含 MCP 服務器的 .dxt 文件", + "addServer.importFrom.selectDxtFile": "選擇 DXT 文件", + "addServer.importFrom.noDxtFile": "請選擇一個 DXT 文件", + "addServer.importFrom.dxtProcessFailed": "處理 DXT 文件失敗", + "addServer.importFrom.dxt": "導入 DXT 包", "addServer.importFrom.placeholder": "貼上 MCP 伺服器 JSON 設定", "addServer.importFrom.tooltip": "請從 MCP Servers 的介紹頁面複製配置 JSON(優先使用\n NPX 或 UVX 配置),並粘貼到輸入框中", "addSuccess": "伺服器新增成功", @@ -2228,9 +2227,8 @@ "system": "系統代理伺服器", "title": "代理伺服器模式" }, - "title": "代理伺服器設定" + "address": "代理伺服器位址" }, - "proxy.title": "代理伺服器地址", "quickAssistant": { "click_tray_to_show": "點選工具列圖示啟動", "enable_quick_assistant": "啟用快捷助手", @@ -2456,199 +2454,6 @@ "show_window": "顯示視窗", "visualization": "視覺化" }, - "update": { - "title": "更新提示", - "message": "新版本 {{version}} 已準備就緒,是否立即安裝?", - "later": "稍後", - "install": "立即安裝", - "noReleaseNotes": "暫無更新日誌" - }, - "selection": { - "name": "劃詞助手", - "action": { - "builtin": { - "translate": "翻譯", - "explain": "解釋", - "summary": "總結", - "search": "搜尋", - "refine": "優化", - "copy": "複製", - "quote": "引用" - }, - "window": { - "pin": "置頂", - "pinned": "已置頂", - "opacity": "視窗透明度", - "original_show": "顯示原文", - "original_hide": "隱藏原文", - "original_copy": "複製原文", - "esc_close": "Esc 關閉", - "esc_stop": "Esc 停止", - "c_copy": "C 複製", - "r_regenerate": "R 重新生成" - }, - "translate": { - "smart_translate_tips": "智能翻譯:內容將優先翻譯為目標語言;內容已是目標語言的,將翻譯為備用語言" - } - }, - "settings": { - "experimental": "實驗性功能", - "enable": { - "title": "啟用", - "description": "目前僅支援 Windows & macOS", - "mac_process_trust_hint": { - "title": "輔助使用權限", - "description": [ - "劃詞助手需「輔助使用權限」才能正常工作。", - "請點擊「去設定」,並在稍後彈出的權限請求彈窗中點擊 「打開系統設定」 按鈕,然後在之後的應用程式列表中找到 「Cherry Studio」,並開啟權限開關。", - "完成設定後,請再次開啟劃詞助手。" - ], - "button": { - "open_accessibility_settings": "打開輔助使用設定", - "go_to_settings": "去設定" - } - } - }, - "toolbar": { - "title": "工具列", - "trigger_mode": { - "title": "取詞方式", - "description": "劃詞後,觸發取詞並顯示工具列的方式", - "description_note": { - "windows": "在某些應用中可能無法透過 Ctrl 鍵劃詞。若使用了 AHK 等工具對 Ctrl 鍵進行了重新對應,可能導致部分應用程式無法劃詞。", - "mac": "若使用了快捷鍵或鍵盤映射工具對 ⌘ 鍵進行了重新對應,可能導致部分應用程式無法劃詞。" - }, - "selected": "劃詞", - "selected_note": "劃詞後,立即顯示工具列", - "ctrlkey": "Ctrl 鍵", - "ctrlkey_note": "劃詞後,再 按住 Ctrl 鍵,才顯示工具列", - "shortcut": "快捷鍵", - "shortcut_note": "劃詞後,使用快捷鍵顯示工具列。請在快捷鍵設定頁面中設置取詞快捷鍵並啟用。", - "shortcut_link": "前往快捷鍵設定" - }, - "compact_mode": { - "title": "緊湊模式", - "description": "緊湊模式下,只顯示圖示,不顯示文字" - } - }, - "window": { - "title": "功能視窗", - "follow_toolbar": { - "title": "跟隨工具列", - "description": "視窗位置將跟隨工具列顯示,停用後則始終置中顯示" - }, - "remember_size": { - "title": "記住大小", - "description": "應用運行期間,視窗會按上次調整的大小顯示" - }, - "auto_close": { - "title": "自動關閉", - "description": "當視窗未置頂且失去焦點時,將自動關閉該視窗" - }, - "auto_pin": { - "title": "自動置頂", - "description": "預設將視窗置於頂部" - }, - "opacity": { - "title": "透明度", - "description": "設置視窗的預設透明度,100% 為完全不透明" - } - }, - "actions": { - "title": "功能", - "custom": "自訂功能", - "reset": { - "button": "重設", - "tooltip": "重設為預設功能,自訂功能不會被刪除", - "confirm": "確定要重設為預設功能嗎?自訂功能不會被刪除。" - }, - "add_tooltip": { - "enabled": "新增自訂功能", - "disabled": "自訂功能已達上限 ({{max}} 個)" - }, - "delete_confirm": "確定要刪除這個自訂功能嗎?", - "drag_hint": "拖曳排序,移動到上方以啟用功能 ({{enabled}}/{{max}})" - }, - "advanced": { - "title": "進階", - "filter_mode": { - "title": "應用篩選", - "description": "可以限制劃詞助手只在特定應用中生效(白名單)或不生效(黑名單)", - "default": "關閉", - "whitelist": "白名單", - "blacklist": "黑名單" - }, - "filter_list": { - "title": "篩選名單", - "description": "進階功能,建議有經驗的用戶在了解情況下再進行設置" - } - }, - "user_modal": { - "title": { - "add": "新增自訂功能", - "edit": "編輯自訂功能" - }, - "name": { - "label": "名稱", - "hint": "請輸入功能名稱" - }, - "icon": { - "label": "圖示", - "placeholder": "輸入 Lucide 圖示名稱", - "error": "無效的圖示名稱,請檢查輸入", - "tooltip": "Lucide 圖示名稱為小寫,如 arrow-right", - "view_all": "檢視所有圖示", - "random": "隨機圖示" - }, - "model": { - "label": "模型", - "tooltip": "使用助手:會同時使用助手的系統提示詞和模型參數", - "default": "預設模型", - "assistant": "使用助手" - }, - "assistant": { - "label": "選擇助手", - "default": "預設" - }, - "prompt": { - "label": "使用者提示詞 (Prompt)", - "tooltip": "使用者提示詞,作為使用者輸入的補充,不會覆蓋助手的系統提示詞", - "placeholder": "使用佔位符 {{text}} 代表選取的文字,不填寫時,選取的文字將加到本提示詞的末尾", - "placeholder_text": "佔位符", - "copy_placeholder": "複製佔位符" - } - }, - "search_modal": { - "title": "設定搜尋引擎", - "engine": { - "label": "搜尋引擎", - "custom": "自訂" - }, - "custom": { - "name": { - "label": "自訂名稱", - "hint": "請輸入搜尋引擎名稱", - "max_length": "名稱不能超過 16 個字元" - }, - "url": { - "label": "自訂搜尋 URL", - "hint": "使用 {{queryString}} 代表搜尋詞", - "required": "請輸入搜尋 URL", - "invalid_format": "請輸入以 http:// 或 https:// 開頭的有效 URL", - "missing_placeholder": "URL 必須包含 {{queryString}} 佔位符" - }, - "test": "測試" - } - }, - "filter_modal": { - "title": "應用篩選名單", - "user_tips": { - "windows": "請輸入應用的執行檔名稱,每行一個,不區分大小寫,可以模糊匹配。例如:chrome.exe、weixin.exe、Cherry Studio.exe等", - "mac": "請輸入應用的 Bundle ID,每行一個,不區分大小寫,可以模糊匹配。例如:com.google.Chrome、com.apple.mail等" - } - } - } - }, "memory": { "add_memory": "新增記憶", "edit_memory": "編輯記憶", diff --git a/src/renderer/src/pages/settings/GeneralSettings.tsx b/src/renderer/src/pages/settings/GeneralSettings.tsx index b9f55cc604..32e9e335ce 100644 --- a/src/renderer/src/pages/settings/GeneralSettings.tsx +++ b/src/renderer/src/pages/settings/GeneralSettings.tsx @@ -240,7 +240,7 @@ const GeneralSettings: FC = () => { <> - {t('settings.proxy.title')} + {t('settings.proxy.address')}