@vtex/intl-equalizer

2.5.1 • Public • Published

👯‍♂️ 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:

"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.

Readme

Keywords

none

Package Sidebar

Install

npm i @vtex/intl-equalizer

Weekly Downloads

894

Version

2.5.1

License

ISC

Unpacked Size

44.8 kB

Total Files

20

Last publish

Collaborators

  • lbebber
  • alcar
  • arturpimentel
  • felippenardi
  • alinevillaca
  • caio.oliveira
  • victorges
  • guilhermebruzzi
  • cmdalbem
  • iago
  • ntmedina
  • salesfelipe
  • diegoximenes
  • andreldsa
  • jgfidelis
  • vcalasans
  • thiagomurakami
  • marcoskwkm
  • lurian
  • rogerlucena
  • arthurepc
  • igorframos
  • gustavorosolem
  • analuizamtg
  • rafarubim
  • tergol
  • rafabac
  • bivillar
  • breno
  • guigs
  • daher
  • lucasecdb
  • victorhmp
  • marcosvcp
  • jeymisson
  • natalia_godot
  • tiagonapoli
  • r-araripe
  • augusto.lazaro
  • kaisermann
  • ericreis
  • athoscouto
  • tlgimenes
  • anitavincent
  • brunojdo
  • vtexlab
  • firstdoit
  • augustob
  • afonsopraca
  • amoreira
  • brunohq
  • nandoacoelho
  • kevinchevallier