txt2po(1)
π txt2po(1) β the girlies' guide to turning boring .txt into fancy PO files π
okay so bestie, this is txt2po from the Translate Toolkit, and it's literally the glow-up station for your plain text files. We're taking .txt and making Gettext PO localization files out of it. No cap. π¦
β¨ NAME β¨
txt2po β convert plain text (.txt) files into Gettext PO localization files. that's it, that's the whole job, and she does it flawlessly π
β¨ SYNOPSIS β¨
txt2po [--version] [-h|--help] [--manpage] [--progress PROGRESS]
[--errorlevel ERRORLEVEL] [-i|--input] INPUT [-x|--exclude EXCLUDE]
[-o|--output] OUTPUT [-S|--timestamp] [-P|--pot] [--encoding] [--flavour
FLAVOUR] [--no-segmentation] [--duplicates DUPLICATESTYLE]
like yes she has a lot of flags, she's high maintenance in the best way π
β¨ DESCRIPTION β¨
so fr fr, if you want the actual examples and usage instructions, the docs live here:
that's the vibe. go read it and come back, I'll wait π
β¨ OPTIONS β¨
--versionβ shows the program's version number and dips. bye bestie βοΈ-h/--helpβ shows this help message and exits. always there for you π«Ά--manpageβ spits out a manpage built from the help. meta queen π--progressβ how she shows progress, your pick:dots,none,bar,names,verboseπ--errorlevelβ how much she yaps about errors, your pick:none,message,exception,tracebackπ-i/--inputβ read from INPUT in*,txtformats-x/--excludeβ skip over names matching EXCLUDE in the input paths. not today π«-o/--outputβ write to OUTPUT inpo,potformats-S/--timestampβ skip the conversion if the output file already has a newer timestamp. she respects a fresh file π-P/--potβ output PO Templates (.pot) instead of PO files (.po) π--encodingβ the encoding of the input file (default:UTF-8) β yep, default is the one true encoding β¨--flavourβ the flavour of the text file:plain(default),dokuwiki,mediawiki. choose your fighter π§--no-segmentationβ don't segment the file, just treat the whole thing like a single message. one big mood, one big string π--duplicatesβ what to do about duplicate strings (identical source text) β options aremerge,msgctxt(default:'msgctxt')
lowkey important:--duplicatesdefaults to'msgctxt', so if you wantedmerge, you gotta say it out loud. don't be shy πΈ
and that's the whole page, periodt. π
this was txt2po(1) from the Translate Toolkit version 3.19.5 β mwah, take care of her, she's iconic ππ
π¦ where this page comes from
- ubuntu stonking: translate-toolkit 3.19.5-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms