Pofilter allows you to run a number of checks against your PO, XLIFF or TMX files. These checks are designed to pick up problems with capitalisation, accelerators, variables, etc. Those messages that fail any of the checks are output and marked so that you can correct them.
Use pofilter -l
to get a list of available checks.
Once you have corrected the errors in your PO files you can merge the corrections into your existing translated PO files using pomerge.
pofilter [options] <in> <out>
Where:
<in> |
the input file or directory which contains PO or XLIFF files |
<out> |
the output file or directory that contains PO or XLIFF files that fail the various tests |
Options:
show program’s version number and exit
show this help message and exit
output a manpage based on the help
show progress as: dots, none, bar, names, verbose
show errorlevel as: none, message, exception, traceback
read from INPUT in pot, po, xlf, tmx formats
exclude names matching EXCLUDE from input paths
write to OUTPUT in po, pot, xlf, tmx formats
list filters available
include elements marked for review (default)
exclude elements marked for review
include elements marked fuzzy (default)
exclude elements marked fuzzy
don’t add notes about the errors (since version 1.3)
output automatic corrections where possible rather than describing issues
set target language code (e.g. af-ZA) [required for spell check]. This will help to make pofilter aware of the conventions of your language
use the standard checks for OpenOffice translations
use the standard checks for LibreOffice translations
use the standard checks for Mozilla translations
use the standard checks for Drupal translations
use the standard checks for Gnome translations
use the standard checks for KDE translations
use the standard checks for wxWidgets translations – identical to –kde
don’t use FILTER when filtering
only use test FILTERs specified with this option when filtering
read list of untranslatable words from FILE (must not be translated)
read list of translatable words from FILE (must be translated)
read list of all valid characters from FILE (must be in UTF-8)
Here are some examples to demonstrate how to use pofilter:
pofilter --openoffice af af-check
Use the default settings (accelerator and variables) for OpenOffice.org. Check all PO files in af and output any messages that fail the check in af-check (create the directory if it does not already exist).
pofilter -t isfuzzy -t untranslated zu zu-check
Only run the isfuzzy and untranslated checks, this will extract all messages that are either fuzzy or untranslated.
pofilter --excludefilter=simplecaps --nofuzzy nso nso-check
Run all filters except simplecaps. You might want to do this if your language does not make use of capitalisation or if the test is creating too many false positives. Also only run the checks against messages that are not marked fuzzy. This is useful if you have already marked problem strings as fuzzy or you know that the fuzzy strings are bad, with this option you don’t have to see the obviously wrong messages.
pofilter --language=fr dir dir-check
Tell pofilter that you are checking French translations so that it can take the conventions of the language into account (for things like punctuation, spacing, quoting, etc.) It will also disable some tests that are not meaningful for your language, like capitalisation checks for languages that don’t have capital letters.
pofilter --excludefilter=untranslated
Tell pofilter not to complain about your untranslated units.
pofilter -l
List all the available checks.
There are minor bugs in the filters. Most relate to false positives, corner cases or minor changes for better fault description.