i18ntk 3.0.0 → 3.1.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/CHANGELOG.md +57 -16
- package/README.md +226 -98
- package/main/i18ntk-sizing.js +471 -218
- package/main/i18ntk-translate.js +399 -68
- package/main/i18ntk-validate.js +26 -14
- package/main/manage/commands/TranslateCommand.js +273 -52
- package/main/manage/commands/ValidateCommand.js +25 -13
- package/package.json +4 -1
- package/settings/settings-cli.js +75 -29
- package/settings/settings-manager.js +109 -1
- package/ui-locales/de.json +14 -14
- package/ui-locales/en.json +14 -14
- package/ui-locales/es.json +14 -14
- package/ui-locales/fr.json +14 -14
- package/ui-locales/ja.json +14 -14
- package/ui-locales/ru.json +18 -17
- package/ui-locales/zh.json +14 -14
- package/utils/config-manager.js +20 -4
- package/utils/security.js +4 -3
- package/utils/translate/cli.js +20 -16
- package/utils/translate/placeholder.js +60 -0
- package/utils/translate/protection.js +243 -0
- package/utils/translate/report.js +49 -22
- package/utils/validation-risk.js +175 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,47 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [3.1.1] - 2026-05-07
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **Auto Translate protection file workflow**: Added user-editable `i18ntk-auto-translate.json` support for protected terms, key paths, exact values, and regex patterns.
|
|
12
|
+
- **Public package README guard**: Public package staging now verifies `README.md` is included and non-empty before publish.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
- Updated README and release documentation for the current Auto Translate protection workflow and public package contents.
|
|
16
|
+
- Removed project-specific hardcoded validation examples so users configure their own brand and domain terms.
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
- Removed provider-shaped fake secret fixtures from tests to avoid GitHub push protection false positives.
|
|
20
|
+
- Ensured public package metadata includes `readmeFilename: "README.md"` so npm can render the package README.
|
|
21
|
+
|
|
22
|
+
## [3.1.0] - 2026-05-07
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
- **Placeholder-preserve translation mode**: Translates text segments around dynamic placeholders and reinserts the original tokens exactly.
|
|
26
|
+
- **Auto Translate beta settings**: Added settings for placeholder mode, concurrency, batch size, progress interval, retry count, retry delay, timeout, dry-run preview, report output, and BOM output.
|
|
27
|
+
- **Large-file tuning flags**: Added `--batch-size` and `--progress-interval` to `i18ntk-translate`.
|
|
28
|
+
- **Short-lived placeholder manifest**: Mirrors placeholder maps to an OS temp file during processing and removes it after each file completes.
|
|
29
|
+
- **Validation content-risk helper**: Added structured detection for URLs, email addresses, secret-like values, and likely untranslated English content.
|
|
30
|
+
- **Sizing file-set analysis**: Added per-language file counts, per-file sizing statistics, and missing/extra file comparison across locale folders.
|
|
31
|
+
|
|
32
|
+
### Changed
|
|
33
|
+
- Automated and manager Auto Translate flows now default to placeholder `preserve` mode instead of skipping placeholder-bearing strings.
|
|
34
|
+
- `i18ntk-translate` can now be imported and run in-process by other package modules.
|
|
35
|
+
- Source JSON reads tolerate UTF-8 BOM-prefixed files.
|
|
36
|
+
- Validation warnings now report specific issue types and reasons instead of the vague `Risky content` message.
|
|
37
|
+
- English-content validation now reports an English percentage and only warns above a 10% threshold with at least three detected English words.
|
|
38
|
+
- Sizing reports now include folder-level file counts and per-file key/character breakdowns for each language.
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
- Fixed false-positive validation warnings for normal product copy terms.
|
|
42
|
+
- Fixed validator handling so ordinary explanatory uses of words like `token` or `secret` are not treated as leaked credentials.
|
|
43
|
+
- Fixed distorted `i18ntk-sizing` table output by rendering aligned columns from measured values instead of fixed localized spacing.
|
|
44
|
+
- Fixed sizing language comparison output so it uses analyzed languages and the configured source language baseline.
|
|
45
|
+
|
|
46
|
+
### Security
|
|
47
|
+
- Removed production `child_process` usage from `main/manage/commands/TranslateCommand.js` by replacing the spawned CLI process with an in-process translator call.
|
|
48
|
+
|
|
8
49
|
## [3.0.0] - 2026-05-05
|
|
9
50
|
|
|
10
51
|
### Added
|
|
@@ -63,22 +104,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
63
104
|
|
|
64
105
|
### Scripts
|
|
65
106
|
- Fixed `scripts/build-public-package.js` and `scripts/reset-release-state.js` `npm_execpath` fallback for missing env var.
|
|
66
|
-
- Fixed `scripts/lint-locales.js` BOM handling and try-catch for `fs.readdirSync`.
|
|
67
|
-
|
|
68
|
-
## [2.5.1] - 2026-04-29
|
|
69
|
-
|
|
70
|
-
### Security
|
|
71
|
-
- Fixed `AdminAuth.verifyPin()` to fail closed when admin config is missing, disabled, or malformed instead of returning success.
|
|
72
|
-
- Fixed auth-required checks to fail closed when settings require admin PIN protection but the admin config is unusable.
|
|
73
|
-
- Normalized admin session expiry handling by storing both `expires` and `expiresAt` and cleaning up both formats consistently.
|
|
74
|
-
|
|
75
|
-
### Added
|
|
76
|
-
- Added regression tests for admin PIN fail-closed behavior and session expiry cleanup.
|
|
77
|
-
|
|
78
|
-
### Changed
|
|
79
|
-
- Documented the public npm package staging flow introduced after `2.5.0`.
|
|
80
|
-
|
|
81
|
-
## [2.5.0] - 2026-04-29
|
|
107
|
+
- Fixed `scripts/lint-locales.js` BOM handling and try-catch for `fs.readdirSync`.
|
|
108
|
+
|
|
109
|
+
## [2.5.1] - 2026-04-29
|
|
110
|
+
|
|
111
|
+
### Security
|
|
112
|
+
- Fixed `AdminAuth.verifyPin()` to fail closed when admin config is missing, disabled, or malformed instead of returning success.
|
|
113
|
+
- Fixed auth-required checks to fail closed when settings require admin PIN protection but the admin config is unusable.
|
|
114
|
+
- Normalized admin session expiry handling by storing both `expires` and `expiresAt` and cleaning up both formats consistently.
|
|
115
|
+
|
|
116
|
+
### Added
|
|
117
|
+
- Added regression tests for admin PIN fail-closed behavior and session expiry cleanup.
|
|
118
|
+
|
|
119
|
+
### Changed
|
|
120
|
+
- Documented the public npm package staging flow introduced after `2.5.0`.
|
|
121
|
+
|
|
122
|
+
## [2.5.0] - 2026-04-29
|
|
82
123
|
|
|
83
124
|
### Security
|
|
84
125
|
- Centralized environment-variable access behind the `utils/env-manager.js` allowlist.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# i18ntk v3.
|
|
1
|
+
# i18ntk v3.1.1
|
|
2
2
|
|
|
3
|
-
Zero-dependency internationalization toolkit for setup, scanning, analysis, validation, usage tracking, translation completion, automatic locale translation, and runtime translation loading.
|
|
3
|
+
Zero-dependency internationalization toolkit for setup, scanning, analysis, validation, usage tracking, translation completion, automatic JSON locale translation, reporting, and runtime translation loading.
|
|
4
4
|
|
|
5
5
|

|
|
6
6
|
|
|
@@ -9,47 +9,7 @@ Zero-dependency internationalization toolkit for setup, scanning, analysis, vali
|
|
|
9
9
|
[](https://nodejs.org)
|
|
10
10
|
[](https://www.npmjs.com/package/i18ntk)
|
|
11
11
|
[](LICENSE)
|
|
12
|
-
[**: Translate one or more source JSON files into one or more target languages from menu option 14.
|
|
24
|
-
- **Standalone CLI**: Use `i18ntk-translate <source-file> <target-lang>` for direct automation and batch translation.
|
|
25
|
-
- **Dry-run preview**: Review translated/skipped counts before writing target files.
|
|
26
|
-
- **Placeholder protection**: Detect and preserve placeholders such as `{name}`, `{{count}}`, `%s`, `%d`, `:id`, `%{name}`, and `${value}`.
|
|
27
|
-
- **Post-translation report**: Print or write translated and skipped key counts.
|
|
28
|
-
- **Zero dependencies**: Translation support uses built-in Node.js modules and the free Google Translate endpoint.
|
|
29
|
-
|
|
30
|
-
For the full detailed changelog, see [CHANGELOG.md](./CHANGELOG.md). For migration notes, see [docs/migration-guide-v3.0.0.md](./docs/migration-guide-v3.0.0.md).
|
|
31
|
-
|
|
32
|
-
## What i18ntk Does
|
|
33
|
-
|
|
34
|
-
- Zero runtime dependencies
|
|
35
|
-
- Interactive and non-interactive project setup
|
|
36
|
-
- Translation completeness analysis and usage tracking
|
|
37
|
-
- Validation, sizing, and summary reporting
|
|
38
|
-
- Missing-key completion and fixer workflows
|
|
39
|
-
- Automatic translation of JSON locale files
|
|
40
|
-
- Runtime translation helpers for application code
|
|
41
|
-
- Support for JS/TS, React, Vue, Angular, and generic projects
|
|
42
|
-
|
|
43
|
-
## Getting Started
|
|
44
|
-
|
|
45
|
-
1. Install the package.
|
|
46
|
-
2. Run `i18ntk` or `i18ntk --command=init` to initialize the project.
|
|
47
|
-
3. Confirm the source language and locale directories.
|
|
48
|
-
4. Run `i18ntk --command=analyze` or `i18ntk --command=validate` to inspect translation coverage.
|
|
49
|
-
5. Use `i18ntk --command=complete` to fill missing keys when needed.
|
|
50
|
-
6. Use `i18ntk --command=translate` or menu option 14 to auto-translate source JSON files.
|
|
51
|
-
|
|
52
|
-
The full onboarding flow is documented in [docs/getting-started.md](docs/getting-started.md).
|
|
12
|
+
[](https://socket.dev/npm/package/i18ntk/overview/3.1.1)
|
|
53
13
|
|
|
54
14
|
## Install
|
|
55
15
|
|
|
@@ -64,11 +24,29 @@ npm install --save-dev i18ntk
|
|
|
64
24
|
npx i18ntk --help
|
|
65
25
|
```
|
|
66
26
|
|
|
67
|
-
|
|
27
|
+
Requirements:
|
|
68
28
|
|
|
69
|
-
|
|
29
|
+
- Node.js `>=16.0.0`
|
|
30
|
+
- npm `>=8.0.0`
|
|
31
|
+
- No runtime dependencies
|
|
70
32
|
|
|
71
|
-
|
|
33
|
+
## What's New in 3.1.1
|
|
34
|
+
|
|
35
|
+
- Auto Translate can translate strings that contain placeholders by translating text around the placeholders and reinserting the original tokens.
|
|
36
|
+
- Auto Translate supports user-editable protection rules in `i18ntk-auto-translate.json` for brand names, product terms, exact values, key paths, and regex patterns.
|
|
37
|
+
- The manager Auto Translate flow runs in-process, avoiding production `child_process` usage for that command.
|
|
38
|
+
- The target-language prompt supports `all` to translate into every configured target language while excluding the source language.
|
|
39
|
+
- Source-directory prompts are clearer and accept absolute paths or project-relative paths.
|
|
40
|
+
- Validation warnings now distinguish URLs, email addresses, secret-like values, and likely untranslated English content.
|
|
41
|
+
- Sizing reports now include per-language file counts, file-set mismatches, and per-file key/character statistics.
|
|
42
|
+
- Internal UI locale coverage is enforced against the English UI locale.
|
|
43
|
+
- Public package staging verifies `README.md` is present before publish.
|
|
44
|
+
|
|
45
|
+
See [CHANGELOG.md](./CHANGELOG.md) and [docs/migration-guide-v3.1.1.md](./docs/migration-guide-v3.1.1.md) for release details.
|
|
46
|
+
|
|
47
|
+
## Quick Start
|
|
48
|
+
|
|
49
|
+
Initialize a project:
|
|
72
50
|
|
|
73
51
|
```bash
|
|
74
52
|
i18ntk
|
|
@@ -76,24 +54,41 @@ i18ntk
|
|
|
76
54
|
i18ntk --command=init
|
|
77
55
|
```
|
|
78
56
|
|
|
79
|
-
|
|
57
|
+
Run common checks:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
i18ntk --command=analyze
|
|
61
|
+
i18ntk --command=validate
|
|
62
|
+
i18ntk --command=usage
|
|
63
|
+
i18ntk --command=sizing
|
|
64
|
+
i18ntk --command=summary
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Complete or fix translation files:
|
|
80
68
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
-
|
|
84
|
-
|
|
85
|
-
- output directory
|
|
86
|
-
- backup behavior
|
|
69
|
+
```bash
|
|
70
|
+
i18ntk --command=complete
|
|
71
|
+
i18ntk-fixer --help
|
|
72
|
+
```
|
|
87
73
|
|
|
88
|
-
|
|
74
|
+
Auto-translate locale JSON:
|
|
89
75
|
|
|
90
76
|
```bash
|
|
91
|
-
i18ntk --command=
|
|
77
|
+
i18ntk --command=translate
|
|
78
|
+
# or
|
|
79
|
+
i18ntk-translate locales/en/common.json de --report-stdout
|
|
92
80
|
```
|
|
93
81
|
|
|
94
|
-
|
|
82
|
+
The full onboarding guide is in [docs/getting-started.md](./docs/getting-started.md).
|
|
83
|
+
|
|
84
|
+
## Main Commands
|
|
85
|
+
|
|
86
|
+
Primary CLI:
|
|
95
87
|
|
|
96
88
|
```bash
|
|
89
|
+
i18ntk
|
|
90
|
+
i18ntk --help
|
|
91
|
+
i18ntk --command=init
|
|
97
92
|
i18ntk --command=analyze
|
|
98
93
|
i18ntk --command=validate
|
|
99
94
|
i18ntk --command=usage
|
|
@@ -102,9 +97,10 @@ i18ntk --command=sizing
|
|
|
102
97
|
i18ntk --command=complete
|
|
103
98
|
i18ntk --command=translate
|
|
104
99
|
i18ntk --command=summary
|
|
100
|
+
i18ntk --command=debug
|
|
105
101
|
```
|
|
106
102
|
|
|
107
|
-
Standalone
|
|
103
|
+
Standalone executables:
|
|
108
104
|
|
|
109
105
|
```bash
|
|
110
106
|
i18ntk-init
|
|
@@ -121,10 +117,11 @@ i18ntk-backup
|
|
|
121
117
|
i18ntk-translate
|
|
122
118
|
```
|
|
123
119
|
|
|
124
|
-
Note: `i18ntk --command=backup`
|
|
125
|
-
Use the standalone `i18ntk-backup` executable when backup operations are required.
|
|
120
|
+
Note: manager route `i18ntk --command=backup` is disabled in current builds. Use `i18ntk-backup` directly for backup operations.
|
|
126
121
|
|
|
127
|
-
## Common
|
|
122
|
+
## Common Options
|
|
123
|
+
|
|
124
|
+
Most commands support:
|
|
128
125
|
|
|
129
126
|
- `--source-dir <path>`
|
|
130
127
|
- `--i18n-dir <path>`
|
|
@@ -135,15 +132,6 @@ Use the standalone `i18ntk-backup` executable when backup operations are require
|
|
|
135
132
|
- `--dry-run`
|
|
136
133
|
- `--help`
|
|
137
134
|
|
|
138
|
-
Auto Translate also supports:
|
|
139
|
-
|
|
140
|
-
- `--source-lang <code>`
|
|
141
|
-
- `--files <pattern>`
|
|
142
|
-
- `--skip-placeholders`
|
|
143
|
-
- `--send-placeholders`
|
|
144
|
-
- `--report-file <path>`
|
|
145
|
-
- `--report-stdout`
|
|
146
|
-
|
|
147
135
|
Example:
|
|
148
136
|
|
|
149
137
|
```bash
|
|
@@ -152,7 +140,7 @@ i18ntk --command=analyze --source-dir=./src --i18n-dir=./locales --output-dir=./
|
|
|
152
140
|
|
|
153
141
|
## Auto Translate
|
|
154
142
|
|
|
155
|
-
Interactive
|
|
143
|
+
Interactive manager flow:
|
|
156
144
|
|
|
157
145
|
```bash
|
|
158
146
|
i18ntk
|
|
@@ -164,16 +152,117 @@ Direct CLI examples:
|
|
|
164
152
|
```bash
|
|
165
153
|
i18ntk-translate locales/en/common.json de
|
|
166
154
|
i18ntk-translate locales/en/common.json fr --dry-run --report-stdout
|
|
167
|
-
i18ntk-translate locales/en es --files "*.json" --no-confirm --
|
|
155
|
+
i18ntk-translate locales/en es --source-dir locales/en --files "*.json" --no-confirm --preserve-placeholders
|
|
168
156
|
```
|
|
169
157
|
|
|
170
|
-
The manager flow
|
|
158
|
+
The manager flow asks for:
|
|
159
|
+
|
|
160
|
+
- source locale directory
|
|
161
|
+
- source language code
|
|
162
|
+
- one or more target languages, or `all`
|
|
163
|
+
- one JSON file or all JSON files in the source directory
|
|
164
|
+
|
|
165
|
+
Before writing files, the manager can run a dry-run preview. After confirmation it writes translated files under sibling target-language folders, for example:
|
|
166
|
+
|
|
167
|
+
```text
|
|
168
|
+
locales/en/common.json
|
|
169
|
+
locales/de/common.json
|
|
170
|
+
locales/fr/common.json
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Placeholder Handling
|
|
174
|
+
|
|
175
|
+
Auto Translate detects common placeholders such as:
|
|
176
|
+
|
|
177
|
+
- `{name}`
|
|
178
|
+
- `{{count}}`
|
|
179
|
+
- `%s`
|
|
180
|
+
- `%d`
|
|
181
|
+
- `:id`
|
|
182
|
+
- `%{name}`
|
|
183
|
+
- `${value}`
|
|
184
|
+
|
|
185
|
+
Useful flags:
|
|
171
186
|
|
|
172
|
-
|
|
187
|
+
- `--preserve-placeholders`: translate text around placeholders and reinsert original tokens
|
|
188
|
+
- `--skip-placeholders`: copy placeholder-bearing strings unchanged
|
|
189
|
+
- `--send-placeholders`: send placeholder-bearing strings through translation after masking
|
|
190
|
+
- `--custom-regex <regex>`: add project-specific placeholder detection
|
|
191
|
+
|
|
192
|
+
### Protected Terms and Keys
|
|
193
|
+
|
|
194
|
+
Auto Translate can create and use a project-local protection file:
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
i18ntk-translate locales/en/common.json de --create-protection-file --protection-file ./i18ntk-auto-translate.json
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Example `i18ntk-auto-translate.json`:
|
|
201
|
+
|
|
202
|
+
```json
|
|
203
|
+
{
|
|
204
|
+
"version": 1,
|
|
205
|
+
"terms": ["BrandName", "PRODUCT_CODE", "API"],
|
|
206
|
+
"keys": ["app.brandName", "legal.companyName", "product.*.symbol"],
|
|
207
|
+
"values": ["BrandName Ltd", "support@example.com"],
|
|
208
|
+
"patterns": ["[A-Z]{2,}-\\d+"]
|
|
209
|
+
}
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
- `terms` are masked before translation and restored exactly afterward.
|
|
213
|
+
- `keys` are exact key paths or `*` wildcard paths copied unchanged.
|
|
214
|
+
- `values` are exact source values copied unchanged.
|
|
215
|
+
- `patterns` are JavaScript regex strings for advanced protected substrings.
|
|
216
|
+
|
|
217
|
+
Useful flags:
|
|
218
|
+
|
|
219
|
+
- `--protection-file <path>`
|
|
220
|
+
- `--create-protection-file`
|
|
221
|
+
- `--no-protection`
|
|
222
|
+
|
|
223
|
+
Open Settings and choose `Auto Translate Beta` to edit defaults for placeholder mode, concurrency, batch size, retry settings, report output, BOM output, protection file path, first-run setup prompt, and update prompt.
|
|
224
|
+
|
|
225
|
+
See [docs/auto-translate.md](./docs/auto-translate.md) for the full Auto Translate guide.
|
|
226
|
+
|
|
227
|
+
## Validation
|
|
228
|
+
|
|
229
|
+
Validation checks locale structure, completeness, placeholders, and content risks.
|
|
230
|
+
|
|
231
|
+
In 3.1.1, warning types are more specific:
|
|
232
|
+
|
|
233
|
+
- `Potential risky content`: URL, email address, or secret-like value
|
|
234
|
+
- `Possible untranslated English content`: target-language value appears to contain too much English
|
|
235
|
+
|
|
236
|
+
English-content warnings include:
|
|
237
|
+
|
|
238
|
+
- detected English percentage
|
|
239
|
+
- configured threshold
|
|
240
|
+
- matched word count
|
|
241
|
+
- sample matched words
|
|
242
|
+
|
|
243
|
+
Tune warnings in `.i18ntk-config`:
|
|
244
|
+
|
|
245
|
+
```json
|
|
246
|
+
{
|
|
247
|
+
"englishContentThresholdPercent": 10,
|
|
248
|
+
"allowedEnglishTerms": ["BrandName", "PRODUCT_CODE"]
|
|
249
|
+
}
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
## Sizing Analysis
|
|
253
|
+
|
|
254
|
+
`i18ntk-sizing` reports translation file sizes, key counts, average value length, and file-set mismatches across language folders.
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
i18ntk-sizing --source-dir ./locales --format table
|
|
258
|
+
i18ntk-sizing --source-dir ./locales --detailed --output-dir ./i18ntk-reports
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
Use `--detailed` to print per-file rows in the terminal.
|
|
173
262
|
|
|
174
263
|
## Runtime API
|
|
175
264
|
|
|
176
|
-
Use `i18ntk/runtime` when
|
|
265
|
+
Use `i18ntk/runtime` when an application needs to read locale JSON files at runtime.
|
|
177
266
|
|
|
178
267
|
```js
|
|
179
268
|
const runtime = require('i18ntk/runtime');
|
|
@@ -193,53 +282,92 @@ console.log(runtime.getAvailableLanguages());
|
|
|
193
282
|
runtime.refresh('fr');
|
|
194
283
|
```
|
|
195
284
|
|
|
196
|
-
|
|
285
|
+
See [docs/runtime.md](./docs/runtime.md) for runtime details.
|
|
197
286
|
|
|
198
287
|
## Configuration
|
|
199
288
|
|
|
200
|
-
|
|
289
|
+
i18ntk uses a project-local `.i18ntk-config` file.
|
|
290
|
+
|
|
291
|
+
Example:
|
|
201
292
|
|
|
202
293
|
```json
|
|
203
294
|
{
|
|
204
|
-
"version": "3.
|
|
295
|
+
"version": "3.1.1",
|
|
205
296
|
"sourceDir": "./locales",
|
|
206
297
|
"i18nDir": "./locales",
|
|
207
298
|
"outputDir": "./i18ntk-reports",
|
|
208
299
|
"sourceLanguage": "en",
|
|
209
300
|
"defaultLanguages": ["de", "es", "fr", "ru"],
|
|
301
|
+
"englishContentThresholdPercent": 10,
|
|
302
|
+
"allowedEnglishTerms": ["BrandName", "PRODUCT_CODE"],
|
|
303
|
+
"autoTranslate": {
|
|
304
|
+
"placeholderMode": "preserve",
|
|
305
|
+
"concurrency": 6,
|
|
306
|
+
"batchSize": 100,
|
|
307
|
+
"progressInterval": 25,
|
|
308
|
+
"retryCount": 3,
|
|
309
|
+
"retryDelay": 1000,
|
|
310
|
+
"timeout": 15000,
|
|
311
|
+
"dryRunFirst": true,
|
|
312
|
+
"reportStdout": true,
|
|
313
|
+
"bom": false,
|
|
314
|
+
"protectionEnabled": true,
|
|
315
|
+
"protectionFile": "./i18ntk-auto-translate.json",
|
|
316
|
+
"promptProtectionSetup": true,
|
|
317
|
+
"promptProtectionUpdate": true
|
|
318
|
+
},
|
|
210
319
|
"setup": {
|
|
211
320
|
"completed": true
|
|
212
321
|
}
|
|
213
322
|
}
|
|
214
323
|
```
|
|
215
324
|
|
|
216
|
-
See [docs/api/CONFIGURATION.md](docs/api/CONFIGURATION.md) for the full configuration model.
|
|
325
|
+
See [docs/api/CONFIGURATION.md](./docs/api/CONFIGURATION.md) for the full configuration model.
|
|
217
326
|
|
|
218
|
-
##
|
|
327
|
+
## Public Package Contents
|
|
219
328
|
|
|
220
|
-
-
|
|
221
|
-
- [Getting Started](https://github.com/vladnoskv/i18ntk/blob/main/docs/getting-started.md)
|
|
222
|
-
- [API Reference](https://github.com/vladnoskv/i18ntk/blob/main/docs/api/API_REFERENCE.md)
|
|
223
|
-
- [Configuration Guide](https://github.com/vladnoskv/i18ntk/blob/main/docs/api/CONFIGURATION.md)
|
|
224
|
-
- [Runtime API Guide](https://github.com/vladnoskv/i18ntk/blob/main/docs/runtime.md)
|
|
225
|
-
- [Auto Translate Guide](https://github.com/vladnoskv/i18ntk/blob/main/docs/auto-translate.md)
|
|
226
|
-
- [Scanner Guide](https://github.com/vladnoskv/i18ntk/blob/main/docs/scanner-guide.md)
|
|
227
|
-
- [Environment Variables](https://github.com/vladnoskv/i18ntk/blob/main/docs/environment-variables.md)
|
|
228
|
-
- [Migration Guide v3.0.0](https://github.com/vladnoskv/i18ntk/blob/main/docs/migration-guide-v3.0.0.md)
|
|
229
|
-
- [Migration Guide v2.6.0](https://github.com/vladnoskv/i18ntk/blob/main/docs/migration-guide-v2.6.0.md)
|
|
230
|
-
- [Migration Guide v2.5.1](https://github.com/vladnoskv/i18ntk/blob/main/docs/migration-guide-v2.5.1.md)
|
|
329
|
+
The public package intentionally ships runtime and CLI files only. The publish staging script excludes development-only content such as tests, scripts, docs, release staging folders, local config files, and generated protection files.
|
|
231
330
|
|
|
232
|
-
|
|
331
|
+
The package includes:
|
|
332
|
+
|
|
333
|
+
- CLI entry points under `main/`
|
|
334
|
+
- manager commands and services
|
|
335
|
+
- runtime API files under `runtime/`
|
|
336
|
+
- settings UI files required at runtime
|
|
337
|
+
- bundled internal UI locales
|
|
338
|
+
- shared utilities required by the shipped commands
|
|
339
|
+
- `README.md`, `CHANGELOG.md`, `LICENSE`, and policy files
|
|
233
340
|
|
|
234
|
-
|
|
235
|
-
- [Code of Conduct](CODE_OF_CONDUCT.md)
|
|
236
|
-
- [Security Policy](SECURITY.md)
|
|
237
|
-
- [Funding](FUNDING.md)
|
|
341
|
+
The public package manifest includes `readmeFilename: "README.md"`, and the release staging script fails if `README.md` is missing or empty.
|
|
238
342
|
|
|
239
|
-
##
|
|
343
|
+
## Documentation
|
|
344
|
+
|
|
345
|
+
- [Documentation Index](./docs/README.md)
|
|
346
|
+
- [Getting Started](./docs/getting-started.md)
|
|
347
|
+
- [API Reference](./docs/api/API_REFERENCE.md)
|
|
348
|
+
- [Configuration Guide](./docs/api/CONFIGURATION.md)
|
|
349
|
+
- [Runtime API Guide](./docs/runtime.md)
|
|
350
|
+
- [Auto Translate Guide](./docs/auto-translate.md)
|
|
351
|
+
- [Scanner Guide](./docs/scanner-guide.md)
|
|
352
|
+
- [Environment Variables](./docs/environment-variables.md)
|
|
353
|
+
- [Migration Guide v3.1.1](./docs/migration-guide-v3.1.1.md)
|
|
354
|
+
- [Migration Guide v3.0.0](./docs/migration-guide-v3.0.0.md)
|
|
355
|
+
- [Migration Guide v2.6.0](./docs/migration-guide-v2.6.0.md)
|
|
356
|
+
- [Migration Guide v2.5.1](./docs/migration-guide-v2.5.1.md)
|
|
357
|
+
|
|
358
|
+
## Security
|
|
359
|
+
|
|
360
|
+
- No API key is required for the default Auto Translate flow.
|
|
361
|
+
- Do not store secrets in locale files, `.i18ntk-config`, or protection files.
|
|
362
|
+
- Project-specific brand/product terms should be configured by the user, not hardcoded into the package.
|
|
363
|
+
- Report security issues using [SECURITY.md](./SECURITY.md).
|
|
364
|
+
|
|
365
|
+
## Community
|
|
240
366
|
|
|
241
|
-
|
|
367
|
+
- [Contributing](./CONTRIBUTING.md)
|
|
368
|
+
- [Code of Conduct](./CODE_OF_CONDUCT.md)
|
|
369
|
+
- [Funding](./FUNDING.md)
|
|
242
370
|
|
|
243
371
|
## License
|
|
244
372
|
|
|
245
|
-
|
|
373
|
+
MIT. See [LICENSE](./LICENSE).
|