Skip to content

v0.2.9

Latest

Choose a tag to compare

@JumpLink JumpLink released this 24 Sep 07:51

New Features

XML Comment Removal

  • Added removeComments option to msgfmtPlugin for automatic XML comment removal
  • Automatically removes <!-- comments --> from XML output files
  • Particularly useful for metainfo files where clean XML is preferred
  • Defaults to true for cleaner output

Text Wrapping Control

  • Added noWrap option to xgettextPlugin for disabling text wrapping in PO/POT files
  • Prevents line breaks from being created during string extraction
  • Automatically removes existing line breaks from PO files during updates
  • Results in cleaner version control diffs and better compatibility with tools like Weblate
  • Defaults to false (wrapping enabled)

Usage Examples

Clean XML Output:

msgfmtPlugin({
  poDirectory: "po",
  outputDirectory: "public/metainfo",
  format: "xml",
  templateFile: "data/metainfo/myapp.metainfo.xml.in",
  removeComments: true, // Remove XML comments
})

Unwrapped PO Files:

xgettextPlugin({
  sources: ["src/**/*.{ts,js}"],
  output: "po/messages.pot",
  noWrap: true, // Disable text wrapping
})

Full Changelog: v0.2.5...v0.2.9