Section: User Commands (1)
Updated: September 15, 2012
Return to Main Contents
potool - program for manipulating gettext po files
[ FILENAME2 ]
works in two (so far) modes. The first mode requires providing one
file name, and works as a filter. In the second mode, the program
the translations in
with the translations from
(So FILENAME1 is the base po file, while FILENAME2 is our working copy.)
- -f filter
Determines which po file entries should be
In the second mode, the filters are applied only to
(the working copy).
Existing filters are:
t - translated entries
nt - untranslated entries
nth - untranslated entries and the header
f - fuzzy entries
nf - entries that are not fuzzy
o - obsolete entries
no - non-obsolete entries
It is possible to stack filters, by specifying multiple -f options.
- -n filter
Determines which po file entries parts should
be retained. Any number of -n options is allowed. Valid parameters are:
ctxt - don't write 'ctxt' parts
id - don't write 'id' parts
str - don't write 'str' parts
tr - don't write translations
ucmt - don't write user's comments
pcmt - don't write the comments regarding position in source files
scmt - don't write special comments ('#, fuzzy, c-format, ...')
dcmt - don't write reserved comments (usually starting with a dot)
cmt - don't write any comments
linf - change source line numbers to '1'.
The last parameter is useful when you need to compare two po or pot files using
as it usually returns lots of unimportant line number changes otherwise.
Don't display the entries themselves, only their count.
causes potool to keep the formatting of the file intact. Without this option,
all strings will be re-wrapped in the output at newlines or word boundaries to
fit in 80 columns.
Overwrite all msgstrs with their msgids.
Display short usage help.
- potool x.po -s -ft
displays the number of translated entries. See also
- potool x.po -nstr
Deletes all translations - so you can start from scratch! :-)
- potool x.po -ft && potool x.po -fnt
displays firstly the translated and then the non-translated entries from file x.po
(reverse order is not recommended because of the first "header" entry).
The output contains all information from x.po, with the difference that
untranslated entries are located together in a single place.
- potool x.po -fnt > tmp.po && editor tmp.po && potool x.po tmp.po
lets you easily add new translations, without looking at the already translated
The last two examples are implemented as the
By default, the program re-wraps lines in all strings in the output. See the
Potool was written by
and is now being maintained by
Marcin Owsiany <firstname.lastname@example.org>.
- SEE ALSO
This document was created by
using the manual pages.
Time: 13:11:33 GMT, September 15, 2012