i18ntk 2.6.0 → 3.1.0

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/package.json CHANGED
@@ -1,12 +1,14 @@
1
1
  {
2
2
  "name": "i18ntk",
3
- "version": "2.6.0",
4
- "description": "Zero-dependency internationalization toolkit for setup, scanning, analysis, validation, usage tracking, fixing, reporting, and runtime translation loading.",
3
+ "version": "3.1.0",
4
+ "description": "Zero-dependency internationalization toolkit for setup, scanning, analysis, validation, auto translation, fixing, reporting, and runtime translation loading.",
5
5
  "keywords": [
6
6
  "i18n",
7
7
  "internationalization",
8
8
  "localization",
9
9
  "translation",
10
+ "auto-translation",
11
+ "google-translate",
10
12
  "l10n",
11
13
  "multilingual",
12
14
  "i18next",
@@ -76,12 +78,14 @@
76
78
  "i18ntk-doctor": "main/i18ntk-doctor.js",
77
79
  "i18ntk-fixer": "main/i18ntk-fixer.js",
78
80
  "i18ntk-scanner": "main/i18ntk-scanner.js",
79
- "i18ntk-backup": "main/i18ntk-backup.js"
81
+ "i18ntk-backup": "main/i18ntk-backup.js",
82
+ "i18ntk-translate": "main/i18ntk-translate.js"
80
83
  },
81
84
  "files": [
82
85
  "main/i18ntk-analyze.js",
83
86
  "main/i18ntk-backup-class.js",
84
87
  "main/i18ntk-backup.js",
88
+ "main/i18ntk-translate.js",
85
89
  "main/i18ntk-complete.js",
86
90
  "main/i18ntk-doctor.js",
87
91
  "main/i18ntk-fixer.js",
@@ -114,6 +118,12 @@
114
118
  "utils/extractors/regex.js",
115
119
  "utils/format-manager.js",
116
120
  "utils/formats/json.js",
121
+ "utils/translate/placeholder.js",
122
+ "utils/translate/api.js",
123
+ "utils/translate/traverse.js",
124
+ "utils/translate/report.js",
125
+ "utils/translate/cli.js",
126
+ "utils/translate/protection.js",
117
127
  "utils/framework-detector.js",
118
128
  "utils/i18n-helper.js",
119
129
  "utils/init-helper.js",
@@ -128,6 +138,7 @@
128
138
  "utils/security.js",
129
139
  "utils/setup-enforcer.js",
130
140
  "utils/terminal-icons.js",
141
+ "utils/validation-risk.js",
131
142
  "utils/version-utils.js",
132
143
  "utils/watch-locales.js",
133
144
  "LICENSE",
@@ -131,13 +131,14 @@ class SettingsCLI {
131
131
  { key: '1', label: t('settings.mainMenu.uiSettings'), description: t('settings.mainMenu.uiSettingsDesc') },
132
132
  { key: '2', label: t('settings.mainMenu.directorySettings'), description: t('settings.mainMenu.directorySettingsDesc') },
133
133
  { key: '3', label: t('settings.mainMenu.scriptDirectorySettings'), description: t('settings.mainMenu.scriptDirectorySettingsDesc') },
134
- { key: '4', label: t('settings.mainMenu.processingSettings'), description: t('settings.mainMenu.processingSettingsDesc') },
135
- { key: '5', label: t('settings.mainMenu.backupSettings'), description: t('settings.mainMenu.backupSettingsDesc') },
136
- { key: '6', label: t('settings.mainMenu.securitySettings'), description: `${t('settings.mainMenu.securitySettingsDesc')} ${pinStatus}` },
137
- { key: '7', label: t('settings.mainMenu.advancedSettings'), description: t('settings.mainMenu.advancedSettingsDesc') },
138
- { key: '8', label: t('settings.mainMenu.viewAllSettings'), description: t('settings.mainMenu.viewAllSettingsDesc') },
139
- { key: '9', label: t('settings.mainMenu.importExport'), description: t('settings.mainMenu.importExportDesc') },
140
- { key: '0', label: t('settings.mainMenu.reportBug'), description: t('settings.mainMenu.reportBugDesc') },
134
+ { key: '4', label: t('settings.mainMenu.processingSettings'), description: t('settings.mainMenu.processingSettingsDesc') },
135
+ { key: '5', label: t('settings.mainMenu.backupSettings'), description: t('settings.mainMenu.backupSettingsDesc') },
136
+ { key: '6', label: t('settings.mainMenu.securitySettings'), description: `${t('settings.mainMenu.securitySettingsDesc')} ${pinStatus}` },
137
+ { key: '7', label: t('settings.mainMenu.advancedSettings'), description: t('settings.mainMenu.advancedSettingsDesc') },
138
+ { key: '8', label: t('settings.mainMenu.viewAllSettings'), description: t('settings.mainMenu.viewAllSettingsDesc') },
139
+ { key: '9', label: t('settings.mainMenu.importExport'), description: t('settings.mainMenu.importExportDesc') },
140
+ { key: 'a', label: 'Auto Translate Beta', description: 'Tune placeholder handling, concurrency, batching, and reports' },
141
+ { key: '0', label: t('settings.mainMenu.reportBug'), description: t('settings.mainMenu.reportBugDesc') },
141
142
  { key: 'x', label: 'Reset Script Directory Overrides', description: 'Clear script directory overrides and use defaults' },
142
143
  { key: 'r', label: t('settings.mainMenu.resetToDefaults'), description: t('settings.mainMenu.resetToDefaultsDesc') },
143
144
  { key: 'u', label: t('settings.mainMenu.updatePackage'), description: t('settings.mainMenu.updatePackageDesc') },
@@ -188,12 +189,15 @@ class SettingsCLI {
188
189
  case '8':
189
190
  await this.showAllSettings();
190
191
  break;
191
- case '9':
192
- await this.showImportExport();
193
- break;
194
- case '0':
195
- await this.reportBug();
196
- break;
192
+ case '9':
193
+ await this.showImportExport();
194
+ break;
195
+ case 'a':
196
+ await this.showAutoTranslateSettings();
197
+ break;
198
+ case '0':
199
+ await this.reportBug();
200
+ break;
197
201
  case 'x':
198
202
  await this.resetScriptDirectories();
199
203
  break;
@@ -302,7 +306,7 @@ class SettingsCLI {
302
306
  /**
303
307
  * Show processing settings menu
304
308
  */
305
- async showProcessingSettings() {
309
+ async showProcessingSettings() {
306
310
  // Refresh language from settings to ensure consistency
307
311
  if (typeof uiI18n.refreshLanguageFromSettings === 'function') {
308
312
  uiI18n.refreshLanguageFromSettings();
@@ -318,8 +322,37 @@ class SettingsCLI {
318
322
  'advanced.sizingThreshold': t('settings.fields.sizingThreshold.label')
319
323
  };
320
324
 
321
- await this.showSettingsCategory(processSettings);
322
- }
325
+ await this.showSettingsCategory(processSettings);
326
+ }
327
+
328
+ async showAutoTranslateSettings() {
329
+ if (typeof uiI18n.refreshLanguageFromSettings === 'function') {
330
+ uiI18n.refreshLanguageFromSettings();
331
+ }
332
+
333
+ this.clearScreen();
334
+ this.showHeader();
335
+ console.log(`${colors.bright}Auto Translate Beta Settings${colors.reset}\n`);
336
+
337
+ const autoTranslateSettings = {
338
+ 'autoTranslate.placeholderMode': 'Placeholder handling mode',
339
+ 'autoTranslate.concurrency': 'Concurrent translation requests',
340
+ 'autoTranslate.batchSize': 'Text segments per batch',
341
+ 'autoTranslate.progressInterval': 'Progress update interval',
342
+ 'autoTranslate.retryCount': 'Retry count',
343
+ 'autoTranslate.retryDelay': 'Retry delay (ms)',
344
+ 'autoTranslate.timeout': 'Request timeout (ms)',
345
+ 'autoTranslate.dryRunFirst': 'Dry-run preview first',
346
+ 'autoTranslate.reportStdout': 'Print report to terminal',
347
+ 'autoTranslate.bom': 'Write UTF-8 BOM',
348
+ 'autoTranslate.protectionEnabled': 'Protect brand terms, keys, values',
349
+ 'autoTranslate.protectionFile': 'Protection JSON file',
350
+ 'autoTranslate.promptProtectionSetup': 'Ask to create protection file',
351
+ 'autoTranslate.promptProtectionUpdate': 'Ask to update protection rules'
352
+ };
353
+
354
+ await this.showSettingsCategory(autoTranslateSettings);
355
+ }
323
356
 
324
357
  /**
325
358
  * Show advanced settings menu
@@ -531,9 +564,16 @@ class SettingsCLI {
531
564
  'security.adminPinEnabled': ['true', 'false'],
532
565
  'security.pinProtection.enabled': ['true', 'false'],
533
566
  'advanced.backupBeforeChanges': ['true', 'false'],
534
- 'backup.enabled': ['true', 'false'],
535
- 'backup.singleFileMode': ['true', 'false']
536
- };
567
+ 'backup.enabled': ['true', 'false'],
568
+ 'backup.singleFileMode': ['true', 'false'],
569
+ 'autoTranslate.placeholderMode': ['preserve', 'skip', 'send'],
570
+ 'autoTranslate.dryRunFirst': ['true', 'false'],
571
+ 'autoTranslate.reportStdout': ['true', 'false'],
572
+ 'autoTranslate.bom': ['true', 'false'],
573
+ 'autoTranslate.protectionEnabled': ['true', 'false'],
574
+ 'autoTranslate.promptProtectionSetup': ['true', 'false'],
575
+ 'autoTranslate.promptProtectionUpdate': ['true', 'false']
576
+ };
537
577
  if (key === 'language') {
538
578
  return settingsManager.getAvailableLanguages().map(l => l.code);
539
579
  }
@@ -566,8 +606,14 @@ class SettingsCLI {
566
606
  'lockoutDuration': { min: 1, max: 60, type: 'int', unit: 'minutes' },
567
607
  'backupRetention': { min: 1, max: 30, type: 'int', unit: 'days' },
568
608
  'logRetention': { min: 1, max: 90, type: 'int', unit: 'days' },
569
- 'retentionDays': { min: 1, max: 365, type: 'int', unit: 'days' },
570
- 'maxBackups': { min: 1, max: 3, type: 'int' }
609
+ 'retentionDays': { min: 1, max: 365, type: 'int', unit: 'days' },
610
+ 'maxBackups': { min: 1, max: 3, type: 'int' },
611
+ 'autoTranslate.concurrency': { min: 1, max: 25, type: 'int' },
612
+ 'autoTranslate.batchSize': { min: 1, max: 10000, type: 'int' },
613
+ 'autoTranslate.progressInterval': { min: 1, max: 10000, type: 'int' },
614
+ 'autoTranslate.retryCount': { min: 0, max: 10, type: 'int' },
615
+ 'autoTranslate.retryDelay': { min: 0, max: 30000, type: 'int', unit: 'ms' },
616
+ 'autoTranslate.timeout': { min: 1000, max: 120000, type: 'int', unit: 'ms' }
571
617
  };
572
618
 
573
619
  for (const [field, rules] of Object.entries(validations)) {
@@ -827,10 +873,10 @@ class SettingsCLI {
827
873
  let finalValue = convertedValue;
828
874
  if (typeof finalValue === 'string') {
829
875
  const lowerKey = key.toLowerCase();
830
- if (lowerKey.includes('dir') || lowerKey.includes('path') || lowerKey.includes('root')) {
831
- finalValue = finalValue.replace(/^([/\\])/, './');
832
- finalValue = configManager.toRelative(path.resolve(finalValue));
833
- }
876
+ if (lowerKey.includes('dir') || lowerKey.includes('path') || lowerKey.includes('root') || key === 'autoTranslate.protectionFile') {
877
+ finalValue = finalValue.replace(/^([/\\])/, './');
878
+ finalValue = configManager.toRelative(path.resolve(finalValue));
879
+ }
834
880
  }
835
881
  this.setNestedValue(this.settings, key, finalValue);
836
882
  this.modified = true;
@@ -1934,9 +1980,9 @@ ${colors.dim}${t('settings.updatePackage.command')}: npm update i18ntk -g${color
1934
1980
  return `${colors.dim}(not set)${colors.reset}`;
1935
1981
  }
1936
1982
  const lowerKey = key.toLowerCase();
1937
- if (typeof value === 'string' && (lowerKey.includes('dir') || lowerKey.includes('path') || lowerKey.includes('root'))) {
1938
- return configManager.toRelative(path.resolve(value));
1939
- }
1983
+ if (typeof value === 'string' && (lowerKey.includes('dir') || lowerKey.includes('path') || lowerKey.includes('root') || key === 'autoTranslate.protectionFile')) {
1984
+ return configManager.toRelative(path.resolve(value));
1985
+ }
1940
1986
  if (typeof value === 'boolean') {
1941
1987
  return value ? `${colors.green}enabled${colors.reset}` : `${colors.red}disabled${colors.reset}`;
1942
1988
  }
@@ -1960,7 +2006,7 @@ ${colors.dim}${t('settings.updatePackage.command')}: npm update i18ntk -g${color
1960
2006
  if (['false','no','n','0','off','disabled'].includes(lower)) return false;
1961
2007
 
1962
2008
  // Numbers for known numeric settings
1963
- const numericKeys = /(sessionTimeout|maxFailedAttempts|lockoutDuration|retentionDays|maxBackups|advanced\.|backup\.)/;
2009
+ const numericKeys = /(sessionTimeout|maxFailedAttempts|lockoutDuration|retentionDays|maxBackups|advanced\.|backup\.|autoTranslate\.(concurrency|batchSize|progressInterval|retryCount|retryDelay|timeout))/;
1964
2010
  if (numericKeys.test(key)) {
1965
2011
  const n = Number(raw);
1966
2012
  if (!Number.isNaN(n)) return n;
@@ -52,6 +52,22 @@ class SettingsManager {
52
52
  "memoryOptimization": true,
53
53
  "compression": true
54
54
  },
55
+ "autoTranslate": {
56
+ "placeholderMode": "preserve",
57
+ "concurrency": 6,
58
+ "batchSize": 100,
59
+ "progressInterval": 25,
60
+ "retryCount": 3,
61
+ "retryDelay": 1000,
62
+ "timeout": 15000,
63
+ "dryRunFirst": true,
64
+ "reportStdout": true,
65
+ "bom": false,
66
+ "protectionEnabled": true,
67
+ "protectionFile": "./i18ntk-auto-translate.json",
68
+ "promptProtectionSetup": true,
69
+ "promptProtectionUpdate": true
70
+ },
55
71
  "reports": {
56
72
  "format": "json",
57
73
  "includeSource": false,
@@ -368,6 +384,10 @@ class SettingsManager {
368
384
  if (loadedSettings.processing) {
369
385
  merged.processing = { ...this.defaultConfig.processing, ...loadedSettings.processing };
370
386
  }
387
+
388
+ if (loadedSettings.autoTranslate) {
389
+ merged.autoTranslate = { ...this.defaultConfig.autoTranslate, ...loadedSettings.autoTranslate };
390
+ }
371
391
 
372
392
  if (loadedSettings.advanced) {
373
393
  merged.advanced = { ...this.defaultConfig.advanced, ...loadedSettings.advanced };
@@ -875,6 +895,95 @@ class SettingsManager {
875
895
  }
876
896
  }
877
897
  },
898
+ autoTranslate: {
899
+ type: 'object',
900
+ description: 'Auto Translate beta defaults',
901
+ properties: {
902
+ placeholderMode: {
903
+ type: 'string',
904
+ description: 'How placeholder-bearing strings are handled during auto translation',
905
+ enum: ['preserve', 'skip', 'send'],
906
+ default: 'preserve'
907
+ },
908
+ concurrency: {
909
+ type: 'number',
910
+ description: 'Maximum concurrent translation requests',
911
+ minimum: 1,
912
+ maximum: 25,
913
+ default: 6
914
+ },
915
+ batchSize: {
916
+ type: 'number',
917
+ description: 'Number of text segments scheduled per translation batch',
918
+ minimum: 1,
919
+ maximum: 10000,
920
+ default: 100
921
+ },
922
+ progressInterval: {
923
+ type: 'number',
924
+ description: 'Number of completed text segments between progress updates',
925
+ minimum: 1,
926
+ maximum: 10000,
927
+ default: 25
928
+ },
929
+ retryCount: {
930
+ type: 'number',
931
+ description: 'Maximum retries per failed translation request',
932
+ minimum: 0,
933
+ maximum: 10,
934
+ default: 3
935
+ },
936
+ retryDelay: {
937
+ type: 'number',
938
+ description: 'Base retry delay in milliseconds',
939
+ minimum: 0,
940
+ maximum: 30000,
941
+ default: 1000
942
+ },
943
+ timeout: {
944
+ type: 'number',
945
+ description: 'HTTP request timeout in milliseconds',
946
+ minimum: 1000,
947
+ maximum: 120000,
948
+ default: 15000
949
+ },
950
+ dryRunFirst: {
951
+ type: 'boolean',
952
+ description: 'Run a dry-run preview before interactive manager translation',
953
+ default: true
954
+ },
955
+ reportStdout: {
956
+ type: 'boolean',
957
+ description: 'Print the post-translation report to stdout',
958
+ default: true
959
+ },
960
+ bom: {
961
+ type: 'boolean',
962
+ description: 'Write translated JSON files with a UTF-8 BOM',
963
+ default: false
964
+ },
965
+ protectionEnabled: {
966
+ type: 'boolean',
967
+ description: 'Enable user-editable protected terms, keys, values, and patterns',
968
+ default: true
969
+ },
970
+ protectionFile: {
971
+ type: 'string',
972
+ description: 'Project JSON file containing Auto Translate protection rules',
973
+ default: './i18ntk-auto-translate.json'
974
+ },
975
+ promptProtectionSetup: {
976
+ type: 'boolean',
977
+ description: 'Ask to create the protection file when Auto Translate first runs',
978
+ default: true
979
+ },
980
+ promptProtectionUpdate: {
981
+ type: 'boolean',
982
+ description: 'Ask whether to update protection rules before manager translations',
983
+ default: true
984
+ }
985
+ }
986
+ },
878
987
  security: {
879
988
  type: 'object',
880
989
  properties: {
@@ -1003,4 +1112,3 @@ class SettingsManager {
1003
1112
  }
1004
1113
 
1005
1114
  module.exports = SettingsManager;
1006
-
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
- "version": "1.10.0",
4
- "updated": "2025-08-16"
3
+ "version": "3.1.0",
4
+ "updated": "2026-05-07"
5
5
  },
6
6
  "common": {
7
7
  "welcome": "Willkommen",
@@ -922,6 +922,7 @@
922
922
  "summaryCommand": "summary - Projektstatus anzeigen",
923
923
  "debugCommand": "debug - Übersetzungsfehler debuggen",
924
924
  "scannerCommand": "scanner - Projekt für i18n-Schlüssel scannen",
925
+ "translateCommand": "translate - Auto-Übersetzung (Beta)",
925
926
  "menu": {
926
927
  "pressEnterToContinue": "Drücken Sie die Eingabetaste, um fortzufahren...",
927
928
  "title": "🌐 I18NTK VERWALTUNGSMENÜ",
@@ -1146,6 +1147,7 @@
1146
1147
  "sizing": "📏 Größenanalyse",
1147
1148
  "fix": "🛠️ Platzhalterübersetzungen reparieren",
1148
1149
  "scanner": "🔍 i18n-Probleme scannen",
1150
+ "translate": "🌐 Auto-Übersetzung (Beta)",
1149
1151
  "workflow": "🔄 Gesamten Workflow ausführen",
1150
1152
  "status": "📋 Projektstatus anzeigen",
1151
1153
  "delete": "🗑️ Alle Berichte löschen",
@@ -2111,6 +2113,7 @@
2111
2113
  "completeCommand": "complete - Übersetzungen vervollständigen (100% Abdeckung)",
2112
2114
  "summaryCommand": "summary - Projektstatus anzeigen",
2113
2115
  "scannerCommand": "scanner - i18n-Probleme scannen",
2116
+ "translateCommand": "translate - Auto-Übersetzung (Beta)",
2114
2117
  "debugCommand": "debug - Übersetzungsprobleme debuggen"
2115
2118
  },
2116
2119
  "test_complete_system": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
- "version": "1.10.3",
4
- "updated": "2025-08-24"
3
+ "version": "3.1.0",
4
+ "updated": "2026-05-07"
5
5
  },
6
6
  "common": {
7
7
  "welcome": "Welcome",
@@ -922,6 +922,7 @@
922
922
  "summaryCommand": "summary - Show project status",
923
923
  "debugCommand": "debug - Debug translation issues",
924
924
  "scannerCommand": "scanner - Scan for keys",
925
+ "translateCommand": "translate - Auto-translate locale files (Beta)",
925
926
  "menu": {
926
927
  "pressEnterToContinue": "Press Enter to continue...",
927
928
  "title": "🌐 I18NTK MANAGEMENT MENU",
@@ -1146,6 +1147,7 @@
1146
1147
  "sizing": "📏 Analyze sizing",
1147
1148
  "fix": "🛠️ Fix placeholder translations",
1148
1149
  "scanner": "🔍 Scan for i18n issues",
1150
+ "translate": "🌐 Auto Translate (Beta)",
1149
1151
  "workflow": "🔄 Run full workflow",
1150
1152
  "status": "📋 Show project status",
1151
1153
  "delete": "🗑️ Delete all reports",
@@ -2109,6 +2111,7 @@
2109
2111
  "completeCommand": "complete - Complete translations (100% coverage)",
2110
2112
  "summaryCommand": "summary - Show project status",
2111
2113
  "scannerCommand": "scanner - Scan for i18n issues",
2114
+ "translateCommand": "translate - Auto-translate locale files (Beta)",
2112
2115
  "debugCommand": "debug - Debug translation issues"
2113
2116
  },
2114
2117
  "test_complete_system": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
- "version": "1.10.0",
4
- "updated": "2025-08-16"
3
+ "version": "3.1.0",
4
+ "updated": "2026-05-07"
5
5
  },
6
6
  "common": {
7
7
  "welcome": "Bienvenido",
@@ -922,6 +922,7 @@
922
922
  "summaryCommand": "summary - Mostrar estado del proyecto",
923
923
  "debugCommand": "debug - Depurar problemas de traducción",
924
924
  "scannerCommand": "scanner - Escanear proyecto para claves i18n",
925
+ "translateCommand": "translate - Traducción automática (Beta)",
925
926
  "menu": {
926
927
  "pressEnterToContinue": "Presiona Enter para continuar...",
927
928
  "title": "🌐 MENÚ DE GESTIÓN I18NTK",
@@ -1146,6 +1147,7 @@
1146
1147
  "sizing": "📏 Analizar dimensionamiento",
1147
1148
  "fix": "🛠️ Corregir traducciones provisionales",
1148
1149
  "scanner": "🔍 Buscar problemas de i18n",
1150
+ "translate": "🌐 Traducción Automática (Beta)",
1149
1151
  "workflow": "🔄 Ejecutar flujo completo",
1150
1152
  "status": "📋 Mostrar estado del proyecto",
1151
1153
  "delete": "🗑️ Eliminar todos los informes",
@@ -2111,6 +2113,7 @@
2111
2113
  "completeCommand": "complete - Completar traducciones (100% cobertura)",
2112
2114
  "summaryCommand": "summary - Mostrar estado del proyecto",
2113
2115
  "scannerCommand": "scanner - Escanear problemas i18n",
2116
+ "translateCommand": "translate - Traducción automática (Beta)",
2114
2117
  "debugCommand": "debug - Depurar problemas de traducción"
2115
2118
  },
2116
2119
  "test_complete_system": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
- "version": "1.10.0",
4
- "updated": "2025-08-16"
3
+ "version": "3.1.0",
4
+ "updated": "2026-05-07"
5
5
  },
6
6
  "common": {
7
7
  "welcome": "Bienvenue",
@@ -922,6 +922,7 @@
922
922
  "summaryCommand": "summary - Afficher le statut du projet",
923
923
  "debugCommand": "debug - Déboguer les problèmes de traduction",
924
924
  "scannerCommand": "scanner - Rechercher des clés",
925
+ "translateCommand": "translate - Traduction automatique (Bêta)",
925
926
  "menu": {
926
927
  "pressEnterToContinue": "Appuyez sur Entrée pour continuer...",
927
928
  "title": "🌐 MENU DE GESTION I18NTK",
@@ -1146,6 +1147,7 @@
1146
1147
  "sizing": "📏 Analyser le dimensionnement",
1147
1148
  "fix": "🛠️ Corriger les traductions de remplacement",
1148
1149
  "scanner": "🔍 Analyser les problèmes i18n",
1150
+ "translate": "🌐 Traduction Automatique (Bêta)",
1149
1151
  "workflow": "🔄 Exécuter le flux complet",
1150
1152
  "status": "📋 Afficher le statut du projet",
1151
1153
  "delete": "🗑️ Supprimer tous les rapports",
@@ -2111,6 +2113,7 @@
2111
2113
  "completeCommand": "complete - Compléter les traductions (couverture 100%)",
2112
2114
  "summaryCommand": "summary - Afficher l'état du projet",
2113
2115
  "scannerCommand": "scanner - Scanner le projet pour les clés i18n",
2116
+ "translateCommand": "translate - Traduction automatique (Bêta)",
2114
2117
  "debugCommand": "debug - Déboguer les problèmes de traduction"
2115
2118
  },
2116
2119
  "test_complete_system": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
- "version": "1.10.0",
4
- "updated": "2025-08-16"
3
+ "version": "3.1.0",
4
+ "updated": "2026-05-07"
5
5
  },
6
6
  "common": {
7
7
  "welcome": "ようこそ",
@@ -922,6 +922,7 @@
922
922
  "summaryCommand": "summary - プロジェクトのステータスを表示",
923
923
  "debugCommand": "debug - 翻訳の問題をデバッグ",
924
924
  "scannerCommand": "scanner - プロジェクトをスキャン",
925
+ "translateCommand": "translate - 自動翻訳 (ベータ版)",
925
926
  "menu": {
926
927
  "pressEnterToContinue": "Enterキーを押して続行してください…",
927
928
  "title": "🌐 I18NTK 管理メニュー",
@@ -1146,6 +1147,7 @@
1146
1147
  "sizing": "📏 サイズを分析",
1147
1148
  "fix": "🛠️ プレースホルダー翻訳を修正",
1148
1149
  "scanner": "🔍 i18n問題をスキャン",
1150
+ "translate": "🌐 自動翻訳 (ベータ版)",
1149
1151
  "workflow": "🔄 フルワークフローを実行",
1150
1152
  "status": "📋 プロジェクトステータスを表示",
1151
1153
  "delete": "🗑️ すべてのレポートを削除",
@@ -2111,6 +2113,7 @@
2111
2113
  "completeCommand": "complete - 翻訳を完了 (100% カバレッジ)",
2112
2114
  "summaryCommand": "summary - プロジェクトステータスを表示",
2113
2115
  "scannerCommand": "scanner - 🔍 i18nの問題をスキャン",
2116
+ "translateCommand": "translate - 自動翻訳 (ベータ版)",
2114
2117
  "debugCommand": "debug - 翻訳の問題をデバッグ"
2115
2118
  },
2116
2119
  "test_complete_system": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
- "version": "1.10.0",
4
- "updated": "2025-08-16"
3
+ "version": "3.1.0",
4
+ "updated": "2026-05-07"
5
5
  },
6
6
  "common": {
7
7
  "welcome": "Добро пожаловать",
@@ -984,7 +984,8 @@
984
984
  "translation_not_found": "Перевод для ключа не найден: {key}",
985
985
  "translation_key_not_string": "Значение ключа перевода не является строкой: {key}",
986
986
  "error_reading_locales_directory": "Ошибка чтения директории локалей: {errorMessage}"
987
- }
987
+ },
988
+ "translateCommand": "translate - Автоперевод файлов локалей (Бета)"
988
989
  },
989
990
  "init": {
990
991
  "initializationTitle": "🚀 Набор инструментов i18n — Инициализация проекта",
@@ -1146,6 +1147,7 @@
1146
1147
  "sizing": "📏 Анализ размеров",
1147
1148
  "fix": "🛠️ Исправить переводы-заглушки",
1148
1149
  "scanner": "🔍 Сканировать проблемы i18n",
1150
+ "translate": "🌐 Автоперевод (Бета)",
1149
1151
  "workflow": "🔄 Запустить полный рабочий процесс",
1150
1152
  "status": "📋 Показать статус проекта",
1151
1153
  "delete": "🗑️ Удалить все отчёты",
@@ -2110,7 +2112,8 @@
2110
2112
  "sizingCommand": "Оценка команды",
2111
2113
  "completeCommand": "Завершение команды",
2112
2114
  "summaryCommand": "Сводка команды",
2113
- "scannerCommand": "scanner - 🔍 Сканирование проблем i18n",
2115
+ "scannerCommand": "scanner - 🔍 Сканирование проблем i18n",
2116
+ "translateCommand": "translate - Автоперевод (Бета)",
2114
2117
  "debugCommand": "Отладка команды"
2115
2118
  },
2116
2119
  "test_complete_system": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
- "version": "1.10.0",
4
- "updated": "2025-08-16"
3
+ "version": "3.1.0",
4
+ "updated": "2026-05-07"
5
5
  },
6
6
  "common": {
7
7
  "welcome": "欢迎",
@@ -922,6 +922,7 @@
922
922
  "summaryCommand": "summary - 显示项目状态",
923
923
  "debugCommand": "debug - 调试翻译问题",
924
924
  "scannerCommand": "scanner - 扫描项目中的 i18n 键",
925
+ "translateCommand": "translate - 自动翻译 (测试版)",
925
926
  "menu": {
926
927
  "pressEnterToContinue": "按 Enter 继续...",
927
928
  "title": "🌐 国际化管理菜单",
@@ -1146,6 +1147,7 @@
1146
1147
  "sizing": "📏 分析大小差异",
1147
1148
  "fix": "🛠️ 修复占位翻译",
1148
1149
  "scanner": "🔍 扫描i18n问题",
1150
+ "translate": "🌐 自动翻译 (测试版)",
1149
1151
  "workflow": "🔄 运行完整工作流",
1150
1152
  "status": "📋 显示项目状态",
1151
1153
  "delete": "🗑️ 删除全部报告",
@@ -2111,6 +2113,7 @@
2111
2113
  "completeCommand": "complete - 完成翻译(100% 覆盖)",
2112
2114
  "summaryCommand": "summary - 显示项目状态",
2113
2115
  "scannerCommand": "scanner - 🔍 扫描i18n问题",
2116
+ "translateCommand": "translate - 自动翻译 (测试版)",
2114
2117
  "debugCommand": "debug - 调试翻译问题"
2115
2118
  },
2116
2119
  "test_complete_system": {
@@ -121,7 +121,7 @@ const DEFAULT_CONFIG = {
121
121
  "complete": null,
122
122
  "manage": null
123
123
  },
124
- "processing": {
124
+ "processing": {
125
125
  "batchSize": 2000,
126
126
  "concurrency": 32,
127
127
  "maxFileSize": 524288,
@@ -150,9 +150,25 @@ const DEFAULT_CONFIG = {
150
150
  "streaming": true,
151
151
  "compression": "brotli",
152
152
  "parallelProcessing": true,
153
- "minimalLogging": true
154
- },
155
- "reports": {
153
+ "minimalLogging": true
154
+ },
155
+ "autoTranslate": {
156
+ "placeholderMode": "preserve",
157
+ "concurrency": 6,
158
+ "batchSize": 100,
159
+ "progressInterval": 25,
160
+ "retryCount": 3,
161
+ "retryDelay": 1000,
162
+ "timeout": 15000,
163
+ "dryRunFirst": true,
164
+ "reportStdout": true,
165
+ "bom": false,
166
+ "protectionEnabled": true,
167
+ "protectionFile": "./i18ntk-auto-translate.json",
168
+ "promptProtectionSetup": true,
169
+ "promptProtectionUpdate": true
170
+ },
171
+ "reports": {
156
172
  "format": "json",
157
173
  "includeStats": true,
158
174
  "includeMissingKeys": true,
package/utils/security.js CHANGED
@@ -687,12 +687,13 @@ static _logging = false;
687
687
  'projectRoot', 'sourceDir', 'i18nDir', 'outputDir', 'backupDir', 'tempDir', 'cacheDir', 'configDir',
688
688
  // Language settings
689
689
  'sourceLanguage', 'uiLanguage', 'language', 'defaultLanguages', 'supportedLanguages',
690
- // Translation markers and content
691
- 'notTranslatedMarker', 'notTranslatedMarkers', 'translatedMarker', 'translatedMarkers',
690
+ // Translation markers and content
691
+ 'notTranslatedMarker', 'notTranslatedMarkers', 'translatedMarker', 'translatedMarkers',
692
+ 'allowedEnglishTerms', 'englishContentThresholdPercent',
692
693
  // File handling
693
694
  'supportedExtensions', 'excludeFiles', 'excludeDirs', 'includeFiles', 'includeDirs',
694
695
  // Operational settings
695
- 'strictMode', 'debug', 'displayPaths', 'version', 'scriptDirectories',
696
+ 'strictMode', 'debug', 'displayPaths', 'version', 'scriptDirectories', 'autoTranslate',
696
697
  // Framework and processing
697
698
  'framework', 'processing', 'performance', 'advanced',
698
699
  // UI and theme settings