https://github.com/labd/intl-extractor
https://github.com/labd/intl-extractor
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/labd/intl-extractor
- Owner: labd
- License: mit
- Created: 2024-04-12T12:26:37.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-03T09:15:32.000Z (almost 2 years ago)
- Last Synced: 2024-12-31T19:29:49.940Z (over 1 year ago)
- Language: TypeScript
- Size: 207 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# intl-extractor
Extracts `next-intl` labels from TypeScript files and merges them to a given output json file.
This automates away manually setting labels in a `source.json` file.
## How to use
```bash
npx @labdigital/intl-extractor -i ./path/to/files -o ./path/to/output.json
```
## How it works
Scans input files for `useTranslations` or `getTranslations` usage using the TypeScript SDK. It will then merge them all together and check the source JSON file for label values.