@vocab/phrase 1.2.4 → 1.2.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 CHANGED
@@ -20,10 +20,11 @@ Vocab helps you ship multiple languages without compromising the reliability of
20
20
 
21
21
  ### Step 1: Install Dependencies
22
22
 
23
- Vocab is a monorepo with different packages you can install depending on your usage, the below list will get you started using the cli, React and webpack integrations.
23
+ Vocab is a monorepo with different packages you can install depending on your usage, the below list will get you started using the CLI and React integration.
24
24
 
25
25
  ```bash
26
- $ npm i --save @vocab/cli @vocab/react @vocab/webpack
26
+ $ npm i --save-dev @vocab/cli
27
+ $ npm i --save @vocab/core @vocab/react
27
28
  ```
28
29
 
29
30
  ### Step 2: Configure Vocab
@@ -116,6 +117,10 @@ Right now every language is loaded into your web application all the time, which
116
117
 
117
118
  This is done using the **VocabWebpackPlugin**. Applying this plugin to your client webpack configuration will replace all vocab files with a dynamic asynchronous chunks designed for the web.
118
119
 
120
+ ```bash
121
+ $ npm i --save-dev @vocab/webpack
122
+ ```
123
+
119
124
  **webpack.config.js**
120
125
 
121
126
  ```js
@@ -206,7 +211,7 @@ module.exports = {
206
211
  */
207
212
  generatedLanguages: [
208
213
  {
209
- name: 'generatedLangauge',
214
+ name: 'generatedLanguage',
210
215
  extends: 'en',
211
216
  generator: {
212
217
  transformElement: capitalize,
@@ -296,6 +301,10 @@ const App = () => (
296
301
 
297
302
  The `@vocab/pseudo-localize` package exports low-level functions that can be used for pseudo-localization of translation messages.
298
303
 
304
+ ```bash
305
+ $ npm i --save-dev @vocab/pseudo-localize
306
+ ```
307
+
299
308
  ```ts
300
309
  import {
301
310
  extendVowels,
@@ -155,6 +155,7 @@ async function pushTranslations(translationsByLanguage, {
155
155
  formData.append('file_format', 'csv');
156
156
  formData.append('branch', branch);
157
157
  formData.append('update_translations', 'true');
158
+ formData.append('update_descriptions', 'true');
158
159
  for (const [locale, index] of Object.entries(localeMapping)) {
159
160
  formData.append(`locale_mapping[${locale}]`, index);
160
161
  }
@@ -155,6 +155,7 @@ async function pushTranslations(translationsByLanguage, {
155
155
  formData.append('file_format', 'csv');
156
156
  formData.append('branch', branch);
157
157
  formData.append('update_translations', 'true');
158
+ formData.append('update_descriptions', 'true');
158
159
  for (const [locale, index] of Object.entries(localeMapping)) {
159
160
  formData.append(`locale_mapping[${locale}]`, index);
160
161
  }
@@ -143,6 +143,7 @@ async function pushTranslations(translationsByLanguage, {
143
143
  formData.append('file_format', 'csv');
144
144
  formData.append('branch', branch);
145
145
  formData.append('update_translations', 'true');
146
+ formData.append('update_descriptions', 'true');
146
147
  for (const [locale, index] of Object.entries(localeMapping)) {
147
148
  formData.append(`locale_mapping[${locale}]`, index);
148
149
  }
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@vocab/phrase",
3
- "version": "1.2.4",
3
+ "version": "1.2.6",
4
4
  "main": "dist/vocab-phrase.cjs.js",
5
5
  "module": "dist/vocab-phrase.esm.js",
6
6
  "author": "SEEK",
7
7
  "license": "MIT",
8
8
  "dependencies": {
9
- "@vocab/core": "^1.3.0",
9
+ "@vocab/core": "^1.3.1",
10
10
  "chalk": "^4.1.0",
11
11
  "csv-stringify": "^6.2.3",
12
12
  "debug": "^4.3.1",