UNPKG

i18ntk

Version:

i18n Tool Kit - Zero-dependency internationalization toolkit for setup, scanning, analysis, validation, auto translation, fixing, reporting, and runtime translation loading.

1,106 lines 141 kB
{ "meta": { "version": "3.1.2", "updated": "2026-05-07" }, "common": { "welcome": "欢迎", "hello": "你好", "goodbye": "再见", "yes": "是的", "no": "不", "save": "节省", "cancel": "取消", "delete": "删除", "edit": "编辑", "loading": "加载中...", "offlineTitle": "您离线", "offlineMessage": "请检查您的互联网连接", "tryReconnect": "尝试重新连接", "logout": "退出", "login": "登录", "amount": "数量", "success": "成功", "error": "错误", "warning": "警告", "info": "信息:", "debug": "调试", "progress": "进步:", "remaining": "其余的:", "total": "全部的:", "completed": "7. 成功完成!", "missing": "丢失的", "partial": "部分的", "sameAsSource": "与来源相同:", "formatMismatch": "格式不匹配:", "typeMismatch": "类型不匹配:", "structureMismatch": "结构不匹配:", "invalidOption": "无效选项", "separator": "===================================================", "initializationFailed": "❌ 初始化失败: {error}", "stackTrace": "堆栈跟踪: {stack}", "pressEnterToContinue": "按 Enter 键继续...", "pressEnterToReturn": "按 Enter 返回主菜单...", "stepCompleted": "步 '{stepName}' 完全的。", "stepFailed": "步 '{stepName}' 失败的。", "runningStep": "运行步骤: {stepName}", "command": "命令: {command}", "startingWorkflow": "开始工作流程...", "workflowCompleted": "工作流程完成。", "checkReports": "检查报告以了解详细信息。", "errorExecutingCommand": "执行命令时出错: {error}", "genericError": "❌ 错误: {error}", "errors": { "errors": "错误:", "genericError": "❌ 错误: {error}", "initializationFailed": "❌ 初始化失败: {error}", "initializationCancelled": "❌ 初始化被用户取消。", "translationKeyNotFound": "未找到翻译键: {key}", "sourceDirectoryNotFound": "未找到源目录: {directory}", "configLoadingFailed": "配置加载失败", "invalidSourceDirectory": "无效的源目录: {directory}", "securityViolation": "检测到安全违规", "authenticationFailed": "认证失败", "sourceEqualsI18nWarn": "⚠️ sourceDir 等于 i18nDir ({sourceDir})。跌回至 {fallback} 用于源扫描。" }, "errorGeneratingStatusSummary": "生成状态摘要时出错: {error}", "errorRunningDebugTool": "运行调试工具时出错'{displayName}': {error}", "errorReadingDebugLogs": "读取调试日志时出错: {error}", "errorAnalyzingLogFile": "分析日志文件时出错: {error}", "errorAnalyzingTranslationKeys": "分析翻译键时出错: {error}", "errorAnalyzingTranslationCompleteness": "分析翻译完整性时出错: {error}", "analyzingTranslationCompleteness": "分析所有语言的翻译完整性...", "i18nDirectoryNotFound": "⚠️ 找不到 i18n 目录: {i18nDir}", "translationCompletenessAnalysisFailed": "⚠️翻译完整性分析失败: {error}", "failedToAnalyzeLanguage": "❌ 无法分析语言 {language}: {error}", "errorReadingI18nDirectory": "❌ 读取 i18n 目录时出错:", "languageCompletenessTitle": "📈 不同语言的翻译完整性", "errorAnalyzingTranslationFormat": "分析翻译格式时出错: {error}", "errorAnalyzingTranslationType": "分析翻译类型时出错: {error}", "errorAnalyzingTranslationStructure": "分析翻译结构时出错: {error}", "errorAnalyzingTranslationFormatMismatch": "分析翻译格式不匹配时出错: {error}", "errorAnalyzingTranslationTypeMismatch": "分析翻译类型不匹配时出错: {error}", "errorAnalyzingTranslationStructureMismatch": "分析翻译结构不匹配时出错: {error}", "errorAnalyzingTranslationSameAsSource": "分析翻译与源相同时出错: {error}", "title": "地位", "nextStep1": "1.查看使用情况分析:", "nextStep2": "2. 验证翻译:", "nextStep3": "3.分析完整性:", "nextStep4": "4. 补全缺失的翻译:", "nextStep5": "5. 生成总结报告:", "nextStep6": "6. 审核并完成翻译:", "generating": "正在生成摘要报告...", "review": "正在审核翻译...", "finalizing": "正在完成翻译...", "finalized": "最终顺利完成!", "warnings": "警告:", "completedKeys": "完成的钥匙:", "missingKeys": "缺少钥匙:", "partialKeys": "部分按键:", "home": "家", "settings": "设置", "startingSettings": "🎛️ 启动设置 CLI...", "confirm": "确认", "errorExiting": "退出时出错。" }, "errors": { "invalidOption": "❌ 无效选项: {option}。请再试一次。", "readlineClosed": "输入流已关闭;以非交互模式运行。", "noPackageJson": "未找到 package.json。无法自动检测 i18n 框架。", "noI18nDir": "在项目根目录中找不到 i18n 目录。", "noI18nConfig": "在项目根目录中找不到 i18n 配置文件。", "errorReadingDebugLogs": "读取调试日志时出错: {error}" }, "scanner": { "help_message": "I18n 文本扫描仪用法:node i18ntk-scanner.js [选项] 选项:--source-dir <dir> 要扫描的源目录(默认:./src)--output <file> 扫描结果的输出文件(默认:./i18ntk-scanner-report.json)--framework <name> 目标框架(react、vue、Angular、vanilla)--patterns <patterns> 自定义正则表达式模式(逗号分隔) --include-tests 在扫描中包含测试文件 --exclude-dirs <dirs> 要排除的目录(逗号分隔) --help 显示此帮助示例:node i18ntk-scanner.js --source-dir=./src --framework=react node i18ntk-scanner.js --patterns 'console.log\\((.*?)\\)' --include-tests node i18ntk-scanner.js --output=./scan-results.json", "help_options": { "source_dir": "用于扫描 i18n 问题的源目录", "output_dir": "扫描报告和结果目录", "framework": "目标框架(React、Vue、Angular、Vanilla)", "patterns": "用于文本检测的自定义正则表达式模式", "exclude": "要从扫描中排除的文件模式", "output_report": "生成详细的扫描报告", "min_length": "翻译时考虑的最小文本长度", "max_length": "翻译时考虑的最大文本长度", "include_tests": "在扫描过程中包含测试文件" }, "starting": "🔍 启动框架的文本扫描器: {framework}", "sourceDirectory": "📁 扫描目录: {sourceDir}", "frameworkDetected": "🎯 检测到的框架: {framework}", "scanningFiles": "📊 扫描 {fileCount} 文件...", "foundTexts": "📝找到了 {textCount} 需要翻译的文本", "generatingReport": "📊 生成详细报告...", "reportSaved": "💾 扫描报告保存至: {reportPath}", "noTextsFound": "✅ 未找到硬编码的英文文本", "scanComplete": "🎉 扫描成功完成!", "analysisTitle": "🔍 翻译扫描分析", "fileSummary": "📄 {file}: {count} 找到文本", "textLocation": "📍线 {line}: {text}", "foundText": "成立 {count} 潜在的硬编码文本实例", "context": "📝 背景: {context}", "severity": "⚠️严重性: {severity}", "recommendation": "💡推荐: {recommendation}", "welcome": { "title": "🎯 欢迎使用文本扫描仪!", "description": "该工具会扫描您的源代码以查找可能需要翻译的硬编码英文文本。" }, "frameworkPrompt": { "title": "🎯 选择框架", "available": "可用框架:react、vue、Angular、vanilla", "description": "输入框架类型(或按 Enter 键自动检测):", "input": "框架:" }, "directoryPrompt": { "title": "📁 选择源目录", "current": "当前目录: {dir}", "description": "输入要扫描的目录(或按 Enter 键选择当前目录):", "input": "目录:" }, "options": { "includeTests": "包括测试文件?", "excludeDirs": "要排除的目录(以逗号分隔):", "customPatterns": "要扫描的自定义模式(正则表达式):" }, "reportGenerated": "生成的扫描报告: {path}" }, "fixer": { "help_message": "I18n Translation Fixer 用法:node i18ntk-fixer.js [options] 选项:--source-dir <dir> 要扫描的源目录(默认:./locales)--languages <langs> 要修复的逗号分隔语言列表 --markers <markers> 逗号分隔标记视为未翻译 --no-backup 跳过自动备份创建 --help 显示此帮助 示例:node i18ntk-fixer.js --languages de,fr node i18ntk-fixer.js --source-dir=./locales --markers NOT_TRANSLATED node i18ntk-fixer.js --no-backup", "starting": "🚀 开始修复语言翻译: {languages}", "sourceDirectory": "📁 源码目录: {sourceDir}", "sourceLanguage": "🔤 源语言: {sourceLanguage}", "markers": "🏷️ 要修复的标记: {markers}", "scanningLanguage": "📊 扫描 {language}...", "noLanguages": "❌ 没有指定修复语言。", "allComplete": "🎉 所有翻译已经完成!", "fullReportSaved": "📊 完整报告保存至: {reportPath}", "reviewReport": "请在继续之前查看该报告。", "backupCreated": "💾 备份创建成功。", "applyingFixes": "🔄 正在应用修复...", "fixingComplete": "✅ 翻译修复完成!", "operationCancelled": "❌ 用户取消操作。", "analysisTitle": "🔍 翻译固定分析", "analysisSeparator": "===================================================", "totalIssues": "发现问题总数: {totalIssues}", "missingTranslations": "缺少翻译: {missing}", "placeholderTranslations": "占位符翻译: {placeholder}", "noIssues": "✅ 没有发现问题。所有翻译均已完成。", "detailedIssues": "📋详细问题:", "detailedSeparator": "--------------------------------------------------", "filePath": "📄 {file} → {path}", "missingKey": "❌ 缺失: {source} → {new}", "placeholderKey": "⚠️占位符:“{target}\" → \"{new}\"", "moreIssues": "... 和 {count} 更多问题。检查报告文件以获取完整的详细信息。", "confirmationTitle": "🤔 您想继续进行这些修复吗?", "confirmationOptions": "选项:", "optionYes": "y - 是,应用所有修复", "optionNo": "n - 否,取消操作", "optionShow": "s - 显示详细问题", "choicePrompt": "您的选择(是/否):", "nonInteractiveMode": "⚡ 检测到非交互模式 - 自动应用修复...", "reportGenerated": "📊 生成的修复程序报告: {path}", "summary": "固定器总结:", "welcome": { "title": "🎯 欢迎使用翻译修复器!", "description": "该工具将帮助您修复区域设置文件中损坏的翻译和占位符。" }, "markerPrompt": { "title": "🏷️ 配置占位符标记", "description": "输入指示未翻译文本的标记(以逗号分隔):", "currentDefaults": "默认标记: {markers}", "input": "标记(或按 Enter 键获取默认值):" }, "languagePrompt": { "title": "🌍 选择要修复的语言", "available": "可用语言: {languages}", "description": "输入要修复的语言(以逗号分隔)或按 Enter 键修复所有语言:", "input": "语言:", "noLanguages": "找不到可修复的语言。" }, "directoryPrompt": { "title": "📁 选择目录", "current": "当前目录: {dir}", "description": "输入包含您的语言环境文件的目录(或按 Enter 键选择当前目录):", "input": "目录:" }, "backupLocation": "备份位置: {dir}", "completed": "修复完成。", "creatingBackup": "创建备份于 {dir}...", "dryRunMode": "试运行模式: {mode}", "error": "修复程序失败: {error}", "fixing": "定影 {language}...", "foundLanguages": "成立 {count} 语言: {languages}", "languageFixed": "{language}: 固定的 {fixed} 键,已跳过 {skipped}.", "running": "运行翻译修复程序...", "totalFixed": "总固定: {count}" }, "autorun": { "stepAnalyzeTranslations": "分析翻译", "stepCompletedWithIcon": "✅ 已完成: {stepName}", "stepValidateTranslations": "验证翻译", "stepRunning": "▶️步骤 {stepNumber}/{totalSteps}: {stepName}", "separator": "===================================================", "stepFailed": "❌失败: {stepName}", "errorLabel": "错误", "autoRunScriptTitle": "🧪 自动运行工作流程", "usageTitle": "用法", "runAllSteps": "运行:node i18ntk-autorun.js", "configureSettingsFirst": "配置:i18ntk-config.json 或 CLI 标志", "runSpecificSteps": "使用 --steps=1,3 或 --list 显示步骤", "showHelp": "--帮助获取更多信息", "examplesTitle": "示例", "configExample": "节点 i18ntk-autorun.js --ui-language=zh", "stepsExample1": "节点 i18ntk-autorun.js --steps=分析,验证", "stepsExample2": "节点 i18ntk-autorun.js --list", "customSettingsConfiguration": "自定义自动运行设置", "availableSteps": "可用步骤", "startingAutoRunWorkflow": "🚀 开始自动运行工作流程...", "workflowIncludesSteps": "工作流程包括 {count} 步骤:", "missingRequiredFile": "缺少所需文件: {file}", "workflowStopped": "工作流程因故障而停止。", "workflowCompleted": "🎉 工作流程完成!", "successfulSteps": "成功步骤: {count}", "failedSteps": "失败的步骤: {count}", "stepInitializeProject": "初始化项目", "stepCheckUsage": "检查密钥使用情况", "stepGenerateSummary": "生成总结报告", "runInitializationFirst": "请先运行初始化。", "initializationCheckPassed": "初始化检查通过。", "runningStep": "运行步骤: {stepName}", "commandLabel": "命令: {command}", "stepCompletedWithTime": "步 '{stepName}' 完成于 {duration}多发性硬化症。", "stepCompleted": "步 '{stepName}' 完全的。", "stepFailedWithError": "步 '{stepName}' 失败并出现错误: {error}", "requiredStepFailed": "所需步骤失败。停止工作流程。", "optionalStepFailed": "可选步骤失败。继续工作流程。", "stepRequired": "(必需的)", "stepOptional": "(选修的)", "startingExecution": "开始执行...", "pressEnterToContinue": "按 Enter 键继续...", "runningSelectedSteps": "运行选定的步骤...", "invalidStepNumber": "无效步骤号: {stepNum}", "executionReport": "执行报告:", "requiredFailedSteps": "所需步骤失败: {count}", "stepDetails": "步骤详情:", "reportSavedTo": "报告保存至: {path}", "overallStatusSuccess": "成功", "overallStatusFailed": "失败的", "overallStatus": "总体状况: {status}", "pressEnterForDefaults": "按 Enter 键可对任何提示使用默认设置。", "sourceDirPrompt": "输入源目录(默认: {default}):", "sourceLangPrompt": "输入源语言(默认: {default}):", "targetLangsPrompt": "输入目标语言(以逗号分隔,默认: {default}):", "translationMarkerPrompt": "输入翻译标记(默认: {default}):", "outputDirPrompt": "输入报告的输出目录(默认: {default}):", "settingsUpdatedSuccessfully": "设置更新成功!", "errorConfiguringSettings": "配置设置时出错: {error}", "configurationComplete": "配置完成。", "runAutoRunCommand": "现在您可以运行自动运行命令。", "configurationFailed": "配置失败: {error}", "noValidStepNumbers": "未提供有效的步骤号。", "autoRunFailed": "自动运行失败: {error}", "stepCompleteTranslations": "完整翻译", "stepAnalyzeSizing": "分析尺码", "stepCompletedIcon": "✅", "stepRunningWithNumber": "[{stepNumber}/{totalSteps}] 步 '{stepName}' 跑步...", "stepFailedIcon": "❌", "translationLoadWarning": "警告:无法加载 {lang} 翻译", "configReadError": "读取错误 {file}" }, "analyze": { "help_message": "国际化翻译分析器用法:node i18ntk-analyze.js [选项] 选项:--source-dir <dir> 要扫描的源目录(默认:./src)--i18n-dir <dir> I18n 目录(默认:./src/locales) --output-report 生成详细报告 --output-dir <dir> 报告的输出目录(默认:./reports) --help 显示此帮助 示例:node i18ntk-analyze.js --output-report node i18ntk-analyze.js --source-dir=./app --i18n-dir=./locales node i18ntk-analyze.js --output-dir=./analysis --output-report", "source_directory": "📁 源码目录: {sourceDir}", "i18n_directory": "🌐I18n 目录: {i18nDir}", "loading_translation_files": "📋 正在加载翻译文件...", "sourceDirectoryLabel": "📁 源目录: {sourceDir}", "sourceLanguageLabel": "🌍 源语言: {sourceLanguage}", "strictModeLabel": "⚙️严格模式: {mode}", "found_translation_files_count": "✅ 找到了 {count} 翻译文件", "analyzing_translations": "🔍 正在分析翻译...", "analysis_completed_successfully": "🎉 分析成功完成!", "analysis_results": "📊 分析结果", "language_analysis_stats": "{language}: {translatedKeys}/{totalKeys} ({percentage}翻译百分比)", "sample_missing_keys": "缺失键示例:", "missing_key": "- {key}", "and_more_missing": "...和 {count} 更多的。", "sample_unused_keys": "未使用的键示例:", "unused_key": "- {key}", "and_more_unused": "...和 {count} 更多的。", "recommendations": "📋推荐", "add_missing_translations": "💡 添加缺失的翻译以提高覆盖范围。", "remove_unused_translations": "💡 删除未使用的翻译以保持项目干净。", "next_steps": "📋 下一步", "review_analysis_results": "1. 在控制台或生成的报告中查看分析结果。", "run_with_output_report": "2. 使用 --output-report 运行以获得详细报告。", "add_or_remove_translations": "3. 添加缺失的翻译或删除未使用的翻译。", "rerun_analysis": "4. 重新运行分析以验证改进。", "analysis_summary": "📊 分析总结", "source_files_scanned": "扫描的源文件: {fileCount}", "translation_files_checked": "检查的翻译文件: {translationFileCount}", "total_keys": "总键数: {totalKeys}", "translated_keys": "翻译后的按键: {translatedKeys}", "missing_keys": "缺少钥匙: {missingKeys}", "unused_keys": "未使用的键: {unusedKeys}", "translation_coverage": "翻译范围: {coverage}%", "analysis_passed_for_language": "✅ 分析通过 {language}", "analysis_failed_for_language": "❌ 分析失败 {language} ({missingKeys} 丢失的, {unusedKeys} 未使用)", "starting": "🔍 开始翻译分析...", "foundLanguages": "📋发现 {count} 要分析的语言: {languages}", "analyzing": "🔄 分析中 {language}...", "reportTitle": "📊 翻译分析报告", "generated": "生成: {timestamp}", "status": "地位: {translated}/{total} 键({percentage}翻译百分比)", "filesAnalyzed": "分析的文件: {analyzed}/{total}", "keysNeedingTranslation": "需要翻译的按键: {count}", "fileBreakdown": "📋 文件分解", "error": "错误", "completed": "✅ 分析已完成 {language}", "progress": "📊 总体进展: {translated}/{total} 处理的语言", "reportSaved": "报告已保存: {reportPath}", "summary": "📊 分析总结", "finished": "✅ 分析成功完成!", "statusFileMissing": "❌ 翻译文件丢失", "sourceKeys": "📊 源代码: {count}", "translation": "📊 翻译: {translated}/{total} ({percentage}%)", "structure": "🗂️结构: {status}", "consistent": "持续的", "inconsistent": "不一致", "missingKeys": "缺少钥匙: {count}", "extraKeys": "额外按键: {count}", "issues": "⚠️发现问题: {count}", "issueType": { "not_translated": "未翻译: {count}", "empty_value": "空值: {count}", "partial_translation": "部分翻译: {count}", "format_mismatch": "格式不匹配: {count}", "type_mismatch": "类型不匹配: {count}", "structure_mismatch": "结构不匹配: {count}", "same_as_source": "与来源相同: {count}" }, "keysToTranslate": "📋 翻译键", "key": "钥匙", "english": "英语", "needsTranslation": "需要翻译", "andMoreKeys": "...和 {count} 更多钥匙。", "noLanguages": "⚠️ 未找到目标语言。", "languageStats": "{language}: {percentage}% 完全的 ({translated}/{total} 键)", "invalidReportFilePath": "报告文件路径无效", "failedToWriteReportFile": "无法安全写入报告文件" }, "complete": { "configLoadedSuccessfully": "配置加载成功", "configLoadingFailed": "配置加载失败", "sourceLanguageNotFound": "未找到源语言目录: {sourceLanguage}", "couldNotParseTarget": "无法解析目标文件: {file}", "couldNotParseSource": "无法解析源文件: {file}", "reportGenerated": "生成的报告: {path}", "generateReportPrompt": "您想要生成一份报告吗?", "title": "🌍 I18NTK 翻译完成", "separator": "===============================================================", "sourceDir": "📁 源码目录: {sourceDir}", "sourceLanguage": "🌐源语言: {sourceLanguage}", "dryRunMode": "🧪 试运行模式 - 不会进行任何更改", "languages": "🌍 可用语言: {languages}", "addingMissingKeys": "➕ 将缺失的键添加到翻译文件中...", "processing": "🔄 加工中 {language}...", "addedKeys": "✅ 添加了 {count} 钥匙丢失", "noChangesNeeded": "✅ 无需更改 {language}", "summaryTitle": "📊 完成总结", "totalChanges": "📝 总变化: {totalChanges}", "languagesProcessed": "🌍 处理的语言: {languagesProcessed}", "missingKeysAdded": "➕ 添加了缺失的按键: {missingKeysAdded}", "nextStepsTitle": "📋 下一步", "nextStep1": "1. 运行使用情况分析:", "nextStep2": "节点 i18ntk-usage.js --输出报告", "nextStep3": "2. 验证翻译:", "nextStep4": "节点 i18ntk-validate.js", "nextStep5": "3. 分析模式:", "nextStep6": "节点 i18ntk-analyze.js", "allKeysAvailable": "🎉 所有翻译键现已可用!", "runWithoutDryRun": "💡 在没有 --dry-run 的情况下运行来应用更改", "deletingOldReport": "🗑️ 正在删除旧报告...", "generatingFreshAnalysis": "📊 生成新的使用情况分析...", "couldNotGenerate": "❌ 无法生成使用情况分析", "reportNotFound": "📋 未找到使用报告。使用通用键...", "foundMissingKeys": "📋发现 {count} 使用分析中缺少密钥", "couldNotParse": "❌ 无法解析使用情况报告。使用通用键...", "errorDuringCompletion": "❌ 完成时出错: {error}", "fatalError": "❌ 致命错误: {error}", "configurationValidationFailed": "配置验证失败:缺少必填字段" }, "sizing": { "separator": "=====================================================================================", "lineSeparator": "------------------------------------------------------------------------------------------------", "analysisStats": "{stats}", "sourceDirectoryLabel": "📁 源码目录: {sourceDir}", "sourceLanguageLabel": "🌍源语言: {sourceLanguage}", "strictModeLabel": "⚙️严格模式: {mode}", "invalidSourceDirectoryError": "无效的源目录路径: {sourceDir}", "sourceDirectoryNotFoundError": "未找到源目录: {sourceDir}", "invalidOutputDirectoryError": "无效的输出目录路径: {outputDir}", "invalidReportFileError": "报告文件路径无效", "problematic_keys": "有问题的按键: {problematicKeys}", "problematicKeysLabel": "有问题的按键: {problematicKeys}", "long_translations": "长翻译: {longTranslations}", "failedToSaveReportError": "无法安全保存报告", "invalidCsvFileError": "CSV 文件路径无效", "failedToSaveCsvError": "无法安全保存 CSV 报告", "fatalError": "❌ 尺寸分析失败: {error}", "starting_i18n_sizing_analysis": "开始 i18n 大小分析...", "source_directory": "源码目录: {sourceDir}", "found_languages": "找到的语言: {languages}", "analyzing_file_sizes": "正在分析文件大小...", "analyzing_translation_content": "正在分析翻译内容...", "generating_size_comparisons": "正在生成尺寸比较...", "no_languages_found_for_comparison": "找不到可供比较的语言", "sizing_analysis_results": "I18n 尺寸分析结果", "file_sizes_title": "文件大小", "file_sizes_header": "语言大小(KB) 行数 字符", "file_size_row": "{lang} {sizeKB} {lines} {characters}", "language_statistics_title": "语言统计", "language_stats_header": "语言键 字符 平均长度 最大长度 空长", "language_stats_row": "{lang} {totalKeys} {totalCharacters} {averageKeyLength} {maxKeyLength} {emptyKeys} {longKeys}", "size_variations_title": "尺寸变化", "size_variations_header": "语言 Char Diff % Diff 有问题", "size_variation_row": "{lang} {characterDifference} {percentageDifference}% {problematic}", "problematic_yes": "是的", "problematic_no": "不", "recommendations_title": "建议", "recommendation_item": "{index}. {recommendation}", "problematic_key_detail": "{index}。钥匙: '{key}' - 变化: {variations}", "generating_detailed_report": "正在生成详细报告...", "keysHaveSignificantSizeVariations": "按键的尺寸差异很大", "longTranslationsDetected": "${lang} ${data.longKeys} 翻译长度超过 100 个字符 - 考虑将它们分解", "longer": "更长", "shorter": "更短", "review_translations": "考虑审查 {lang} 翻译 - 他们是 {percentageDifference}% {comparison} 比基线", "report_saved_to": "报告保存至: {reportPath}", "considerReviewingTranslations": "考虑审查 ${lang} 翻译 - 比基线长 ${data.percentageDifference}%", "csv_report_saved_to": "CSV 报告保存到: {csvPath}", "human_report_saved": "已保存的可读报告: {reportPath}", "folder_summary_title": "文件夹摘要", "folder_summary_table_header": "语言大小 (KB) 键 平均长度 总字符数", "folder_summary_row": "{lang} {sizeKB} {totalKeys} {avgLength} {totalChars}", "language_comparison_title": "语言比较", "language_comparison_row": "{lang}: {diff} 字符({percent}%) {status}", "summary_stats": "📊总结: {totalLanguages} 语言, {totalKeys} 键 - 报告保存到 {reportPath}", "detailedKeysDescription": "在控制台中显示详细的关键级别分析", "too_many_keys_warning": "⚠️ 控制台中显示的按键太多 - 检查详细报告文件以进行完整分析", "no_translation_files_found": "未找到翻译文件", "analysis_completed": "分析完成于 {duration}多发性硬化症", "analysis_failed": "分析失败: {errorMessage}", "starting_analysis": "开始分析...", "found_files": "成立 {count} 文件", "failed_to_parse_language_error": "解析失败 {language} 翻译: {errorMessage}", "recommendations": { "keys_have_significant_size_variations": "按键的尺寸差异很大", "consider_reviewing_translations": "考虑审查 {lang} 翻译 - 他们是 {percentageDifference}% {comparison} 比基线", "long_translations_detected": "{lang} 有 {longKeys} 翻译长度超过 {threshold} 角色 - 考虑将它们分解" }, "detailed_key_analysis_title": "详细的关键分析", "key_analysis_detail": "{lang}: {length} 字符({status}) - {translation}", "key_analysis_header": "钥匙: {key}", "status_empty": "空的", "status_long": "长的", "status_ok": "好的" }, "usage": { "help_message": "I18n 使用分析器用法:node i18ntk-usage.js [选项] 选项:--source-dir <dir> 要扫描的源目录(默认:./src)--i18n-dir <dir> I18n 目录(默认:./src/locales) --output-report 生成详细报告 --output-dir <dir> 报告的输出目录(默认:./reports) --help 显示此帮助 示例:node i18ntk-usage.js --output-report node i18ntk-usage.js --source-dir=./app --i18n-dir=./locales node i18ntk-usage.js --output-dir=./analysis --output-report", "source_directory_thissourcedir": "📁 源码目录: {sourceDir}", "translationCompletenessTitle": "🌍 翻译完整性:", "i18n_directory_thisi18ndir": "🌐I18n 目录: {i18nDir}", "failed_to_parse_filename_error": "⚠️解析失败 {fileName}: {errorMessage}", "analyzing_source_files": "🔍 正在分析源文件...", "found_files_in_source": "📂 找到了 {numFiles} 源目录中的文件", "found_thisusedkeyssize_unique_": "🎯 找到了 {usedKeysSize} 唯一使用过的钥匙", "total_key_usages_totalkeysfoun": "📊 总按键用法: {totalKeysFound}", "loading_available_translation_": "📋 正在加载可用的翻译键...", "found_thisavailablekeyssize_av": "✅ 找到了 {availableKeysSize} 可用键", "foundTranslationFiles": "✅ 找到了 {count} 翻译文件", "errorReadingI18nDirectory": "⚠️ 读取 i18n 目录时出错: {error}", "pressEnterToReturnToMenu": "📝 按 Enter 键返回主菜单...", "notTranslatedKeysTotal": "⚠️ 未翻译的按键: {total}", "noSourceFilesFound": "⚠️在源目录中找不到源文件。", "reviewNotTranslatedKeys": "💡 检查未翻译的按键", "analysisCompletedSuccessfully": "🎉 分析成功完成!", "detectedSourceDirectory": "检测到的源目录: {sourceDir}", "detectedI18nDirectory": "检测到 i18n 目录: {i18nDir}", "fileInfo": "📄 {namespace}: {keys} 键", "failedToAnalyzeUsage": "❌ 无法分析使用情况: {error}", "failedToAnalyzeFile": "❌ 分析文件失败: {error}", "failedToExtractKeys": "❌ 无法从中提取密钥 {filePath}: {error}", "analysisFailedError": "❌ 分析失败: {error}", "analyzerInitialized": "分析仪已初始化", "analyzerInitFailed": "分析仪初始化失败: {error}", "argsParsed": "参数解析", "processedFiles": "已加工 {processedFiles} 的 {totalFiles} 文件。", "argsParseFailed": "参数解析失败: {error}", "translationDiscoveryError": "翻译发现错误: {error}", "fileTraversalError": "文件遍历错误: {error}", "sourceEqualsI18nWarn": "{reason}。使用情况分析不会将语言环境文件扫描为源代码。", "i18nEqualsSourceWarn": "⚠️ I18n目录和源码目录是一样的。这可能会导致分析出现问题。", "usageAnalysisFailed": "⚠️ 使用情况分析失败: {error}", "translationFileParseError": "⚠️翻译文件解析错误: {error}", "translationKeysLoadError": "⚠️翻译键加载错误: {error}", "languageCompletenessStats": "🌐 {language}: {translated}/{total} ({completeness}翻译百分比)", "missingKeysCount": "⚠️丢失钥匙: {count}", "analyzingTranslationCompleteness": "正在分析翻译完整性...", "unusedKeysCount": "未使用的键: {count}", "usedKeysCount": "使用过的按键: {count}", "availableKeysCount": "可用键: {count}", "analysisResults": "分析结果:", "i18nDirectoryNotFound": "⚠️ 未找到 I18n 目录。请检查路径。", "sourceDirectoryNotFound": "⚠️找不到源目录: {dir}", "checkUsage": { "title": "🔍I18NTK 使用分析", "analyzing_source_files": "🔍 正在分析源文件...", "source_directory_thissourcedir": "📁 源码目录: {sourceDir}", "i18n_directory_thisi18ndir": "📁 i18n 目录: {i18nDir}", "found_files_in_source": "✅ 找到了 {numFiles} 源目录中的文件", "no_source_files_found": "⚠️指定目录下没有找到源文件", "processedFiles": "📊已处理 {processedFiles} 的 {totalFiles} 文件", "failedToProcessFile": "❌ 处理失败", "found_thisusedkeyssize_unique_": "🔍发现 {usedKeysSize} 唯一使用过的钥匙", "total_key_usages_totalkeysfoun": "📊 总按键用法: {totalKeysFound}", "loading_available_translation_": "📂 正在加载可用的翻译键...", "found_thisavailablekeyssize_av": "✅ 找到了 {availableKeysSize} 可用键", "message": "正在分析整个项目中的翻译密钥使用情况...", "usage_analysis_results": "📊 使用分析结果", "source_files_scanned_thisfileu": "📁 扫描的源文件: {fileUsageSize}", "available_translation_keys_thi": "✅ 可用的翻译键: {availableKeysSize}", "used_translation_keys_thisused": "🔍 使用的翻译键: {usedKeysSize}", "dynamic_keys_detected_dynamick": "⚡ 检测到动态键: {dynamicKeysLength}", "unused_keys_unusedkeyslength": "🗑️未使用的键: {unusedKeysLength}", "missing_keys_missingkeyslength": "❌ 丢失钥匙: {missingKeysLength}", "translation_completeness_title": "📈 翻译完整性", "language_completeness_stats": "{language}: {translated}/{total} 键({percentage}%)", "n_sample_unused_keys": "🗑️ 未使用的密钥示例(前 5 个):", "key": "🔑 {key}", "and_unusedkeyslength_5_more": "... 和 {count} 更多未使用的键", "n_sample_missing_keys": "❌ 缺失钥匙示例(前 5 个):", "and_missingkeyslength_5_more": "... 和 {count} 更多丢失的钥匙", "n_generating_detailed_report": "📊 生成详细报告...", "report_saved_reportpath": "📄 报告已保存: {reportPath}", "n_recommendations": "💡建议:", "consider_removing_unused_trans": "🗑️ 考虑删除未使用的翻译以减少包大小", "add_missing_translation_keys_t": "➕ 添加缺失的翻译键以保持一致性", "review_dynamic_keys_manually_t": "🔍手动检查动态键(它们可能是有效的)", "all_translation_keys_are_prope": "✅ 所有翻译键都正确使用!", "n_next_steps": "🎯 下一步:", "2_check_the_detailed_report_fo": "2、具体问题查看详细报告", "help_message": "I18n 使用分析器用法:node i18ntk-usage.js [选项] 选项:--source-dir <dir> 要扫描的源目录(默认:./src)--i18n-dir <dir> I18n 目录(默认:./src/locales) --output-report 生成详细报告 --output-dir <dir> 报告的输出目录(默认:./reports) --help 显示此帮助 示例:node i18ntk-usage.js --output-report node i18ntk-usage.js --source-dir=./app --i18n-dir=./locales node i18ntk-usage.js --output-dir=./analysis --output-report", "1_review_the_analysis_results": "1. 在控制台或生成的报告中查看分析结果。", "2_run_with_outputreport_for_de": "2. 使用 --output-report 运行以获得详细报告。", "3_remove_unused_keys_or_add_mi": "3. 删除未使用的密钥或将丢失的密钥添加到源代码中。", "4_rerun_analysis_to_verify_imp": "4. 重新运行分析以验证改进。", "noSourceFilesFound": "未找到可分析的源文件。", "i18nDirectoryNotFound": "未找到 I18n 目录: {i18nDir}", "noTranslationLanguagesFound": "未找到翻译语言。", "failedToAnalyzeFile": "无法分析文件 {filePath}: {error}", "failedToAnalyzeLanguage": "无法分析语言 {language}: {error}", "translationCompletenessAnalysisFailed": "翻译完整性分析失败: {error}", "n": "\\n" }, "complete": { "configLoadedSuccessfully": "配置加载成功", "configLoadingFailed": "配置加载失败", "title": "🌍 I18NTK 翻译完成", "separator": "===============================================================", "sourceDir": "📁 源码目录: {sourceDir}", "sourceLanguage": "🌐源语言: {sourceLanguage}", "dryRunMode": "🧪 试运行模式 - 不会进行任何更改", "languages": "🌍 可用语言: {languages}", "addingMissingKeys": "➕ 将缺失的键添加到翻译文件中...", "processing": "🔄 加工中 {language}...", "addedKeys": "✅ 添加了 {count} 钥匙丢失", "changeDetails": "📝 {file}: {key}", "andMore": "...和 {count} 更多的", "noChangesNeeded": "✅ 无需更改 {language}", "summaryTitle": "📊 完成总结", "totalChanges": "📝 总变化: {totalChanges}", "languagesProcessed": "🌍 处理的语言: {languagesProcessed}", "missingKeysAdded": "➕ 添加了缺失的按键: {missingKeysAdded}", "nextStepsTitle": "📋 下一步", "nextStep1": "1. 运行使用情况分析:", "nextStep2": "节点 i18ntk-usage.js --输出报告", "nextStep3": "2. 验证翻译:", "nextStep4": "节点 i18ntk-validate.js", "nextStep5": "3. 分析模式:", "nextStep6": "节点 i18ntk-analyze.js", "allKeysAvailable": "🎉 所有翻译键现已可用!", "runWithoutDryRun": "💡 在没有 --dry-run 的情况下运行来应用更改", "deletingOldReport": "🗑️ 正在删除旧报告...", "generatingFreshAnalysis": "📊 生成新的使用情况分析...", "couldNotGenerate": "❌ 无法生成使用情况分析", "reportNotFound": "📋 未找到使用报告。使用通用键...", "foundMissingKeys": "📋发现 {count} 使用分析中缺少密钥", "couldNotParse": "❌ 无法解析使用情况报告。使用通用键..." }, "noTranslationLanguagesFound": "未找到翻译语言", "failedToAnalyzeLanguage": "无法分析语言", "translationCompletenessAnalysisFailed": "翻译完整性分析失败", "failedToProcessFile": "处理文件失败:", "failedToSaveReport": "无法保存使用报告: {error}", "i18nDirectoryDoesNotExist": "I18n 目录不存在: {dir}", "reportSavedTo": "使用情况报告保存到: {reportPath}", "sourceDirectoryDoesNotExist": "源目录不存在: {dir}", "noSourceDirectoryConfigured": "(未配置)" }, "validate": { "help_message": "国际化翻译验证器用法:node i18ntk-validate.js [options] 选项:--source-dir <dir> 要扫描的源目录(默认:./src)--i18n-dir <dir> I18n 目录(默认:./src/locales) --output-report 生成详细报告 --output-dir <dir> 报告的输出目录(默认:./reports) --help 显示此帮助示例:node i18ntk-validate.js --output-report node i18ntk-validate.js --source-dir=./app --i18n-dir=./locales node i18ntk-validate.js --output-dir=./analysis --output-report", "title": "🔍 国际化翻译验证器", "message": "开始验证过程...", "sourceDirectory": "📁 源码目录: {dir}", "sourceLanguage": "🌍源语言: {sourceLanguage}", "strictMode": "⚙️严格模式: {mode}", "noTargetLanguages": "未配置目标语言;跳过目标验证。通过“i18ntk init --languages=de,fr”添加语言。", "validatingLanguages": "🌍 验证语言: {langs}", "validatingLanguage": "🔍 验证语言: {lang}", "filesCount": "📄 文件: {count}", "keysCount": "🔑 按键: {count}", "missingFilesCount": "📁 丢失文件: {count}", "syntaxErrorsCount": "❌ 语法错误: {count}", "translationPercentage": "🎯翻译: {percentage}% ({translated}/{total} 键)", "validationSummary": "📊 验证摘要", "validation_failed": "❌ 验证失败: {error}", "totalErrors": "❌ 总错误数: {count}", "totalWarnings": "⚠️警告总数: {count}", "errorsSection": "❌ 错误", "warningsSection": "⚠️警告", "recommendationsSection": "💡推荐", "fixErrorsFirst": "1.首先修复所有错误", "resolveMissingFilesAndSyntaxErrors": "1.解决丢失文件和语法错误", "fixStructuralInconsistencies": "2. 修复结构不一致的问题", "completeMissingTranslations": "3. 完成缺失的翻译", "rerunValidation": "4. 重新运行验证以验证修复", "addressWarnings": "解决警告以提高质量", "reviewWarnings": "查看警告并在适当的情况下进行修复", "considerRunningWithStrict": "2.考虑使用 --strict 标志运行以进行更严格的验证", "allValidationsPassed": "🎉 所有验证均已通过!", "considerRunningUsageAnalysis": "考虑运行使用情况分析:node i18ntk-usage.js", "deletedOldReport": "🗑️删除了旧的验证报告", "sourceDir": "📁 源码目录: {sourceDir}", "i18nDir": "🌐I18n 目录: {i18nDir}", "loadingTranslationFiles": "📋 正在加载翻译文件...", "foundTranslationFilesCount": "✅ 找到了 {count} 翻译文件", "analyzingTranslations": "🔍 正在分析翻译...", "validationCompletedSuccessfully": "🎉 验证成功完成!", "validationErrorsFound": "⚠️发现验证错误: {count}", "validationWarningsFound": "⚠️发现验证警告: {count}", "validationPassed": "✅ 验证已通过,没有错误", "validationFailed": "验证失败: {error}", "startingValidationProcess": "🔍 开始验证过程...", "validationProcessCompletedSuccessfully": "✅ 验证过程已成功完成", "stackTrace": "堆栈跟踪: {stack}", "authenticationFailed": "❌ 验证失败。拒绝访问。", "fatalValidationError": "❌ 致命验证错误: {error}", "configAccess": "访问配置以进行验证", "configValidated": "配置验证成功", "configError": "配置错误: {error}", "validatorInit": "初始化 I18n 验证器", "validatorInitialized": "I18n 验证器初始化成功", "validatorInitError": "验证器初始化错误: {error}", "argsParsing": "解析命令行参数", "argsParsed": "命令行参数解析成功", "argsParseError": "参数解析错误: {error}", "languagesScan": "扫描可用语言", "languagesFound": "成立 {count} 语言", "languagesScanError": "语言扫描错误: {error}", "filesScan": "成立 {count} 文件在 {language}", "filesScanError": "文件扫描错误: {error}", "jsonValidated": "JSON 语法已验证: {filePath}", "jsonValidationError": "JSON 验证错误: {error}", "languageValidation": "验证语言: {language}", "languageValidationError": "语言验证错误: {error}", "fileDeleted": "文件已删除", "runStarted": "开始验证运行", "runCompleted": "验证运行已成功完成", "runError": "验证运行失败: {error}", "scriptExecution": "脚本执行", "validationCompleted": "验证完成", "validationError": "验证错误: {error}", "separator": "──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────", "languageHeader": "🌐语言: {language}", "validationResults": "📊 验证结果", "noErrors": "✅ 没有发现错误", "noWarnings": "✅ 没有发现任何警告", "summaryHeader": "📋 总体总结", "progressIndicator": "⏳ 处理中...", "completedIndicator": "✅ 已完成", "errorIndicator": "❌ 错误", "warningIndicator": "⚠️警告", "infoIndicator": "ℹ️信息", "sourceDirNotConfigured": "源目录未配置", "sourceLanguageNotConfigured": "未配置源语言", "translationFunctionNotInitialized": "翻译功能未正确初始化", "sourceLanguageDirectoryNotFound": "未找到源语言目录", "specifiedLanguageNotFound": "找不到指定的语言", "noJsonFilesFound": "在源目录中找不到 JSON 文件: {sourceDir}", "i18nDirectoryNotFound": "未找到 I18n 目录: {i18nDir}", "invalidDirectoryPaths": "检测到无效的目录路径", "invalidSampleFilePath": "示例文件路径无效", "failedToCreateSampleTranslationFile": "无法创建示例翻译文件", "invalidFilePathDetected": "检测到无效的文件路径", "failedToWriteFile": "写入文件失败: {filePath}", "invalidSourceDirectory": "无效的源目录: {sourceDir}", "invalidSourceLanguageDirectory": "无效的源语言目录: {sourceDir}" }, "adminCli": { "setupPinProtectionTitle": "🔐 设置管理员 PIN 码保护", "setupPinProtectionDescription": "这将需要 4-6 位 PIN 码才能进行管理操作。", "enablePinProtectionPrompt": "您想启用管理员 PIN 码保护吗?", "setupCancelled": "管理员 PIN 保护设置已取消。", "enterPinPrompt": "输入 4-6 位 PIN 码:", "pinFormatError": "❌ PIN 码必须为 4-6 位数字。请再试一次。", "confirmPinPrompt": "确认密码:", "pinMismatchError": "❌ PIN 码不匹配。请再试一次。", "pinProtectionEnabledSuccess": "✅ 管理员 PIN 码保护已成功启用!", "pinRecoveryWarning": "⚠️记住您的 PIN 码 - 如果丢失将无法恢复。", "setupPinProtectionFailed": "❌ 无法设置管理员 PIN 码保护。", "errorSettingUpPin": "❌ 设置管理员 PIN 码时出错: {message}", "authRequiredForOperation": "🔐 需要管理员身份验证: {operation}", "invalidPinFormat": "❌ PIN 码格式无效。 PIN 码必须为 4-6 位数字。", "authenticationSuccess": "✅ 认证成功!", "invalidPinAttemptsRemaining": "❌ PIN 码无效。 {remaining} 剩余尝试次数。", "authenticationFailedAccessDenied": "❌ 验证失败。拒绝访问。", "authenticationError": "❌ 认证错误: {message}", "pinProtectionNotEnabled": "当前未启用管理员 PIN 保护。", "disablingPinProtectionTitle": "🔓 禁用管理员 PIN 码保护", "confirmDisablePinProtection": "您确定要禁用管理员 PIN 码保护吗?", "operationCancelled": "操作已取消。", "pinProtectionDisabledSuccess": "✅ 禁用管理员 PIN 码保护。", "disablePinProtectionFailed": "❌ 无法禁用管理员 PIN 码保护。", "errorDisablingPinProtection": "❌ 禁用管理员保护时出错: {message}", "adminProtectionStatusTitle": "🔐 管理员保护状态", "statusEnabled": "状态: ✅ 已启用", "protectionDetails": "保护:管理操作需要 4-6 位 PIN", "lockoutDetails": "锁定:3 次失败尝试 = 15 分钟锁定", "statusDisabled": "状态: ❌ 已禁用", "noAuthRequired": "保护:无需身份验证", "unprotectedRisk": "风险:行政操作不受保护", "errorCheckingAdminStatus": "❌ 检查管理员状态时出错: {message}", "authRequired": "🔐 需要管理员身份验证。", "invalidPin": "❌ PIN 码无效。", "authSuccess": "✅ 认证成功!", "adminPinSetupCli": "admin_pin_setup_cli", "adminAuthFailedCli": "admin_auth_failed_cli", "adminAuthDisabledCli": "admin_auth_disabled_cli", "protectedAccess": "受保护的访问:敏感操作需要管理员身份验证。", "enterPin": "输入管理员 PIN 码:", "accessGranted": "已授予访问权限。" }, "adminPin": { "setup_title": "🔐 管理员 PIN 码设置", "setup_separator": "===============================================================", "setup_description": "创建 4-6 位 PIN 码,以便管理员访问敏感设置。", "required_for_title": "以下情况需要此 PIN 码:", "required_for_1": "• 更改安全设置", "required_for_2": "• 修改高级配置", "required_for_3": "• 访问调试工具", "required_for_4": "• 重置设置", "setup_note": "💡 注意:您在键入时会看到星号 (*) - 这些只是屏蔽字符。", "setup_digits_only": "仅接受数字 0-9 作为 PIN 数字。", "invalid_pin_length": "❌ PIN 码无效。必须为 4-6 位数字(仅限数字 0-9)。", "invalid_pin_example": "示例:1234 或 567890", "pins_do_not_match": "❌ PIN 码不匹配。", "setup_success": "✅ 管理员 PIN 码已成功设置!", "setup_warning": "⚠️ 确保此 PIN 码安全。如果丢失则无法恢复。", "setup_error": "❌ 设置 PIN 码时出错:", "session_expired": "⏰ 管理会话由于不活动而过期。", "no_pin_set_setting_up": "⚠️ 未设置管理员 PIN 码。正在设置 PIN...", "no_pin_configured_access_denied": "⚠️ 未配置管理员 PIN。拒绝访问。", "use_admin_settings_to_set_pin": "💡 首先使用管理设置设置 PIN。", "locked_out": "🔒 由于尝试失败次数过多,管理员访问权限被锁定。", "wait_before_retry": "请等待 5 分钟,然后重试。", "access_granted": "✅ 已授予管理员访问权限。", "incorrect_pin": "❌ PIN 码不正确。 {attempts} 剩余尝试次数。", "verify_pin_error": "❌ 验证 PIN 码时出错:", "already_configured": "✅ 管理员 PIN 码已配置。", "optional_setup_title": "🔐 管理员 PIN 设置(可选)", "optional_setup_description": "管理员 PIN 保护增加了敏感操作的安全性,例如:", "setup_prompt": "您想设置管理员 PIN 码吗? (是/否):", "skipping_setup": "⏭️ 跳过管理员 PIN 设置。您可以稍后在设置中进行设置。", "setup_prompt_error": "❌ PIN 设置提示错误:", "protectedAccess": "受保护的访问:敏感操作需要管理员身份验证。", "enterPin": "输入管理员 PIN 码:", "accessGranted": "已授予访问权限。", "invalidPin": "❌ PIN 码无效。请再试一次。", "weak_pin_warning": "⚠️警告:此 PIN 码似乎较弱或常见。", "weak_pin_suggestion": "💡 考虑使用具有不同数字的更强的 PIN 码。", "use_anyway_prompt": "键入“yes”仍可使用,或按 Enter 键选择不同的 PIN:", "enter_new_pin": "输入新的管理员 PIN 码(4-6 位数字):", "confirm_pin": "确认管理员 PIN 码:", "not_set": "未设置", "pin_display_mask": "####" }, "debug": { "title": "🔧 调试工具", "separator": "===============================================================", "mainDebuggerSystemDiagnostics": "1. 系统诊断", "_consoleTranslationsCheck": "// 2. 控制台翻译检查", "_exportMissingKeys": "// 3. 导出缺失的翻译键", "_replaceHardcodedConsole": "// 4. 替换硬编码的控制台字符串", "_consoleKeyChecker": "// 5. 控制台按键检查器", "debugLogs": "2. 调试日志", "backToMainMenu": "0. 返回主菜单", "selectOption": "选择调试工具:", "runningDebugTool": "跑步 {displayName}...", "debugToolNotFound": "❌ 未找到调试工具: {toolName}", "errorRunningDebugTool": "运行调试工具时出错'{displayName}': {error}", "recentDebugLogs": "📄 最近的调试日志", "noDebugLogsFound": "❌ 未找到调试日志。", "debugLogsDirectoryNotFound": "❌ 找不到调试日志目录。", "selectLogPrompt": "选择要查看的日志文件(1-{count}):", "invalidChoiceSelectRange": "无效选择。请从可用范围中选择。", "contentOf": "📄 内容 {filename}:", "pressEnterToContinue": "按 Enter 键继续..." }, "detect_language_mismatches": { "tool_title": "🔍 语言不匹配检测工具", "separator": "=======================================", "analyzing_file": "📄 分析中 {language}.json...", "error_analyzing_file": "❌ 错误分析 {filename}: {errorMessage}", "results_title": "📊 语言不匹配检测结果", "results_separator": "=========================================", "summary_title": "📋总结:", "total_files_analyzed": "分析的总文件数: {totalFiles}", "files_with_mismatches": "不匹配的文件: {filesWithMismatches}", "total_mismatches_found": "发现的不匹配总数: {totalMismatches}", "no_mismatches_found": "✅ 未发现语言不匹配!所有翻译似乎都是正确的语言。", "detailed_results_title": "🔍详细结果:", "file_mismatch_header": "📄 {filename} ({language})", "mismatches_count": "成立 {count} 不匹配:", "mismatch_details": "{index}。钥匙: {key}", "mismatch_value": "价值: ”{value}\"", "mismatch_issue": "问题: {description}", "recommendations_title": "💡建议:", "recommendation_1": "1. 审核并翻译所有标有 [翻译] 的条目", "recommendation_2": "2. 用正确的翻译替换语言前缀(例如,[DE]、[FR])", "recommendation_3": "3. 将英文文本翻译成适当的目标语言", "recommendation_4": "4. 对所有面向用户的文本使用母语等效内容", "recommendation_5": "5. 进行更正后再次运行此工具以验证修复", "detailed_report_saved": "📄 详细报告保存至: {reportPath}", "error_saving_report": "❌ 保存报告时出错: {errorMessage}", "auto_fix_mode": "🔧 自动修复模式 {dryRun}", "auto_fix_separator": "=======================================", "fixed_file": "✅ 固定 {filename}", "auto_fix_summary_title": "📊 自动修复摘要:", "total_fixes_applied": "应用的修复总数: {count}", "preview_fixes_title": "🔍修复预览:", "fix_details": "{file}: {key} 老的: ”{old}“ 新的: ”{new}\"", "more_fixes": "... 和 {count} 更多修复", "run_with_apply_fixes": "💡 使用 --apply 运行以应用这些修复", "error_general": "❌ 错误:", "mainDebuggerSystemDiagnostics": "主调试器/系统诊断", "exportMissingKeys": "导出丢失的密钥", "replaceHardcodedConsole": "替换硬编码控制台", "consoleKeyChecker": "控制台按键检查器", "debugLogs": "调试日志", "backToMainMenu": "返回主菜单", "invalidChoiceSelectRange": "❌ 无效选择。请选择显示范围内的数字。", "runningDebugTool": "运行调试工具: {displayName}", "debugToolNotFound": "调试工具'{toolName}' 未找到。", "recentDebugLogs": "最近的调试日志", "noDebugLogsFound": "未找到调试日志。", "logEntry": "日志条目: {timestamp} - {message}", "debugLogsDirectoryNotFound": "找不到调试日志目录。" }, "help": { "title": "📊 I18NTK 管理帮助", "usage": "用法:node main/manage/index.js [选项]", "interactiveMode": "💡使用:node main/manage/index.js --command=<command> 用于直接执行", "showHelp": "📖 使用:node main/manage/index.js --help 查看可用命令", "availableCommands": "📖 可用命令:", "initProject": "🚀 初始化新语言", "analyzeTranslations": "🔍 分析翻译", "validateTranslations": "✅ 验证翻译", "checkUsage": "📊 检查密钥使用情况", "initCommand": "init - 初始化新语言", "analyzeCommand": "分析 - 分析翻译", "validateCommand": "validate - 验证翻译", "usageCommand": "使用情况 - 检查密钥使用情况", "sizingCommand": "尺寸调整 - 分析尺寸", "completeCommand": "完整 - 完整翻译(100% 覆盖率)", "summaryCommand": "摘要 - 显示项目状态", "debugCommand": "debug - 调试翻译问题", "scannerCommand": "扫描仪 - 扫描钥匙", "translateCommand": "翻译 - 自动翻译语言环境文件", "menu": { "pressEnterToContinue": "按 Enter 键继续...", "title": "🌐I18NTK 管理菜单", "description": "用于管理国际化的交互式菜单", "exit": "🚪 退出" }, "commands": { "init": "init - 初始化新语言", "analyze": "分析 - 分析翻译", "validate": "validate - 验证翻译", "usage": "使用情况 - 检查密钥使用情况", "sizing": "尺寸调整 - 分析尺寸", "complete": "完整 - 完整翻译(100% 覆盖率)", "summary": "摘要 - 显示项目状态", "debug": "debug - 调试翻译问题" }, "options": { "sourceDir": "--源目录 <dir> 要分析的源目录", "output": "- 输出 <file> 报告的输出文件", "verbose": "--verbose, -v 显示详细信息", "keepReports": "--keep-reports 保留现有报告", "deleteReports": "--delete-reports 删除现有报告", "help": "--help, -h 显示此帮助" }, "examples": { "title": "示例:", "example1": "节点 i18ntk-manage.js", "example2": "节点 i18ntk-manage.js --source-dir ./locales", "example3": "节点 i18ntk-manage.js --输出摘要报告.txt", "example4": "节点 i18ntk-manage.js --verbose", "example5": "节点 i18ntk-manage.js --source-dir ./locales --output report.json" }, "features": { "initProject": "🚀 初始化新语言", "analyzeTranslations": "🔍 分析翻译", "validateTranslations": "✅ 验证翻译", "checkUsage": "📊 检查密钥使用情况", "completeTranslations": "🎯 完整翻译(100%覆盖)", "showSizing": "📏 分析尺码", "runWorkflow": "🔄 运行完整的工作流程", "showStatus": "📋 显示项目状态", "deleteReports": "🗑️删除所有报告", "changeLanguage": "🌍更改用户界面语言", "settings": "⚙️ 设置", "showHelp": "❓ 帮助", "debugTools": "🔧 调试工具" }, "messages": { "selectOption": "选择一个选项:", "invalidOption": "无效选项。请再试一次。", "operationCompleted": "✅ 操作成功完成!", "pressEnter": "按 Enter 键继续...", "goodbye": "👋再见!", "unknownCommand": "未知命令: {command}", "nonInteractive": "⚠️ 检测到非交互模式。显示的菜单仅供参考。" }, "i18n_helper": { "translation_file_not_found": "未找到翻译文件: {translationFile}", "error_loading_translations": "加载翻译时出错: {errorMessage}", "translation_not_found": "未找到密钥的翻译: {key}", "translation_key_not_string": "翻译键无法解析为字符串: {key}", "error_reading_locales_directory": "读取语言环境目录时出错: {errorMessage}" } }, "init": { "initializationTitle": "🚀 i18n 管理工具包 - 项目初始化", "initializationCancelled": "🚫 初始化被用户取消。", "sourceDirectoryLabel": "📁 源目录: {dir}", "requiredTitle": "需要初始化", "requiredBody": "在运行此命令之前必须初始化该项目。", "promptRunNow": "您想现在运行初始化吗? (是/否):", "sourceLanguageLabel": "🌍 源语言: {language}", "detectedI18nFrameworks": "🔍 检测到的 i18n 框架: {frameworks}", "pinMustBe4Digits": "🔐 PIN 码必须为 4 位数字。", "existingDirectoriesFound": "📁 找到现有的翻译目录:", "useExistingDirectoryPrompt": "您想使用现有目录吗? (是/否)", "selectDirectoryPrompt": "通过输入号码选择目录(或选择“创建新目录”)", "enterNewDirectoryName": "输入新翻译目录的名称", "createdNewDirectory": "✅ 创建新目录: {dir}", "directoryAlreadyExists": "⚠️目录已存在: {dir}", "invalidDirectoryName": "❌ 提供的目录名称无效。", "usingExistingDirectory": "使用现有目录: {dir}", "adminPinSetupOptional": "🔐 管理员 PIN 设置可选(出于安全考虑,推荐)", "adminPinSeparator": "------------------------------------------", "adminPinDescription1": "管理员 PIN:用于安全访问的 4 位数字", "adminPinDescription2": "留空以跳过 PIN 设置", "adminPinDescription3": "如果您设置了 PIN,则将来的所有安全操作都需要它。", "adminPinDescription4": "用于安全存储 PIN 的 AES-256-GCM 加密。", "adminPinSetupPrompt": "输入管理员 PIN(4 位数字)或留空以跳过:", "skippingAdminPinSetup": "正在跳过管理员 PIN 设置...", "settingUpAdminPin": "🔐 设置管理员 PIN...", "enterAdminPin": "输入管理员 PIN 码:", "confirmAdminPin": "确认管理员 PIN 码:", "pinMismatch": "PIN 码不匹配。请再试一次。", "adminPinSetupSuccess": "🔐 管理员 PIN 设置成功!", "adminPinSetupFailure": "🔐 管理员 PIN 设置失败。请再试一次。", "adminProtectionEnabled": "🔐 启用管理员保护。所有操作都需要 PIN 身份验证。", "adminProtectionDisabled": "🔐 管理员保护已禁用。现在无需 PIN 码即可执行所有操作。", "autoDetectedI18nDirectory": "自动检测 i18n 目录: {directory}", "initializingProject": "⚙️ 正在初始化项目配置...", "createdSampleTranslationFile": "✅ 创建示例翻译文件: {file}", "languageSelectionTitle": "🌐 语言配置", "available": "可用的", "defaultLanguages": "📝 默认语言: {languages}", "enterLanguageCodes": "🎯 输入目标语言代码(以逗号分隔,例如 de、es、fr、ru):", "targetLanguages": "🌍 目标语言", "foundSourceFiles": "📄 找到了 {count} 要分析的源文件", "processingLanguage": "🔄 处理语言: {language}", "fileProcessingResult": "✅ 已处理 {file}: {translated}/{total} 键({percentage}%)", "overallProgress": "📊 总体进展: {translated}/{total} 已处理的密钥({percentage}%)", "initializationSummaryTitle": "📋 初始化总结", "languageSummary": "{icon} {name} ({code}): {percentage}% 完全的", "languageFiles": "📄 文件: {count}", "languageKeys": "🔤 按键: {translated}/{total}", "languageMissing": "⚠️缺少: {count}", "initializationCompletedSuccessfully": "🎉 项目初始化成功完成!", "nextStepsTitle": "🚀 后续步骤", "nextStep1": "1. 在 locales/ 目录中查看生成的翻译文件", "nextStep2": "2. 添加每种目标语言的翻译", "nextStep3": "3. 再次运行“npm run i18ntk”以验证翻译", "detectedFrameworks": "✅ 检测到的 i18n 框架: {frameworks}", "setup": { "title": "设置", "question": "设置问题", "opt_single": "单文件", "opt_modular": "模块化的", "opt_existing": "现存的", "choice_prompt": "选择一个选项:", "opt_confirm": "确认", "opt_cancel": "取消", "apply_all_prompt": "将这个结构应用于所有语言? (是/否):", "per_language_intro": "您已选择单独配置语言。以下是可用的语言:", "available_languages": "可用语言: {languages}", "include_prompt": "输入要包含的以逗号分隔的语言代码(例如“de,fr,es”):" }, "warnings": { "noPackageJson": "未找到 package.json。无法自动检测 i18n 框架。" }, "errorsPackageJsonRead": "读取 package.json 时出错: {error}", "errorsNoFramework": "未检测到 i18n 框架。请安装一个或手动指定。", "suggestions": { "noFramework": "未检测到 i18n 框架。考虑使用以下其中一项:", "installFramework": "要安装框架,请运行: npm install <package-name>" }, "frameworks": { "react": "- 反应 i18next (react-i18next)", "vue": "-Vue i18n (vue-i18n)", "i18next": "- i18next (i18next)", "nuxt": "- Nuxt i18n (@nuxtjs/i18n)", "svelte": "- Svelte i18n (svelte-i18n)" }, "continueWithoutI18nPrompt": "未检测到 i18n 框架。您想在没有人的情况下继续吗? (是/否):", "detectedI18nFramework": "检测到的 i18n 框架: {frameworks}", "existingDirectoryItem": "{index}. {location}", "usingExistingStructure": "使用现有结构: {dir}", "creatingSourceDirectory": "创建源目录: {dir}", "creatingSourceLanguageDirectory": "创建源语言目录: {dir}", "errors": { "errorExecutingCommand": "执行命令时出错: {error}", "sourceDirectoryNotFound": "未找到源目录: {dir}", "sourceLanguageDirectoryNotFound": "未找到源语言目录: {dir}", "noJsonFilesInSourceDirectory": "在源目录中找不到 JSON 文件: {dir}", "invalidFilePathDetected": "检测到无效的文件路径", "initializationFailed": "初始化失败: {error}", "noFramework": "未检测到 i18n 框架。继续通用模式。", "packageJsonRead": "读取 package.json 时出错。" }, "processingFile": "加工 {file} 为了 {language}...", "fileAlreadyExistsMerging": "文件 {file} 已经存在。合并新密钥。", "createdNewFile": "创建了新文件: {file}", "updatedFile": "更新的文件: {file}", "skippingExcludedFile": "跳绳 {file} 为了 {language} 因为它被排除在外。", "continuingWithoutAdminPin": "无需设置管理员 PIN 码即可继续。", "createdSourceLanguageDirectory": "创建源语言目录: {dir}", "errorSettingUpAdminPin": "设置管理员 PIN 码时出错: {error}", "noTargetLanguagesSpecified": "未指定目标语言。", "translationFilesCreatedWarning": "翻译文件是使用占位符创建的;生产使用前进行审查。", "warningCannotReadSourceDir": "警告:无法读取源目录 {dir}: {error}", "warningInvalidLanguageCodes": "警告:忽略无效的语言代码: {languages}", "warningProceedingWith