i18ntk 1.7.2 → 1.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +78 -19
- package/main/i18ntk-analyze.js +19 -17
- package/main/i18ntk-fixer.js +653 -0
- package/main/i18ntk-manage.js +40 -33
- package/main/i18ntk-validate.js +4 -3
- package/package.json +13 -6
- package/scripts/fixer.test.js +90 -0
- package/scripts/test-runner.js +2 -1
- package/settings/i18ntk-config.json +8 -1
- package/settings/initialization.json +3 -3
- package/ui-locales/de.json +67 -1
- package/ui-locales/en.json +67 -1
- package/ui-locales/es.json +67 -1
- package/ui-locales/fr.json +67 -1
- package/ui-locales/ja.json +67 -1
- package/ui-locales/ru.json +67 -1
- package/ui-locales/zh.json +67 -1
- package/utils/config-helper.js +5 -1
- package/utils/security.js +2 -1
package/ui-locales/fr.json
CHANGED
|
@@ -94,6 +94,71 @@
|
|
|
94
94
|
"settings": "Paramètres",
|
|
95
95
|
"confirm": "Confirmer"
|
|
96
96
|
},
|
|
97
|
+
"fixer": {
|
|
98
|
+
"help_message": "\nCorrecteur de Traduction I18n\n\nUtilisation: node i18ntk-fixer.js [options]\n\nOptions:\n --source-dir <dir> Répertoire source à analyser (par défaut: ./locales)\n --languages <langs> Liste séparée par virgules des langues à corriger\n --markers <markers> Liste séparée par virgules des marqueurs à traiter comme non traduits\n --no-backup Sauter la création de sauvegarde automatique\n --help Afficher cette aide\n\nExemples:\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",
|
|
99
|
+
"starting": "🚀 Démarrage de la correction de traduction pour les langues: {languages}",
|
|
100
|
+
"sourceDirectory": "📁 Répertoire source: {sourceDir}",
|
|
101
|
+
"sourceLanguage": "🔤 Langue source: {sourceLanguage}",
|
|
102
|
+
"markers": "🏷️ Marqueurs à corriger: {markers}",
|
|
103
|
+
"scanningLanguage": "📊 Analyse de {language}...",
|
|
104
|
+
"noLanguages": "❌ Aucune langue spécifiée pour la correction.",
|
|
105
|
+
"allComplete": "🎉 Toutes les traductions sont déjà complètes!",
|
|
106
|
+
"fullReportSaved": "📊 Rapport complet sauvegardé dans: {reportPath}",
|
|
107
|
+
"reviewReport": "Veuillez examiner le rapport avant de continuer.",
|
|
108
|
+
"backupCreated": "💾 Sauvegarde créée avec succès.",
|
|
109
|
+
"applyingFixes": "🔄 Application des corrections...",
|
|
110
|
+
"fixingComplete": "✅ Correction de traduction terminée!",
|
|
111
|
+
"operationCancelled": "❌ Opération annulée par l'utilisateur.",
|
|
112
|
+
"analysisTitle": "🔍 ANALYSE DE CORRECTION DE TRADUCTION",
|
|
113
|
+
"analysisSeparator": "==================================================",
|
|
114
|
+
"totalIssues": "Total de problèmes trouvés: {totalIssues}",
|
|
115
|
+
"missingTranslations": "Traductions manquantes: {missing}",
|
|
116
|
+
"placeholderTranslations": "Traductions avec marqueurs: {placeholder}",
|
|
117
|
+
"noIssues": "✅ Aucun problème trouvé. Toutes les traductions sont complètes.",
|
|
118
|
+
"detailedIssues": "📋 PROBLÈMES DÉTAILLÉS:",
|
|
119
|
+
"detailedSeparator": "--------------------------------------------------",
|
|
120
|
+
"filePath": "📄 {file} → {path}",
|
|
121
|
+
"missingKey": "❌ MANQUANT: {source} → {new}",
|
|
122
|
+
"placeholderKey": "⚠️ MARQUEUR: \"{target}\" → \"{new}\"",
|
|
123
|
+
"moreIssues": "... et {count} problèmes supplémentaires. Consultez le fichier de rapport pour les détails complets.",
|
|
124
|
+
"confirmationTitle": "🤔 Voulez-vous procéder avec ces corrections?",
|
|
125
|
+
"confirmationOptions": "Options:",
|
|
126
|
+
"optionYes": "o - Oui, appliquer toutes les corrections",
|
|
127
|
+
"optionNo": "n - Non, annuler l'opération",
|
|
128
|
+
"optionShow": "d - Afficher les problèmes détaillés",
|
|
129
|
+
"choicePrompt": "Votre choix (o/n/d): ",
|
|
130
|
+
"nonInteractiveMode": "⚡ Mode non interactif détecté - application automatique des corrections...",
|
|
131
|
+
"reportGenerated": "📊 Rapport de correction généré: {path}",
|
|
132
|
+
"summary": {
|
|
133
|
+
"totalIssues": "Total des problèmes : {total}",
|
|
134
|
+
"missingKeys": "Clés manquantes : {missing}",
|
|
135
|
+
"placeholderKeys": "Clés avec marqueurs : {placeholder}",
|
|
136
|
+
"languages": "Langues : {languages}"
|
|
137
|
+
},
|
|
138
|
+
"welcome": {
|
|
139
|
+
"title": "🎯 Bienvenue dans l'Outil de Réparation des Traductions !",
|
|
140
|
+
"description": "Cet outil vous aidera à corriger les traductions brisées et les marqueurs dans vos fichiers de langue."
|
|
141
|
+
},
|
|
142
|
+
"markerPrompt": {
|
|
143
|
+
"title": "🏷️ Configurer les Marqueurs de Placeholder",
|
|
144
|
+
"description": "Entrez les marqueurs qui indiquent le texte non traduit (séparés par des virgules) :",
|
|
145
|
+
"currentDefaults": "Marqueurs par défaut : {markers}",
|
|
146
|
+
"input": "Marqueurs (ou appuyez sur Entrée pour utiliser les défauts) : "
|
|
147
|
+
},
|
|
148
|
+
"languagePrompt": {
|
|
149
|
+
"title": "🌍 Sélectionner les Langues à Réparer",
|
|
150
|
+
"available": "Langues disponibles : {languages}",
|
|
151
|
+
"description": "Entrez les langues à réparer (séparées par des virgules) ou appuyez sur Entrée pour toutes :",
|
|
152
|
+
"input": "Langues : ",
|
|
153
|
+
"noLanguages": "Aucune langue trouvée à réparer."
|
|
154
|
+
},
|
|
155
|
+
"directoryPrompt": {
|
|
156
|
+
"title": "📁 Sélectionner le Répertoire",
|
|
157
|
+
"current": "Répertoire actuel : {dir}",
|
|
158
|
+
"description": "Entrez le répertoire contenant vos fichiers de langue (ou appuyez sur Entrée pour le répertoire actuel) :",
|
|
159
|
+
"input": "Répertoire : "
|
|
160
|
+
}
|
|
161
|
+
},
|
|
97
162
|
"autorun": {
|
|
98
163
|
"stepAnalyzeTranslations": "Analyser les traductions",
|
|
99
164
|
"stepCompletedWithIcon": "✅ Étape '{stepName}' terminée.",
|
|
@@ -947,6 +1012,7 @@
|
|
|
947
1012
|
"usage": "📊 Vérifier l’utilisation des clés",
|
|
948
1013
|
"complete": "🎯 Compléter les traductions (100 % de couverture)",
|
|
949
1014
|
"sizing": "📏 Analyser le dimensionnement",
|
|
1015
|
+
"fix": "🛠️ Corriger les traductions de remplacement",
|
|
950
1016
|
"workflow": "🔄 Exécuter le flux complet",
|
|
951
1017
|
"status": "📋 Afficher le statut du projet",
|
|
952
1018
|
"delete": "🗑️ Supprimer tous les rapports",
|
|
@@ -958,7 +1024,7 @@
|
|
|
958
1024
|
},
|
|
959
1025
|
"update": "📦 Mettre à jour le paquet",
|
|
960
1026
|
"goodbye": "👋 Au revoir !",
|
|
961
|
-
"invalidChoice": "❌ Choix invalide. Veuillez sélectionner 0-
|
|
1027
|
+
"invalidChoice": "❌ Choix invalide. Veuillez sélectionner 0-14.",
|
|
962
1028
|
"returning": "🔄 Retour au menu principal…",
|
|
963
1029
|
"invalidOption": "❌ Option invalide. Veuillez réessayer.",
|
|
964
1030
|
"nonInteractiveModeWarning": "⚠️ Mode non interactif détecté. Menu affiché à titre indicatif.",
|
package/ui-locales/ja.json
CHANGED
|
@@ -94,6 +94,71 @@
|
|
|
94
94
|
"settings": "設定",
|
|
95
95
|
"confirm": "確認"
|
|
96
96
|
},
|
|
97
|
+
"fixer": {
|
|
98
|
+
"help_message": "\nI18n Translation Fixer\n\nUsage: node i18ntk-fixer.js [options]\n\nOptions:\n --source-dir <dir> Source directory to scan (default: ./locales)\n --languages <langs> Comma separated list of languages to fix\n --markers <markers> Comma separated markers to treat as untranslated\n --no-backup Skip automatic backup creation\n --help Show this help\n\nExamples:\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",
|
|
99
|
+
"starting": "🚀 翻訳修正を開始します。言語: {languages}",
|
|
100
|
+
"sourceDirectory": "📁 ソースディレクトリ: {sourceDir}",
|
|
101
|
+
"sourceLanguage": "🔤 ソース言語: {sourceLanguage}",
|
|
102
|
+
"markers": "🏷️ 修正するマーカー: {markers}",
|
|
103
|
+
"scanningLanguage": "📊 {language} をスキャン中...",
|
|
104
|
+
"noLanguages": "❌ 修正する言語が指定されていません。",
|
|
105
|
+
"allComplete": "🎉 すべての翻訳が既に完了しています!",
|
|
106
|
+
"fullReportSaved": "📊 完全なレポートが保存されました: {reportPath}",
|
|
107
|
+
"reviewReport": "翻訳修正レポートを確認してください。",
|
|
108
|
+
"backupCreated": "💾 バックアップが正常に作成されました。",
|
|
109
|
+
"applyingFixes": "🔄 修正を適用中...",
|
|
110
|
+
"fixingComplete": "✅ 翻訳修正が完了しました!",
|
|
111
|
+
"operationCancelled": "❌ ユーザーによる操作がキャンセルされました。",
|
|
112
|
+
"analysisTitle": "🔍 翻訳修正分析",
|
|
113
|
+
"analysisSeparator": "==================================================",
|
|
114
|
+
"totalIssues": "🔍 修正可能な問題の合計: {totalIssues}",
|
|
115
|
+
"missingTranslations": "❌ 不足している翻訳: {missing}",
|
|
116
|
+
"placeholderTranslations": "⚠️ プレースホルダー翻訳: {placeholder}",
|
|
117
|
+
"noIssues": "✅ 修正可能な問題が見つかりませんでした。すべての翻訳が完了しています。",
|
|
118
|
+
"detailedIssues": "📋 詳細な問題:",
|
|
119
|
+
"detailedSeparator": "--------------------------------------------------",
|
|
120
|
+
"filePath": "📄 {file} → {path}",
|
|
121
|
+
"missingKey": "❌ 不足している翻訳: {source} → {new}",
|
|
122
|
+
"placeholderKey": "⚠️ プレースホルダー翻訳: \"{target}\" → \"{new}\"",
|
|
123
|
+
"moreIssues": "... その他 {count} 件の問題が見つかりました。詳細はレポートファイルを参照してください。",
|
|
124
|
+
"confirmationTitle": "🤔 修正を適用しますか?",
|
|
125
|
+
"confirmationOptions": "選択肢:",
|
|
126
|
+
"optionYes": "y - すべての修正を適用",
|
|
127
|
+
"optionNo": "n - 操作をキャンセル",
|
|
128
|
+
"optionShow": "s - 詳細な問題を表示",
|
|
129
|
+
"choicePrompt": "選択肢を入力 (y/n/s): ",
|
|
130
|
+
"nonInteractiveMode": "⚡ 非対話モードが検出されました。修正を自動的に適用します...",
|
|
131
|
+
"reportGenerated": "📊 修正レポートが生成されました: {path}",
|
|
132
|
+
"summary": {
|
|
133
|
+
"totalIssues": "総問題数: {total}",
|
|
134
|
+
"missingKeys": "不足キー: {missing}",
|
|
135
|
+
"placeholderKeys": "プレースホルダーキー: {placeholder}",
|
|
136
|
+
"languages": "言語: {languages}"
|
|
137
|
+
},
|
|
138
|
+
"welcome": {
|
|
139
|
+
"title": "🎯 翻訳フィクサーへようこそ!",
|
|
140
|
+
"description": "このツールは、壊れた翻訳やプレースホルダーマーカーを言語ファイルから修復するのに役立ちます。"
|
|
141
|
+
},
|
|
142
|
+
"markerPrompt": {
|
|
143
|
+
"title": "🏷️ プレースホルダーマーカーの設定",
|
|
144
|
+
"description": "未翻訳のテキストを示すマーカーを入力してください(カンマ区切り):",
|
|
145
|
+
"currentDefaults": "デフォルトマーカー: {markers}",
|
|
146
|
+
"input": "マーカー(Enterでデフォルトを使用): "
|
|
147
|
+
},
|
|
148
|
+
"languagePrompt": {
|
|
149
|
+
"title": "🌍 修復する言語の選択",
|
|
150
|
+
"available": "利用可能な言語: {languages}",
|
|
151
|
+
"description": "修復する言語を入力してください(カンマ区切り)またはEnterですべてを選択:",
|
|
152
|
+
"input": "言語: ",
|
|
153
|
+
"noLanguages": "修復する言語が見つかりませんでした。"
|
|
154
|
+
},
|
|
155
|
+
"directoryPrompt": {
|
|
156
|
+
"title": "📁 ディレクトリの選択",
|
|
157
|
+
"current": "現在のディレクトリ: {dir}",
|
|
158
|
+
"description": "言語ファイルを含むディレクトリを入力してください(またはEnterで現在のディレクトリを使用):",
|
|
159
|
+
"input": "ディレクトリ: "
|
|
160
|
+
}
|
|
161
|
+
},
|
|
97
162
|
"autorun": {
|
|
98
163
|
"stepAnalyzeTranslations": "翻訳の分析",
|
|
99
164
|
"stepCompletedWithIcon": "✅ ステップ「{stepName}」が完了しました。",
|
|
@@ -950,6 +1015,7 @@
|
|
|
950
1015
|
"usage": "📊 キー使用状況をチェック",
|
|
951
1016
|
"complete": "🎯 翻訳を完了 (100% カバレッジ)",
|
|
952
1017
|
"sizing": "📏 サイズを分析",
|
|
1018
|
+
"fix": "🛠️ プレースホルダー翻訳を修正",
|
|
953
1019
|
"workflow": "🔄 フルワークフローを実行",
|
|
954
1020
|
"status": "📋 プロジェクトステータスを表示",
|
|
955
1021
|
"delete": "🗑️ すべてのレポートを削除",
|
|
@@ -961,7 +1027,7 @@
|
|
|
961
1027
|
},
|
|
962
1028
|
"update": "📦 パッケージを更新",
|
|
963
1029
|
"goodbye": "👋 さようなら!",
|
|
964
|
-
"invalidChoice": "❌ 無効な選択です。0〜
|
|
1030
|
+
"invalidChoice": "❌ 無効な選択です。0〜14 を選択してください。",
|
|
965
1031
|
"returning": "🔄 メインメニューに戻ります…",
|
|
966
1032
|
"invalidOption": "❌ 無効なオプションです。もう一度お試しください。",
|
|
967
1033
|
"nonInteractiveModeWarning": "⚠️ 非対話モードが検出されました。メニューは参照用です。",
|
package/ui-locales/ru.json
CHANGED
|
@@ -94,6 +94,71 @@
|
|
|
94
94
|
"settings": "Настройки",
|
|
95
95
|
"confirm": "Подтвердить"
|
|
96
96
|
},
|
|
97
|
+
"fixer": {
|
|
98
|
+
"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",
|
|
99
|
+
"starting": "🚀 Запуск исправления переводов для языков: {languages}",
|
|
100
|
+
"sourceDirectory": "📁 Исходный каталог: {sourceDir}",
|
|
101
|
+
"sourceLanguage": "🔤 Исходный язык: {sourceLanguage}",
|
|
102
|
+
"markers": "🏷️ Маркеры для исправления: {markers}",
|
|
103
|
+
"scanningLanguage": "📊 Сканирование {language}...",
|
|
104
|
+
"noLanguages": "❌ Языки для исправления не указаны.",
|
|
105
|
+
"allComplete": "🎉 Все переводы уже завершены!",
|
|
106
|
+
"fullReportSaved": "📊 Полный отчет сохранен в: {reportPath}",
|
|
107
|
+
"reviewReport": "Пожалуйста, просмотрите отчет перед продолжением.",
|
|
108
|
+
"backupCreated": "💾 Резервная копия успешно создана.",
|
|
109
|
+
"applyingFixes": "🔄 Применение исправлений...",
|
|
110
|
+
"fixingComplete": "✅ Исправление переводов завершено!",
|
|
111
|
+
"operationCancelled": "❌ Операция отменена пользователем.",
|
|
112
|
+
"analysisTitle": "🔍 АНАЛИЗ ИСПРАВЛЕНИЯ ПЕРЕВОДОВ",
|
|
113
|
+
"analysisSeparator": "==================================================",
|
|
114
|
+
"totalIssues": "Всего найдено проблем: {totalIssues}",
|
|
115
|
+
"missingTranslations": "Отсутствующие переводы: {missing}",
|
|
116
|
+
"placeholderTranslations": "Переводы с маркерами: {placeholder}",
|
|
117
|
+
"noIssues": "✅ Проблем не найдено. Все переводы завершены.",
|
|
118
|
+
"detailedIssues": "📋 ПОДРОБНЫЕ ПРОБЛЕМЫ:",
|
|
119
|
+
"detailedSeparator": "--------------------------------------------------",
|
|
120
|
+
"filePath": "📄 {file} → {path}",
|
|
121
|
+
"missingKey": "❌ ОТСУТСТВУЕТ: {source} → {new}",
|
|
122
|
+
"placeholderKey": "⚠️ МАРКЕР: \"{target}\" → \"{new}\"",
|
|
123
|
+
"moreIssues": "... и еще {count} проблем. См. файл отчета для полных деталей.",
|
|
124
|
+
"confirmationTitle": "🤔 Продолжить с этими исправлениями?",
|
|
125
|
+
"confirmationOptions": "Опции:",
|
|
126
|
+
"optionYes": "д - Да, применить все исправления",
|
|
127
|
+
"optionNo": "н - Нет, отменить операцию",
|
|
128
|
+
"optionShow": "п - Показать подробные проблемы",
|
|
129
|
+
"choicePrompt": "Ваш выбор (д/н/п): ",
|
|
130
|
+
"nonInteractiveMode": "⚡ Обнаружен неинтерактивный режим - автоматическое применение исправлений...",
|
|
131
|
+
"reportGenerated": "📊 Сгенерирован отчет об исправлении: {path}",
|
|
132
|
+
"summary": {
|
|
133
|
+
"totalIssues": "Всего проблем: {total}",
|
|
134
|
+
"missingKeys": "Отсутствующие ключи: {missing}",
|
|
135
|
+
"placeholderKeys": "Ключи с маркерами: {placeholder}",
|
|
136
|
+
"languages": "Языки: {languages}"
|
|
137
|
+
},
|
|
138
|
+
"welcome": {
|
|
139
|
+
"title": "🎯 Добро пожаловать в инструмент исправления переводов!",
|
|
140
|
+
"description": "Этот инструмент поможет вам исправить сломанные переводы и маркеры в ваших языковых файлах."
|
|
141
|
+
},
|
|
142
|
+
"markerPrompt": {
|
|
143
|
+
"title": "🏷️ Настройка маркеров плейсхолдеров",
|
|
144
|
+
"description": "Введите маркеры, которые указывают на непереведенный текст (через запятую):",
|
|
145
|
+
"currentDefaults": "Маркеры по умолчанию: {markers}",
|
|
146
|
+
"input": "Маркеры (или Enter для использования по умолчанию): "
|
|
147
|
+
},
|
|
148
|
+
"languagePrompt": {
|
|
149
|
+
"title": "🌍 Выбор языков для исправления",
|
|
150
|
+
"available": "Доступные языки: {languages}",
|
|
151
|
+
"description": "Введите языки для исправления (через запятую) или Enter для всех:",
|
|
152
|
+
"input": "Языки: ",
|
|
153
|
+
"noLanguages": "Языки для исправления не найдены."
|
|
154
|
+
},
|
|
155
|
+
"directoryPrompt": {
|
|
156
|
+
"title": "📁 Выбор директории",
|
|
157
|
+
"current": "Текущая директория: {dir}",
|
|
158
|
+
"description": "Введите директорию с вашими языковыми файлами (или Enter для текущей директории):",
|
|
159
|
+
"input": "Директория: "
|
|
160
|
+
}
|
|
161
|
+
},
|
|
97
162
|
"autorun": {
|
|
98
163
|
"stepAnalyzeTranslations": "Анализ переводов",
|
|
99
164
|
"stepCompletedWithIcon": "✅ Шаг «{stepName}» завершён.",
|
|
@@ -950,6 +1015,7 @@
|
|
|
950
1015
|
"usage": "📊 Проверить использование ключей",
|
|
951
1016
|
"complete": "🎯 Завершить переводы (100% покрытия)",
|
|
952
1017
|
"sizing": "📏 Анализ размеров",
|
|
1018
|
+
"fix": "🛠️ Исправить переводы-заглушки",
|
|
953
1019
|
"workflow": "🔄 Запустить полный рабочий процесс",
|
|
954
1020
|
"status": "📋 Показать статус проекта",
|
|
955
1021
|
"delete": "🗑️ Удалить все отчёты",
|
|
@@ -961,7 +1027,7 @@
|
|
|
961
1027
|
},
|
|
962
1028
|
"update": "📦 Обновить пакет",
|
|
963
1029
|
"goodbye": "👋 До свидания!",
|
|
964
|
-
"invalidChoice": "❌ Неверный выбор. Пожалуйста выберите 0-
|
|
1030
|
+
"invalidChoice": "❌ Неверный выбор. Пожалуйста выберите 0-14.",
|
|
965
1031
|
"returning": "🔄 Возвращаюсь в главное меню...",
|
|
966
1032
|
"invalidOption": "❌ Недопустимая опция. Попробуйте ещё раз.",
|
|
967
1033
|
"nonInteractiveModeWarning": "⚠️ Обнаружен неинтерактивный режим. Меню показано только для справки.",
|
package/ui-locales/zh.json
CHANGED
|
@@ -94,6 +94,71 @@
|
|
|
94
94
|
"settings": "设置",
|
|
95
95
|
"confirm": "确认"
|
|
96
96
|
},
|
|
97
|
+
"fixer": {
|
|
98
|
+
"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",
|
|
99
|
+
"starting": "🚀 开始修复翻译,语言: {languages}",
|
|
100
|
+
"sourceDirectory": "📁 源目录: {sourceDir}",
|
|
101
|
+
"sourceLanguage": "🔤 源语言: {sourceLanguage}",
|
|
102
|
+
"markers": "🏷️ 要修复的标记: {markers}",
|
|
103
|
+
"scanningLanguage": "📊 正在扫描 {language}...",
|
|
104
|
+
"noLanguages": "❌ 未指定要修复的语言。",
|
|
105
|
+
"allComplete": "🎉 所有翻译已经完成!",
|
|
106
|
+
"fullReportSaved": "📊 完整报告已保存到: {reportPath}",
|
|
107
|
+
"reviewReport": "请查看报告后再继续。",
|
|
108
|
+
"backupCreated": "💾 备份已成功创建。",
|
|
109
|
+
"applyingFixes": "🔄 正在应用修复...",
|
|
110
|
+
"fixingComplete": "✅ 翻译修复完成!",
|
|
111
|
+
"operationCancelled": "❌ 用户取消了操作。",
|
|
112
|
+
"analysisTitle": "🔍 翻译修复分析",
|
|
113
|
+
"analysisSeparator": "==================================================",
|
|
114
|
+
"totalIssues": "发现的问题总数: {totalIssues}",
|
|
115
|
+
"missingTranslations": "缺失的翻译: {missing}",
|
|
116
|
+
"placeholderTranslations": "带有标记的翻译: {placeholder}",
|
|
117
|
+
"noIssues": "✅ 未发现任何问题,所有翻译都已完成。",
|
|
118
|
+
"detailedIssues": "📋 详细问题:",
|
|
119
|
+
"detailedSeparator": "--------------------------------------------------",
|
|
120
|
+
"filePath": "📄 {file} → {path}",
|
|
121
|
+
"missingKey": "❌ 缺失: {source} → {new}",
|
|
122
|
+
"placeholderKey": "⚠️ 标记: \"{target}\" → \"{new}\"",
|
|
123
|
+
"moreIssues": "... 还有 {count} 个问题。查看报告文件获取完整详情。",
|
|
124
|
+
"confirmationTitle": "🤔 要继续进行这些修复吗?",
|
|
125
|
+
"confirmationOptions": "选项:",
|
|
126
|
+
"optionYes": "y - 是,应用所有修复",
|
|
127
|
+
"optionNo": "n - 否,取消操作",
|
|
128
|
+
"optionShow": "s - 显示详细问题",
|
|
129
|
+
"choicePrompt": "请选择 (y/n/s): ",
|
|
130
|
+
"nonInteractiveMode": "⚡ 检测到非交互模式 - 自动应用修复...",
|
|
131
|
+
"reportGenerated": "📊 修复报告已生成: {path}",
|
|
132
|
+
"summary": {
|
|
133
|
+
"totalIssues": "问题总数: {total}",
|
|
134
|
+
"missingKeys": "缺失的键: {missing}",
|
|
135
|
+
"placeholderKeys": "带有标记的键: {placeholder}",
|
|
136
|
+
"languages": "语言: {languages}"
|
|
137
|
+
},
|
|
138
|
+
"welcome": {
|
|
139
|
+
"title": "🎯 欢迎使用翻译修复工具!",
|
|
140
|
+
"description": "此工具将帮助您修复语言文件中损坏的翻译和占位符标记。"
|
|
141
|
+
},
|
|
142
|
+
"markerPrompt": {
|
|
143
|
+
"title": "🏷️ 配置占位符标记",
|
|
144
|
+
"description": "输入指示未翻译文本的标记(用逗号分隔):",
|
|
145
|
+
"currentDefaults": "默认标记:{markers}",
|
|
146
|
+
"input": "标记(或按Enter使用默认值):"
|
|
147
|
+
},
|
|
148
|
+
"languagePrompt": {
|
|
149
|
+
"title": "🌍 选择要修复的语言",
|
|
150
|
+
"available": "可用语言:{languages}",
|
|
151
|
+
"description": "输入要修复的语言(用逗号分隔)或按Enter选择全部:",
|
|
152
|
+
"input": "语言:",
|
|
153
|
+
"noLanguages": "未找到需要修复的语言。"
|
|
154
|
+
},
|
|
155
|
+
"directoryPrompt": {
|
|
156
|
+
"title": "📁 选择目录",
|
|
157
|
+
"current": "当前目录:{dir}",
|
|
158
|
+
"description": "输入包含语言文件的目录(或按Enter使用当前目录):",
|
|
159
|
+
"input": "目录:"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
97
162
|
"autorun": {
|
|
98
163
|
"stepAnalyzeTranslations": "分析翻译",
|
|
99
164
|
"stepCompletedWithIcon": "✅ 步骤“{stepName}”已完成。",
|
|
@@ -950,6 +1015,7 @@
|
|
|
950
1015
|
"usage": "📊 检查键使用情况",
|
|
951
1016
|
"complete": "🎯 完成翻译(100% 覆盖)",
|
|
952
1017
|
"sizing": "📏 分析大小差异",
|
|
1018
|
+
"fix": "🛠️ 修复占位翻译",
|
|
953
1019
|
"workflow": "🔄 运行完整工作流",
|
|
954
1020
|
"status": "📋 显示项目状态",
|
|
955
1021
|
"delete": "🗑️ 删除全部报告",
|
|
@@ -961,7 +1027,7 @@
|
|
|
961
1027
|
},
|
|
962
1028
|
"update": "📦 更新软件包",
|
|
963
1029
|
"goodbye": "👋 再见!",
|
|
964
|
-
"invalidChoice": "❌ 无效选择。请选择 0-
|
|
1030
|
+
"invalidChoice": "❌ 无效选择。请选择 0-14。",
|
|
965
1031
|
"returning": "🔄 正在返回主菜单…",
|
|
966
1032
|
"invalidOption": "❌ 无效选项,请重试。",
|
|
967
1033
|
"nonInteractiveModeWarning": "⚠️ 检测到非交互模式,仅供参考显示菜单。",
|
package/utils/config-helper.js
CHANGED
|
@@ -65,11 +65,15 @@ async function getUnifiedConfig(scriptName, cliArgs = {}) {
|
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
const settingsDir = settingsManager.configDir;
|
|
68
|
+
const rawMarkers = cfg.notTranslatedMarkers || cfg.processing?.notTranslatedMarkers || cfg.notTranslatedMarker || cfg.processing?.notTranslatedMarker || 'NOT_TRANSLATED';
|
|
69
|
+
const markerList = Array.isArray(rawMarkers) ? rawMarkers : [rawMarkers];
|
|
70
|
+
|
|
68
71
|
const config = {
|
|
69
72
|
...cfg,
|
|
70
73
|
sourceLanguage: cliArgs.sourceLanguage || cfg.sourceLanguage || 'en',
|
|
71
74
|
uiLanguage: cliArgs.uiLanguage || cfg.uiLanguage || 'en',
|
|
72
|
-
notTranslatedMarker:
|
|
75
|
+
notTranslatedMarker: markerList[0],
|
|
76
|
+
notTranslatedMarkers: markerList,
|
|
73
77
|
supportedExtensions: cfg.supportedExtensions || cfg.processing?.supportedExtensions || ['.json', '.js', '.ts'],
|
|
74
78
|
excludeFiles: cfg.excludeFiles || cfg.processing?.excludeFiles || ['.DS_Store', 'Thumbs.db'],
|
|
75
79
|
excludeDirs: cfg.excludeDirs || cfg.processing?.excludeDirs || ['node_modules', '.next', '.git', 'dist', 'build'],
|
package/utils/security.js
CHANGED
|
@@ -294,7 +294,8 @@ class SecurityUtils {
|
|
|
294
294
|
'theme', 'autoSave', 'notifications', 'dateFormat', 'timeFormat', 'timezone',
|
|
295
295
|
'processing', 'performance', 'advanced', 'security', 'debug', 'projectRoot', 'scriptDirectories',
|
|
296
296
|
'supportedExtensions', 'settings', 'backupDir', 'tempDir', 'cacheDir', 'configDir',
|
|
297
|
-
'displayPaths', 'reports', 'ui', 'behavior', 'dateTime', 'backup'
|
|
297
|
+
'displayPaths', 'reports', 'ui', 'behavior', 'dateTime', 'backup', 'framework',
|
|
298
|
+
'notTranslatedMarkers'
|
|
298
299
|
];
|
|
299
300
|
|
|
300
301
|
for (const [key, value] of Object.entries(config)) {
|