Skip to content
This repository has been archived by the owner on Oct 27, 2023. It is now read-only.

timonwong/webpack-angular-gettext

Repository files navigation

webpack-angular-gettext

Webpack plugin & loader that extract translatable strings from your source files for angular-gettext.

Based on webpack-angular-translate and angular-gettext-extract-loader.

Getting started

Install the plugin using npm:

npm install --save-dev webpack-angular-gettext

Configure the loader and the plugin in the webpack configuration.

var WebpackAngularGettext = require('webpack-angular-gettext');

module.exports = {
  // ...
  module: {
    preLoaders: [
      {
        test: /\.html$/,
        exclude: /node_modules/,
        loader: WebpackAngularGettext.loader()
      },
      {
        test: /\.js$/,
        loader: WebpackAngularGettext.loader()
      }
    ]
  }

  plugins: [
    new WebpackAngularGettext.Plugin()
  ]
};

The Plugin() accepts the following options in the constructor:

  • fileName: The name of the file that contains all the translations, default translations.pot

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published