Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vocab/react

Package Overview
Dependencies
Maintainers
4
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vocab/react - npm Package Compare versions

Comparing version 1.1.7 to 1.1.8

4

package.json
{
"name": "@vocab/react",
"version": "1.1.7",
"version": "1.1.8",
"main": "dist/vocab-react.cjs.js",

@@ -15,3 +15,3 @@ "module": "dist/vocab-react.esm.js",

"dependencies": {
"@vocab/core": "^1.4.0",
"@vocab/core": "^1.5.0",
"intl-messageformat": "^10.0.0"

@@ -18,0 +18,0 @@ },

@@ -509,2 +509,34 @@ # Vocab

#### Global key
`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.
```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.
##### 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:
```sh
vocab pull --error-on-no-global-key-translation
```
## Troubleshooting

@@ -511,0 +543,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc