A grunt task for backfilling your localized app resource files.
Used in conjunction with the excellent angular-localization
If you have any problems setting up or using
grunt-angular-localization, open an issue. I would be happy to help.
This is an active repository that takes user suggestions, feedback and pull requests seriously. Happy grunting!
This plugin requires Grunt
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-angular-localization --save-dev
The "localize" task
In your project's Gruntfile, add a section named
localize to the data object passed into
Most of these will mirror your configuration (whether default or overriden) for the client-side angular library.
Number of spaces to indent JSON resource files after sorting. Note there is a hard limit of
See MDN's definition of JSON.stringify for more details.
The locale that your app is initialized with for a new user.
The folder off the root of your web app where the resource files are located.
The extension for all resource files spanning across all of the different supported languages.
The various other languages that you want to support within your app (specified as language tags).
If you are following a best-practices directory structure and keeping the default
then you need only to set the locales that you wish to support.
Or, you can supply more task-specific options from your custom configuration:
> npm install> npm test
In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt. Please refer to this document for a detailed explanation of git commit guidelines - source: AngularJS
- 2014-09-26 v1.0.1 Update README
- 2014-09-23 v1.0.0 First version!
Task submitted by Rahul Doshi.