node package manager
Easy collaboration. Discover, share, and reuse code in your team. Create a free org »



Language report plugin

Getting Started

This plugin requires Grunt ~0.4.5

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 lang-rep

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:


The "langRep" task

Will check language files and compare them to a 'master' language outputting the keys that do not have a translations in the non-master files

grunt langRep -<options>



Separates the output files of the langRep task into separate files, where each file is a different language #### -zip Like the separate option but also then zips the separate files into a zip file

    files: [
      expand: true
      cwd: 'client/assets/strings'
      dest: 'tmpDir/'
      src: '**/'
    langs: ['en''fr''es''it''pt''ru''te''zh']
    master: 'en'

The "verify" task

grunt verify

used for checking a directory for keys of an object, to see if they are in use

        master: 'client/assets/strings/en/'
        include: [
        exclude: [  
            'client/vendor/** '  

The "import" task

imports new translations (csv/coffee) and combines with an existing string file

grunt import -<options>



silences all warning #### -f forced past non-existant string error, for creating files even if an perceived error occurred

    master: 'en'
    # files to be imported csv and coffee are supported 
    trans: './Translations/*'
    langs:  ['de''es''fr''it''hi''nl''pt''ru''te''tr''zh']
    # delimiter used for csv-parse default: ',' 
    csvDelim: '\t'
    # existing string files to combine with imported files 
    files: [
      expand: true
      cwd: './strings'
      src: '**/'
      dest: './tmpDir/'