grunt-commandL10n
NOTE: currently in development. working thru some things
Identifies unused localization key/value pairs in a project. Recursively reads the directory and its sub-directories, comparing localization string variables from the view with the locale file(ie en.json) key/value pairs
Install the package - "grunt-commandl10n"
npm install grunt-commandl10n --save-dev
Load the task - "grunt-commandl10n"
grunt;
Register the task - "commandL10n"
grunt;
Update the config settings
In your project's Gruntfile, add a section named commandL10n
to the data object passed into your config settings, grunt.initConfig()
.
grunt
More Information
You do have to set the path to your localization file (ie en.json, es.json en-au.json) and the path to your view folder in the connfiguration.
Unless you want the resulting cleaned up json to be written to a new file or folder, don't worry about the options object in the configuration.
Running from the command line
npm install and link
> npm link
command line example
> grunt L10n
Running Tests unit test(server)
Using mocha, sinon and chai for unit testing server
In command line:
mocha test/unit/server/grunt-commandL10nSpec --reporter spec
License
Copyright (c) 2015 Norman Barber. Licensed under the MIT license.