Releases: seek-oss/vocab
@vocab/phrase@1.3.1
Patch Changes
- Updated dependencies [
8228608
]:- @vocab/core@1.6.0
@vocab/core@1.6.0
@vocab/cli@1.4.1
Patch Changes
- Updated dependencies [
8228608
]:- @vocab/core@1.6.0
- @vocab/phrase@1.3.1
@vocab/webpack@1.2.4
Patch Changes
- Updated dependencies [
161d698
]:- @vocab/core@1.5.0
@vocab/types@1.3.3
Patch Changes
- Updated dependencies [
161d698
]:- @vocab/core@1.5.0
@vocab/react@1.1.8
Patch Changes
- Updated dependencies [
161d698
]:- @vocab/core@1.5.0
@vocab/phrase@1.3.0
Minor Changes
-
161d698
#170 Thanks @jasoncheng-jora! -vocab push
andvocab pull
can support global keys mapping. When you want certain translations to use a specific/custom key in Phrase, add theglobalKey
to the structure.EXAMPLE USAGE:
// translations.json { "Hello": { "message": "Hello", "globalKey": "hello" }, "Goodbye": { "message": "Goodbye", "globalKey": "app.goodbye.label" } }
In the above example,
vocab push
will push thehello
andapp.goodbye.label
keys to Phrase.vocab pull
will pull translations from Phrase and map them to thehello
andapp.goodbye.label
keys.
-
161d698
#170 Thanks @jasoncheng-jora! - Add an optionalerrorOnNoGlobalKeyTranslation
flag topull
function. If set totrue
, it will error if a translation is missing in Phrase for a translation with a global key.EXAMPLE USAGE:
import { pull } from '@vocab/phrase'; const vocabConfig = { devLanguage: 'en', language: ['en', 'fr'], }; await pull( { branch: 'myBranch', errorOnNoGlobalKeyTranslation: true }, vocabConfig, );
Patch Changes
- Updated dependencies [
161d698
]:- @vocab/core@1.5.0
@vocab/core@1.5.0
Minor Changes
-
161d698
#170 Thanks @jasoncheng-jora! -vocab push
andvocab pull
can support global keys mapping. When you want certain translations to use a specific/custom key in Phrase, add theglobalKey
to the structure.EXAMPLE USAGE:
// translations.json { "Hello": { "message": "Hello", "globalKey": "hello" }, "Goodbye": { "message": "Goodbye", "globalKey": "app.goodbye.label" } }
In the above example,
vocab push
will push thehello
andapp.goodbye.label
keys to Phrase.vocab pull
will pull translations from Phrase and map them to thehello
andapp.goodbye.label
keys.
@vocab/cli@1.4.0
Minor Changes
-
161d698
#170 Thanks @jasoncheng-jora! - Error on no translation for global keyBy 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:
vocab pull --error-on-no-global-key-translation
Patch Changes
@vocab/webpack@1.2.3
Patch Changes
- Updated dependencies [
09b7179
]:- @vocab/core@1.4.0