handlebars-i18n-cli 2.0.5 → 2.0.6
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 +6 -6
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ for [handlebars-i18n](https://github.com/fwalzel/handlebars-i18n.git) and other
|
|
|
12
12
|
[](https://github.com/fwalzel/handlebars-i18n-cli/actions/workflows/node.js.yml/badge.svg)
|
|
13
13
|
[](https://coveralls.io/github/fwalzel/handlebars-i18n-cli?branch=main)
|
|
14
14
|
[](https://snyk.io/test/github/fwalzel/handlebars-i18n-cli/badge.svg)
|
|
15
|
-

|
|
16
16
|
|
|
17
17
|
## Install
|
|
18
18
|
|
|
@@ -44,7 +44,7 @@ i18n-collect src/**/*.hbs src/translations.json --lng de,en,fr
|
|
|
44
44
|
|
|
45
45
|
From a very simple handlebars template like this …
|
|
46
46
|
|
|
47
|
-
```
|
|
47
|
+
```hbs
|
|
48
48
|
<!DOCTYPE html>
|
|
49
49
|
<html lang="{{_locale}}">
|
|
50
50
|
<head>
|
|
@@ -170,7 +170,7 @@ You can use `handlebars-i18n-cli` in a programmatical way too. For import and in
|
|
|
170
170
|
* The output will always be in `.json` format. The file(s) can then be required for your i18next translation
|
|
171
171
|
as [JSON v2](https://www.i18next.com/misc/json-format#i18next-json-v2)
|
|
172
172
|
|
|
173
|
-
```
|
|
173
|
+
```javascript
|
|
174
174
|
i18next.init({
|
|
175
175
|
compatibilityJSON: 'v2'
|
|
176
176
|
});
|
|
@@ -186,7 +186,7 @@ value strings contain current language and key name. Example:
|
|
|
186
186
|
|
|
187
187
|
The template …
|
|
188
188
|
|
|
189
|
-
```
|
|
189
|
+
```hbs
|
|
190
190
|
<h1>{{__ headline userName="Frank"}}</h1>
|
|
191
191
|
<p>{{__ paragraph}}</p>
|
|
192
192
|
```
|
|
@@ -233,7 +233,7 @@ i18n-collect template.hbs translation.json --lng de,en,fn --separateLngFiles
|
|
|
233
233
|
Say your translation function has the name *t* instead of handlebars-i18n’s *__* (double underscore) and your template
|
|
234
234
|
usage would look like:
|
|
235
235
|
|
|
236
|
-
```
|
|
236
|
+
```hbs
|
|
237
237
|
<p> {{t myKeyNameToTranslation}} </p>
|
|
238
238
|
```
|
|
239
239
|
|
|
@@ -365,5 +365,5 @@ npm test
|
|
|
365
365
|
|
|
366
366
|
## License
|
|
367
367
|
|
|
368
|
-
MIT License, Copyright (c) 2022–
|
|
368
|
+
MIT License, Copyright (c) 2022–26 Florian Walzel
|
|
369
369
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "handlebars-i18n-cli",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "Extract translation keys from handlebars templates and form JSON from it, generate automatic translations via DeepL",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -40,20 +40,20 @@
|
|
|
40
40
|
},
|
|
41
41
|
"homepage": "https://github.com/fwalzel/handlebars-i18n-cli#readme",
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"async-file-tried": "^1.2.
|
|
43
|
+
"async-file-tried": "^1.2.3",
|
|
44
44
|
"axios": "^1.13.2",
|
|
45
45
|
"commander": "^14.0.2",
|
|
46
|
-
"deepl-node": "^1.
|
|
46
|
+
"deepl-node": "^1.24.0",
|
|
47
47
|
"dotenv": "^17.2.3",
|
|
48
48
|
"glob": "^13.0.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"c8": "^10.1.3",
|
|
52
|
-
"chai": "^6.2.
|
|
52
|
+
"chai": "^6.2.2",
|
|
53
53
|
"chai-as-promised": "^8.0.2",
|
|
54
54
|
"coveralls-next": "^6.0.1",
|
|
55
55
|
"mocha": "^11.7.5",
|
|
56
|
-
"sinon": "^21.0.
|
|
56
|
+
"sinon": "^21.0.1",
|
|
57
57
|
"sinon-chai": "^4.0.1",
|
|
58
58
|
"test-console": "^2.0.0",
|
|
59
59
|
"typescript": "^5.9.3"
|