UNPKG

i18ntk

Version:

🚀 The fastest i18n toolkit with 97% performance boost! Zero-dependency, enterprise-grade internationalization for React, Vue, Angular, Python, Java, PHP & more. Features PIN protection, auto framework detection, 7+ UI languages, and comprehensive transla

1,079 lines 130 kB
{ "meta": { "version": "1.10.0", "updated": "2025-08-16" }, "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}", "translationKeyNotFound": "翻译键未找到: {key}", "sourceDirectoryNotFound": "源目录未找到: {directory}", "configLoadingFailed": "配置加载失败", "invalidSourceDirectory": "无效源目录: {directory}", "securityViolation": "安全违规检测到", "authenticationFailed": "身份验证失败", "sourceEqualsI18nWarn": "⚠️ 源目录等于国际化目录 ({sourceDir})。回退到 {fallback} 进行源扫描。" }, "errorGeneratingStatusSummary": "生成状态摘要时出错: {error}", "errorRunningDebugTool": "运行调试工具'{displayName}'时出错: {error}", "errorReadingDebugLogs": "读取调试日志时出错: {error}", "errorAnalyzingLogFile": "分析日志文件时出错: {error}", "errorAnalyzingTranslationKeys": "分析翻译键时出错: {error}", "errorAnalyzingTranslationCompleteness": "分析翻译完整性时出错: {error}", "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": "设置", "confirm": "确认", "analyzingTranslationCompleteness": "正在分析翻译完整性...", "i18nDirectoryNotFound": "⚠️ i18n 目录未找到: {i18nDir}", "translationCompletenessAnalysisFailed": "⚠️ 翻译完整性分析失败: {error}", "failedToAnalyzeLanguage": "❌ 分析语言 {language} 失败: {error}", "errorReadingI18nDirectory": "❌ 读取 i18n 目录时出错: {error}", "initializationCancelled": "🚫 初始化被用户取消。", "languageCompletenessTitle": "📈 翻译完整性按语言", "startingSettings": "🎛️ 开始设置 CLI..." }, "errors": { "invalidOption": "❌ 无效的选项:{option}。请重试。", "readlineClosed": "输入流已关闭;正在以非交互模式运行。", "noPackageJson": "未找到 package.json 文件。无法自动检测 i18n 框架。", "noI18nDir": "未在项目根目录找到 i18n 目录。", "noI18nConfig": "未在项目根目录找到 i18n 配置文件。" }, "fixer": { "help_message": "\nI18n 翻译修复工具\n\n用法: node i18ntk-fixer.js [选项]\n\n选项:\n --source-dir <dir> 要扫描的源目录(默认: ./locales)\n --languages <langs> 要修复的语言列表,用逗号分隔\n --markers <markers> 视为未翻译的标记列表,用逗号分隔\n --no-backup 跳过自动备份创建\n --help 显示此帮助信息\n\n示例:\n node i18ntk-fixer.js --languages de,fr\n node i18ntk-fixer.js --source-dir=./locales --markers NOT_TRANSLATED\n node i18ntk-fixer.js --no-backup\n", "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": "请选择 (y/n/s): ", "nonInteractiveMode": "⚡ 检测到非交互模式 - 自动应用修复...", "reportGenerated": "📊 修复报告已生成: {path}", "summary": { "totalIssues": "问题总数: {total}", "missingKeys": "缺失的键: {missing}", "placeholderKeys": "带有标记的键: {placeholder}", "languages": "语言: {languages}" }, "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": "目录:" } }, "autorun": { "stepAnalyzeTranslations": "分析翻译", "stepCompletedWithIcon": "✅ 步骤“{stepName}”已完成。", "stepValidateTranslations": "验证翻译", "stepRunning": "步骤“{stepName}”正在运行...", "separator": "==================================================", "stepFailed": "步骤“{stepName}”失败。", "errorLabel": "错误:{error}", "autoRunScriptTitle": "自动运行脚本", "usageTitle": "用法:", "runAllSteps": "node i18ntk-autorun.js --all - 运行 i18ntk-config.json 中定义的所有步骤", "configureSettingsFirst": "node i18ntk-autorun.js --config - 配置工作流设置", "runSpecificSteps": "node i18ntk-autorun.js --steps <步骤编号> - 运行特定步骤(例如:--steps 1,3,5)", "showHelp": "node i18ntk-autorun.js --help - 显示此帮助信息", "examplesTitle": "示例:", "configExample": "node i18ntk-autorun.js --config", "stepsExample1": "node i18ntk-autorun.js --steps 1,2,3", "stepsExample2": "node i18ntk-autorun.js --all", "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}ms 内完成。", "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": "\n国际化翻译分析器\n\n用法: node i18ntk-analyze.js [选项]\n\n选项:\n --source-dir <dir> 要扫描的源目录 (默认: ./locales)\n --i18n-dir <dir> I18n 目录 (默认: ./locales)\n --output-report 生成详细报告\n --output-dir <dir> 报告输出目录 (默认: ./i18ntk-reports)\n --help 显示此帮助\n\n示例:\n node i18ntk-analyze.js --output-report\n node i18ntk-analyze.js --source-dir=./app --i18n-dir=./locales\n node i18ntk-analyze.js --output-dir=./analysis --output-report\n", "source_directory": "📁 源目录: {sourceDir}", "i18n_directory": "🌐 I18n 目录: {i18nDir}", "loading_translation_files": "📋 正在加载翻译文件...", "sourceDirectoryLabel": "📁 源目录: ${sourceDir}", "sourceLanguageLabel": "🌍 源语言: ${sourceLanguage}", "strictModeLabel": "⚙️ 严格模式: ${mode}\n", "found_translation_files_count": "✅ 找到 {count} 个翻译文件", "analyzing_translations": "🔍 正在分析翻译...", "analysis_completed_successfully": "🎉 分析成功完成!", "analysis_results": "📊 分析结果", "language_analysis_stats": " {language}: {translatedKeys}/{totalKeys} ({percentage}% 已翻译)", "sample_missing_keys": "\n缺失键示例:", "missing_key": "- {key}", "and_more_missing": "...以及 {count} 个更多。", "sample_unused_keys": "\n未使用键示例:", "unused_key": "- {key}", "and_more_unused": "...以及 {count} 个更多。", "recommendations": "\n📋 建议", "add_missing_translations": "💡 添加缺失翻译以提高覆盖率。", "remove_unused_translations": "💡 删除未使用的翻译以保持项目整洁。", "next_steps": "\n📋 后续步骤", "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": "未找到源语言:{language}", "couldNotParseTarget": "无法解析目标语言:{language}", "couldNotParseSource": "无法解析源语言:{language}", "reportGenerated": "报告已生成:{reportPath}", "generateReportPrompt": "是否生成报告?(y/n)", "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": " node i18ntk-usage.js --output-report", "nextStep3": "2. 验证翻译:", "nextStep4": " node i18ntk-validate.js", "nextStep5": "3. 分析模式:", "nextStep6": " node 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": "开始国际化大小分析...", "source_directory": "源目录: ${sourceDir}", "found_languages": "找到语言: ${languages}", "analyzing_file_sizes": "正在分析文件大小...", "analyzing_translation_content": "正在分析翻译内容...", "generating_size_comparisons": "正在生成大小比较...", "no_languages_found_for_comparison": "未找到用于比较的语言", "sizing_analysis_results": "国际化大小分析结果", "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": "语言 字符差异 百分比差异 问题", "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} 翻译 - 它们比基准 ${comparison} ${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}", "failed_to_parse_language_error": "无法解析${language}翻译: {errorMessage}", "recommendations": { "keys_have_significant_size_variations": "键有显著的大小变化", "consider_reviewing_translations": "考虑检查 ${lang} 翻译 - 它们比基准 ${comparison} ${percentageDifference}%", "long_translations_detected": "${lang} 有 ${data.longKeys} 个翻译超过 ${data.threshold} 个字符 - 考虑拆分它们" }, "starting_analysis": "正在开始分析...", "found_files": "找到 {count} 个文件" }, "usage": { "help_message": "\n国际化使用分析器\n\n用法: node i18ntk-usage.js [选项]\n\n选项:\n --source-dir <dir> 要扫描的源目录 (默认: ./src)\n --i18n-dir <dir> I18n 目录 (默认: ./src/locales)\n --output-report 生成详细报告\n --output-dir <dir> 报告输出目录 (默认: ./reports)\n --help 显示此帮助\n\n示例:\n node i18ntk-usage.js --output-report\n node i18ntk-usage.js --source-dir=./app --i18n-dir=./locales\n node i18ntk-usage.js --output-dir=./analysis --output-report\n", "source_directory_thissourcedir": "📁 源目录: {sourceDir}", "translationCompletenessTitle": "🌍 翻译完整性:", "failedToExtractKeys": "提取键时出错:{error}", "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} 个翻译文件", "pressEnterToReturnToMenu": "📝 按 Enter 键返回主菜单...", "notTranslatedKeysTotal": "⚠️ 未翻译键: {total}", "noSourceFilesFound": "⚠️ 未找到源文件目录中的源文件。", "reviewNotTranslatedKeys": "💡 查看未翻译键", "analysisCompletedSuccessfully": "🎉 分析成功完成!", "detectedSourceDirectory": "检测到源目录: {sourceDir}", "detectedI18nDirectory": "检测到 I18n 目录: {i18nDir}", "fileInfo": " 📄 {namespace}: {keys} 个键", "failedToAnalyzeUsage": "❌ 使用分析失败: {error}", "failedToAnalyzeFile": "❌ 文件分析失败: {error}", "analyzerInitialized": "分析器已初始化", "analyzerInitFailed": "分析器初始化失败: {error}", "argsParsed": "参数已解析", "processedFiles": "已处理 {processedFiles} 个文件中的 {totalFiles} 个文件。", "argsParseFailed": "参数解析失败: {error}", "translationDiscoveryError": "翻译发现错误: {error}", "fileTraversalError": "文件遍历错误: {error}", "usageAnalysisFailed": "使用分析失败: {error}", "sourceEqualsI18nWarn": "⚠️ 源目录和 i18n 目录相同。这可能会导致分析问题。", "i18nEqualsSourceWarn": "⚠️ I18n 目录和源目录相同。这可能会导致分析问题。", "translationFileParseError": "⚠️ 翻译文件解析错误: {error}", "translationKeysLoadError": "⚠️ 翻译键加载错误: {error}", "languageCompletenessStats": "🌍 {language}: {translated}/{total} ({completeness}% 已翻译)", "missingKeysCount": "⚠️ 缺失键: {count}", "analyzingTranslationCompleteness": "正在分析翻译完整性...", "unusedKeysCount": "未使用键: {count}", "usedKeysCount": "已使用键: {count}", "availableKeysCount": "可用键: {count}", "analysisResults": "分析结果:", "i18nDirectoryNotFound": "⚠️ 未找到 i18n 目录:{dir}", "sourceDirectoryNotFound": "⚠️ 未找到源目录:{dir}", "checkUsage": { "title": "🔍 国际化使用分析", "message": "正在分析项目中国际化键的使用情况。", "help_message": "\n国际化使用分析器\n\n用法: node i18ntk-usage.js [选项]\n\n选项:\n --source-dir <dir> 要扫描的源目录 (默认: ./src)\n --i18n-dir <dir> I18n 目录 (默认: ./src/locales)\n --output-report 生成详细报告\n --output-dir <dir> 报告输出目录 (默认: ./reports)\n --help 显示此帮助\n\n示例:\n node i18ntk-usage.js --output-report\n node i18ntk-usage.js --source-dir=./app --i18n-dir=./locales\n node i18ntk-usage.js --output-dir=./analysis --output-report\n", "source_directory_thissourcedir": "📁 源目录: {sourceDir}", "i18n_directory_thisi18ndir": "🌐 I18n 目录: {i18nDir}", "loading_available_translation_": "📋 正在加载可用翻译键...", "found_thisavailablekeyssize_av": "✅ 找到 {availableKeysSize} 个可用键", "analyzing_source_files": "🔍 正在分析源文件...", "found_files_in_source": "📂 在源目录中找到 {numFiles} 个文件", "found_thisusedkeyssize_unique_": "🎯 找到 {usedKeysSize} 个唯一使用键", "total_key_usages_totalkeysfoun": "📊 总键使用数: {totalKeysFound}", "translation_completeness_title": "📊 翻译完整性", "language_completeness_stats": " {language}: {translated}/{total} ({completeness}% 已翻译)", "n_sample_unused_keys": "\n示例未使用键:", "key": "- {key}", "and_unusedkeyslength_5_more": "...还有 {count} 个。", "n_recommendations": "\n📋 建议", "consider_removing_unused_trans": "💡 考虑移除未使用的翻译以保持项目整洁。", "n_next_steps": "\n📋 下一步", "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. 重新运行分析以验证改进。", "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}", "noSourceFilesFound": "未找到要分析的源文件。", "processedFiles": "已处理 {processedFiles} / {totalFiles} 个文件。", "i18nDirectoryNotFound": "未找到 I18n 目录: {i18nDir}", "noTranslationLanguagesFound": "未找到翻译语言。", "failedToAnalyzeFile": "分析文件 {filePath} 失败: {error}", "failedToAnalyzeLanguage": "分析语言 {language} 失败: {error}", "translationCompletenessAnalysisFailed": "翻译完整性分析失败: {error}", "n": "", "no_source_files_found": "⚠️ 未找到源文件", "failedToProcessFile": "❌ 处理文件 {filePath} 失败: {error}", "n_sample_missing_keys": "❌ 示例缺失键 (前 5 个):", "and_missingkeyslength_5_more": "...以及 {count} 个更多缺失键", "n_generating_detailed_report": "\n📊 正在生成详细报告...", "report_saved_reportpath": "📄 报告已保存: {reportPath}", "add_missing_translation_keys_t": " ➕ 向翻译文件添加缺失键以保持一致性", "review_dynamic_keys_manually_t": " 🔍 手动检查动态键 (可能有效)", "all_translation_keys_are_prope": "✅ 所有翻译键都已正确使用!", "2_check_the_detailed_report_fo": " 2. 检查详细报告以获取特定问题" }, "complete": { "configLoadedSuccessfully": "配置加载成功", "configLoadingFailed": "配置加载失败", "title": "🌍 国际化翻译完成", "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": " node i18ntk-usage.js --output-report", "nextStep3": "2. 验证翻译:", "nextStep4": " node i18ntk-validate.js", "nextStep5": "3. 分析模式:", "nextStep6": " node i18ntk-analyze.js", "allKeysAvailable": "🎉 所有翻译键现在都可用!", "runWithoutDryRun": "💡 不使用 --dry-run 运行以应用更改", "deletingOldReport": "🗑️ 正在删除旧报告...", "generatingFreshAnalysis": "📊 正在生成新的使用分析...", "couldNotGenerate": "❌ 无法生成使用分析", "reportNotFound": "📋 未找到使用报告。使用常用键...", "foundMissingKeys": "📋 从使用分析中找到 {count} 个缺失键", "couldNotParse": "❌ 无法解析使用报告。使用常用键..." }, "noTranslationLanguagesFound": "未找到翻译语言。", "failedToAnalyzeLanguage": "分析语言 {language} 失败: {error}", "translationCompletenessAnalysisFailed": "翻译完整性分析失败: {error}", "errorReadingI18nDirectory": "⚠️ 读取 i18n 目录时出错: {error}", "analysisFailedError": "❌ 分析失败: {error}" }, "validate": { "help_message": "\nI18n翻译验证器\n\n用法: node i18ntk-validate.js [选项]\n\n选项:\n --source-dir <dir> 要扫描的源目录 (默认: ./src)\n --i18n-dir <dir> I18n目录 (默认: ./src/locales)\n --output-report 生成详细报告\n --output-dir <dir> 报告输出目录 (默认: ./reports)\n --help 显示此帮助\n\n示例:\n node i18ntk-validate.js --output-report\n node i18ntk-validate.js --source-dir=./app --i18n-dir=./locales\n node i18ntk-validate.js --output-dir=./analysis --output-report\n", "title": "🔍 I18n翻译验证器", "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": "在 {language} 中找到 {count} 个文件", "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}" }, "adminCli": { "setupPinProtectionTitle": "\n🔐 设置管理员PIN保护", "setupPinProtectionDescription": "这将要求输入4-6位数字PIN码进行管理员操作。", "enablePinProtectionPrompt": "您要启用管理员PIN保护吗?", "setupCancelled": "管理员PIN保护设置已取消。", "enterPinPrompt": "请输入4-6位数字PIN码:", "pinFormatError": "❌ PIN码必须是4-6位数字。请重试。", "confirmPinPrompt": "确认PIN码:", "pinMismatchError": "❌ PIN码不匹配。请重试。", "pinProtectionEnabledSuccess": "✅ 管理员PIN保护已成功启用!", "pinRecoveryWarning": "⚠️ 记住您的PIN码 - 如果丢失将无法恢复。", "setupPinProtectionFailed": "❌ 设置管理员PIN保护失败。", "errorSettingUpPin": "❌ 设置管理员PIN时出错:{message}", "authRequiredForOperation": "\n🔐 管理员身份验证要求:{operation}", "invalidPinFormat": "❌ 无效的PIN码格式。PIN码必须是4-6位数字。", "authenticationSuccess": "✅ 身份验证成功!", "invalidPinAttemptsRemaining": "❌ 无效的PIN码。还剩{remaining}次尝试机会。", "authenticationFailedAccessDenied": "❌ 身份验证失败。访问被拒绝。", "authenticationError": "❌ 身份验证错误:{message}", "pinProtectionNotEnabled": "管理员PIN保护当前未启用。", "disablingPinProtectionTitle": "\n🔓 禁用管理员PIN保护", "confirmDisablePinProtection": "您确定要禁用管理员PIN保护吗?", "operationCancelled": "操作已取消。", "pinProtectionDisabledSuccess": "✅ 管理员PIN保护已禁用。", "disablePinProtectionFailed": "❌ 禁用管理员PIN保护失败。", "errorDisablingPinProtection": "❌ 禁用管理员保护时出错:{message}", "adminProtectionStatusTitle": "\n🔐 管理员保护状态", "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": "\n⏰ 管理员会话因不活动而过期。", "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": "\n🔐 管理员PIN设置(可选)", "optional_setup_description": "管理员PIN保护为以下敏感操作增加安全性:", "setup_prompt": "您要设置管理员PIN码吗?(y/N): ", "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": "运行调试工具时出错:{error}", "recentDebugLogs": "📄 最近的调试日志", "noDebugLogsFound": "❌ 未找到调试日志。", "debugLogsDirectoryNotFound": "❌ 未找到调试日志目录。", "selectLogPrompt": "选择要查看的日志文件(1-{count}):", "invalidChoiceSelectRange": "无效的选择。请选择提供范围内的数字。", "contentOf": "📄 {filename} 的内容:", "pressEnterToContinue": "按 Enter 继续..." }, "detect_language_mismatches": { "tool_title": "🔍 语言不匹配检测工具", "separator": "=====================================\n", "analyzing_file": "📄 正在分析 {language}.json...", "error_analyzing_file": "❌ 分析 {filename} 时出错:{errorMessage}", "results_title": "📊 语言不匹配检测结果", "results_separator": "========================================\n", "summary_title": "📋 总结:", "total_files_analyzed": " 分析的文件总数:{totalFiles}", "files_with_mismatches": " 出现不匹配的文件:{filesWithMismatches}", "total_mismatches_found": " 发现不匹配项总数:{totalMismatches}\n", "no_mismatches_found": "✅ 未发现语言不匹配!所有翻译似乎都在正确的语言中。\n", "detailed_results_title": "🔍 详细结果:\n", "file_mismatch_header": "📄 {filename}({language})", "mismatches_count": " 找到 {count} 个不匹配项:\n", "mismatch_details": " {index}. 键:{key}", "mismatch_value": " 值:\"{value}\"", "mismatch_issue": " 问题:{description}", "recommendations_title": "💡 建议:\n", "recommendation_1": "1. 审查并翻译所有标记为 [TRANSLATE] 的条目", "recommendation_2": "2. 替换语言前缀(如 [DE], [FR])为适当的翻译", "recommendation_3": "3. 将英语文本翻译为目标语言", "recommendation_4": "4. 所有面向用户的文本应使用本地语言表达", "recommendation_5": "5. 完成更正后再次运行该工具以验证修复效果\n", "detailed_report_saved": "📄 详细报告已保存到:{reportPath}\n", "error_saving_report": "❌ 保存报告时出错:{errorMessage}\n", "auto_fix_mode": "🔧 自动修复模式 {dryRun}", "auto_fix_separator": "=====================================\n", "fixed_file": "✅ 已修复 {filename}", "auto_fix_summary_title": "\n📊 自动修复摘要:", "total_fixes_applied": " 应用的修复总数:{count}", "preview_fixes_title": "\n🔍 修复预览:", "fix_details": " {file}:{key}\n 原始:\"{old}\"\n 新值:\"{new}\"\n", "more_fixes": " ...以及另外 {count} 个修复\n", "run_with_apply_fixes": "💡 使用 --apply 参数运行以应用这些修复\n", "error_general": "❌ 错误:", "mainDebuggerSystemDiagnostics": "主调试器 / 系统诊断", "exportMissingKeys": "导出缺失键", "replaceHardcodedConsole": "替换硬编码控制台", "consoleKeyChecker": "控制台键检查器", "debugLogs": "调试日志", "backToMainMenu": "返回主菜单", "invalidChoiceSelectRange": "❌ 无效选择。请选择显示范围内的数字。", "runningDebugTool": "正在运行调试工具:{displayName}", "debugToolNotFound": "未找到调试工具:'{toolName}'。", "recentDebugLogs": "最近的调试日志", "noDebugLogsFound": "未找到调试日志。", "logEntry": "日志条目:{timestamp} - {message}", "debugLogsDirectoryNotFound": "未找到调试日志目录。" }, "help": { "title": "📊 国际化管理帮助\n\n", "usage": "用法:node i18ntk-manage.js [选项]\n", "interactiveMode": "\n💡 使用:node i18ntk-manage.js --command=<command> 直接执行命令\n", "showHelp": "\n📖 使用:node i18ntk-manage.js --help 查看可用命令\n", "availableCommands": "\n📖 可用命令:\n", "initProject": "🚀 初始化新语言", "analyzeTranslations": "🔍 分析翻译", "validateTranslations": "✅ 验证翻译", "checkUsage": "📊 检查键使用情况", "initCommand": " init - 初始化新语言", "analyzeCommand": " analyze - 分析翻译", "validateCommand": " validate - 验证翻译", "usageCommand": " usage - 检查键使用情况", "sizingCommand": " sizing - 分析大小差异", "completeCommand": " complete - 完成翻译(100% 覆盖)", "summaryCommand": " summary - 显示项目状态", "debugCommand": " debug - 调试翻译问题", "scannerCommand": " scanner - 扫描项目中的 i18n 键", "menu": { "pressEnterToContinue": "按 Enter 继续...", "title": "\n🌐 国际化管理菜单\n", "description": "用于管理国际化的交互式菜单\n", "exit": "\n🚪 退出" }, "commands": { "init": "\n init - 初始化新语言", "analyze": " analyze - 分析翻译", "validate": " validate - 验证翻译", "usage": " usage - 检查键使用情况", "sizing": " sizing - 分析大小差异", "complete": " complete - 完成翻译(100% 覆盖)", "summary": " summary - 显示项目状态", "debug": " debug - 调试翻译问题" }, "options": { "sourceDir": "\n --source-dir <dir> 要分析的源目录", "output": " --output <file> 报告输出文件", "verbose": " --verbose, -v 显示详细信息", "keepReports": " --keep-reports 保留现有报告", "deleteReports": " --delete-reports 删除现有报告", "help": " --help, -h 显示此帮助" }, "examples": { "title": "\n示例:\n", "example1": " node i18ntk-manage.js", "example2": " node i18ntk-manage.js --source-dir ./locales", "example3": " node i18ntk-manage.js --output summary-report.txt", "example4": " node i18ntk-manage.js --verbose", "example5": " node 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": "读取 locales 目录时出错:{errorMessage}" } }, "init": { "initializationTitle": "🚀 i18n 管理工具 - 项目初始化", "initializationCancelled": "🚫 初始化已被用户取消。", "sourceDirectoryLabel": "📁 源目录:{dir}", "createdSourceLanguageDirectory": "✅ 创建源语言目录:{dir}", "requiredTitle": "需要初始化", "requiredBody": "在运行此命令之前,必须先初始化项目。", "promptRunNow": "现在要运行初始化吗?(y/N): ", "sourceLanguageLabel": "🌍 源语言:{language}", "detectedI18nFrameworks": "🔍 检测到的 i18n 框架:{frameworks}", "existingDirectoriesFound": "📁 发现已有翻译目录:", "useExistingDirectoryPrompt": "要使用已有目录吗?(y/n)", "selectDirectoryPrompt": "选择目录(输入数字或选择 '创建新目录'):", "enterNewDirectoryName": "输入新目录名称:", "createdNewDirectory": "✅ 已创建新目录: {dir}", "pinMustBe4Digits": "🔐 PIN 必须是 4 位数字。", "directoryAlreadyExists": "⚠️ 目录已存在:{dir}", "invalidDirectoryName": "❌ 无效目录名称:{name}", "usingExistingDirectory": " 使用现有目录: {dir}", "adminPinSetupOptional": "🔐 管理员 PIN 设置可选(推荐用于安全)", "adminPinSeparator": "------------------------------", "adminPinDescription1": "管理员 PIN:4 位数字,用于安全访问", "adminPinDescription2": "留空以跳过 PIN 设置", "adminPinDescription3": "PIN 将要求用于所有后续操作", "adminPinDescription4": "PIN 设置完成", "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": "是否将此结构应用于所有语言?(y/N): ", "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 <包名>" }, "frameworks": { "react": "- React i18next (react-i18next)", "vue": "- Vue i18n (vue-i18n)", "i18next": "- i18next (i18next)", "nuxt": "- Nuxt i18n (@nuxtjs/i18n)", "svelte": "- Svelte i18n (svelte-i18n)" }, "continueWithoutI18nPrompt": "未检测到 i18n 框架。是否继续?(y/N):", "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}" }, "processingFile": "正在为 {language} 处理文件 {file}...", "fileAlreadyExistsMerging": "文件 {file} 已存在。正在合并新键。", "createdNewFile": "已创建新文件:{file}", "updatedFile": "已更新文件:{file}", "skippingExcludedFile": "已跳过 {language} 的 {file},因其在排除列表中。" }, "language": { "title": "🌍 切换语言", "separator": "============================================================", "current": "当前语言:{language}", "available": "可用语言:", "languageOption": "{index}. {displayName}{current}", "backToMainMenu": "返回主菜单", "prompt": "请选择语言(0-8):", "cancelled": "已取消语言切换。", "invalid": "无效选择,请重试。", "changed": "语言已切换为:{language}", "pressEnterToContinue": "按 Enter 继续..." }, "maintainLanguagePurity": { "workflow_title": "🚀 语言纯洁度维护工作流", "step1_title": "📊 第1步:初始语言纯洁度评估", "step2_title": "\n🔧 第2步:检测并自动修复语言不匹配", "step3_title": "\n🌐 第3步:应用自动翻译", "step4_title": "\n✅ 第4步:最终语言纯洁度评估", "workflow_error": "❌ 工作流错误:{errorMessage}", "running_initial_validation": "正在运行初始语言纯洁度验证…", "initial_assessment_complete": "✅ 初始评估完成:发现 {count} 处违规\n", "initial_assessment_warnings": "⚠️ 初始评估完成,存在警告\n", "detecting_fixing_mismatches": "正在检测并修复语言不匹配…", "detection_complete_applying_fixes": "检测完成,正在应用自动修复…", "mismatch_fixes_complete": "✅ 语言不匹配修复完成:应用了 {count} 处修复\n", "mismatch_fixes_warnings": "⚠️ 语言不匹配修复完成,存在警告\n", "applying_automatic_translations": "正在应用自动翻译…", "translation_preview_complete": "翻译预览完成,正在应用翻译…" }, "menu": { "title": "🌐 国际化管理菜单", "separator": "============================================================", "options": { "init": "🚀 初始化新语言", "analyze": "🔍 分析翻译", "validate": "✅ 验证翻译", "usage": "📊 检查键使用情况", "complete": "🎯 完成翻译(100% 覆盖)", "sizing": "📏 分析大小差异", "fix": "🛠️ 修复占位翻译", "workflow": "🔄 运行完整工作流", "status": "📋 显示项目状态", "delete": "🗑️ 删除全部报告", "language": "🌍 切换界面语言", "settings": "⚙️ 设置", "help": "❓ 帮助", "debug": "🔧 调试工具", "scanner": "🔍 扫描i18n问题", "exit": "🚪 退出" }, "update": "📦 更新软件包", "goodbye": "👋 再见!", "invalidChoice": "❌ 无效选择。请选择 0-15。", "return