i18ntk 1.4.0 → 1.4.2

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.
Files changed (107) hide show
  1. package/CHANGELOG.md +61 -1
  2. package/README.md +410 -20
  3. package/locales/de/common.json +17 -20
  4. package/locales/en/common.json +17 -20
  5. package/locales/es/common.json +17 -20
  6. package/locales/fr/common.json +17 -20
  7. package/locales/ru/common.json +17 -20
  8. package/main/i18ntk-manage.js +52 -24
  9. package/package.json +6 -8
  10. package/{dev → scripts}/debug/README.md +9 -5
  11. package/{dev → scripts}/debug/debugger.js +84 -4
  12. package/scripts/prepublish.js +2 -2
  13. package/scripts/validate-all-translations.js +2 -2
  14. package/ui-locales/de/debug.json +5 -5
  15. package/ui-locales/de/init.json +1 -0
  16. package/ui-locales/de/language.json +11 -2
  17. package/ui-locales/de/security.json +2 -1
  18. package/ui-locales/de/sizing.json +1 -0
  19. package/ui-locales/de/usage.json +1 -0
  20. package/ui-locales/en/debug.json +5 -5
  21. package/ui-locales/en/init.json +1 -0
  22. package/ui-locales/en/language.json +11 -2
  23. package/ui-locales/en/security.json +2 -1
  24. package/ui-locales/en/sizing.json +2 -0
  25. package/ui-locales/en/usage.json +1 -0
  26. package/ui-locales/es/debug.json +5 -5
  27. package/ui-locales/es/init.json +1 -0
  28. package/ui-locales/es/language.json +11 -2
  29. package/ui-locales/es/security.json +2 -1
  30. package/ui-locales/es/sizing.json +2 -0
  31. package/ui-locales/es/usage.json +1 -0
  32. package/ui-locales/fr/debug.json +5 -5
  33. package/ui-locales/fr/init.json +1 -0
  34. package/ui-locales/fr/language.json +11 -2
  35. package/ui-locales/fr/security.json +2 -1
  36. package/ui-locales/fr/sizing.json +2 -0
  37. package/ui-locales/fr/usage.json +1 -0
  38. package/ui-locales/ja/debug.json +5 -5
  39. package/ui-locales/ja/init.json +1 -0
  40. package/ui-locales/ja/language.json +11 -2
  41. package/ui-locales/ja/security.json +2 -1
  42. package/ui-locales/ja/sizing.json +3 -0
  43. package/ui-locales/ja/usage.json +1 -0
  44. package/ui-locales/pt/debug.json +5 -5
  45. package/ui-locales/pt/init.json +1 -0
  46. package/ui-locales/pt/language.json +11 -2
  47. package/ui-locales/pt/security.json +2 -1
  48. package/ui-locales/pt/sizing.json +2 -0
  49. package/ui-locales/pt/usage.json +1 -0
  50. package/ui-locales/ru/debug.json +5 -5
  51. package/ui-locales/ru/init.json +1 -0
  52. package/ui-locales/ru/language.json +11 -2
  53. package/ui-locales/ru/security.json +2 -1
  54. package/ui-locales/ru/sizing.json +2 -0
  55. package/ui-locales/ru/usage.json +1 -0
  56. package/ui-locales/zh/debug.json +5 -5
  57. package/ui-locales/zh/init.json +1 -0
  58. package/ui-locales/zh/language.json +11 -2
  59. package/ui-locales/zh/security.json +2 -1
  60. package/ui-locales/zh/sizing.json +2 -0
  61. package/ui-locales/zh/usage.json +1 -0
  62. package/utils/test-complete-system.js +1 -1
  63. package/dev/README.md +0 -37
  64. package/docs/INSTALLATION.md +0 -98
  65. package/docs/PIN_PROTECTION_GUIDE.md +0 -265
  66. package/docs/README.md +0 -111
  67. package/docs/SCRIPT_DIRECTORY_GUIDE.md +0 -278
  68. package/docs/TODO_ROADMAP.md +0 -279
  69. package/docs/TRANSLATION_STATUS.md +0 -67
  70. package/docs/api/API_REFERENCE.md +0 -258
  71. package/docs/api/COMPONENTS.md +0 -492
  72. package/docs/api/CONFIGURATION.md +0 -676
  73. package/docs/api/NPM_PUBLISHING_GUIDE.md +0 -426
  74. package/docs/debug/DEBUG_README.md +0 -30
  75. package/docs/debug/DEBUG_TOOLS.md +0 -152
  76. package/docs/development/AGENTS.md +0 -349
  77. package/docs/development/DEVELOPMENT_RULES.md +0 -165
  78. package/docs/development/DEV_README.md +0 -41
  79. package/docs/release-notes/RELEASE_NOTES_v1.0.0.md +0 -175
  80. package/docs/release-notes/RELEASE_NOTES_v1.0.4.md +0 -153
  81. package/docs/release-notes/RELEASE_NOTES_v1.1.2.md +0 -68
  82. package/docs/release-notes/RELEASE_NOTES_v1.1.5.md +0 -81
  83. package/docs/release-notes/RELEASE_NOTES_v1.4.0.md +0 -115
  84. package/docs/release-notes/RELEASE_NOTES_v1.6.0.md +0 -141
  85. package/docs/release-notes/RELEASE_NOTES_v1.6.1.md +0 -185
  86. package/docs/release-notes/RELEASE_NOTES_v1.6.3.md +0 -199
  87. package/docs/release-notes/v1.3.0.md +0 -162
  88. package/docs/release-notes/v1.3.1.md +0 -136
  89. package/docs/reports/ANALYSIS_README.md +0 -17
  90. package/docs/reports/CONSOLE_MISMATCH_BUG_REPORT_v1.5.0.md +0 -181
  91. package/docs/reports/SIZING_README.md +0 -18
  92. package/docs/reports/SUMMARY_README.md +0 -18
  93. package/docs/reports/TRANSLATION_BUG_REPORT_v1.5.0.md +0 -129
  94. package/docs/reports/USAGE_README.md +0 -18
  95. package/docs/reports/VALIDATION_README.md +0 -18
  96. /package/{dev → scripts}/debug/complete-console-translations.js +0 -0
  97. /package/{dev → scripts}/debug/console-key-checker.js +0 -0
  98. /package/{dev → scripts}/debug/console-translations.js +0 -0
  99. /package/{dev → scripts}/debug/debug-security.js +0 -0
  100. /package/{dev → scripts}/debug/debug-translation.js +0 -0
  101. /package/{dev → scripts}/debug/export-missing-keys.js +0 -0
  102. /package/{dev → scripts}/debug/final-normalize.js +0 -0
  103. /package/{dev → scripts}/debug/find-extra-keys.js +0 -0
  104. /package/{dev → scripts}/debug/normalize-locales.js +0 -0
  105. /package/{dev → scripts}/debug/refactor-locales.js +0 -0
  106. /package/{dev → scripts}/debug/reorder-locales.js +0 -0
  107. /package/{dev → scripts}/debug/replace-hardcoded-console.js +0 -0
