start

# pogrep

The pogrep tool extracts messages that match a regular expresion into a new set of PO files that can be examined, edited and corrected. These corrections can then be merged using pomerge.

## Usage

    pogrep [options] <in> <out>

Where:

In and out are either directories or files. Out will contain PO files with only those messages that match the regular expression that was you searched for.

Options:

--version | show program’s version number and exit
-h, --help | show this help message and exit
--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)
--search=SEARCHPARTS | searches the given parts (valid values are msgid or msgstr)
-I, --ignore-case | ignore case distinctions
-e, --regexp | use regular expression matching
-v, --invert-match | select non-matching lines
--accelerator=ACCELERATOR | ignores the given accelerator when matching (valid values are &_~)

## Example

    pogrep --accelerator="_" --search msgid -I -e "software|hardware" only-zu only-zu-check

Search for the words “software” or “hardware” in the msgid field. Ignore case (-I) and treat the underscore (_) character as an accelerator key. Search through all PO files in the directory “only-zu” and place any matches in PO files in the directory “only-zu-check”. This would be useful to run if you know that the word for software and hardware has been changed during the course of translation and you want to check and correct all these instances.

    pogrep --search=msgid -e '^\w+(\s+\w+){0,3}$' -i templates -o short-words

Find all messages in the tempalates direcotry that have between 1 and 4 words and place them in short-words. Use this is you want to see quick results by translating messages that are most likely menu entries or dialogue labels.

    pogrep --search=msgstr -I -e "Ifayile" zu zu-check

Search all translations for the occurance of Ifayile. You would use this to check if words have been used correctly. Usefull if you find problematic use of the same word for different concepts. You can use pocompendium to find these conflicts.