diff --git a/.changeset/lemon-mails-battle.md b/.changeset/lemon-mails-battle.md deleted file mode 100644 index 813d6507..00000000 --- a/.changeset/lemon-mails-battle.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -'@vocab/phrase': minor -'@vocab/core': minor ---- - -`vocab push` and `vocab pull` can support global keys mapping. When you want certain translations to use a specific/custom key in Phrase, add the `globalKey` to the structure. - -**EXAMPLE USAGE**: - -```jsonc -// translations.json -{ - "Hello": { - "message": "Hello", - "globalKey": "hello" - }, - "Goodbye": { - "message": "Goodbye", - "globalKey": "app.goodbye.label" - } -} -``` - -In the above example, - -- `vocab push` will push the `hello` and `app.goodbye.label` keys to Phrase. -- `vocab pull` will pull translations from Phrase and map them to the `hello` and `app.goodbye.label` keys. diff --git a/.changeset/many-apricots-try.md b/.changeset/many-apricots-try.md deleted file mode 100644 index da673d1a..00000000 --- a/.changeset/many-apricots-try.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -'@vocab/cli': minor ---- - -Error on no translation for global key - -By default, `vocab pull` will not error if a translation is missing in Phrase for a translation with a global key. -If you want to throw an error in this situation, pass the `--error-on-no-global-key-translation` flag: - -**EXAMPLE USAGE**: - -```sh -vocab pull --error-on-no-global-key-translation -``` diff --git a/.changeset/slimy-dingos-begin.md b/.changeset/slimy-dingos-begin.md deleted file mode 100644 index f4bf79e9..00000000 --- a/.changeset/slimy-dingos-begin.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -'@vocab/phrase': minor ---- - -Add an optional `errorOnNoGlobalKeyTranslation` flag to `pull` function. If set to `true`, it will error if a translation is missing in Phrase for a translation with a global key. - -**EXAMPLE USAGE**: - -```js -import { pull } from '@vocab/phrase'; - -const vocabConfig = { - devLanguage: 'en', - language: ['en', 'fr'], -}; - -await pull({ branch: 'myBranch', errorOnNoGlobalKeyTranslation: true }, vocabConfig); -``` - - diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index b3d82349..f96b1a23 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,26 @@ # @vocab/cli +## 1.4.0 + +### Minor Changes + +- [`161d698`](https://github.com/seek-oss/vocab/commit/161d698f7fd198f594a765104f02261d2e45f007) [#170](https://github.com/seek-oss/vocab/pull/170) Thanks [@jasoncheng-jora](https://github.com/jasoncheng-jora)! - Error on no translation for global key + + By default, `vocab pull` will not error if a translation is missing in Phrase for a translation with a global key. + If you want to throw an error in this situation, pass the `--error-on-no-global-key-translation` flag: + + **EXAMPLE USAGE**: + + ```sh + vocab pull --error-on-no-global-key-translation + ``` + +### Patch Changes + +- Updated dependencies [[`161d698`](https://github.com/seek-oss/vocab/commit/161d698f7fd198f594a765104f02261d2e45f007), [`161d698`](https://github.com/seek-oss/vocab/commit/161d698f7fd198f594a765104f02261d2e45f007)]: + - @vocab/phrase@1.3.0 + - @vocab/core@1.5.0 + ## 1.3.7 ### Patch Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index 2885ba4f..74255faa 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@vocab/cli", - "version": "1.3.7", + "version": "1.4.0", "main": "dist/vocab-cli.cjs.js", "module": "dist/vocab-cli.esm.js", "bin": { @@ -14,8 +14,8 @@ "license": "MIT", "dependencies": { "@types/env-ci": "^3.1.0", - "@vocab/core": "^1.4.0", - "@vocab/phrase": "^1.2.8", + "@vocab/core": "^1.5.0", + "@vocab/phrase": "^1.3.0", "env-ci": "^5.0.2", "fast-glob": "^3.2.4", "form-data": "^3.0.0", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index a808bf4f..2e07c487 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,32 @@ # @vocab/core +## 1.5.0 + +### Minor Changes + +- [`161d698`](https://github.com/seek-oss/vocab/commit/161d698f7fd198f594a765104f02261d2e45f007) [#170](https://github.com/seek-oss/vocab/pull/170) Thanks [@jasoncheng-jora](https://github.com/jasoncheng-jora)! - `vocab push` and `vocab pull` can support global keys mapping. When you want certain translations to use a specific/custom key in Phrase, add the `globalKey` to the structure. + + **EXAMPLE USAGE**: + + ```jsonc + // translations.json + { + "Hello": { + "message": "Hello", + "globalKey": "hello" + }, + "Goodbye": { + "message": "Goodbye", + "globalKey": "app.goodbye.label" + } + } + ``` + + In the above example, + + - `vocab push` will push the `hello` and `app.goodbye.label` keys to Phrase. + - `vocab pull` will pull translations from Phrase and map them to the `hello` and `app.goodbye.label` keys. + ## 1.4.0 ### Minor Changes diff --git a/packages/core/package.json b/packages/core/package.json index 1c9d9314..26922d2b 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@vocab/core", - "version": "1.4.0", + "version": "1.5.0", "main": "dist/vocab-core.cjs.js", "module": "dist/vocab-core.esm.js", "exports": { diff --git a/packages/phrase/CHANGELOG.md b/packages/phrase/CHANGELOG.md index 2ab727d1..c351fcb6 100644 --- a/packages/phrase/CHANGELOG.md +++ b/packages/phrase/CHANGELOG.md @@ -1,5 +1,55 @@ # @vocab/phrase +## 1.3.0 + +### Minor Changes + +- [`161d698`](https://github.com/seek-oss/vocab/commit/161d698f7fd198f594a765104f02261d2e45f007) [#170](https://github.com/seek-oss/vocab/pull/170) Thanks [@jasoncheng-jora](https://github.com/jasoncheng-jora)! - `vocab push` and `vocab pull` can support global keys mapping. When you want certain translations to use a specific/custom key in Phrase, add the `globalKey` to the structure. + + **EXAMPLE USAGE**: + + ```jsonc + // translations.json + { + "Hello": { + "message": "Hello", + "globalKey": "hello" + }, + "Goodbye": { + "message": "Goodbye", + "globalKey": "app.goodbye.label" + } + } + ``` + + In the above example, + + - `vocab push` will push the `hello` and `app.goodbye.label` keys to Phrase. + - `vocab pull` will pull translations from Phrase and map them to the `hello` and `app.goodbye.label` keys. + +- [`161d698`](https://github.com/seek-oss/vocab/commit/161d698f7fd198f594a765104f02261d2e45f007) [#170](https://github.com/seek-oss/vocab/pull/170) Thanks [@jasoncheng-jora](https://github.com/jasoncheng-jora)! - Add an optional `errorOnNoGlobalKeyTranslation` flag to `pull` function. If set to `true`, it will error if a translation is missing in Phrase for a translation with a global key. + + **EXAMPLE USAGE**: + + ```js + import { pull } from '@vocab/phrase'; + + const vocabConfig = { + devLanguage: 'en', + language: ['en', 'fr'], + }; + + await pull( + { branch: 'myBranch', errorOnNoGlobalKeyTranslation: true }, + vocabConfig, + ); + ``` + +### Patch Changes + +- Updated dependencies [[`161d698`](https://github.com/seek-oss/vocab/commit/161d698f7fd198f594a765104f02261d2e45f007)]: + - @vocab/core@1.5.0 + ## 1.2.8 ### Patch Changes diff --git a/packages/phrase/package.json b/packages/phrase/package.json index 58c3a526..80d64245 100644 --- a/packages/phrase/package.json +++ b/packages/phrase/package.json @@ -1,12 +1,12 @@ { "name": "@vocab/phrase", - "version": "1.2.8", + "version": "1.3.0", "main": "dist/vocab-phrase.cjs.js", "module": "dist/vocab-phrase.esm.js", "author": "SEEK", "license": "MIT", "dependencies": { - "@vocab/core": "^1.4.0", + "@vocab/core": "^1.5.0", "chalk": "^4.1.0", "csv-stringify": "^6.2.3", "debug": "^4.3.1", diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 18670c39..7f7b947e 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,12 @@ # @vocab/react +## 1.1.8 + +### Patch Changes + +- Updated dependencies [[`161d698`](https://github.com/seek-oss/vocab/commit/161d698f7fd198f594a765104f02261d2e45f007)]: + - @vocab/core@1.5.0 + ## 1.1.7 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index f874bee1..7f247fa5 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@vocab/react", - "version": "1.1.7", + "version": "1.1.8", "main": "dist/vocab-react.cjs.js", "module": "dist/vocab-react.esm.js", "author": "SEEK", @@ -12,7 +12,7 @@ "dist" ], "dependencies": { - "@vocab/core": "^1.4.0", + "@vocab/core": "^1.5.0", "intl-messageformat": "^10.0.0" }, "devDependencies": { diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index efaaa1b6..a6193d56 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -1,5 +1,12 @@ # @vocab/types +## 1.3.3 + +### Patch Changes + +- Updated dependencies [[`161d698`](https://github.com/seek-oss/vocab/commit/161d698f7fd198f594a765104f02261d2e45f007)]: + - @vocab/core@1.5.0 + ## 1.3.2 ### Patch Changes diff --git a/packages/types/package.json b/packages/types/package.json index 8ad02adc..c22f2796 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@vocab/types", - "version": "1.3.2", + "version": "1.3.3", "main": "dist/vocab-types.cjs.js", "module": "dist/vocab-types.esm.js", "author": "SEEK", @@ -9,6 +9,6 @@ "dist" ], "dependencies": { - "@vocab/core": "^1.4.0" + "@vocab/core": "^1.5.0" } } diff --git a/packages/webpack/CHANGELOG.md b/packages/webpack/CHANGELOG.md index 4e5eed84..1f4bc00b 100644 --- a/packages/webpack/CHANGELOG.md +++ b/packages/webpack/CHANGELOG.md @@ -1,5 +1,12 @@ # @vocab/webpack +## 1.2.4 + +### Patch Changes + +- Updated dependencies [[`161d698`](https://github.com/seek-oss/vocab/commit/161d698f7fd198f594a765104f02261d2e45f007)]: + - @vocab/core@1.5.0 + ## 1.2.3 ### Patch Changes diff --git a/packages/webpack/package.json b/packages/webpack/package.json index ca64fb1b..8ab6eb2f 100644 --- a/packages/webpack/package.json +++ b/packages/webpack/package.json @@ -1,6 +1,6 @@ { "name": "@vocab/webpack", - "version": "1.2.3", + "version": "1.2.4", "main": "dist/vocab-webpack.cjs.js", "module": "dist/vocab-webpack.esm.js", "exports": { @@ -39,7 +39,7 @@ "web" ], "dependencies": { - "@vocab/core": "^1.4.0", + "@vocab/core": "^1.5.0", "chalk": "^4.1.0", "cjs-module-lexer": "^1.2.2", "debug": "^4.3.1",