auto-lang 1.0.7 → 1.0.8

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.
Files changed (3) hide show
  1. package/README.md +36 -28
  2. package/package.json +1 -1
  3. package/src/index.js +1 -1
package/README.md CHANGED
@@ -16,16 +16,23 @@ You could either install the package and add a script to `package.json` or use t
16
16
  $ npx auto-lang [options]
17
17
 
18
18
  ### 2. Using a script in `package.json`
19
-
20
19
  ```json
21
- {
22
- "scripts": {
23
- "gen-lang": "auto-lang [options]"
24
- }
20
+ {
21
+ "scripts": {
22
+ "gen-lang": "auto-lang [options]"
25
23
  }
24
+ }
26
25
  ```
27
26
 
28
- You can give your script any name you wish. Also, replace `[options]` with any of the options below.
27
+ Now, in the terminal run:
28
+
29
+ $ npm run gen-lang
30
+
31
+ Or, using yarn:
32
+
33
+ $ yarn gen-lang
34
+
35
+ **Note:** You can give your script any name you wish. Also, replace `[options]` with any of the options below.
29
36
 
30
37
  #### Options
31
38
 
@@ -62,6 +69,7 @@ There is a file `en.json` in the translations folder
62
69
  }
63
70
  ```
64
71
  Get translation files for French (fr) and Spanish (es).
72
+
65
73
  $ npx auto-lang --from en --to fr es
66
74
 
67
75
  Two files have been created; `fr.json` and `es.json` in the `translations` folder.
@@ -76,17 +84,17 @@ Two files have been created; `fr.json` and `es.json` in the `translations` folde
76
84
  /* fr.json */
77
85
 
78
86
  {
79
- "GENERAL": {
80
- "OK": "D'ACCORD",
81
- "CANCEL": "Annuler",
82
- "ACCEPT": "Accepter",
83
- "DECLINE": "Déclin"
84
- },
85
- "GREETINGS": {
86
- "HELLO": "Bonjour",
87
- "HI": "Salut",
88
- "GOOD_MORNING": "Bonjour"
89
- }
87
+ "GENERAL": {
88
+ "OK": "D'ACCORD",
89
+ "CANCEL": "Annuler",
90
+ "ACCEPT": "Accepter",
91
+ "DECLINE": "Déclin"
92
+ },
93
+ "GREETINGS": {
94
+ "HELLO": "Bonjour",
95
+ "HI": "Salut",
96
+ "GOOD_MORNING": "Bonjour"
97
+ }
90
98
  }
91
99
  ```
92
100
 
@@ -94,17 +102,17 @@ Two files have been created; `fr.json` and `es.json` in the `translations` folde
94
102
  /* es.json */
95
103
 
96
104
  {
97
- "GENERAL": {
98
- "OK": "OK",
99
- "CANCEL": "Cancelar",
100
- "ACCEPT": "Aceptar",
101
- "DECLINE": "Rechazar"
102
- },
103
- "GREETINGS": {
104
- "HELLO": "Hola",
105
- "HI": "Hola",
106
- "GOOD_MORNING": "Buenos dias"
107
- }
105
+ "GENERAL": {
106
+ "OK": "OK",
107
+ "CANCEL": "Cancelar",
108
+ "ACCEPT": "Aceptar",
109
+ "DECLINE": "Rechazar"
110
+ },
111
+ "GREETINGS": {
112
+ "HELLO": "Hola",
113
+ "HI": "Hola",
114
+ "GOOD_MORNING": "Buenos dias"
115
+ }
108
116
  }
109
117
  ```
110
118
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auto-lang",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Automatically create language json files for internationalization",
5
5
  "main": "./src/index.js",
6
6
  "scripts": {
package/src/index.js CHANGED
@@ -14,7 +14,7 @@ import { Logger } from './utils/Logger.mjs';
14
14
  import chalk from 'chalk';
15
15
  import { validateOptions } from './utils/validation.mjs';
16
16
 
17
- const APP_VERSION = '1.0.7';
17
+ const APP_VERSION = '1.0.8';
18
18
 
19
19
  const program = new Command();
20
20
  const nodeMajVer = parseInt(process.version.substring(1).split('.')[0]);