POTOOL(1)
π POTOOL(1) π
okay bestie, sit down, we're learning potool β that's the program for manipulating gettext po files, and it lives in section 1 of the General Commands Manual. She's been around a while, she's iconic, and she's about to make your .po files behave. π
β¨ NAME β¨
potool β the program for manipulating gettext po files. that's it, that's the whole job description, and she does it beautifully. π
πΈ SYNOPSIS πΈ
potool FILENAME1 [ FILENAME2 ] [-f f|nf|t|nt|nth|o|no] [-n
ctxt|id|str|cmt|ucmt|pcmt|scmt|dcmt|tr|linf]... [-s] [-p] [-c]
potool -h
one file = filter mode, two files = swap mode, and -h when you're lost. π¦
π« DESCRIPTION π«
so potool works in two (so far) modes and honestly? she serves in both.
Mode one needs just one file name and she works as a filter. lowkey the simplest thing ever, she just reads and outputs.
Mode two is the glow-up: the program replaces the translations in FILENAME1 with the translations from FILENAME2. so like β FILENAME1 is the base po file, while FILENAME2 is our working copy. base gets updated, working copy does the talking. periodt. π
π OPTIONS π
-ffilter β decides which po file entries get retained. in mode two, filters are applied only to FILENAME2 (the working copy, remember her). existing filters are:tβ translated entries β¨ntβ untranslated entries πnthβ untranslated entries and the headerfβ fuzzy entries π«nfβ entries that are not fuzzyoβ obsolete entries πnoβ non-obsolete entries
and yes bestie, you can stack filters by specifying multiple -f options. go off. π₯
-nfilter β decides which po file entry parts should not be retained. any number of-noptions is allowed (she's flexible like that π ). valid parameters are:ctxtβ don't writectxtpartsidβ don't writeidpartsstrβ don't writestrpartstrβ don't write translationsucmtβ don't write user's commentspcmtβ don't write the comments regarding position in source filesscmtβ don't write special comments ('#, fuzzy, c-format, ...')dcmtβ don't write reserved comments (usually starting with a dot)cmtβ don't write any commentslinfβ change source line numbers to'1'.
the last parameter is so useful when you need to compare two po or pot files using diff(1), because otherwise it usually returns lots of unimportant line number changes and you're just sitting there like π
-sβ don't display the entries themselves, only their count. she's just giving you the numbers, no yapping. π’-pβ causespotoolto 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. no cap.-cβ overwrite all msgstrs with their msgids. wild but okay π-hβ display short usage help. the "bestie I'm lost" button π«Ά
π EXAMPLES π
count the translated entries:
potool x.po -s -ft
displays the number of translated entries. see also postats(1). π
delete everything and start fresh:
potool x.po -nstr
deletes all translations β so you can start from scratch! :-) iconic honestly.
translated first, then untranslated:
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. organized queen. π
edit only the untranslated ones:
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 entries. chef's kiss. π
the last two examples are implemented as the potooledit(1) program. β¨
π¦ CAVEATS π¦
by default, the program re-wraps lines in all strings in the output. see the -p option. not a drill, bestie, she will reformat your strings and she will not apologize. π
π SEE ALSO π
potooledit(1), postats(1), msgmerge(1), msgfmt(1). go read them, they're all part of the family. π
π AUTHOR π
Potool was written by Zbigniew Chyla and is now being maintained by Marcin Owsiany <porridge@debian.org>. legends, both of them. π«Ά
and that's the whole page, bestie!! this was the POTOOL(1) man page, dated September 15, 2012, and if you made it this far you're genuinely so valid. go filter some po files. slay. π
β¨πΈ
π¦ where this page comes from
- debian bookworm: potool 0.19-1+b1
- debian trixie: potool 0.19-1+b2
- ubuntu jammy: potool 0.19-1
- ubuntu noble: potool 0.19-1build2
- ubuntu questing: potool 0.19-1build2
- ubuntu resolute: potool 0.19-1build3
- ubuntu stonking: potool 0.19-1.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms