kbs0327 / angular-gettext-extract-loader

Loader to extract gettext strings from an angular project.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Loader to extract gettext strings from an angular project.

webpack

compaitable with webpack ^4.0.0

Installation

npm i -D angular-gettext-extract-loader

Usage

Add it into the pipeline for js & html loading:

modules: {
  ...
  loaders: [
    ...
      {
        test: /src.*\.js$/,
        loader: 'angular-gettext-extract-loader?pofile=po/template.pot'
      },
      {
        test: /src.*\.html$/,
        loader: 'angular-gettext-extract-loader?pofile=po/template.pot'
      },
    ...
  ]
  ...
}

This will output all strings found to the the configured pofile.

About

Loader to extract gettext strings from an angular project.

License:MIT License


Languages

Language:JavaScript 100.0%