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

@vocab/react

Package Overview
Dependencies
Maintainers
5
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.3 to 1.1.4

7

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

@@ -11,4 +11,7 @@ "module": "dist/vocab-react.esm.js",

},
"files": [
"dist"
],
"dependencies": {
"@vocab/types": "^1.1.1",
"@vocab/types": "^1.1.2",
"intl-messageformat": "^10.0.0"

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

@@ -425,16 +425,77 @@ # Vocab

## External translation tooling
## External Translation Tooling
Vocab can be used to synchronize your translations with translations from a remote translation platform.
| Platform | Environment Variables |
| -------------------------------------------- | ----------------------------------- |
| [Phrase](https://developers.phrase.com/api/) | PHRASE_PROJECT_ID, PHRASE_API_TOKEN |
| Platform | Environment Variables |
| -------- | ----------------------------------- |
| [Phrase] | PHRASE_PROJECT_ID, PHRASE_API_TOKEN |
```bash
$ vocab push --branch my-branch
$ vocab push --branch my-branch --delete-unused-keys
$ vocab pull --branch my-branch
```
### [Phrase] Platform Features
#### Delete Unused keys
When uploading translations, Phrase identifies keys that exist in the Phrase project, but were not
referenced in the upload. These keys can be deleted from Phrase by providing the
`---delete-unused-keys` flag to `vocab push`. E.g.
```sh
$ vocab push --branch my-branch --delete-unused-keys
```
[phrase]: https://developers.phrase.com/api/
#### [Tags]
`vocab push` supports uploading [tags] to Phrase.
Tags can be added to an individual key via the `tags` property:
```jsonc
// translations.json
{
"Hello": {
"message": "Hello",
"tags": ["greeting", "home_page"]
},
"Goodbye": {
"message": "Goodbye",
"tags": ["home_page"]
}
}
```
Tags can also be added under a top-level `_meta` field. This will result in the tags applying to all
keys specified in the file:
```jsonc
// translations.json
{
"_meta": {
"tags": ["home_page"]
},
"Hello": {
"message": "Hello",
"tags": ["greeting"]
},
"Goodbye": {
"message": "Goodbye"
}
}
```
In the above example, both the `Hello` and `Goodbye` keys would have the `home_page` tag attached to
them, but only the `Hello` key would have the `usage_greeting` tag attached to it.
**NOTE**: Only tags specified on keys in your [`devLanguage`][configuration] will be uploaded.
Tags on keys in other languages will be ignored.
[tags]: https://support.phrase.com/hc/en-us/articles/5822598372252-Tags-Strings-
[configuration]: #Configuration
## Troubleshooting

@@ -441,0 +502,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