@mariokreitz/langsync 0.6.0 → 0.7.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 +37 -12
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +459 -977
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -37
- package/package.json +17 -12
package/README.md
CHANGED
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
# @mariokreitz/langsync
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> CLI tooling for localization workflows in TypeScript projects.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@mariokreitz/langsync)
|
|
6
|
+
[](https://github.com/mariokreitz/langsync/actions/workflows/ci.yml)
|
|
7
|
+
[](https://codecov.io/gh/mariokreitz/langsync)
|
|
6
8
|
[](https://nodejs.org)
|
|
7
9
|
[](https://github.com/mariokreitz/langsync/blob/main/LICENSE)
|
|
8
10
|
|
|
9
|
-
LangSync is a
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
LangSync is a practical CLI for localization maintenance: validate locale
|
|
12
|
+
structure, sync missing keys, translate empty values, and run Excel handoffs
|
|
13
|
+
without changing your existing JSON-based i18n setup.
|
|
12
14
|
|
|
13
|
-
- **
|
|
14
|
-
- **Bidirectional Excel I/O** for non-technical translators.
|
|
15
|
+
- **Translation sync** with missing-key detection across locales and namespaces.
|
|
15
16
|
- **Strict validation** with CI-friendly exit codes and JSON output.
|
|
16
17
|
- **Auto-detected integrations** for `i18next`, `ngx-translate`, `react-intl`.
|
|
18
|
+
- **AI translation adapters**: OpenAI and DeepL are released; Anthropic and Gemini are experimental (`LANGSYNC_AI_EXPERIMENTAL=1`).
|
|
19
|
+
- **Optional Excel round-trip** for translator collaboration when needed.
|
|
20
|
+
- **Typed configuration** with `defineConfig()` and IntelliSense.
|
|
17
21
|
- **Interactive setup** that scaffolds your config and single-file or namespaced locale files.
|
|
18
22
|
|
|
19
23
|
## Install
|
|
@@ -44,13 +48,13 @@ npx langsync validate
|
|
|
44
48
|
# 3. Add missing keys (empty placeholders) to non-reference locales
|
|
45
49
|
npx langsync sync
|
|
46
50
|
|
|
47
|
-
# 4. Optionally fill the gaps with AI
|
|
51
|
+
# 4. Optionally fill the gaps with AI (OpenAI/DeepL)
|
|
48
52
|
npx langsync translate
|
|
49
53
|
|
|
50
|
-
# 5.
|
|
54
|
+
# 5. Optionally hand off to translators via Excel
|
|
51
55
|
npx langsync export excel
|
|
52
56
|
|
|
53
|
-
# 6.
|
|
57
|
+
# 6. Optionally import their work back
|
|
54
58
|
npx langsync import excel
|
|
55
59
|
```
|
|
56
60
|
|
|
@@ -102,12 +106,33 @@ or set `framework: 'none'` for custom setups. Omit `namespaces` for the default
|
|
|
102
106
|
`<input>/<locale>.json` layout, or set `namespaces.structure` to `locale-dir`
|
|
103
107
|
or `locale-prefix` for per-namespace files.
|
|
104
108
|
|
|
109
|
+
## SDK
|
|
110
|
+
|
|
111
|
+
Besides the CLI, LangSync ships a standalone SDK — `@mariokreitz/langsync-sdk` —
|
|
112
|
+
that exports the command runners (`runValidate`, `runSync`, `runFindMissing`,
|
|
113
|
+
`runTranslate`) as in-process, side-effect-free functions. Use it to drive the
|
|
114
|
+
same workflows from Node.js — editor integrations, custom scripts, or CI tooling
|
|
115
|
+
— without shelling out.
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
npm install @mariokreitz/langsync-sdk
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
See the [SDK reference](https://docs.langsync.kreitz-webdev.de/docs/sdk) for the
|
|
122
|
+
full surface, options, and result types.
|
|
123
|
+
|
|
124
|
+
## Migration from i18n-excel-manager
|
|
125
|
+
|
|
126
|
+
For migration steps and command mapping, use the dedicated guide:
|
|
127
|
+
|
|
128
|
+
- [Migration from i18n-excel-manager](https://docs.langsync.kreitz-webdev.de/docs/migration-from-i18n-excel-manager)
|
|
129
|
+
|
|
105
130
|
## Documentation
|
|
106
131
|
|
|
107
|
-
Full documentation
|
|
108
|
-
and framework integration recipes:
|
|
132
|
+
Full documentation — configuration reference, every CLI command, the VS Code
|
|
133
|
+
extension, the SDK, and framework integration recipes:
|
|
109
134
|
|
|
110
|
-
**https://
|
|
135
|
+
**https://docs.langsync.kreitz-webdev.de**
|
|
111
136
|
|
|
112
137
|
## License
|
|
113
138
|
|
package/dist/cli.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import '@langsync
|
|
1
|
+
import '@mariokreitz/langsync-sdk';
|