angular-gettext-plugin

1.0.1 • Public • Published

angular-gettext-plugin

Full Webpack plugin for angular-gettext based on the angular-gettext-cli utility. Intended for both compilation and extraction. For details see official developer guide for angular-gettext.

This utility can:

  1. extract all you strings into a separate file of you choice
  2. compile a given group of po files into the desired format

Installation

$ npm -D i angular-gettext-plugin

Example of usage

//webpack.config.js
 
const AngularGetTextPlugin = require('./build/angular-gettext-plugin');
module.exports = {
  entry: './app/index.js', // your entry file
  output: {
    // your output options...
  },
  module: {
    // all your rules and loaders...
  },
  plugins: [
    new AngularGetTextPlugin({
      compileTranslations: { //optional
        input: 'po/*.po',
        outputFolder: 'l10n',
        format: 'json'
      },
      extractStrings: { //optional
        input: 'app/**/*.html',
        destination: 'po/template.pot'
        //Any of the angular-gettext-tools Extractor options
      }
    }),
    // the rest of your plugins...
  ]
}

Options

Support all the configuration and options of the angular-gettext-cli utility. Check also the angular-gettext-tools Extractor options (for the supported extractStrings options).

Package Sidebar

Install

npm i angular-gettext-plugin

Weekly Downloads

449

Version

1.0.1

License

MIT

Last publish

Collaborators

  • augusto.altman