Removing all fuzzy entries of a PO file

Martijn Burger picture Martijn Burger · Sep 10, 2011 · Viewed 7.6k times · Source

Does anyone know a method to mass delete all fuzzy translations from a PO file. Something like:

if #, fuzzy == TRUE Then SET msgstr="" AND REMOVE #, fuzzy

Answer

Aaron M picture Aaron M · Feb 20, 2015

If gettext is installed you can use the msgattrib command to accomplish this:

msgattrib --clear-fuzzy --empty -o /path/to/output.po /path/to/input.po

The full documentation for msgattrib is here:

https://www.gnu.org/software/gettext/manual/html_node/msgattrib-Invocation.html