Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vtex/intl-equalizer
👯♂️
https://github.com/vtex/intl-equalizer
srv-store-framework xp-developer
Last synced: about 1 month ago
JSON representation
👯♂️
- Host: GitHub
- URL: https://github.com/vtex/intl-equalizer
- Owner: vtex
- Created: 2018-10-25T19:16:24.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-07-19T02:45:12.000Z (over 1 year ago)
- Last Synced: 2024-11-01T18:16:08.369Z (2 months ago)
- Topics: srv-store-framework, xp-developer
- Language: JavaScript
- Homepage:
- Size: 1.16 MB
- Stars: 11
- Watchers: 134
- Forks: 2
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# 👯♂️ Intl-Equalizer
A VTEX CLI for linting locale string files
Easy tool to compare between locale files and find missing keys
# Installation
Install Intl-Equalizer using yarn:
`yarn add --dev @vtex/intl-equalizer`
Or via npm:
`npm install --save-dev @vtex/intl-equalizer`
# Configuration
**1)** Add a new script to your package.json:
```json
"scripts": {
"lint:locales": "intl-equalizer"
}
```**2)** And Intl-Equalizer config in your `package.json` if you need to change the default values:
```
// package.json
{
"intl-equalizer": {
"referenceLocale": "pt",
"localeDirectory": "src/locales/",
"filesToIgnore": ["context.json"]
}
}
```> `referenceLocale` default value is `'en'`
> `localeDirectory` default value is `'/messages'`
> `filesToIgnore` default value is an empty array`
# Optional Commands
## Fix
Command to fix the order of the locale keys based on the `referenceLocale`
```
intl-equalizer --fix
```## All
Using `intl-equalizer --all`, or its shorthand `intl-equalizer -a`, will override the fail-fast behavior and instead list all errors.