i18ntk 1.2.2 → 1.3.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/CHANGELOG.md +48 -2
- package/LICENSE +3 -1
- package/README.md +47 -46
- package/docs/README.md +40 -18
- package/docs/SCRIPT_DIRECTORY_GUIDE.md +224 -0
- package/docs/release-notes/v1.3.0.md +162 -0
- package/main/i18ntk-analyze.js +11 -6
- package/main/i18ntk-autorun.js +37 -36
- package/main/i18ntk-complete.js +9 -5
- package/main/i18ntk-init.js +16 -12
- package/main/i18ntk-manage.js +6 -4
- package/main/i18ntk-sizing.js +5 -1
- package/main/i18ntk-summary.js +6 -2
- package/main/i18ntk-usage.js +5 -5
- package/main/i18ntk-validate.js +9 -5
- package/package.json +12 -5
- package/scripts/copy-translations.js +90 -0
- package/settings/i18ntk-config.json +11 -1
- package/settings/settings-cli.js +136 -75
- package/settings/settings-manager.js +19 -0
- package/ui-locales/de/autorun.json +69 -64
- package/ui-locales/de/common.json +14 -1
- package/ui-locales/de/errors.json +11 -1
- package/ui-locales/de/menu.json +10 -1
- package/ui-locales/de/operations.json +11 -0
- package/ui-locales/de/security.json +2 -1
- package/ui-locales/de/settings.json +60 -9
- package/ui-locales/de/sizing.json +14 -1
- package/ui-locales/de/status.json +18 -1
- package/ui-locales/de/test-complete-system.json +13 -1
- package/ui-locales/en/autorun.json +68 -65
- package/ui-locales/en/common.json +15 -1
- package/ui-locales/en/init.json +20 -5
- package/ui-locales/en/menu.json +1 -0
- package/ui-locales/en/operations.json +11 -1
- package/ui-locales/en/settings.json +151 -34
- package/ui-locales/es/autorun.json +68 -65
- package/ui-locales/es/common.json +14 -1
- package/ui-locales/es/errors.json +11 -1
- package/ui-locales/es/menu.json +10 -1
- package/ui-locales/es/operations.json +11 -0
- package/ui-locales/es/security.json +2 -1
- package/ui-locales/es/settings.json +60 -9
- package/ui-locales/es/sizing.json +14 -1
- package/ui-locales/es/status.json +18 -1
- package/ui-locales/es/test-complete-system.json +13 -1
- package/ui-locales/fr/autorun.json +69 -64
- package/ui-locales/fr/common.json +14 -1
- package/ui-locales/fr/errors.json +11 -1
- package/ui-locales/fr/menu.json +10 -1
- package/ui-locales/fr/operations.json +11 -0
- package/ui-locales/fr/security.json +2 -1
- package/ui-locales/fr/settings.json +60 -9
- package/ui-locales/fr/sizing.json +14 -1
- package/ui-locales/fr/status.json +18 -1
- package/ui-locales/fr/test-complete-system.json +13 -1
- package/ui-locales/ja/autorun.json +69 -64
- package/ui-locales/ja/common.json +14 -1
- package/ui-locales/ja/errors.json +11 -1
- package/ui-locales/ja/menu.json +10 -1
- package/ui-locales/ja/operations.json +11 -0
- package/ui-locales/ja/security.json +2 -1
- package/ui-locales/ja/settings.json +60 -9
- package/ui-locales/ja/sizing.json +14 -1
- package/ui-locales/ja/status.json +18 -1
- package/ui-locales/ja/test-complete-system.json +13 -1
- package/ui-locales/pt/analyze.json +2 -1
- package/ui-locales/pt/autorun.json +69 -64
- package/ui-locales/pt/common.json +14 -1
- package/ui-locales/pt/errors.json +11 -1
- package/ui-locales/pt/init.json +5 -1
- package/ui-locales/pt/menu.json +10 -1
- package/ui-locales/pt/operations.json +11 -0
- package/ui-locales/pt/security.json +2 -1
- package/ui-locales/pt/settings.json +60 -9
- package/ui-locales/pt/sizing.json +14 -1
- package/ui-locales/pt/status.json +18 -1
- package/ui-locales/pt/test-complete-system.json +13 -1
- package/ui-locales/ru/autorun.json +69 -64
- package/ui-locales/ru/common.json +14 -1
- package/ui-locales/ru/errors.json +11 -1
- package/ui-locales/ru/menu.json +10 -1
- package/ui-locales/ru/operations.json +11 -0
- package/ui-locales/ru/security.json +2 -1
- package/ui-locales/ru/settings.json +60 -9
- package/ui-locales/ru/sizing.json +14 -1
- package/ui-locales/ru/status.json +18 -1
- package/ui-locales/ru/test-complete-system.json +13 -1
- package/ui-locales/zh/autorun.json +69 -64
- package/ui-locales/zh/common.json +14 -1
- package/ui-locales/zh/errors.json +11 -1
- package/ui-locales/zh/menu.json +10 -1
- package/ui-locales/zh/operations.json +11 -0
- package/ui-locales/zh/security.json +2 -1
- package/ui-locales/zh/settings.json +60 -9
- package/ui-locales/zh/sizing.json +13 -1
- package/ui-locales/zh/status.json +25 -8
- package/ui-locales/zh/test-complete-system.json +13 -1
- package/utils/test-complete-system.js +178 -162
- package/settings/backups/i18ntk-config-backup-2025-08-01T23-38-43-753Z.json +0 -117
- package/ui-locales/de-old.json +0 -705
- package/ui-locales/de.json +0 -15
- package/ui-locales/en-old.json +0 -709
- package/ui-locales/en.json +0 -15
- package/ui-locales/es-old.json +0 -654
- package/ui-locales/es.json +0 -15
- package/ui-locales/fr-old.json +0 -606
- package/ui-locales/fr.json +0 -15
- package/ui-locales/ja-old.json +0 -660
- package/ui-locales/ja.json +0 -15
- package/ui-locales/pt.json +0 -15
- package/ui-locales/ru-old.json +0 -655
- package/ui-locales/ru.json +0 -15
- package/ui-locales/zh-old.json +0 -647
- package/ui-locales/zh.json +0 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,57 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
All notable changes to the I18N Management Toolkit are documented here. This project follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
4
3
|
|
|
5
|
-
**Current Version:** 1.
|
|
4
|
+
**Current Version:** 1.3.0 (2025-08-02) - **SCRIPT DIRECTORY CONFIGURATION & PATH RESOLUTION FIXES** 🚀
|
|
5
|
+
|
|
6
|
+
### 🆕 New Features
|
|
7
|
+
- **Per-Script Directory Configuration**: Added support for custom directory overrides for each script type (analyze, complete, init, manage, sizing, summary, usage, validate)
|
|
8
|
+
- **Enhanced Path Guidance**: Added current working directory display and relative path examples in CLI prompts
|
|
9
|
+
- **Improved Internationalization**: Added comprehensive translation keys for all new configuration options
|
|
10
|
+
|
|
11
|
+
### 🐛 Bug Fixes
|
|
12
|
+
- **Fixed Path Resolution**: Corrected directory path resolution to properly use relative paths from project root instead of script directory
|
|
13
|
+
- **Fixed Settings Loading**: Scripts now correctly follow configured directory settings instead of defaulting to hardcoded paths
|
|
14
|
+
- **Translation Key Completeness**: Added missing translation keys for new configuration options
|
|
15
|
+
|
|
16
|
+
### 📁 Configuration Improvements
|
|
17
|
+
- **Custom Script Directories**: Each script can now have its own source directory configured independently
|
|
18
|
+
- **Settings CLI Enhancement**: Added new menu option for configuring script-specific directories
|
|
19
|
+
- **Backward Compatibility**: All existing configurations continue to work without changes
|
|
20
|
+
|
|
21
|
+
### ⚠️ Deployment Notes
|
|
22
|
+
- **Testing Recommended**: Test on a development branch before deploying to production
|
|
23
|
+
- **No Breaking Changes**: Existing configurations remain compatible
|
|
24
|
+
- **Path Resolution**: Relative paths now resolve correctly from project root directory
|
|
25
|
+
|
|
26
|
+
**Previous Version:** 1.2.3 (2025-08-02) - **KEY USAGE & UPDATE FEATURE**
|
|
27
|
+
|
|
28
|
+
## [1.2.3] - 2025-08-02
|
|
29
|
+
**⚠️ DEPRECATED:**
|
|
30
|
+
### 🚀 New Features
|
|
31
|
+
- **Added**: Update package feature to settings CLI for easy `npm update i18ntk`
|
|
32
|
+
- **Enhanced**: Key usage checking now correctly scans directories based on settings
|
|
33
|
+
- **Improved**: Complete coverage scanning ensures all relevant files are processed
|
|
34
|
+
|
|
35
|
+
### 🐛 Bug Fixes
|
|
36
|
+
- **Fixed**: Key usage and complete coverage tools now respect configured `sourceDir` and `i18nDir`
|
|
37
|
+
- **Fixed**: Removed any potential hardcoded directory paths in key scanning logic
|
|
38
|
+
|
|
39
|
+
### 🔧 Technical Details
|
|
40
|
+
- **Issue**: Key usage and complete coverage tools were not always respecting user-defined directory settings.
|
|
41
|
+
- **Root Cause**: Inconsistent directory resolution logic in `i18ntk-usage.js` and `i18ntk-complete.js`.
|
|
42
|
+
- **Resolution**: Ensured both tools consistently retrieve `sourceDir` and `i18nDir` from `settingsManager.getSettings()`.
|
|
43
|
+
- **Impact**: Accurate key usage analysis and complete translation coverage based on user configuration.
|
|
6
44
|
|
|
7
45
|
## [1.2.2] - 2025-08-02
|
|
8
46
|
|
|
47
|
+
**⚠️ DEPRECATED:** This version contains a critical bug affecting custom locale directory configuration. Please upgrade to v1.2.3 immediately.
|
|
48
|
+
|
|
49
|
+
### 🚨 Critical Bug Fix
|
|
50
|
+
- **Fixed**: Resolved `settingsManager.setDirectories is not a function` error when adding custom locale support
|
|
51
|
+
- **Fixed**: Corrected settings management to use proper `getSettings()` and `saveSettings()` methods instead of non-existent `setDirectories()`
|
|
52
|
+
- **Enhanced**: Improved stability when configuring custom translation directories
|
|
53
|
+
- **Fixed**: Directory configuration now properly persists across sessions
|
|
54
|
+
|
|
9
55
|
### 🚨 Critical Bug Fix
|
|
10
56
|
- **Fixed**: Resolved `settingsManager.setDirectories is not a function` error when adding custom locale support
|
|
11
57
|
- **Fixed**: Corrected settings management to use proper `getSettings()` and `saveSettings()` methods instead of non-existent `setDirectories()`
|
package/LICENSE
CHANGED
|
@@ -18,4 +18,6 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
Last Updated: 02/08/2025
|
package/README.md
CHANGED
|
@@ -1,21 +1,27 @@
|
|
|
1
|
-
# i18ntk -
|
|
2
|
-
|
|
3
|
-
**Version:** 1.2 – **PRODUCTION READY** with enhanced documentation and npm metadata cleanup! 🌍
|
|
4
|
-
|
|
5
|
-
**⚠️ Important Notice:** All previous versions (< 1.2) are now deprecated due to critical bugs and issues. Please upgrade to v1.1.5 for the most stable experience. We recommend backing up your project before upgrading.
|
|
6
|
-
|
|
7
|
-
**🎉 Thank You:** 200+ downloads in the first week! Thank you for your support and patience as we resolved the functional issues. My First Published Project.
|
|
1
|
+
# i18ntk - i18n Management Toolkit
|
|
8
2
|
|
|
9
3
|
[](https://badge.fury.io/js/i18ntk)
|
|
10
4
|
[](https://www.npmjs.com/package/i18ntk)
|
|
11
5
|
[](https://opensource.org/licenses/MIT)
|
|
12
6
|
[](https://nodejs.org/)
|
|
13
7
|
|
|
14
|
-
**i18ntk** (i18n Toolkit) is a comprehensive, internationalization management toolkit for JavaScript/TypeScript projects. It provides a complete CLI suite with multi-language support and advanced analysis capabilities for managing translations efficiently.
|
|
8
|
+
**Version:** 1.3.0 – **i18ntk** (i18n Toolkit) is a comprehensive, internationalization management toolkit for JavaScript/TypeScript projects. It provides a complete CLI suite with multi-language support and advanced analysis capabilities for managing translations efficiently.
|
|
9
|
+
|
|
10
|
+
## 🔧 Key Features
|
|
11
|
+
|
|
12
|
+
- **Flexible Configuration**: Customize script directories and file formats in `settings.json`
|
|
13
|
+
- **Path Resolution**: Automatically resolves relative paths based on project structure
|
|
14
|
+
- **Comprehensive Commands**: Includes analyze, complete, manage, validate, and more
|
|
15
|
+
- **Multi-Language Support**: UI available in 7 languages with partial internationalization
|
|
16
|
+
- **Production-Ready**: Tested extensively in various environments
|
|
17
|
+
|
|
18
|
+
**⚠️ Important Notice:** All previous versions (< 1.3.0) are now deprecated due to critical bugs and issues. Please upgrade to v1.3.0 for the most stable experience. We recommend backing up your project before upgrading and testing on a development branch first.
|
|
19
|
+
|
|
20
|
+
**🎉 Thank You:** 500+ downloads in the first week! Thank you for your support and patience as I resolve the functional issues. My First Published Package, please update to the latest version as any previous bugs were probably fixed.
|
|
15
21
|
|
|
16
22
|
## ⚠️ Important Disclaimer
|
|
17
23
|
|
|
18
|
-
**Important: This is an independent, community-driven toolkit**
|
|
24
|
+
**Important: This is an independent, community-driven toolkit** generated with the help of AI tools therefore, bugs and errors are prone to happen, please report an issue if you find one. Also, this package is not affiliated with any official i18n organization or team. Originally developed as a personal solution for my own translation management, i18ntk has evolved into a feature-rich internationalization toolkit available to the broader development community. The toolkit is designed to be framework-agnostic and highly adaptable:
|
|
19
25
|
|
|
20
26
|
- Works with any translation file format configured in the settings
|
|
21
27
|
- Operates independently (no i18n framework required)
|
|
@@ -23,7 +29,8 @@
|
|
|
23
29
|
- Easily extensible through code modifications or AI-assisted configuration
|
|
24
30
|
- Flexible enough to accommodate diverse project requirements
|
|
25
31
|
|
|
26
|
-
While maintaining its independence, i18ntk strives to follow i18n best practices and standards to ensure compatibility with existing workflows. Although we test thoroughly, we cannot guarantee 100% compatibility with all i18n frameworks or systems. Users are encouraged to test i18ntk with their specific setup and adjust settings as needed or find an alternative solution.
|
|
32
|
+
While maintaining its independence, i18ntk strives to follow i18n best practices and standards to ensure compatibility with existing workflows. Although we test thoroughly, we cannot guarantee 100% compatibility with all i18n frameworks or systems and don't accept liability if there are any issues, we recommend running this toolkit on a fresh project. Users are encouraged to test i18ntk with their specific setup and adjust settings as needed or find an alternative solution. Thank you for trying i18ntk, if you have any issues or suggestions, please feel free to open an issue on the GitHub repository!
|
|
33
|
+
|
|
27
34
|
|
|
28
35
|
## 🚀 Quick Start
|
|
29
36
|
|
|
@@ -79,23 +86,36 @@ npx i18ntk --version # 📋 Show detailed version information
|
|
|
79
86
|
npx i18ntk -v # 📋 Show detailed version information (short flag)
|
|
80
87
|
```
|
|
81
88
|
|
|
82
|
-
**Note:** v1.1.4 is production-ready with full core functionality. Console UI translation support is at approximately 95% with English fallback for missing keys. Core features work flawlessly - only translation completion remains.
|
|
83
|
-
|
|
84
89
|
**Important:** Direct command execution (e.g., `npx i18ntk usage`) now bypasses the interactive menu, allowing for more streamlined workflows and scripting.
|
|
85
90
|
|
|
86
|
-
## ✨ What's New in v1.
|
|
91
|
+
## ✨ What's New in v1.3.0
|
|
87
92
|
|
|
88
|
-
###
|
|
89
|
-
- **
|
|
90
|
-
- **
|
|
91
|
-
- **
|
|
92
|
-
- **
|
|
93
|
+
### 🆕 Script Directory Configuration
|
|
94
|
+
- **New**: Added per-script directory configuration support for maximum flexibility
|
|
95
|
+
- **Fixed**: Path resolution now correctly uses relative paths from project root
|
|
96
|
+
- **Enhanced**: Added comprehensive internationalization for all new configuration options
|
|
97
|
+
- **Improved**: Settings CLI now includes script directory configuration menu
|
|
98
|
+
- **Added**: Current working directory display and path guidance in CLI prompts
|
|
93
99
|
|
|
94
100
|
### 🐛 Previous Version Deprecation
|
|
95
|
-
- **Status**: All versions < 1.
|
|
96
|
-
- **Recommendation**: Immediate upgrade to v1.
|
|
101
|
+
- **Status**: All versions < 1.3.0 are now deprecated due to critical bugs
|
|
102
|
+
- **Recommendation**: Immediate upgrade to v1.3.0 for stable functionality
|
|
97
103
|
- **Migration**: Major-breaking-changes upgrading from any 1.0.x version. Uninstall, and reinstall and rerun initilization.
|
|
98
104
|
|
|
105
|
+
### ⬆️ Update Package Functionality
|
|
106
|
+
- **New Feature**: Added `Update Package` option to the settings CLI for easy `npm update i18ntk` execution.
|
|
107
|
+
- **Convenience**: Simplifies keeping the toolkit up-to-date directly from the interactive menu.
|
|
108
|
+
|
|
109
|
+
### 🔍 Enhanced Directory Handling
|
|
110
|
+
- **Improvement**: All scripts now correctly scan directories based on settings configurations
|
|
111
|
+
- **Accuracy**: Path resolution fixed to respect relative paths from project root
|
|
112
|
+
- **Bug Fix**: Resolved "Source directory not found" errors with proper path handling
|
|
113
|
+
|
|
114
|
+
### 🎯 Improved Complete Coverage Scanning
|
|
115
|
+
- **Enhancement**: Complete coverage scanning now accurately handles directory configurations.
|
|
116
|
+
- **Reliability**: Ensures all relevant files are scanned for comprehensive analysis.
|
|
117
|
+
- **Consistency**: Aligns with `i18ntk-usage.js` in respecting `sourceDir` and `i18nDir` settings.
|
|
118
|
+
|
|
99
119
|
### 📁 Enhanced Project Organization
|
|
100
120
|
- **Improved**: Configuration files now properly organized in `settings/` directory
|
|
101
121
|
- **Enhanced**: All reports centralized in `i18ntk-reports/` directory for better organization
|
|
@@ -103,7 +123,7 @@ npx i18ntk -v # 📋 Show detailed version information (short flag)
|
|
|
103
123
|
- **Updated**: Documentation reflects new file structure and locations
|
|
104
124
|
|
|
105
125
|
### 🎉 Community Milestone
|
|
106
|
-
- **Achievement**:
|
|
126
|
+
- **Achievement**: 500+ downloads in the first week
|
|
107
127
|
- **Gratitude**: Thank you for your patience as we resolved functional issues
|
|
108
128
|
- **Commitment**: Continued focus on stability and user experience
|
|
109
129
|
|
|
@@ -113,6 +133,8 @@ npx i18ntk -v # 📋 Show detailed version information (short flag)
|
|
|
113
133
|
|
|
114
134
|
**🏠 [Documentation Index](./docs/INDEX.md)** - Quick navigation to all documentation
|
|
115
135
|
|
|
136
|
+
**📁 [Script Directory Guide](./docs/SCRIPT_DIRECTORY_GUIDE.md)** - Configure custom directories for each script type (v1.3.0+)
|
|
137
|
+
|
|
116
138
|
**📊 [Translation Status](./docs/TRANSLATION_STATUS.md)** - Current translation completion status
|
|
117
139
|
|
|
118
140
|
**🔧 [API Reference](./docs/api/API_REFERENCE.md)** - Complete API documentation
|
|
@@ -146,25 +168,6 @@ npx i18ntk -v # 📋 Show detailed version information (short flag)
|
|
|
146
168
|
|
|
147
169
|
> **📖 For detailed setup and usage instructions, see [Documentation](./docs/README.md)**
|
|
148
170
|
|
|
149
|
-
## 🛠️ Core Commands
|
|
150
|
-
|
|
151
|
-
### NPM Scripts (Recommended)
|
|
152
|
-
|
|
153
|
-
| Command | Description | Direct Usage |
|
|
154
|
-
|---------|-------------|-------------|
|
|
155
|
-
| `npm run i18ntk` | Interactive management interface | `node main/i18ntk-manage.js` |
|
|
156
|
-
| `npm run i18ntk:autorun` | Automated complete workflow | `node main/i18ntk-autorun.js` |
|
|
157
|
-
| `npm run i18ntk:init` | Initialize i18n configuration | `node main/i18ntk-init.js` |
|
|
158
|
-
| `npm run i18ntk:analyze` | Analyze translation completeness | `node main/i18ntk-analyze.js` |
|
|
159
|
-
| `npm run i18ntk:validate` | Validate translation integrity | `node main/i18ntk-validate.js` |
|
|
160
|
-
| `npm run i18ntk:complete` | Complete missing translations | `node main/i18ntk-complete.js` |
|
|
161
|
-
| `npm run i18ntk:usage` | Analyze translation key usage | `node main/i18ntk-usage.js` |
|
|
162
|
-
| `npm run i18ntk:sizing` | Generate sizing reports | `node main/i18ntk-sizing.js` |
|
|
163
|
-
| `npm run i18ntk:summary` | Generate summary reports | `node main/i18ntk-summary.js` |
|
|
164
|
-
| `npm run i18ntk:debug` | Debug and diagnostics | `node dev/debug/debugger.js` |
|
|
165
|
-
|
|
166
|
-
> **📖 For complete command reference, see [API Documentation](./docs/api/API_REFERENCE.md)**
|
|
167
|
-
|
|
168
171
|
## 📊 Reports and Analysis
|
|
169
172
|
|
|
170
173
|
The toolkit generates comprehensive reports in the `i18ntk-reports/` directory:
|
|
@@ -187,11 +190,6 @@ Requests for additional languages are welcome!
|
|
|
187
190
|
|
|
188
191
|
## 🧪 Development and Testing
|
|
189
192
|
|
|
190
|
-
### Debug Tools
|
|
191
|
-
```bash
|
|
192
|
-
# Main debug interface
|
|
193
|
-
npm run i18ntk:debug
|
|
194
|
-
|
|
195
193
|
> **📖 For comprehensive debug tools documentation, see [Debug Tools](./docs/debug/DEBUG_TOOLS.md)**
|
|
196
194
|
|
|
197
195
|
|
|
@@ -220,7 +218,10 @@ npm run i18ntk:debug
|
|
|
220
218
|
|
|
221
219
|
---
|
|
222
220
|
|
|
223
|
-
**Version:** 1.
|
|
221
|
+
**Version:** 1.3.0
|
|
222
|
+
**Release Date:** 02/08/2025
|
|
223
|
+
**Previous Versions:** 1.2.x, 1.1.x, 1.0.x series
|
|
224
|
+
|
|
224
225
|
## 📄 License
|
|
225
226
|
|
|
226
227
|
This project is licensed under the MIT License - see the `LICENSE` file for details.
|
package/docs/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# I18N Management Toolkit - Documentation Hub
|
|
2
2
|
|
|
3
|
-
**Version:** 1.
|
|
3
|
+
**Version:** 1.3.0
|
|
4
4
|
**Last Updated:** August 2, 2025
|
|
5
5
|
**Maintainer:** Vladimir Noskov
|
|
6
6
|
|
|
@@ -8,12 +8,32 @@
|
|
|
8
8
|
|
|
9
9
|
**This is NOT an official i18n team product or affiliated with any i18n organization.** This toolkit was originally created as a personal project to help manage my own translation files, which was then enhanced with additional features, internationalization support, and made available to the community. It should work with any `en.json` translation files, even without i18n installed, and includes custom logic and settings that can be customized to fit your specific project needs. With simple code modifications or AI-assisted edits, you can easily adapt it to your project's requirements.
|
|
10
10
|
|
|
11
|
+
## 🆕 What's New in v1.3.0
|
|
12
|
+
|
|
13
|
+
### Major Features
|
|
14
|
+
- **🎯 Per-Script Directory Configuration** - Configure custom directories for each script type
|
|
15
|
+
- **🔧 Fixed Path Resolution** - Analyzing logic now correctly follows settings
|
|
16
|
+
- **🌍 Enhanced Internationalization** - Continued support for global applications
|
|
17
|
+
- **⚙️ Custom Directory Overrides** - Override any script directory via CLI arguments
|
|
18
|
+
- **📋 Improved Settings CLI** - Enhanced configuration management
|
|
19
|
+
|
|
20
|
+
### Key Benefits
|
|
21
|
+
- **Flexibility**: Use different directory structures for different script types
|
|
22
|
+
- **Reliability**: Path resolution now works correctly with relative paths
|
|
23
|
+
- **Backward Compatibility**: Existing configurations continue to work
|
|
24
|
+
- **Migration Support**: Easy upgrade path from v1.2.x
|
|
25
|
+
|
|
26
|
+
📖 **[See Script Directory Guide](./SCRIPT_DIRECTORY_GUIDE.md)** for detailed configuration instructions.
|
|
27
|
+
|
|
11
28
|
## 📚 Welcome to the Documentation Hub
|
|
12
29
|
|
|
13
30
|
This is your central hub for all I18N Management Toolkit documentation. Whether you're just getting started or looking for advanced configuration options, you'll find everything you need here.
|
|
14
31
|
|
|
15
32
|
## 🚀 Quick Start
|
|
16
33
|
|
|
34
|
+
### ⚠️ Deployment Warning
|
|
35
|
+
**We do not recommend using on a deployment server without testing on a branch first to see the file changes and process.** Always test v1.3.0 configuration changes in a development environment before production deployment.
|
|
36
|
+
|
|
17
37
|
### New to i18ntk?
|
|
18
38
|
Start with these essential documents:
|
|
19
39
|
|
|
@@ -92,11 +112,12 @@ docs/reports/
|
|
|
92
112
|
|
|
93
113
|
## 🎯 Common Use Cases
|
|
94
114
|
|
|
95
|
-
### 🆕 Setting Up a New Project
|
|
115
|
+
### 🆕 Setting Up a New Project (v1.3.0)
|
|
96
116
|
1. **[Installation Guide](../INSTALLATION.md)** - Install i18ntk locally (recommended) or globally
|
|
97
|
-
2. **[
|
|
98
|
-
3. **[
|
|
99
|
-
4. **[
|
|
117
|
+
2. **[Script Directory Guide](./SCRIPT_DIRECTORY_GUIDE.md)** - Configure custom directories for each script type
|
|
118
|
+
3. **[Initialization](./api/API_REFERENCE.md#i18ntk-init)** - Set up i18n structure (`npx i18ntk init`)
|
|
119
|
+
4. **[Configuration](./api/CONFIGURATION.md#primary-configuration-files)** - Configure for your framework
|
|
120
|
+
5. **[First Analysis](./api/API_REFERENCE.md#i18ntk-analyze)** - Analyze your translations (`npx i18ntk analyze`)
|
|
100
121
|
|
|
101
122
|
### 🔍 Analyzing Existing Projects
|
|
102
123
|
1. **[Usage Analysis](./api/API_REFERENCE.md#i18ntk-usage)** - Find unused/missing keys (`npx i18ntk usage`)
|
|
@@ -110,11 +131,12 @@ docs/reports/
|
|
|
110
131
|
3. **[Debug Tools](./debug/DEBUG_TOOLS.md)** - Troubleshoot issues
|
|
111
132
|
4. **[Quality Assurance](../README.md#-quality-assurance)** - Ensure 100% coverage
|
|
112
133
|
|
|
113
|
-
### 🚀 Production Deployment
|
|
114
|
-
1. **[
|
|
115
|
-
2. **[
|
|
116
|
-
3. **[
|
|
117
|
-
4. **[
|
|
134
|
+
### 🚀 Production Deployment (v1.3.0)
|
|
135
|
+
1. **[Script Directory Guide](./SCRIPT_DIRECTORY_GUIDE.md)** - Configure production directory paths
|
|
136
|
+
2. **[Testing on Branch](./SCRIPT_DIRECTORY_GUIDE.md#testing-your-configuration)** - Test configuration on development branch
|
|
137
|
+
3. **[Final Validation](./api/API_REFERENCE.md#i18ntk-validate)** - Pre-deployment checks (`npx i18ntk validate`)
|
|
138
|
+
4. **[Performance Analysis](./api/API_REFERENCE.md#i18ntk-sizing)** - Optimize bundle size (`npx i18ntk sizing`)
|
|
139
|
+
5. **[Deployment Verification](./SCRIPT_DIRECTORY_GUIDE.md#migration-guide)** - Verify all scripts work correctly
|
|
118
140
|
|
|
119
141
|
## 🌍 Language Support
|
|
120
142
|
|
|
@@ -182,14 +204,14 @@ For enterprise support, custom integrations, or consulting services, please cont
|
|
|
182
204
|
## 🔄 Version History
|
|
183
205
|
|
|
184
206
|
### Recent Releases
|
|
185
|
-
- **[v1.
|
|
186
|
-
- **[v1.
|
|
187
|
-
- **[v1.1.
|
|
188
|
-
- **[v1.1.
|
|
189
|
-
- **[v1.1.
|
|
190
|
-
- **[v1.1.
|
|
191
|
-
|
|
192
|
-
**⚠️ Note:** All versions < 1.
|
|
207
|
+
- **[v1.3.0](../CHANGELOG.md)** - Script Directory Configuration & Path Resolution Fixes (Current)
|
|
208
|
+
- **[v1.2.3](../CHANGELOG.md)** - Documentation & Metadata Cleanup **(DEPRECATED)**
|
|
209
|
+
- **[v1.1.5](../CHANGELOG.md)** - Internationalization Completion **(DEPRECATED)**
|
|
210
|
+
- **[v1.1.4](../CHANGELOG.md)** - Translation System Enhancement **(DEPRECATED)**
|
|
211
|
+
- **[v1.1.3](../CHANGELOG.md)** - Enhanced CLI Experience **(DEPRECATED)**
|
|
212
|
+
- **[v1.1.2](../CHANGELOG.md)** - Interactive Menu & Locale Fixes **(DEPRECATED)**
|
|
213
|
+
|
|
214
|
+
**⚠️ Note:** All versions < 1.3.0 are deprecated. Please upgrade immediately.
|
|
193
215
|
|
|
194
216
|
### Migration Guides
|
|
195
217
|
- **[Upgrading to v1.0.0](../RELEASE_NOTES_v1.0.0.md#-migration-guide)** - Seamless upgrade from dev versions
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
# Script Directory Configuration Guide
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Starting with **i18ntk v1.3.0**, we've introduced powerful new features for managing script directories and fixed critical path resolution issues. This guide explains how to configure custom directories for each script type and take advantage of the improved path handling.
|
|
6
|
+
|
|
7
|
+
## 🆕 New Features in v1.3.0
|
|
8
|
+
|
|
9
|
+
### 1. Per-Script Directory Configuration
|
|
10
|
+
|
|
11
|
+
Each script type can now have its own source directory configured independently. This allows for maximum flexibility in organizing your i18n files.
|
|
12
|
+
|
|
13
|
+
#### Supported Script Types
|
|
14
|
+
- **analyze** - Translation analysis reports
|
|
15
|
+
- **complete** - Translation completion tool
|
|
16
|
+
- **init** - Project initialization
|
|
17
|
+
- **manage** - Main management interface
|
|
18
|
+
- **sizing** - Translation sizing analysis
|
|
19
|
+
- **summary** - Summary reports
|
|
20
|
+
- **usage** - Usage analysis
|
|
21
|
+
- **validate** - Validation checks
|
|
22
|
+
|
|
23
|
+
### 2. Fixed Path Resolution
|
|
24
|
+
|
|
25
|
+
We've corrected how relative paths are resolved to ensure they always work from your project root directory, eliminating the "Source directory not found" errors.
|
|
26
|
+
|
|
27
|
+
## Configuration Methods
|
|
28
|
+
|
|
29
|
+
### Method 1: Settings CLI (Recommended)
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Launch the interactive settings manager
|
|
33
|
+
node main/i18ntk-manage.js --command=settings
|
|
34
|
+
|
|
35
|
+
# Or directly
|
|
36
|
+
node settings/settings-cli.js
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Navigate to **"Script Directory Configuration"** to configure individual directories for each script type.
|
|
40
|
+
|
|
41
|
+
### Method 2: Manual Configuration
|
|
42
|
+
|
|
43
|
+
Edit your settings file (`settings/settings.json`) to add custom directory configurations:
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"scriptDirectories": {
|
|
48
|
+
"analyze": "./src/i18n/locales",
|
|
49
|
+
"complete": "./translations",
|
|
50
|
+
"init": "./locales",
|
|
51
|
+
"manage": "./i18n/locales",
|
|
52
|
+
"sizing": "./src/i18n/sizing",
|
|
53
|
+
"summary": "./reports/i18n",
|
|
54
|
+
"usage": "./src/i18n/usage",
|
|
55
|
+
"validate": "./src/i18n/locales"
|
|
56
|
+
},
|
|
57
|
+
"sourceDir": "./locales"
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Method 3: CLI Arguments
|
|
62
|
+
|
|
63
|
+
Use command-line arguments to override directories for specific runs:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
# Override source directory for analyze
|
|
67
|
+
node main/i18ntk-analyze.js --source-dir=./src/i18n/locales
|
|
68
|
+
|
|
69
|
+
# Override for complete
|
|
70
|
+
node main/i18ntk-complete.js --source-dir=./translations
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Path Resolution Priority
|
|
74
|
+
|
|
75
|
+
The toolkit uses the following priority order for determining source directories:
|
|
76
|
+
|
|
77
|
+
1. **CLI Arguments** (`--source-dir`) - Highest priority
|
|
78
|
+
2. **Script-Specific Configuration** (`scriptDirectories.<script>`)
|
|
79
|
+
3. **Global Configuration** (`sourceDir`)
|
|
80
|
+
4. **Default Directory** (`./locales`) - Lowest priority
|
|
81
|
+
|
|
82
|
+
## Usage Examples
|
|
83
|
+
|
|
84
|
+
### Example 1: Multi-Directory Setup
|
|
85
|
+
|
|
86
|
+
Organize your i18n files across multiple directories:
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
project/
|
|
90
|
+
├── src/
|
|
91
|
+
│ └── i18n/
|
|
92
|
+
│ ├── locales/ # Main translations
|
|
93
|
+
│ ├── admin-locales/ # Admin interface translations
|
|
94
|
+
│ └── public-locales/ # Public-facing translations
|
|
95
|
+
├── legacy/
|
|
96
|
+
│ └── translations/ # Legacy translation files
|
|
97
|
+
└── settings/
|
|
98
|
+
└── settings.json
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Configuration:
|
|
102
|
+
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"scriptDirectories": {
|
|
106
|
+
"analyze": "./src/i18n/locales",
|
|
107
|
+
"complete": "./legacy/translations",
|
|
108
|
+
"manage": "./src/i18n/admin-locales"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Example 2: Development vs Production
|
|
114
|
+
|
|
115
|
+
Use different directories for development and production:
|
|
116
|
+
|
|
117
|
+
```json
|
|
118
|
+
{
|
|
119
|
+
"scriptDirectories": {
|
|
120
|
+
"analyze": "./src/i18n/dev-locales",
|
|
121
|
+
"validate": "./src/i18n/prod-locales"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Path Guidance Features
|
|
127
|
+
|
|
128
|
+
### Current Working Directory Display
|
|
129
|
+
|
|
130
|
+
The settings CLI now displays your current working directory and provides helpful hints:
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
📁 Current directory: /home/user/myproject
|
|
134
|
+
💡 Tip: Use relative paths like "./src/i18n/locales" or "../translations"
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Relative Path Examples
|
|
138
|
+
|
|
139
|
+
- ✅ `./src/i18n/locales` - Relative to project root
|
|
140
|
+
- ✅ `../translations` - Relative to parent directory
|
|
141
|
+
- ✅ `/absolute/path/to/locales` - Absolute path
|
|
142
|
+
- ❌ `src/i18n/locales` - Missing `./` prefix (may cause issues)
|
|
143
|
+
|
|
144
|
+
## Migration Guide
|
|
145
|
+
|
|
146
|
+
### From v1.2.x to v1.3.0
|
|
147
|
+
|
|
148
|
+
1. **No Breaking Changes**: Your existing configurations will continue to work
|
|
149
|
+
2. **Optional Upgrade**: The new features are opt-in
|
|
150
|
+
3. **Path Resolution**: Existing relative paths will now work correctly
|
|
151
|
+
|
|
152
|
+
### Testing Your Configuration
|
|
153
|
+
|
|
154
|
+
Before deploying to production, test your configuration:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
# Test with a specific directory
|
|
158
|
+
node main/i18ntk-analyze.js --source-dir=./test-locales --dry-run
|
|
159
|
+
|
|
160
|
+
# Verify all scripts work with your new configuration
|
|
161
|
+
npm run i18ntk:settings
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Internationalization Support
|
|
165
|
+
|
|
166
|
+
All new configuration options are fully internationalized with support for:
|
|
167
|
+
- English (en)
|
|
168
|
+
- German (de)
|
|
169
|
+
- Spanish (es)
|
|
170
|
+
- French (fr)
|
|
171
|
+
- Portuguese (pt)
|
|
172
|
+
- Russian (ru)
|
|
173
|
+
- Japanese (ja)
|
|
174
|
+
- Chinese (zh)
|
|
175
|
+
|
|
176
|
+
## Troubleshooting
|
|
177
|
+
|
|
178
|
+
### Common Issues
|
|
179
|
+
|
|
180
|
+
1. **"Source directory not found"**
|
|
181
|
+
- Ensure the directory exists
|
|
182
|
+
- Use relative paths from project root
|
|
183
|
+
- Check file permissions
|
|
184
|
+
|
|
185
|
+
2. **Settings not applied**
|
|
186
|
+
- Verify `scriptDirectories` configuration in settings.json
|
|
187
|
+
- Check for syntax errors in JSON
|
|
188
|
+
- Ensure settings file is in the correct location
|
|
189
|
+
|
|
190
|
+
3. **CLI arguments not working**
|
|
191
|
+
- Use the correct argument format: `--source-dir=./path`
|
|
192
|
+
- Ensure no spaces around the equals sign
|
|
193
|
+
|
|
194
|
+
### Debug Commands
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
# Check current settings
|
|
198
|
+
node settings/settings-cli.js --show
|
|
199
|
+
|
|
200
|
+
# Test path resolution
|
|
201
|
+
node main/i18ntk-analyze.js --source-dir=./test-path --dry-run
|
|
202
|
+
|
|
203
|
+
# Validate configuration
|
|
204
|
+
node main/i18ntk-validate.js --config-only
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## Best Practices
|
|
208
|
+
|
|
209
|
+
1. **Use Relative Paths**: Always use relative paths from project root for portability
|
|
210
|
+
2. **Test Before Deploying**: Always test directory configurations on a development branch
|
|
211
|
+
3. **Document Your Setup**: Keep a record of your directory structure and configurations
|
|
212
|
+
4. **Use Version Control**: Commit your settings.json to version control for team consistency
|
|
213
|
+
5. **Backup Settings**: Create backups before making significant configuration changes
|
|
214
|
+
|
|
215
|
+
## Support
|
|
216
|
+
|
|
217
|
+
For issues or questions:
|
|
218
|
+
- Check the [troubleshooting section](#troubleshooting)
|
|
219
|
+
- Review the [CHANGELOG.md](../CHANGELOG.md)
|
|
220
|
+
- Open an issue on [GitHub](https://github.com/vladnoskv/i18n-management-toolkit-main/issues)
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
*This guide is part of i18ntk v1.3.0. For previous versions, see the [documentation](../docs/).*
|