1.1.1 • Published 6 months ago

@kenyerman/i18lint v1.1.1

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

i18lint

This script lints your translation files and rewrites them in a way that keys are sorted. Compatible with @ngx-translate

Installation

The script is npm available. You can install via:

npm i @kenyerman/i18lint -g

Usage

Simple example

i18lint path/to/translations/root --rewrite

Help output

$ i18lint --help
Positionals:
  dir  The path to the translation files                                [string]

Options:
      --help         Show help                                         [boolean]
      --version      Show version number                               [boolean]
  -r, --rewrite      Rewrite the translation files with pretty printing and orde
                     red keys                                          [boolean]
  -i, --indent       Force indentation of written files. Default is 4 spaces.
                                                                        [number]
      --projectRoot  Root directory of the project. Default is the current worki
                     ng directory.                                      [string]

Features (planned)

  • Check directory structure
  • Check files validity
  • Enforce ISO 639-1 language codes
  • Enforce commitment between namespacing or nesting
  • Check for missing translations between languages
  • Sort translation keys (rewrite files)
  • Config file
  • Enforce configured key separator (e.g. dash or underscore)

Changelog

Learn about the latest improvements.

Contributing

Contributing Guidelines

Read through our contributing guidelines to learn about our submission process, coding rules and more.

Want to Help?

Want to report a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues labeled as help wanted or good first issue.

License

The project is licensed under MIT License. Read more here.