i18ntk 1.5.3 → 1.6.1
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 +171 -228
- package/main/i18ntk-analyze.js +118 -78
- package/main/i18ntk-autorun.js +242 -179
- package/main/i18ntk-complete.js +180 -137
- package/main/i18ntk-doctor.js +19 -0
- package/main/i18ntk-init.js +1125 -841
- package/main/i18ntk-manage.js +221 -90
- package/main/i18ntk-sizing.js +827 -634
- package/main/i18ntk-summary.js +441 -171
- package/main/i18ntk-ui.js +439 -396
- package/main/i18ntk-usage.js +1474 -1320
- package/main/i18ntk-validate.js +836 -842
- package/package.json +174 -168
- package/scripts/debug/debugger.js +250 -259
- package/scripts/fix-all-i18n.js +215 -0
- package/scripts/fix-and-purify-i18n.js +212 -0
- package/scripts/locale-optimizer.js +426 -0
- package/scripts/update-checker.js +225 -0
- package/scripts/validate-all-translations.js +114 -223
- package/settings/settings-cli.js +691 -80
- package/settings/settings-manager.js +769 -648
- package/ui-locales/de.json +1622 -1378
- package/ui-locales/en.json +1987 -1744
- package/ui-locales/es.json +1711 -1467
- package/ui-locales/fr.json +490 -244
- package/ui-locales/ja.json +727 -482
- package/ui-locales/ru.json +698 -162
- package/ui-locales/zh.json +1563 -1321
- package/utils/admin-auth.js +503 -496
- package/utils/admin-pin.js +53 -29
- package/utils/config-helper.js +307 -0
- package/utils/config-manager.js +329 -0
- package/utils/i18n-helper.js +291 -230
- package/utils/path-utils.js +33 -0
- package/utils/performance-optimizer.js +246 -0
- package/utils/security-check.js +13 -23
- package/utils/security-config.js +16 -31
- package/utils/security.js +405 -373
- package/utils/ultra-performance-optimizer.js +350 -0
- package/scripts/debug/debug-security.js +0 -0
- package/scripts/prepublish.js +0 -149
- package/scripts/test-runner.js +0 -206
- package/scripts/verify-package.js +0 -50
- 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
|
-

|
|
4
|
-
|
|
5
|
-
**Version:** 1.
|
|
6
|
-
**Last Updated:** 2025-08-
|
|
7
|
-
**GitHub Repository:** [vladnoskv/i18ntk](https://github.com/vladnoskv/i18ntk)
|
|
8
|
-
|
|
9
|
-
[](https://www.npmjs.com/package/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
|
+

|
|
4
|
+
|
|
5
|
+
**Version:** 1.6.0
|
|
6
|
+
**Last Updated:** 2025-08-08
|
|
7
|
+
**GitHub Repository:** [vladnoskv/i18ntk](https://github.com/vladnoskv/i18ntk)
|
|
8
|
+
|
|
9
|
+
[](https://www.npmjs.com/package/i18ntk) [](https://badge.fury.io/js/i18ntk) [](https://nodejs.org/) [](https://www.npmjs.com/package/i18ntk) [](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 validation—it 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
|
+
|  |  |
|
|
56
|
+
|
|
57
|
+
| **Management Interface** | **Initialization Menu** |
|
|
58
|
+
|:------------------------:|:------------------------:|
|
|
59
|
+
|  |  |
|
|
60
|
+
|
|
61
|
+
| **Language Selection** | **Language Change** |
|
|
62
|
+
|:----------------------:|:-------------------:|
|
|
63
|
+
|  |  |
|
|
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** ❤️
|