1.0.5 • Published 1 year ago

gettext-extractor-plugin v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Webpack gettext extractor plugin

This Webpack plugin extracts translatable sentences from your code to a gettext catalog file (.pot).

Options

OptionsMandatoryTypeDescription
calleesYArray of stringsArray of functions names which translate sentences in your code
headersNObjectOptional headers to add to the catalog file
outputYStringCatalog file path

Example Webpack configuration

const GettextExtractorPlugin = require("gettext-extractor-plugin");

...

{
  ...
  plugins: [
    ...
    new GettextExtractorPlugin({
      callees: ["translate", "t"],
      headers: { Language: "en" },
      output: "src/assets/i18n/messages.pot",
    }),
    ...
  ],
  ...
}
1.0.5

1 year ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago