New Features
XML Comment Removal
- Added
removeCommentsoption tomsgfmtPluginfor automatic XML comment removal - Automatically removes
<!-- comments -->from XML output files - Particularly useful for metainfo files where clean XML is preferred
- Defaults to
truefor cleaner output
Text Wrapping Control
- Added
noWrapoption toxgettextPluginfor 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