@@ -1,676 +0,0 @@
1
- # I18N Management Toolkit - Configuration Guide
2
-
3
- **Version:** 1.1.5
4
- **Last Updated:** 27/07/2025
5
- **Maintainer:** Vladimir Noskov
6
-
7
- ## 📋 Overview
8
-
9
- This guide provides comprehensive information about configuring the I18N Management Toolkit for optimal performance and functionality in your project.
10
-
11
- ## 🔧 Configuration Files
12
-
13
- ### Primary Configuration Files
14
-
15
- #### `i18ntk-config.json`
16
- **Location:** Project root directory
17
- **Purpose:** User-specific settings and preferences
18
- **Auto-generated:** Yes (on first run)
19
-
20
- ```json
21
- {
22
- "version": "1.0.0",
23
- "lastUpdated": "2025-07-27",
24
- "project": {
25
- "name": "My Project",
26
- "type": "react",
27
- "framework": "react-i18next"
28
- },
29
- "directories": {
30
- "source": "./src",
31
- "locales": "./locales",
32
- "reports": "./i18ntk-reports",
33
- "backups": "./backups"
34
- },
35
- "languages": {
36
- "default": "en",
37
- "supported": ["en", "es", "fr", "de", "ru", "pt", "ja", "zh"],
38
- "fallback": "en"
39
- },
40
- "features": {
41
- "autoTranslate": false,
42
- "autoValidate": true,
43
- "autoBackup": true,
44
- "strictMode": false
45
- },
46
- "translation": {
47
- "provider": "google",
48
- "apiKey": "",
49
- "batchSize": 50,
50
- "rateLimit": 100
51
- },
52
- "validation": {
53
- "strict": true,
54
- "autoFix": false,
55
- "checkSyntax": true,
56
- "checkConsistency": true,
57
- "checkCompleteness": true
58
- },
59
- "reporting": {
60
- "format": "html",
61
- "includeCharts": true,
62
- "includeStatistics": true,
63
- "autoOpen": false
64
- },
65
- "ui": {
66
- "language": "en",
67
- "theme": "default",
68
- "showProgress": true,
69
- "verboseOutput": false
70
- }
71
- }
72
- ```
73
-
74
- #### `admin-config.json`
75
- **Location:** Project root directory
76
- **Purpose:** Administrative settings and security configuration
77
- **Auto-generated:** Yes (when admin features are enabled)
78
-
79
- ```json
80
- {
81
- "version": "1.6.3",
82
- "lastUpdated": "2025-07-27",
83
- "security": {
84
- "adminMode": false,
85
- "encryptionEnabled": true,
86
- "securityLevel": "standard",
87
- "sessionTimeout": 3600,
88
- "maxLoginAttempts": 3
89
- },
90
- "backup": {
91
- "enabled": true,
92
- "retention": 30,
93
- "compression": true,
94
- "location": "./backups"
95
- },
96
- "logging": {
97
- "enabled": true,
98
- "level": "info",
99
- "auditTrail": true,
100
- "maxLogSize": "10MB",
101
- "logRotation": true
102
- },
103
- "api": {
104
- "rateLimit": {
105
- "enabled": true,
106
- "requestsPerMinute": 60,
107
- "burstLimit": 10
108
- },
109
- "cors": {
110
- "enabled": false,
111
- "origins": []
112
- }
113
- },
114
- "maintenance": {
115
- "autoCleanup": true,
116
- "cleanupInterval": "24h",
117
- "tempFileRetention": "1h"
118
- }
119
- }
120
- ```
121
-
122
- ### Package Configuration
123
-
124
- #### `package.json` Integration
125
- **Required Scripts:** Already configured in package.json
126
-
127
- ```json
128
- {
129
- "scripts": {
130
- "i18ntk": "npx i18ntk",
131
- "i18ntk:init": "npx i18ntk init",
132
- "i18ntk:analyze": "npx i18ntk analyze",
133
- "i18ntk:validate": "npx i18ntk validate",
134
- "i18ntk:usage": "npx i18ntk usage",
135
- "i18ntk:complete": "npx i18ntk complete",
136
- "i18ntk:sizing": "npx i18ntk sizing",
137
- "i18ntk:summary": "npx i18ntk summary",
138
- "i18ntk:autorun": "npx i18ntk autorun"
139
- }
140
- }
141
- ```
142
-
143
- ## 🌍 Environment Variables
144
-
145
- ### Core Environment Variables
146
-
147
- | Variable | Description | Default | Example |
148
- |----------|-------------|---------|----------|
149
- | `I18N_SOURCE_DIR` | Source directory path | `./src` | `./app/src` |
150
- | `I18N_LOCALES_DIR` | Locales directory path | `./locales` | `./public/locales` |
151
- | `I18N_DEFAULT_LANG` | Default language code | `en` | `en-US` |
152
- | `I18N_SUPPORTED_LANGS` | Supported languages (comma-separated) | `en,es,fr,de,pt,ja,ru,zh` | `en,es,fr,de,pt,ja,ru,zh` |
153
- | `I18N_FRAMEWORK` | i18n framework | `react-i18next` | `vue-i18n` |
154
- | `I18N_STRICT_MODE` | Enable strict validation | `false` | `true` |
155
- | `I18N_AUTO_BACKUP` | Enable automatic backups | `true` | `false` |
156
- | `I18N_REPORT_FORMAT` | Default report format | `html` | `json` |
157
- | `I18N_UI_LANGUAGE` | UI language | `en` | `es` |
158
- | `I18N_VERBOSE` | Enable verbose output | `false` | `true` |
159
-
160
- ### UI Language Configuration
161
-
162
- The toolkit now supports **runtime UI language switching** through the interactive menu. Configure your preferred UI language settings:
163
-
164
- | Variable | Description | Default | Example |
165
- |----------|-------------|---------|----------|
166
- | `I18N_UI_LANGUAGE` | Default UI language | `en` | `pt` |
167
-
168
- **Supported UI Languages:**
169
- - `en` - English (default)
170
- - `de` - German
171
- - `es` - Spanish
172
- - `fr` - French
173
- - `pt` - Portuguese *(new in v1.3.1)*
174
- - `ja` - Japanese
175
- - `ru` - Russian
176
- - `zh` - Chinese
177
-
178
- **Runtime Language Switching:**
179
- Access the language switcher via the interactive menu:
180
- 1. Run `npx i18ntk`
181
- 2. Select **10. ⚙️ Settings**
182
- 3. Choose **Change UI Language**
183
- 4. Select from the 8 available languages
184
-
185
- ### Translation Service Variables
186
-
187
- | Variable | Description | Required | Provider |
188
- |----------|-------------|----------|----------|
189
- | `GOOGLE_TRANSLATE_API_KEY` | Google Translate API key | For Google Translate | Google |
190
- | `DEEPL_API_KEY` | DeepL API key | For DeepL | DeepL |
191
- | `OPENAI_API_KEY` | OpenAI API key | For AI translation | OpenAI |
192
- | `AZURE_TRANSLATOR_KEY` | Azure Translator key | For Azure | Microsoft |
193
- | `AWS_TRANSLATE_ACCESS_KEY` | AWS Translate access key | For AWS | Amazon |
194
- | `AWS_TRANSLATE_SECRET_KEY` | AWS Translate secret key | For AWS | Amazon |
195
-
196
- ### Security Variables
197
-
198
- | Variable | Description | Default | Security Level |
199
- |----------|-------------|---------|----------------|
200
- | `I18N_ADMIN_MODE` | Enable admin features | `false` | High |
201
- | `I18N_ENCRYPTION_KEY` | Encryption key for sensitive data | Auto-generated | High |
202
- | `I18N_SESSION_SECRET` | Session secret key | Auto-generated | Medium |
203
- | `I18N_AUDIT_LOGGING` | Enable audit logging | `true` | Medium |
204
- | `I18N_SECURE_MODE` | Enable secure mode | `false` | High |
205
-
206
- ## 🏗️ Framework-Specific Configuration
207
-
208
- ### React i18next Configuration
209
-
210
- #### Required Dependencies
211
- ```json
212
- {
213
- "dependencies": {
214
- "react-i18next": "^15.6.1",
215
- "i18next": "^23.0.0"
216
- }
217
- }
218
- ```
219
-
220
- #### Framework Detection
221
- The toolkit automatically detects React i18next by:
222
- - Checking `package.json` dependencies
223
- - Looking for `i18next` configuration files
224
- - Scanning for React i18next usage patterns
225
-
226
- #### Configuration Example
227
- ```javascript
228
- // i18n.js
229
- import i18n from 'i18next';
230
- import { initReactI18next } from 'react-i18next';
231
-
232
- i18n
233
- .use(initReactI18next)
234
- .init({
235
- lng: 'en',
236
- fallbackLng: 'en',
237
- resources: {
238
- en: {
239
- translation: require('./locales/en/common.json')
240
- }
241
- }
242
- });
243
-
244
- export default i18n;
245
- ```
246
-
247
- ### Vue i18n Configuration
248
-
249
- #### Required Dependencies
250
- ```json
251
- {
252
- "dependencies": {
253
- "vue-i18n": "^9.0.0"
254
- }
255
- }
256
- ```
257
-
258
- #### Configuration Example
259
- ```javascript
260
- // i18n.js
261
- import { createI18n } from 'vue-i18n';
262
-
263
- const i18n = createI18n({
264
- locale: 'en',
265
- fallbackLocale: 'en',
266
- messages: {
267
- en: require('./locales/en/common.json')
268
- }
269
- });
270
-
271
- export default i18n;
272
- ```
273
-
274
- ### Angular i18n Configuration
275
-
276
- #### Required Dependencies
277
- ```json
278
- {
279
- "dependencies": {
280
- "@angular/localize": "^16.0.0"
281
- }
282
- }
283
- ```
284
-
285
- #### Configuration Example
286
- ```json
287
- // angular.json
288
- {
289
- "projects": {
290
- "app": {
291
- "i18n": {
292
- "sourceLocale": "en",
293
- "locales": {
294
- "es": "src/locales/es.json",
295
- "fr": "src/locales/fr.json"
296
- }
297
- }
298
- }
299
- }
300
- }
301
- ```
302
-
303
- ## 📁 Directory Structure Configuration
304
-
305
- ### Recommended Structure
306
-
307
- ```
308
- project-root/
309
- ├── src/ # Source code directory
310
- │ ├── components/
311
- │ ├── pages/
312
- │ └── utils/
313
- ├── locales/ # Translation files
314
- │ ├── en/
315
- │ │ ├── common.json
316
- │ │ ├── auth.json
317
- │ │ └── validation.json
318
- │ ├── es/
319
- │ ├── fr/
320
- │ └── de/
321
- ├── i18ntk-reports/ # Generated reports
322
- │ ├── analysis/
323
- │ ├── validation/
324
- │ ├── usage/
325
- │ ├── sizing/
326
- │ └── summary/
327
- ├── backups/ # Configuration backups
328
- ├── docs/ # Documentation
329
- ├── settings/i18ntk-config.json # User configuration (main config file)
330
- ├── settings/admin-config.json # Admin configuration
331
- └── package.json
332
- ```
333
-
334
- ### Custom Directory Configuration
335
-
336
- ```json
337
- {
338
- "directories": {
339
- "source": "./app/src", # Custom source directory
340
- "locales": "./public/i18n", # Custom locales directory
341
- "reports": "./reports/i18n", # Custom reports directory
342
- "backups": "./data/backups", # Custom backups directory
343
- "temp": "./tmp", # Temporary files directory
344
- "logs": "./logs" # Log files directory
345
- }
346
- }
347
- ```
348
-
349
- ## 🔍 Validation Configuration
350
-
351
- ### Validation Rules
352
-
353
- ```json
354
- {
355
- "validation": {
356
- "strict": true, # Enable strict validation
357
- "autoFix": false, # Auto-fix common issues
358
- "rules": {
359
- "syntax": {
360
- "enabled": true,
361
- "checkJSON": true,
362
- "checkYAML": true,
363
- "allowComments": false
364
- },
365
- "consistency": {
366
- "enabled": true,
367
- "checkKeys": true,
368
- "checkValues": true,
369
- "caseSensitive": true
370
- },
371
- "completeness": {
372
- "enabled": true,
373
- "requireAllKeys": true,
374
- "allowEmpty": false,
375
- "threshold": 95
376
- },
377
- "quality": {
378
- "enabled": true,
379
- "checkLength": true,
380
- "maxLength": 500,
381
- "checkSpecialChars": true,
382
- "checkEncoding": true
383
- }
384
- },
385
- "ignore": {
386
- "files": ["test.json", "temp.json"],
387
- "keys": ["debug.*", "temp.*"],
388
- "patterns": ["*.test.json"]
389
- }
390
- }
391
- }
392
- ```
393
-
394
- ## 📊 Reporting Configuration
395
-
396
- ### Report Settings
397
-
398
- ```json
399
- {
400
- "reporting": {
401
- "format": "html", # Default format: html, json, csv, pdf
402
- "template": "default", # Report template
403
- "includeCharts": true, # Include visual charts
404
- "includeStatistics": true, # Include statistical data
405
- "includeDetails": true, # Include detailed information
406
- "autoOpen": false, # Auto-open reports in browser
407
- "compression": true, # Compress large reports
408
- "retention": 30, # Days to keep reports
409
- "customFields": [ # Custom report fields
410
- "projectName",
411
- "version",
412
- "buildDate"
413
- ],
414
- "export": {
415
- "enabled": true,
416
- "formats": ["html", "json", "csv"],
417
- "location": "./exports"
418
- }
419
- }
420
- }
421
- ```
422
-
423
- ### Chart Configuration
424
-
425
- ```json
426
- {
427
- "charts": {
428
- "enabled": true,
429
- "library": "chartjs", # Chart library: chartjs, d3, plotly
430
- "theme": "default", # Chart theme
431
- "colors": {
432
- "primary": "#007bff",
433
- "secondary": "#6c757d",
434
- "success": "#28a745",
435
- "warning": "#ffc107",
436
- "danger": "#dc3545"
437
- },
438
- "types": {
439
- "completeness": "pie", # Chart type for completeness
440
- "progress": "bar", # Chart type for progress
441
- "trends": "line", # Chart type for trends
442
- "distribution": "doughnut" # Chart type for distribution
443
- }
444
- }
445
- }
446
- ```
447
-
448
- ## 🔄 Workflow Configuration
449
-
450
- ### Automated Workflow Settings
451
-
452
- ```json
453
- {
454
- "workflow": {
455
- "enabled": true,
456
- "schedule": {
457
- "enabled": false,
458
- "cron": "0 2 * * *", # Daily at 2 AM
459
- "timezone": "UTC"
460
- },
461
- "steps": [
462
- {
463
- "name": "analyze",
464
- "enabled": true,
465
- "config": {
466
- "detailed": true,
467
- "threshold": 90
468
- }
469
- },
470
- {
471
- "name": "validate",
472
- "enabled": true,
473
- "config": {
474
- "strict": true,
475
- "autoFix": false
476
- }
477
- },
478
- {
479
- "name": "usage",
480
- "enabled": true,
481
- "config": {
482
- "checkUnused": true,
483
- "checkMissing": true
484
- }
485
- },
486
- {
487
- "name": "complete",
488
- "enabled": false,
489
- "config": {
490
- "auto": false,
491
- "provider": "google"
492
- }
493
- },
494
- {
495
- "name": "summary",
496
- "enabled": true,
497
- "config": {
498
- "format": "html",
499
- "includeCharts": true
500
- }
501
- }
502
- ],
503
- "notifications": {
504
- "enabled": false,
505
- "email": {
506
- "enabled": false,
507
- "recipients": [],
508
- "smtp": {}
509
- },
510
- "webhook": {
511
- "enabled": false,
512
- "url": "",
513
- "method": "POST"
514
- }
515
- }
516
- }
517
- }
518
- ```
519
-
520
- ## 🔐 Security Configuration
521
-
522
- ### Security Settings
523
-
524
- ```json
525
- {
526
- "security": {
527
- "encryption": {
528
- "enabled": true,
529
- "algorithm": "aes-256-gcm",
530
- "keyDerivation": "pbkdf2",
531
- "iterations": 100000
532
- },
533
- "authentication": {
534
- "enabled": false,
535
- "method": "local", # local, oauth, ldap
536
- "sessionTimeout": 3600,
537
- "maxAttempts": 3,
538
- "lockoutDuration": 900
539
- },
540
- "authorization": {
541
- "enabled": false,
542
- "roles": ["admin", "user", "viewer"],
543
- "permissions": {
544
- "admin": ["*"],
545
- "user": ["read", "write"],
546
- "viewer": ["read"]
547
- }
548
- },
549
- "audit": {
550
- "enabled": true,
551
- "logLevel": "info",
552
- "includeData": false,
553
- "retention": 90
554
- }
555
- }
556
- }
557
- ```
558
-
559
- ## 🎨 UI Configuration
560
-
561
- ### User Interface Settings
562
-
563
- ```json
564
- {
565
- "ui": {
566
- "language": "en", # UI language
567
- "theme": "default", # UI theme: default, dark, light
568
- "dateFormat": "YYYY-MM-DD", # Date format
569
- "timeFormat": "HH:mm:ss", # Time format
570
- "timezone": "UTC", # Timezone
571
- "pagination": {
572
- "enabled": true,
573
- "pageSize": 50,
574
- "maxPages": 100
575
- },
576
- "progress": {
577
- "enabled": true,
578
- "style": "bar", # bar, spinner, dots
579
- "showPercentage": true,
580
- "showETA": true
581
- },
582
- "notifications": {
583
- "enabled": true,
584
- "position": "top-right", # Position for notifications
585
- "duration": 5000, # Duration in milliseconds
586
- "sound": false
587
- }
588
- }
589
- }
590
- ```
591
-
592
- ## 🔧 Performance Configuration
593
-
594
- ### Performance Optimization
595
-
596
- ```json
597
- {
598
- "performance": {
599
- "caching": {
600
- "enabled": true,
601
- "ttl": 3600, # Cache TTL in seconds
602
- "maxSize": "100MB", # Maximum cache size
603
- "strategy": "lru" # Cache strategy: lru, fifo, lfu
604
- },
605
- "concurrency": {
606
- "maxWorkers": 4, # Maximum worker threads
607
- "batchSize": 100, # Batch processing size
608
- "timeout": 30000 # Operation timeout in ms
609
- },
610
- "memory": {
611
- "maxHeapSize": "512MB", # Maximum heap size
612
- "gcInterval": 60000, # Garbage collection interval
613
- "monitoring": true # Enable memory monitoring
614
- },
615
- "io": {
616
- "bufferSize": 8192, # I/O buffer size
617
- "maxFileSize": "10MB", # Maximum file size
618
- "compression": true # Enable compression
619
- }
620
- }
621
- }
622
- ```
623
-
624
- ## 📝 Configuration Validation
625
-
626
- ### Validation Rules
627
-
628
- The toolkit automatically validates configuration files on startup:
629
-
630
- 1. **Schema Validation** - Ensures all required fields are present
631
- 2. **Type Validation** - Checks data types for all fields
632
- 3. **Range Validation** - Validates numeric ranges and limits
633
- 4. **Path Validation** - Verifies directory and file paths exist
634
- 5. **Dependency Validation** - Checks for required dependencies
635
-
636
- ### Configuration Errors
637
-
638
- Common configuration errors and solutions:
639
-
640
- | Error | Cause | Solution |
641
- |-------|-------|----------|
642
- | `Invalid source directory` | Directory doesn't exist | Create directory or update path |
643
- | `Missing API key` | Translation service key not set | Add API key to environment variables |
644
- | `Invalid language code` | Unsupported language code | Use ISO 639-1 language codes |
645
- | `Permission denied` | Insufficient file permissions | Update file/directory permissions |
646
- | `Invalid JSON syntax` | Malformed configuration file | Fix JSON syntax errors |
647
-
648
- ## 🔄 Configuration Migration
649
-
650
- ### Version Migration
651
-
652
- When upgrading to version 1.4.6, the toolkit automatically:
653
-
654
- 1. **Backs up** existing configuration files
655
- 2. **Migrates** settings to new format
656
- 3. **Validates** migrated configuration
657
- 4. **Reports** any migration issues
658
-
659
- ### Manual Migration
660
-
661
- For manual migration:
662
-
663
- ```bash
664
- # Backup current configuration
665
- npm run i18ntk:settings -- --export ./config-backup.json
666
-
667
- # Reset to defaults
668
- npm run i18ntk:settings -- --reset
669
-
670
- # Import backed up settings
671
- npm run i18ntk:settings -- --import ./config-backup.json
672
- ```
673
-
674
- ---
675
-
676
- **Note:** This configuration guide is maintained for version 1.4.6. For the latest configuration options, refer to the [API Reference](./API_REFERENCE.md) and [Components Documentation](./COMPONENTS.md).