1.0.5 • Published 1 month ago

gettext-extractor-plugin v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month 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 month ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago