handlebars-i18n-cli 1.0.2 → 1.0.4

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.
@@ -0,0 +1,30 @@
1
+ on: ["push", "pull_request"]
2
+
3
+ name: Test Coveralls
4
+
5
+ jobs:
6
+
7
+ build:
8
+ name: Build
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+
12
+ - uses: actions/checkout@v1
13
+
14
+ - name: Use Node.js 16.x
15
+ uses: actions/setup-node@v3
16
+ with:
17
+ node-version: 16.x
18
+
19
+ - name: npm install, make test-coverage
20
+ run: |
21
+ npm install
22
+ npm test -- --coverage
23
+
24
+ - name: Wait for coverage report
25
+ run: sleep 5
26
+
27
+ - name: Publish to coveralls.io
28
+ uses: coverallsapp/github-action@v1.1.2
29
+ with:
30
+ github-token: ${{ secrets.COVERALLS_REPO_TOKEN }}
@@ -27,5 +27,4 @@ jobs:
27
27
  node-version: ${{ matrix.node-version }}
28
28
  cache: 'npm'
29
29
  - run: npm ci
30
- - run: npm run build --if-present
31
- - run: npm test
30
+ - run: npm run build --if-present
package/.nycrc ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "reporter": [
3
+ "text-summary",
4
+ "lcov"
5
+ ],
6
+ "all": true,
7
+ "include": [
8
+ "src/i18n-collect.js"
9
+ ],
10
+ "exclude": [
11
+ "node_modules/**",
12
+ "**/*.test.js"
13
+ ]
14
+ }
package/.travis.yml CHANGED
@@ -9,7 +9,7 @@ install:
9
9
  script:
10
10
  - npm test
11
11
 
12
- after_success: 'npm run coveralls'
12
+ after_success: 'npm run coverage'
13
13
 
14
14
  after_failure:
15
15
  - cat /Users/travis/.npm/_logs/*.log
package/README.md CHANGED
@@ -5,15 +5,11 @@ It will help to automatically extract translation strings from your handlebars t
5
5
  json files from it. It also helps to keep your translations up to date when changes are made in the templates.
6
6
 
7
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
8
+ ![Node.js Version](https://img.shields.io/badge/Node.js-14.x-green)
8
9
  [![Build](https://github.com/fwalzel/handlebars-i18n-cli/actions/workflows/node.js.yml/badge.svg)](https://github.com/fwalzel/handlebars-i18n-cli/actions/workflows/node.js.yml/badge.svg)
9
- [![Code Quality](https://api.codiga.io/project/35110/score/svg)](https://api.codiga.io/project/35110/score/svg)
10
+ [![Coverage Status](https://coveralls.io/repos/github/fwalzel/handlebars-i18n-cli/badge.svg?branch=main)](https://coveralls.io/github/fwalzel/handlebars-i18n-cli?branch=main)
10
11
  [![Known Vulnerabilities](https://snyk.io/test/github/fwalzel/handlebars-i18n-cli/badge.svg)](https://snyk.io/test/github/fwalzel/handlebars-i18n-cli/badge.svg)
11
12
 
12
- ## License
13
-
14
- Copyright (c) 2022 Florian Walzel,
15
- MIT License
16
-
17
13
 
18
14
  ## Install
19
15
 
@@ -50,6 +46,8 @@ From a very simple template like this …
50
46
  </html>
51
47
  ```
52
48
 
49
+
50
+
53
51
  … the generated translations.json would be:
54
52
 
55
53
  ```json
@@ -205,7 +203,7 @@ Write each language in a separate json file instead of a single one.
205
203
  $ i18n-collect my-project/template.html my-project/translation.json --lng=de,en,fr --separateLngFiles
206
204
  ```
207
205
 
208
- Will generate three json files: **translation.de.json**, **translation.en.json**, and **translation.en.json** each holding
206
+ Will generate three json files: **translation.de.json**, **translation.en.json**, and **translation.fn.json** each holding
209
207
  only the translation for their respective language. By default all translations are written to a single json file.
210
208
 
211
209
  ---
@@ -263,9 +261,11 @@ sudo npm link
263
261
  ## Run tests
264
262
 
265
263
  ```bash
266
- $ npm test
264
+ $ nyc npm test
267
265
  ```
268
266
 
269
267
 
268
+ ## License
270
269
 
271
-
270
+ Copyright (c) 2022 Florian Walzel,
271
+ MIT License
@@ -0,0 +1,3 @@
1
+ i18n-deepl ../examples/de.json other.json --target-lang=en --auth-key=0d520e59-eea9-24e7-908f-b2184b3039bb:fx
2
+
3
+
@@ -0,0 +1,39 @@
1
+ {
2
+ "Report": "Messbericht",
3
+ "Designation": "Bauteilbezeichnung",
4
+ "AmountOrdered": "Stückzahl bestellt",
5
+ "AmountTested": "Stückzahl getestet",
6
+ "OrderIdClient": "Bestellnr. des Kunden",
7
+ "Client": "Kunde Firma",
8
+ "Specification": "Spezifikation",
9
+ "MeansOfMeasure": "Messmittel",
10
+ "Valuation": "Bewertung",
11
+ "ResultSeries": "Messergebnis - Staffel",
12
+ "Measure": "Maß",
13
+ "VisualInspection": "Sichtprüfung",
14
+ "Ok": "OK",
15
+ "NotOk": "nicht OK",
16
+ "noAberration": "keine Abweichung",
17
+ "MinimalAberration": "minimale Abweichung",
18
+ "CriticalAberration": "kritische Abweichung",
19
+ "Usable": "verwendbar",
20
+ "UsableUnderReserve": "verwendbar unter Vorbehalt",
21
+ "NotUsable": "nicht verwendbar",
22
+ "FurtherProceedings": "Weiteres Vorgehen",
23
+ "ApprovalGranted": "Freigabe erteilt",
24
+ "ApprovalWithReserve": "Freigabe unter Vorbehalt",
25
+ "Rework": "Nacharbeit",
26
+ "NewProduction": "Neufertigung",
27
+ "CompiledBy": "Zusammenstellung von",
28
+ "DocumentApprovalAt": "Dokumentfreigabe am",
29
+ "MeasuringEquipmentDesigs": "Messmittelbezeichnungen",
30
+ "visualChecks": {
31
+ "Deburred": "Entgratet",
32
+ "Stainless": "Rostfrei",
33
+ "DirtFree": "Schmutz Flüssigkeiten",
34
+ "Scratches": "Kratzer Dellen",
35
+ "Package": "Verpackung",
36
+ "Color": "Farbe",
37
+ "Engraving": "Gravur"
38
+ }
39
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "Report": "Rapporto di misura",
3
+ "Designation": "denominazione del componente",
4
+ "AmountOrdered": "numero di pezzi ordinati",
5
+ "AmountTested": "numero di pezzi testati",
6
+ "OrderIdClient": "numero d’ordine del cliente",
7
+ "Client": "azienda cliente",
8
+ "Specification": "specifica",
9
+ "MeansOfMeasure": "apparecchiatura di misura",
10
+ "Valuation": "valutazione",
11
+ "ResultSeries": "risultato della misura - scala",
12
+ "Measure": "dimensione",
13
+ "VisualInspection": "controllo visivo",
14
+ "Ok": "OK",
15
+ "NotOk": "non OK",
16
+ "noAberration": "nessuna deviazione",
17
+ "MinimalAberration": "non è stato possibile",
18
+ "CriticalAberration": "azienda cliente",
19
+ "Usable": "specifica",
20
+ "UsableUnderReserve": "apparecchiatura di misura",
21
+ "NotUsable": "valutazione",
22
+ "FurtherProceedings": "risultato di misura - scala",
23
+ "ApprovalGranted": "dimensione",
24
+ "ApprovalWithReserve": "controllo visivo",
25
+ "Rework": "OK",
26
+ "NewProduction": "non OK",
27
+ "CompiledBy": "nessuna deviazione",
28
+ "DocumentApprovalAt": "deviazione minima",
29
+ "MeasuringEquipmentDesigs": "deviazione critica",
30
+ "visualChecks": {
31
+ "Deburred": "Entgratet",
32
+ "Stainless": "Rostfrei",
33
+ "DirtFree": "Schmutz Flüssigkeiten",
34
+ "Scratches": "Kratzer Dellen",
35
+ "Package": "Verpackung",
36
+ "Color": "Farbe",
37
+ "Engraving": "Gravur"
38
+ },
39
+ "Deburred": "utilizzabile",
40
+ "Stainless": "utilizzabile con riserva",
41
+ "DirtFree": "non utilizzabile",
42
+ "Scratches": "ulteriore procedura",
43
+ "Package": "rilascio concesso",
44
+ "Color": "rilascio con riserva",
45
+ "Engraving": "rilavorazione"
46
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "translations": {
3
+ "de": {
4
+ "Sample_invoice_title": "de of Sample_invoice_title",
5
+ "Company_slogan": "de of Company_slogan",
6
+ "Mr": "de of Mr",
7
+ "Ms": "de of Ms",
8
+ "Confirmation": {
9
+ "Delivery_Address": "de of Confirmation.Delivery_Address",
10
+ "Order_confirmation": "de of Confirmation.Order_confirmation",
11
+ "Intro_statement": "de of Confirmation.Intro_statement with variables {{refLetterId}} {{refLetterDate}}",
12
+ "NoVat_requires_TaxId": "de of Confirmation.NoVat_requires_TaxId",
13
+ "General_Sale_and_Delivery_Terms": "de of Confirmation.General_Sale_and_Delivery_Terms with variables {{webAgb}}"
14
+ },
15
+ "Project_no": "de of Project_no",
16
+ "Receipt_no": "de of Receipt_no",
17
+ "Your_customer_no": "de of Your_customer_no",
18
+ "Contact_partner": "de of Contact_partner",
19
+ "Telephone": "de of Telephone",
20
+ "E-mail": "de of E-mail",
21
+ "Date_accepted": "de of Date_accepted",
22
+ "Your_enquiry_no": "de of Your_enquiry_no",
23
+ "Supplier_no": "de of Supplier_no",
24
+ "Order_no": "de of Order_no",
25
+ "Dear_Ladies_and_Gentlemen": "de of Dear_Ladies_and_Gentlemen",
26
+ "Dear_Mr": "de of Dear_Mr",
27
+ "Dear_Ms": "de of Dear_Ms",
28
+ "Item": "de of Item",
29
+ "Description": "de of Description",
30
+ "Material": "de of Material",
31
+ "Quantity": "de of Quantity",
32
+ "UnitPrice": "de of UnitPrice",
33
+ "Total": "de of Total",
34
+ "Carry": "de of Carry",
35
+ "Subtotal": "de of Subtotal",
36
+ "Surcharge": "de of Surcharge",
37
+ "Discount": "de of Discount",
38
+ "Net_price": "de of Net_price",
39
+ "VAT": "de of VAT",
40
+ "Total_price": "de of Total_price",
41
+ "Your_conditions": "de of Your_conditions",
42
+ "Delivery_time": "de of Delivery_time",
43
+ "Delivery_date": "de of Delivery_date",
44
+ "Shipping_terms": "de of Shipping_terms",
45
+ "Payment_terms": "de of Payment_terms",
46
+ "Special_remarks": "de of Special_remarks",
47
+ "Should_you_have_questions": "de of Should_you_have_questions with variables {{telHref}} {{phone}}",
48
+ "Kind_regards": "de of Kind_regards"
49
+ }
50
+ }
51
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "handlebars-i18n-cli",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "A CLI tool to support node module handlebars-i18n",
5
5
  "main": "./src/i18n-collect.js",
6
6
  "bin": {
@@ -11,8 +11,9 @@
11
11
  "access": "public"
12
12
  },
13
13
  "scripts": {
14
- "test": "nyc mocha",
15
- "coveralls": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage",
14
+ "test" : "nyc mocha",
15
+ "test:istanbul": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec",
16
+ "coveralls": "npm test && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage",
16
17
  "i18n-collect": "cd bin && node i18n-collect"
17
18
  },
18
19
  "repository": {
@@ -0,0 +1,3 @@
1
+ {
2
+ "apiKey": "12345ABCD"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "apiKey": "12345ABCD"
3
+ }
@@ -1,145 +0,0 @@
1
- {
2
- "translations": {
3
- "de": {
4
- "Sample_invoice_title": "de of Sample_invoice_title",
5
- "Company_slogan": "de of Company_slogan",
6
- "Mr": "de of Mr",
7
- "Ms": "de of Ms",
8
- "Confirmation": {
9
- "Delivery_Address": "de of Confirmation.Delivery_Address",
10
- "Order_confirmation": "de of Confirmation.Order_confirmation",
11
- "Intro_statement": "de of Confirmation.Intro_statement with variables {{refLetterId}} {{refLetterDate}}",
12
- "NoVat_requires_TaxId": "de of Confirmation.NoVat_requires_TaxId",
13
- "General_Sale_and_Delivery_Terms": "de of Confirmation.General_Sale_and_Delivery_Terms with variables {{webAgb}}"
14
- },
15
- "Project_no": "de of Project_no",
16
- "Receipt_no": "de of Receipt_no",
17
- "Your_customer_no": "de of Your_customer_no",
18
- "Contact_partner": "de of Contact_partner",
19
- "Telephone": "de of Telephone",
20
- "E-mail": "de of E-mail",
21
- "Date_accepted": "de of Date_accepted",
22
- "Your_enquiry_no": "de of Your_enquiry_no",
23
- "Supplier_no": "de of Supplier_no",
24
- "Order_no": "de of Order_no",
25
- "Dear_Ladies_and_Gentlemen": "de of Dear_Ladies_and_Gentlemen",
26
- "Dear_Mr": "de of Dear_Mr",
27
- "Dear_Ms": "de of Dear_Ms",
28
- "Item": "de of Item",
29
- "Description": "de of Description",
30
- "Material": "de of Material",
31
- "Quantity": "de of Quantity",
32
- "UnitPrice": "de of UnitPrice",
33
- "Total": "de of Total",
34
- "Carry": "de of Carry",
35
- "Subtotal": "de of Subtotal",
36
- "Surcharge": "de of Surcharge",
37
- "Discount": "de of Discount",
38
- "Net_price": "de of Net_price",
39
- "VAT": "de of VAT",
40
- "Total_price": "de of Total_price",
41
- "Your_conditions": "de of Your_conditions",
42
- "Delivery_time": "de of Delivery_time",
43
- "Delivery_date": "de of Delivery_date",
44
- "Shipping_terms": "de of Shipping_terms",
45
- "Payment_terms": "de of Payment_terms",
46
- "Special_remarks": "de of Special_remarks",
47
- "Should_you_have_questions": "de of Should_you_have_questions with variables {{telHref}} {{phone}}",
48
- "Kind_regards": "de of Kind_regards"
49
- },
50
- "fr": {
51
- "Sample_invoice_title": "fr of Sample_invoice_title",
52
- "Company_slogan": "fr of Company_slogan",
53
- "Mr": "fr of Mr",
54
- "Ms": "fr of Ms",
55
- "Confirmation": {
56
- "Delivery_Address": "fr of Confirmation.Delivery_Address",
57
- "Order_confirmation": "fr of Confirmation.Order_confirmation",
58
- "Intro_statement": "fr of Confirmation.Intro_statement with variables {{refLetterId}} {{refLetterDate}}",
59
- "NoVat_requires_TaxId": "fr of Confirmation.NoVat_requires_TaxId",
60
- "General_Sale_and_Delivery_Terms": "fr of Confirmation.General_Sale_and_Delivery_Terms with variables {{webAgb}}"
61
- },
62
- "Project_no": "fr of Project_no",
63
- "Receipt_no": "fr of Receipt_no",
64
- "Your_customer_no": "fr of Your_customer_no",
65
- "Contact_partner": "fr of Contact_partner",
66
- "Telephone": "fr of Telephone",
67
- "E-mail": "fr of E-mail",
68
- "Date_accepted": "fr of Date_accepted",
69
- "Your_enquiry_no": "fr of Your_enquiry_no",
70
- "Supplier_no": "fr of Supplier_no",
71
- "Order_no": "fr of Order_no",
72
- "Dear_Ladies_and_Gentlemen": "fr of Dear_Ladies_and_Gentlemen",
73
- "Dear_Mr": "fr of Dear_Mr",
74
- "Dear_Ms": "fr of Dear_Ms",
75
- "Item": "fr of Item",
76
- "Description": "fr of Description",
77
- "Material": "fr of Material",
78
- "Quantity": "fr of Quantity",
79
- "UnitPrice": "fr of UnitPrice",
80
- "Total": "fr of Total",
81
- "Carry": "fr of Carry",
82
- "Subtotal": "fr of Subtotal",
83
- "Surcharge": "fr of Surcharge",
84
- "Discount": "fr of Discount",
85
- "Net_price": "fr of Net_price",
86
- "VAT": "fr of VAT",
87
- "Total_price": "fr of Total_price",
88
- "Your_conditions": "fr of Your_conditions",
89
- "Delivery_time": "fr of Delivery_time",
90
- "Delivery_date": "fr of Delivery_date",
91
- "Shipping_terms": "fr of Shipping_terms",
92
- "Payment_terms": "fr of Payment_terms",
93
- "Special_remarks": "fr of Special_remarks",
94
- "Should_you_have_questions": "fr of Should_you_have_questions with variables {{telHref}} {{phone}}",
95
- "Kind_regards": "fr of Kind_regards"
96
- },
97
- "en": {
98
- "Sample_invoice_title": "en of Sample_invoice_title",
99
- "Company_slogan": "en of Company_slogan",
100
- "Mr": "en of Mr",
101
- "Ms": "en of Ms",
102
- "Confirmation": {
103
- "Delivery_Address": "en of Confirmation.Delivery_Address",
104
- "Order_confirmation": "en of Confirmation.Order_confirmation",
105
- "Intro_statement": "en of Confirmation.Intro_statement with variables {{refLetterId}} {{refLetterDate}}",
106
- "NoVat_requires_TaxId": "en of Confirmation.NoVat_requires_TaxId",
107
- "General_Sale_and_Delivery_Terms": "en of Confirmation.General_Sale_and_Delivery_Terms with variables {{webAgb}}"
108
- },
109
- "Project_no": "en of Project_no",
110
- "Receipt_no": "en of Receipt_no",
111
- "Your_customer_no": "en of Your_customer_no",
112
- "Contact_partner": "en of Contact_partner",
113
- "Telephone": "en of Telephone",
114
- "E-mail": "en of E-mail",
115
- "Date_accepted": "en of Date_accepted",
116
- "Your_enquiry_no": "en of Your_enquiry_no",
117
- "Supplier_no": "en of Supplier_no",
118
- "Order_no": "en of Order_no",
119
- "Dear_Ladies_and_Gentlemen": "en of Dear_Ladies_and_Gentlemen",
120
- "Dear_Mr": "en of Dear_Mr",
121
- "Dear_Ms": "en of Dear_Ms",
122
- "Item": "en of Item",
123
- "Description": "en of Description",
124
- "Material": "en of Material",
125
- "Quantity": "en of Quantity",
126
- "UnitPrice": "en of UnitPrice",
127
- "Total": "en of Total",
128
- "Carry": "en of Carry",
129
- "Subtotal": "en of Subtotal",
130
- "Surcharge": "en of Surcharge",
131
- "Discount": "en of Discount",
132
- "Net_price": "en of Net_price",
133
- "VAT": "en of VAT",
134
- "Total_price": "en of Total_price",
135
- "Your_conditions": "en of Your_conditions",
136
- "Delivery_time": "en of Delivery_time",
137
- "Delivery_date": "en of Delivery_date",
138
- "Shipping_terms": "en of Shipping_terms",
139
- "Payment_terms": "en of Payment_terms",
140
- "Special_remarks": "en of Special_remarks",
141
- "Should_you_have_questions": "en of Should_you_have_questions with variables {{telHref}} {{phone}}",
142
- "Kind_regards": "en of Kind_regards"
143
- }
144
- }
145
- }