gettext-extractor

A flexible and powerful Gettext message extractor with support for JavaScript, TypeScript, JSX and HTML.

MIT License

Downloads
401.8K
Stars
96
Committers
10

Bot releases are hidden (Show)

gettext-extractor - v3.1.0

Published by lukasgeiter almost 7 years ago

Features

  • New option transformSource for parse* methods, which allows pre-processing of source code
gettext-extractor - v3.0.0

Published by lukasgeiter over 7 years ago

Breaking Changes

  • The POT output format has changed a bit
    There have been a few improvements to the output - see Improvements below.
  • toPotString has been renamed to getPotString
  • toGettextMessages has been removed
    Use the new methods instead: getMessages, getContexts and getMessagesByContext

Features

  • Support for setting PO headers
  • New methods for retrieving extracted messages: getMessages, getContexts and getMessagesByContext

Improvements

  • By default the Content-Type PO header is set to text/plain; charset=UTF-8
  • Plurals have a msgstr[1] "" in the POT output #5
  • File references are sorted alphabetically in the POT output

Bugfixes

  • Prevent &, < and > from being escaped as HTML entities
  • Preserve messages with empty string as text
gettext-extractor - v2.1.0

Published by lukasgeiter over 7 years ago

Features

  • More intelligent extraction of comments from JavaScript code
gettext-extractor - v2.0.0

Published by lukasgeiter over 7 years ago

Breaking Changes

  • functionCall and methodCall have been replaced by JsExtractors.callExpression
  • Node.js version 6 or higher is now required
  • Passing null for optional arguments will throw an error

Features

  • HTML support
  • More flexible extraction of call expression with JsExtractors.callExpression
  • Support for glob options in parseFilesGlob
  • Parse options that allow setting the starting line number and more
  • Save to .pot file asynchronously with savePotFileAsync
gettext-extractor - v1.0.2

Published by lukasgeiter over 7 years ago

Bugfixes

  • Let TypeScript parser infer script kind from filename
    This resolves issues with TypeScript casts (like <any>) being treated
    as JSX elements which can result in missing messages.
gettext-extractor - v1.0.1

Published by lukasgeiter over 7 years ago

Bugfixes

  • Fix character encoding issue #1
gettext-extractor - v1.0.0

Published by lukasgeiter over 7 years ago

Inital public release of the Gettext Extractor