Home

Awesome

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).

Changelog

Please check the CHANGELOG.md file.