Skip to content

Releases: gjsify/vite

v0.2.9

24 Sep 07:51

Choose a tag to compare

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

v0.2.5

09 Sep 21:23
fa37a95

Choose a tag to compare

This release improves reproducibility of gettext outputs and reduces noisy diffs.

Changes

  • @gjsify/vite-plugin-gettext
    • Add options: noLocation, deterministic, sourceDateEpoch, fixedCreationDate, sortOutput, msgcatOptions.
    • Pass through xgettextOptions and propagate new flags to xgettext, msgcat, and msgmerge.
    • Set SOURCE_DATE_EPOCH when deterministic is true to stabilize timestamps.
    • Normalize POT-Creation-Date header using fixedCreationDate or formatted epoch for stable diffs.
  • Docs: Update README with new options and reproducible extraction example.
  • @gjsify/vite-plugin-blueprint: version bump.

Reference

  • PR #1: Make gettext outputs deterministic