i18nexus-cli 3.4.0 → 3.5.0
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 +26 -18
- package/bin/index.js +11 -1
- package/commands/addString.js +2 -1
- package/commands/updateString.js +1 -0
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -130,14 +130,15 @@ Translations for the string will be automatically generated and machine translat
|
|
|
130
130
|
|
|
131
131
|
### Options
|
|
132
132
|
|
|
133
|
-
| Option
|
|
134
|
-
|
|
|
135
|
-
| `--api-key` or `-k`
|
|
136
|
-
| `--pat` or `-t`
|
|
137
|
-
| `--namespace` or `-ns`
|
|
138
|
-
| `--key` or `-K`
|
|
139
|
-
| `--value` or `-v`
|
|
140
|
-
| `--details` or `-d`
|
|
133
|
+
| Option | Required? |
|
|
134
|
+
| ---------------------------- | --------- |
|
|
135
|
+
| `--api-key` or `-k` | ✔ |
|
|
136
|
+
| `--pat` or `-t` | ✔ |
|
|
137
|
+
| `--namespace` or `-ns` | ✔ |
|
|
138
|
+
| `--key` or `-K` | ✔ |
|
|
139
|
+
| `--value` or `-v` | ✔ |
|
|
140
|
+
| `--details` or `-d` | |
|
|
141
|
+
| `--ai-instructions` or `-ai` | |
|
|
141
142
|
|
|
142
143
|
### Notes
|
|
143
144
|
|
|
@@ -159,6 +160,9 @@ The value of the string to create
|
|
|
159
160
|
`--details`
|
|
160
161
|
The details of the string to create (optional)
|
|
161
162
|
|
|
163
|
+
`--ai-instructions`
|
|
164
|
+
Instructions or context for AI machine translator (optional)
|
|
165
|
+
|
|
162
166
|
## Updating existing strings
|
|
163
167
|
|
|
164
168
|
`i18nexus update-string <namespace> <key>` or `i18nexus u <namespace> <key>`
|
|
@@ -175,16 +179,17 @@ You can then update the key, value, details, and/or namespace by using the comma
|
|
|
175
179
|
|
|
176
180
|
### Options
|
|
177
181
|
|
|
178
|
-
| Option
|
|
179
|
-
|
|
|
180
|
-
| `--api-key` or `-k`
|
|
181
|
-
| `--pat` or `-t`
|
|
182
|
-
| `--namespace` or `-ns`
|
|
183
|
-
| `--key` or `-K`
|
|
184
|
-
| `--value` or `-v`
|
|
185
|
-
| `--details` or `-d`
|
|
186
|
-
| `--
|
|
187
|
-
| `--
|
|
182
|
+
| Option | Required? |
|
|
183
|
+
| ---------------------------- | --------- |
|
|
184
|
+
| `--api-key` or `-k` | ✔ |
|
|
185
|
+
| `--pat` or `-t` | ✔ |
|
|
186
|
+
| `--namespace` or `-ns` | |
|
|
187
|
+
| `--key` or `-K` | |
|
|
188
|
+
| `--value` or `-v` | |
|
|
189
|
+
| `--details` or `-d` | |
|
|
190
|
+
| `--ai-instructions` or `-ai` | |
|
|
191
|
+
| `--reset-confirmed` | |
|
|
192
|
+
| `--retain-confirmed` | |
|
|
188
193
|
|
|
189
194
|
### Notes
|
|
190
195
|
|
|
@@ -206,6 +211,9 @@ The new value of the string
|
|
|
206
211
|
`--details`
|
|
207
212
|
The new details of the string
|
|
208
213
|
|
|
214
|
+
`--ai-instructions`
|
|
215
|
+
Instructions or context for AI machine translator
|
|
216
|
+
|
|
209
217
|
#### If you are updating the value of a string that contains translations that have been marked confirmed in i18nexus, you will be required to include one of the following options to your command:
|
|
210
218
|
|
|
211
219
|
`--reset-confirmed`
|
package/bin/index.js
CHANGED
|
@@ -83,6 +83,10 @@ program
|
|
|
83
83
|
'-d, --details <stringDetails>',
|
|
84
84
|
'The details of the string to create (optional)'
|
|
85
85
|
)
|
|
86
|
+
.option(
|
|
87
|
+
'-ai, --ai-instructions <stringAiInstructions>',
|
|
88
|
+
'Instructions/Context for AI machine translator (optional)'
|
|
89
|
+
)
|
|
86
90
|
.action(options => {
|
|
87
91
|
addString({
|
|
88
92
|
key: options.key,
|
|
@@ -90,7 +94,8 @@ program
|
|
|
90
94
|
details: options.details,
|
|
91
95
|
namespace: options.namespace,
|
|
92
96
|
apiKey: options.apiKey,
|
|
93
|
-
pat: options.pat
|
|
97
|
+
pat: options.pat,
|
|
98
|
+
aiInstructions: options.aiInstructions
|
|
94
99
|
});
|
|
95
100
|
});
|
|
96
101
|
|
|
@@ -115,6 +120,10 @@ program
|
|
|
115
120
|
'The new namespace of the string'
|
|
116
121
|
)
|
|
117
122
|
.option('-d, --details <stringDetails>', 'The new details of the string')
|
|
123
|
+
.option(
|
|
124
|
+
'-ai, --ai-instructions <stringAiInstructions>',
|
|
125
|
+
'Instructions/Context for AI machine translator (optional)'
|
|
126
|
+
)
|
|
118
127
|
.option(
|
|
119
128
|
'--reset-confirmed',
|
|
120
129
|
'Reset confirmed translations of this string with machine translations.'
|
|
@@ -132,6 +141,7 @@ program
|
|
|
132
141
|
key: options.key,
|
|
133
142
|
value: options.value,
|
|
134
143
|
details: options.details,
|
|
144
|
+
aiInstructions: options.aiInstructions,
|
|
135
145
|
namespace: options.namespace,
|
|
136
146
|
apiKey: options.apiKey,
|
|
137
147
|
pat: options.pat,
|
package/commands/addString.js
CHANGED
package/commands/updateString.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "i18nexus-cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"description": "Command line interface (CLI) for accessing the i18nexus API",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
"keywords": [
|
|
10
10
|
"i18nexus",
|
|
11
11
|
"cli",
|
|
12
|
-
"
|
|
12
|
+
"react-intl",
|
|
13
|
+
"i18next",
|
|
14
|
+
"next-intl"
|
|
13
15
|
],
|
|
14
16
|
"author": "i18nexus",
|
|
15
17
|
"license": "MIT",
|