Full Webpack plugin for angular-gettext. Intended for both compilation and extraction. For details see official developer guide for angular-gettext.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
CHANGELOG.md
LICENSE
README.md
index.js
package-lock.json
package.json

README.md

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.