Git Product home page Git Product logo

grunt-jade-l10n-extractor's Introduction

grunt-jade-l10n-extractor

Extract l10n strings from jade files.

Getting Started

This plugin requires Grunt ~0.4.2

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-jade-l10n-extractor --save-dev

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

grunt.loadNpmTasks('grunt-jade-l10n-extractor');

The "jade_l10n_extractor" task

Overview

In your project's Gruntfile, add a section named jade_l10n_extractor to the data object passed into grunt.initConfig().

grunt.initConfig({
  jade_l10n_extractor: {
    options: {
      // Task-specific options go here.
    },
    your_target: {
      // Target-specific file lists and/or options go here.
    },
  },
});

Options

options.separator

Type: String Default value: ', '

A string value that is used to do something with whatever.

options.punctuation

Type: String Default value: '.'

A string value that is used to do something else with whatever else.

Usage Examples

Default Options

In this example, the default options are used to do something with whatever. So if the testing file has the content Testing and the 123 file had the content 1 2 3, the generated result would be Testing, 1 2 3.

grunt.initConfig({
  jade_l10n_extractor: {
    options: {},
    files: {
      'dest/default_options': ['src/testing', 'src/123'],
    },
  },
});

Custom Options

In this example, custom options are used to do something else with whatever else. So if the testing file has the content Testing and the 123 file had the content 1 2 3, the generated result in this case would be Testing: 1 2 3 !!!

grunt.initConfig({
  jade_l10n_extractor: {
    options: {
      separator: ': ',
      punctuation: ' !!!',
    },
    files: {
      'dest/default_options': ['src/testing', 'src/123'],
    },
  },
});

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

(Nothing yet)

Bitdeli Badge

grunt-jade-l10n-extractor's People

Contributors

bitdeli-chef avatar mynetx avatar vhpoet avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

gruntjs-updater

grunt-jade-l10n-extractor's Issues

package breaks npm

npm install grunt-jade-l10n-extractor
npm WARN package.json [email protected] No repository field.
npm http GET https://registry.npmjs.org/grunt-jade-l10n-extractor
npm http 304 https://registry.npmjs.org/grunt-jade-l10n-extractor
npm http GET https://registry.npmjs.org/grunt-jade-l10n-extractor/-/grunt-jade-l10n-extractor-0.1.3.tgz
npm http 404 https://registry.npmjs.org/grunt-jade-l10n-extractor/-/grunt-jade-l10n-extractor-0.1.3.tgz
npm ERR! fetch failed https://registry.npmjs.org/grunt-jade-l10n-extractor/-/grunt-jade-l10n-extractor-0.1.3.tgz
npm ERR! Error: 404 Not Found
npm ERR! at WriteStream. (/usr/lib/node_modules/npm/lib/utils/fetch.js:57:12)
npm ERR! at WriteStream.EventEmitter.emit (events.js:117:20)
npm ERR! at fs.js:1596:14
npm ERR! at /usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:103:5
npm ERR! at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/isaacs/npm/issues

npm ERR! System Linux 3.2.0-29-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "grunt-jade-l10n-extractor"
npm ERR! cwd /home/dev-lib/ripple-client-cn
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/dev-lib/ripple-client-cn/npm-debug.log
npm ERR! not ok code 0

I do realize that you suggested the solution which was more of a quickfix than actual solution so I'm reopening the issue, cause this package breaks entire ripple build script because of this 404 error. Please look into it and propose actual solution. Thank you for your support.

i can't install it using npm.. it's seems get a http 404 from npmjs.org

npm install grunt-jade-l10n-extractor
npm WARN package.json [email protected] No repository field.
npm http GET https://registry.npmjs.org/grunt-jade-l10n-extractor
npm http 304 https://registry.npmjs.org/grunt-jade-l10n-extractor
npm http GET https://registry.npmjs.org/grunt-jade-l10n-extractor/-/grunt-jade-l10n-extractor-0.1.3.tgz
npm http 404 https://registry.npmjs.org/grunt-jade-l10n-extractor/-/grunt-jade-l10n-extractor-0.1.3.tgz
npm ERR! fetch failed https://registry.npmjs.org/grunt-jade-l10n-extractor/-/grunt-jade-l10n-extractor-0.1.3.tgz
npm ERR! Error: 404 Not Found
npm ERR! at WriteStream. (/usr/lib/node_modules/npm/lib/utils/fetch.js:57:12)
npm ERR! at WriteStream.EventEmitter.emit (events.js:117:20)
npm ERR! at fs.js:1596:14
npm ERR! at /usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:103:5
npm ERR! at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/isaacs/npm/issues

npm ERR! System Linux 3.2.0-29-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "grunt-jade-l10n-extractor"
npm ERR! cwd /home/dev-lib/ripple-client-cn
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/dev-lib/ripple-client-cn/npm-debug.log
npm ERR! not ok code 0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.