start

# pofilter

Pofilter allows you to run a number of checks against your PO 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.

## Usage

    pofilter [options] <in> <out>

Where:

<in> | the input file or directory which contains PO files
<out> | the output file or directory that contains PO files that fail the various tests

Options:

--version | show program’s version number and exit
-h, --help | show this help message and exit
--manpage | output a manpage based on the help
--progress=PROGRESS | show progress as: dots, none, bar, names, verbose
--errorlevel=ERRORLEVEL | show errorlevel as: none, message, exception, traceback
-iINPUT, --input=INPUT | read from INPUT in pot, po formats
-xEXCLUDE, --exclude=EXCLUDE | exclude names matching EXCLUDE from input paths
-oOUTPUT, --output=OUTPUT | write to OUTPUT in po, pot formats
--psyco=MODE | use psyco to speed up the operation (set mode)
-l, --listfilters | list filters available
--review | include elements marked for review (default)
--noreview | exclude elements marked for review
--fuzzy | include elements marked fuzzy (default)
--nofuzzy | exclude elements marked fuzzy
--header | include a PO header in the output
--autocorrect | output automatic corrections where possible rather than describing issues
--language=LANG | set target language code (e.g. af-ZA) [required for spell check]
--openoffice | use the standard checks for OpenOffice translations
--mozilla | use the standard checks for Mozilla translations
--gnome | use the standard checks for Gnome translations
--kde | use the standard checks for KDE translations
--excludefilter=FILTER | don’t use FILTER when filtering
-tFILTER, --test=FILTER | only use test FILTERs specified with this option when filtering
--notranslatefile=FILE | read list of untranslatable words from FILE (must not be translated)
--musttranslatefile=FILE | read list of translatable words from FILE (must be translated)
--validcharsfile=FILE | read list of all valid characters from FILE (must be in UTF-8)

## Example

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 is 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 usefull 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 -l

List all the available checks.