@opensea/i18n-extract
Advanced tools
Comparing version 0.0.25 to 1.0.0
{ | ||
"name": "@opensea/i18n-extract", | ||
"version": "0.0.25", | ||
"version": "1.0.0", | ||
"description": "Package for i18n key extractions", | ||
@@ -21,6 +21,6 @@ "license": "MIT", | ||
"dependencies": { | ||
"@babel/parser": "7.22.13", | ||
"@babel/parser": "7.22.14", | ||
"@babel/traverse": "7.22.11", | ||
"commander": "11.0.0", | ||
"glob": "10.3.3", | ||
"glob": "10.3.4", | ||
"lodash.get": "4.4.2", | ||
@@ -27,0 +27,0 @@ "lodash.isequal": "4.5.0", |
# extract | ||
## Install | ||
`@opensea/i18n-extract` analyzes and extracts translation keys with their default values from source files. Extracted translation keys are meant to be uploaded to a translation management system for translation into other languages. | ||
**How?** | ||
Program looks for references to the `useTranslation()` and `<Trans />` from [next-translate](https://github.com/aralroca/next-translate) using `@babel/parser` and `@babel/traverse`. Note that wrapping these into custom hooks/components will break the translation key extraction. | ||
## Getting started | ||
### Install | ||
```sh | ||
@@ -9,6 +17,16 @@ npm install --save-dev @opensea/i18n-extract | ||
## Running tests | ||
### Usage | ||
Published packages comes with a `i18n-extract` binary. | ||
```sh | ||
npm run i18n-extract --directory ./ --out locales/en-US | ||
``` | ||
## Local development | ||
### Running tests | ||
```sh | ||
yarn test | ||
``` |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
15477
1
32
0
+ Added@babel/parser@7.22.14(transitive)
+ Addedglob@10.3.4(transitive)
- Removed@babel/parser@7.22.13(transitive)
- Removedglob@10.3.3(transitive)
Updated@babel/parser@7.22.14
Updatedglob@10.3.4