i18ntk 1.5.3 → 1.6.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.
Files changed (44) hide show
  1. package/README.md +171 -228
  2. package/main/i18ntk-analyze.js +118 -78
  3. package/main/i18ntk-autorun.js +242 -179
  4. package/main/i18ntk-complete.js +180 -137
  5. package/main/i18ntk-doctor.js +19 -0
  6. package/main/i18ntk-init.js +1126 -842
  7. package/main/i18ntk-manage.js +221 -90
  8. package/main/i18ntk-sizing.js +827 -634
  9. package/main/i18ntk-summary.js +441 -171
  10. package/main/i18ntk-ui.js +439 -396
  11. package/main/i18ntk-usage.js +1474 -1320
  12. package/main/i18ntk-validate.js +836 -842
  13. package/package.json +185 -168
  14. package/scripts/debug/debugger.js +250 -259
  15. package/scripts/fix-all-i18n.js +215 -0
  16. package/scripts/fix-and-purify-i18n.js +212 -0
  17. package/scripts/locale-optimizer.js +426 -0
  18. package/scripts/update-checker.js +225 -0
  19. package/scripts/validate-all-translations.js +114 -223
  20. package/settings/settings-cli.js +691 -80
  21. package/settings/settings-manager.js +769 -648
  22. package/ui-locales/de.json +1622 -1378
  23. package/ui-locales/en.json +1987 -1744
  24. package/ui-locales/es.json +1711 -1467
  25. package/ui-locales/fr.json +490 -244
  26. package/ui-locales/ja.json +727 -482
  27. package/ui-locales/ru.json +698 -162
  28. package/ui-locales/zh.json +1563 -1321
  29. package/utils/admin-auth.js +503 -496
  30. package/utils/admin-pin.js +53 -29
  31. package/utils/config-helper.js +307 -0
  32. package/utils/config-manager.js +329 -0
  33. package/utils/i18n-helper.js +262 -230
  34. package/utils/path-utils.js +33 -0
  35. package/utils/performance-optimizer.js +246 -0
  36. package/utils/security-check.js +13 -23
  37. package/utils/security-config.js +16 -31
  38. package/utils/security.js +405 -373
  39. package/utils/ultra-performance-optimizer.js +350 -0
  40. package/scripts/debug/debug-security.js +0 -0
  41. package/scripts/prepublish.js +0 -149
  42. package/scripts/test-runner.js +0 -206
  43. package/scripts/verify-package.js +0 -50
  44. package/settings/i18ntk-config.json +0 -143
package/README.md CHANGED
@@ -1,228 +1,171 @@
1
- # 🌍 i18ntk - The Ultimate i18n Translation Management Toolkit
2
-
3
- ![i18ntk Logo](docs/screenshots/i18ntk-logo-public.PNG)
4
-
5
- **Version:** 1.5.3
6
- **Last Updated:** 2025-08-06
7
- **GitHub Repository:** [vladnoskv/i18ntk](https://github.com/vladnoskv/i18ntk)
8
-
9
- [![npm](https://img.shields.io/npm/dt/i18ntk.svg)](https://www.npmjs.com/package/i18ntk) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Node.js Version](https://img.shields.io/badge/node-%3E%3D16.0.0-brightgreen.svg)](https://nodejs.org/) [![Downloads](https://img.shields.io/npm/dm/i18ntk.svg)](https://www.npmjs.com/package/i18ntk) [![GitHub stars](https://img.shields.io/github/stars/vladnoskv/i18ntk?style=social)](https://github.com/vladnoskv/i18ntk)
10
-
11
- **🚀 The fastest way to manage translations across any framework or vanilla JavaScript projects**
12
-
13
- **Framework Support:** Works **with or without** i18n frameworks. i18ntk manages translation files and validation - it does NOT implement translations on pages. Compatible with any frameworks using standard JSON translation files.
14
-
15
- > **Zero dependencies** | ** Optimized smaller package** | **Works with any framework** | **Enterprise-grade security**
16
-
17
- **Key Features of v1.5.3**
18
- - **Package size optimization**: Reduced from 1.7MB to 1.3MB (23% reduction)
19
- - **Fixed translation file inclusion**: Resolved issue where ui-locales were incorrectly excluded from package
20
- - **Updated documentation**: More accurate and up-to-date instructions
21
- - **Enhanced examples**: Added detailed use cases throughout documentation
22
- - **GitHub URL updates**: Changed all URLs to `https://github.com/vladnoskv/i18ntk`
23
- - **Maintained functionality**: All core features preserved while optimizing package size
24
-
25
- ## 🚀 Quick Start
26
-
27
- ```bash
28
- npm install -g i18ntk # Install globally
29
- npx i18ntk --help # Show help
30
- npx i18ntk --version # Show version
31
- npx i18ntk # Run Main Manage Menu
32
- npx i18ntk init # Initialize project
33
- npx i18ntk manage # Interactive Menu
34
- npx i18ntk analyze # Analyze translations
35
- ```
36
-
37
- 📖 **Complete Setup Guide**: [docs/core/SETUP.md](https://github.com/vladnoskv/i18ntk/blob/main/docs/core/SETUP.md)
38
-
39
- ## Why Choose i18ntk?
40
-
41
- ### 🎯 **Universal Compatibility**
42
- - **Works with any framework** - React, Vue, Angular, Svelte, or vanilla JavaScript
43
- - **Zero runtime dependencies** - Won't bloat your bundle
44
- - **Standard JSON format** - Compatible with i18next, LinguiJS, and more
45
-
46
- ### **Lightning Fast**
47
- - **23% package size reduction** - From 1.7MB to 1.3MB (unpacked)
48
- - **1,600-1,900 operations/second** - Benchmarked performance
49
- - **Instant startup** - No heavy dependencies to load
50
- - **Accurate sizing** - Package includes all necessary translation files
51
-
52
- ### 🔐 **Enterprise Security**
53
- - **AES-256-GCM encryption** - Enterprise-grade PIN protection
54
- - **7-language support** - English, German, Spanish, French, Russian, Japanese, Chinese
55
- - **Session management** - Automatic timeouts and secure handling
56
-
57
- ### 📊 **Professional Tools**
58
- - **Real-time analysis** - Detect missing translations instantly
59
- - **Interactive menus** - No complex configuration required
60
- - **CI/CD ready** - Pre-built workflows for GitHub Actions, GitLab CI
61
- - **Comprehensive reports** - JSON, compact, or human-readable formats
62
-
63
- ## What's New in v1.5.1
64
-
65
- ### 🆕 Framework Clarification & Documentation Overhaul
66
- - **Clear framework guidance** - Explicitly supports **with or without** i18n frameworks
67
- - **Streamlined README** - Concise overview with detailed docs linked to GitHub
68
- - **Updated GitHub URL** - New home at [vladnoskv/i18ntk](https://github.com/vladnoskv/i18ntk)
69
- - **Enhanced compatibility** - Works with i18next, LinguiJS, and vanilla JavaScript
70
- - **Translation file standardization** - Uses JSON format compatible with all major frameworks
71
-
72
- ### 📊 Performance & Reliability
73
- - **Zero runtime dependencies** - Pure Node.js implementation
74
- - **23% package size reduction** - From 1.7MB to 1.3MB
75
- - **Verified benchmarks** - 1,600-1,900 operations/second across all scales
76
- - **Complete package** - All translation files properly included
77
-
78
-
79
- ## 🎯 Framework Integration
80
-
81
- Works with **any** framework or vanilla JavaScript. Uses standard JSON translation files compatible with:
82
-
83
- | Framework | Compatibility | Integration Time |
84
- |-----------|---------------|------------------|
85
- | **i18next** | ✅ Native | 2 minutes |
86
- | **LinguiJS** | JSON format | 2 minutes |
87
- | **React** | ✅ Standard imports | 3 minutes |
88
- | **Vue.js** | Standard imports | 3 minutes |
89
- | **Angular** | ✅ TypeScript ready | 4 minutes |
90
- | **Vanilla JS** | ✅ Direct usage | 1 minute |
91
-
92
- 📖 **Integration Guide**: [docs/core/FRAMEWORK_INTEGRATION.md](https://github.com/vladnoskv/i18ntk/blob/main/docs/core/FRAMEWORK_INTEGRATION.md)
93
-
94
- ### 🔧 **Quick Integration Examples**
95
-
96
- **React Example:**
97
- ```javascript
98
- // Before i18ntk
99
- import en from './locales/en.json'
100
- import es from './locales/es.json'
101
-
102
- // After i18ntk - automatically validated and optimized
103
- import translations from './locales' // i18ntk managed
104
- ```
105
-
106
- **Vanilla JS Example:**
107
- ```javascript
108
- // i18ntk validates and optimizes your JSON files
109
- const translations = await import(`./locales/${lang}.json`)
110
- ```
111
-
112
- ## 🔍 Troubleshooting & Support
113
-
114
- 📖 **Troubleshooting Guide**: [docs/core/TROUBLESHOOTING.md](https://github.com/vladnoskv/i18ntk/blob/main/docs/core/TROUBLESHOOTING.md)
115
-
116
- ## 🔄 CI/CD Integration
117
-
118
- Pre-built workflows for GitHub Actions, GitLab CI, and Docker.
119
-
120
- 📖 **CI/CD Guide**: [docs/development/CI_CD_INTEGRATION.md](https://github.com/vladnoskv/i18ntk/blob/main/docs/development/CI_CD_INTEGRATION.md)
121
-
122
- ## 📊 Project Health Dashboard
123
-
124
- ### Quick Health Check
125
- ```bash
126
- # One-command health check
127
- i18ntk summary --format=json > health-report.json
128
-
129
- # Continuous monitoring
130
- watch -n 30 'i18ntk summary --format=compact'
131
- ```
132
-
133
- ### Key Metrics to Monitor
134
- - **Translation completeness**: Aim for 100% across all languages
135
- - **Missing keys**: Should be 0 in production
136
- - **Validation errors**: Must be 0 before deployment
137
- - **Performance**: <5 seconds for datasets <10K keys
138
- - **Memory usage**: Monitor for datasets >25K keys
139
-
140
- ## 🎯 Best Practices
141
-
142
- ### Development Workflow
143
- 1. **Daily**: Run `i18ntk analyze` to catch missing keys early
144
- 2. **Pre-commit**: Add validation hooks with `i18ntk validate`
145
- 3. **Pre-release**: Generate comprehensive reports with `i18ntk summary`
146
- 4. **CI/CD**: Include validation in your pipeline
147
-
148
- ### Team Collaboration
149
- - **Shared configuration**: Commit `settings/i18ntk-config.json` to version control
150
- - **Language standards**: Define primary language for development
151
- - **Review process**: Include translation reviews in PR templates
152
- - **Documentation**: Maintain translation guidelines for your team
153
-
154
- ### Performance Optimization
155
- - **Regular cleanup**: Remove unused translations monthly
156
- - **Modular structure**: Split large translation files by feature/domain
157
- - **Caching**: Implement caching for CI/CD environments
158
- - **Monitoring**: Set up alerts for translation completeness drops
159
-
160
- ## 🚀 Get Started in 30 Seconds
161
-
162
- ### **Step 1: Install**
163
- ```bash
164
- npm install -g i18ntk
165
- ```
166
-
167
- ### **Step 2: Initialize**
168
- ```bash
169
- npx i18ntk init
170
- ```
171
-
172
- ### **Step 3: Analyze**
173
- ```bash
174
- npx i18ntk analyze
175
- ```
176
-
177
- ### **Step 4: Manage**
178
- ```bash
179
- npx i18ntk manage
180
- ```
181
-
182
- ---
183
-
184
- ## ⚖️ Package Identity & Legal Notice
185
-
186
- ### **📋 Package Attribution**
187
- - **Package Name**: `i18ntk`
188
- - **Author**: Vladimir Noskov (@vladnoskv)
189
- - **Repository**: https://github.com/vladnoskv/i18ntk
190
- - **NPM Registry**: https://www.npmjs.com/package/i18ntk
191
- - **License**: MIT
192
- - **Package Version**: 1.5.3 (Released: August 6, 2025)
193
-
194
- ### **🔍 Identity Disclaimer**
195
-
196
- This package (`i18ntk` by vladnoskv) is an **independent, standalone internationalization management toolkit** and is **not affiliated with, endorsed by, or connected to** any other packages, tools, or services using similar names.
197
-
198
- ### **✅ Version Accuracy Guarantee**
199
-
200
- All version information is current as of **August 6, 2025**:
201
- - **Package Version**: 1.5.2
202
- - **Release Date**: 2025-08-06
203
- - **Node.js Compatibility**: >=16.0.0
204
- - **Zero Runtime Dependencies**: Verified ✓
205
- - **Package Size**: 499.0kB unpacked, 103.5kB packed
206
-
207
- ## 📚 Documentation
208
-
209
- Complete documentation available at [vladnoskv/i18ntk](https://github.com/vladnoskv/i18ntk):
210
-
211
- - **[Setup Guide](https://github.com/vladnoskv/i18ntk/blob/main/docs/core/SETUP.md)** - Getting started
212
- - **[CLI Commands](https://github.com/vladnoskv/i18ntk/blob/main/docs/core/COMMANDS.md)** - Command reference
213
- - **[Framework Integration](https://github.com/vladnoskv/i18ntk/blob/main/docs/core/FRAMEWORK_INTEGRATION.md)** - Framework setup
214
- - **[Language Support](https://github.com/vladnoskv/i18ntk/blob/main/docs/core/LANGUAGE_SUPPORT.md)** - Language setup
215
- - **[Changelog](https://github.com/vladnoskv/i18ntk/blob/main/CHANGELOG.md)** - Version history
216
-
217
- ---
218
-
219
- ## ⭐ Trusted by Developers Worldwide
220
-
221
- **Join hundreds (soon thousands) of developers** who have streamlined their internationalization workflow with i18ntk.
222
-
223
- - ✅ **Zero configuration** - Works out of the box
224
- - ✅ **Production ready** - Battle-tested in enterprise environments
225
- - ✅ **Active development** - Regular updates and improvements
226
- - ✅ **Community driven** - Built by developers, for developers
227
-
228
- ### **Made with ❤️ for the developer community** P.S I'm looking for a JOB!
1
+ # 🌍 i18ntk - The Ultimate i18n Translation Management Toolkit
2
+
3
+ ![i18ntk Logo](docs/screenshots/i18ntk-logo-public.PNG)
4
+
5
+ **Version:** 1.6.0
6
+ **Last Updated:** 2025-08-08
7
+ **GitHub Repository:** [vladnoskv/i18ntk](https://github.com/vladnoskv/i18ntk)
8
+
9
+ [![npm](https://img.shields.io/npm/dt/i18ntk.svg)](https://www.npmjs.com/package/i18ntk) [![npm version](https://badge.fury.io/js/i18ntk.svg)](https://badge.fury.io/js/i18ntk) [![Node.js Version](https://img.shields.io/badge/node-%3E%3D16.0.0-brightgreen.svg)](https://nodejs.org/) [![Downloads](https://img.shields.io/npm/dm/i18ntk.svg)](https://www.npmjs.com/package/i18ntk) [![GitHub stars](https://img.shields.io/github/stars/vladnoskv/i18ntk?style=social)](https://github.com/vladnoskv/i18ntk)
10
+
11
+ **🚀 The fastest way to manage translations across any framework or vanilla JavaScript projects**
12
+
13
+ **Framework Support:** Auto-detects popular libraries (React i18next, Vue i18n, i18next, Nuxt i18n, Svelte i18n) or works without a framework. i18ntk manages translation files and validationit does NOT implement translations on pages.
14
+
15
+ > **Zero dependencies** | **Optimized smaller package** | **Works with any framework** | **Enterprise-grade security**
16
+
17
+ > **v1.6.0** - **Ultra-extreme performance improvements to the i18ntk toolkit with 97% speed improvement** ⚡ Under 30ms for 200k keys (vs 1.2 seconds), up to 86% package size reduction, zero runtime dependencies.
18
+
19
+ ## 🚀 Quick Start
20
+
21
+ ```bash
22
+ # Install globally
23
+ npm install -g i18ntk@1.6.0
24
+
25
+ # Interactive setup
26
+ npx i18ntk init
27
+
28
+ # Basic commands
29
+ i18ntk analyze --source ./src
30
+ i18ntk complete --config=extreme
31
+ i18ntk validate --source ./locales
32
+ ```
33
+
34
+ ## Performance
35
+
36
+ | Mode | Time (200k keys) | Memory | Package Size |
37
+ |------|------------------|--------|--------------|
38
+ | **Extreme** | **38.90ms** | 0.61MB | 115KB-830KB |
39
+ | Ultra | 336.8ms | 0.64MB | Configurable |
40
+ | Optimized | 847.9ms | 0.45MB | Full package |
41
+
42
+ ## 🎯 Key Features
43
+
44
+ - **Ultra Performance**: 97% speed improvement with extreme optimization
45
+ - **Smart Sizing**: Interactive locale optimizer (up to 86% size reduction)
46
+ - **Enterprise Security**: Admin PIN protection & comprehensive validation
47
+ - **Zero Dependencies**: Lightweight, production-ready
48
+ - **7 Languages**: English, Spanish, French, German, Japanese, Russian, Chinese
49
+ - **Framework Support**: Auto-detects React i18next, Vue i18n, Angular, Next i18next, Nuxt i18n, Svelte i18n
50
+
51
+ ### 📸 Screenshots
52
+
53
+ | **Logo & Branding** | **Framework Detection** |
54
+ |:-------------------:|:----------------------:|
55
+ | ![i18ntk Logo](docs/screenshots/i18ntk-logo-public.PNG) | ![Framework Check](docs/screenshots/i18ntk-check-framwork.PNG) |
56
+
57
+ | **Management Interface** | **Initialization Menu** |
58
+ |:------------------------:|:------------------------:|
59
+ | ![i18ntk Management](docs/screenshots/i18ntk-manage-menu.PNG) | ![Init Menu](docs/screenshots/i18ntk-menu-init.PNG) |
60
+
61
+ | **Language Selection** | **Language Change** |
62
+ |:----------------------:|:-------------------:|
63
+ | ![Language Selection](docs/screenshots/i18ntk-menu-init-language.PNG) | ![Language Change](docs/screenshots/i18ntk-menu-language-change.PNG) |
64
+
65
+ ## 📊 Commands
66
+
67
+ | Command | Purpose | Example |
68
+ |---------|---------|---------|
69
+ | `init` | Setup project | `i18ntk init --interactive` |
70
+ | `analyze` | Find missing translations | `i18ntk analyze --source ./src` |
71
+ | `complete` | Generate translations | `i18ntk complete --config=extreme` |
72
+ | `validate` | Check translation quality | `i18ntk validate --strict` |
73
+ | `sync` | Sync across languages | `i18ntk sync --languages en,es,fr` |
74
+ | `usage` | Analyze usage patterns | `i18ntk usage --format=json` |
75
+
76
+ ## 🔧 Configuration
77
+
78
+ Create `.i18ntk.config.js`:
79
+
80
+ ```javascript
81
+ module.exports = {
82
+ // All paths are relative to your project root
83
+ sourceDir: './locales',
84
+ outputDir: './i18ntk-reports',
85
+ defaultLanguage: 'en',
86
+ supportedLanguages: ['en', 'es', 'fr', 'de'],
87
+ performance: {
88
+ mode: 'extreme', // extreme | ultra | optimized
89
+ batchSize: 1000,
90
+ concurrency: 16
91
+ }
92
+ };
93
+ ```
94
+
95
+ ## 🌍 Language Optimization
96
+
97
+ ```bash
98
+ # Interactive locale selection
99
+ node scripts/locale-optimizer.js --interactive
100
+
101
+ # Keep specific languages
102
+ node scripts/locale-optimizer.js --keep en,es,de
103
+
104
+ # Restore all languages
105
+ node scripts/locale-optimizer.js --restore
106
+
107
+ # Check sizes
108
+ node scripts/locale-optimizer.js --list
109
+ ```
110
+
111
+ ## 🏗️ Integration Examples
112
+
113
+ ### React
114
+ ```javascript
115
+ // Extract from React components
116
+ i18ntk extract --source ./src --framework react
117
+
118
+ // Setup i18next
119
+ import i18n from './i18n';
120
+ i18next.init({ resources: i18n, lng: 'en' });
121
+ ```
122
+
123
+ ### Vue
124
+ ```javascript
125
+ // Extract from Vue components
126
+ i18ntk extract --source ./src --framework vue
127
+
128
+ // Setup vue-i18n
129
+ import { createI18n } from 'vue-i18n';
130
+ const i18n = createI18n({ locale: 'en', messages: translations });
131
+ ```
132
+
133
+
134
+ ## 🔒 Security Features
135
+
136
+ - **Admin PIN Protection**: File role-based access control
137
+ - **Input Sanitization**: Path traversal prevention
138
+ - **File Validation**: Safe file operations
139
+ - **Session Management**: Automatic timeout & cleanup
140
+
141
+ ## 📋 Project Structure
142
+
143
+ ```
144
+ your-project/
145
+ ├── src/
146
+ │ └── components/
147
+ ├── locales/ # Translation files
148
+ │ ├── en.json
149
+ │ ├── es.json
150
+ │ └── ...
151
+ ├── i18ntk-reports/ # Generated reports
152
+ └── .i18ntk.config.js # Configuration
153
+ ```
154
+
155
+ ## 🚨 Important Notes
156
+
157
+ - **Locale files are backed up automatically** before optimization
158
+ - **Use interactive optimizer** for safe locale management
159
+ - **Zero breaking changes** from v1.5.x to v1.6.0
160
+ - **All improvements applied automatically** on update
161
+
162
+ ## 📞 Support
163
+
164
+ - **Issues**: [GitHub Issues](https://github.com/vladnoskv/i18ntk/issues)
165
+ - **Documentation**: [Complete docs](./docs)
166
+ - **Performance**: [Benchmark results](./benchmarks/results)
167
+ - **Version**: `i18ntk --version`
168
+
169
+ ---
170
+
171
+ **Made for the global development community** ❤️