grunt-i18n-checker

0.1.1 • Public • Published

NPM version Build Status devDependencies Status

grunt-i18n-checker

A simple checker which ensure consistency between i18n JSON data, such as files used by https://github.com/angular-translate/angular-translate.

Checks run

  • Every key found in first JSON translation file also exists in all other JSON files (ie. checks there is no missing key in other files).
  • All keys found in each JSON file also exists in first file found (ie. checks there is no missing key in first file).

Getting started

If this is the first time you're using Grunt, the getting started guide will show you how to get up and running.

Once you have that installed, with a Gruntfile set for your code, you can install the plugin with:

npm install grunt-i18n-checker --save-dev

In your Gruntfile, add the line:

grunt.loadNpmTasks( 'grunt-i18n-checker' );

Running and configuring

Run this task with the grunt i18nChecker command.

This is designed to be very simple and need only a few configuring for the most common cases.

You can specify the targets and options for the task using the normal Grunt configuration – see Grunt's guide on how to configure tasks in general.

Options

src

Type: string Required

The directory where JSON files (*.json) will be read.

Example uses

Looks for all *.json files in www/i18n/ subdirectory.

  i18nChecker: {
    all: {
      src: 'www/i18n/'
    }
  }

Package Sidebar

Install

npm i grunt-i18n-checker

Weekly Downloads

4

Version

0.1.1

License

MIT

Last publish

Collaborators

  • gbourel