0.0.6 • Published 3 months ago

react-i18next-validator v0.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

Contributors Forks Stargazers Issues MIT License LinkedIn

About The Project

Stop cluttering translation.json files with keys that are no longer used or duplicate values. Make sure you don't forget to add a key to the translation file when you add it to the code. Make sure you don't forget to remove a key from the translation file when you remove it from the code.

Getting Started

Installation

  1. Install NPM package
npm install react-i18next-validator
  1. Create config file in root directory ri18next-v.config.json
{
	"directory": "./public/locales/", // path to translation locales directory
	"src": "./src/" // path to source code directory
}
  1. Add script to package.json
"scripts": {
  "ri18next-v": "ri18next-validator"
}
  1. Run script
npm run ri18next-v
  1. You can add additional options to the config
{
	"errorLevel": "error", // error, warn, info
	"regex": [], // string[] array of regex to look for in code files to match translation keys
	"ignoreKeys": [] // string[] array of keys to ignore
}

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE.txt for more information.

0.0.5

3 months ago

0.0.6

3 months ago

0.0.4

3 months ago

0.0.3

4 months ago

0.0.2

4 months ago

0.0.1

4 months ago