txt2po(1)
π NAME π
Okay bestie, meet txt2po(1) from the Translate Toolkit 3.12.1 era β she converts plain text (.txt) files into Gettext PO localization files. Itβs giving βglow-up for your plain text,β fr fr. π
β¨
π 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]
π¦ DESCRIPTION π¦
The manpage literally says: see http://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/txt2po.html for examples and usage instructions. Thatβs the whole description vibe β no extra lore, no cap. π«Ά
β¨ OPTIONS β¨
--versionβ show the programβs version number and exit. Iconic little exit, ngl. π-h/--helpβ show this help message and exit. Your built-in bestie when youβre lost. π--manpageβ output a manpage based on the help. Yes, she can generate her own manual-page energy. β¨--progressβ show progress as:dots,none,bar,names,verbose. Pick your progress aesthetic, bestie. π--errorlevelβ show errorlevel as:none,message,exception,traceback. Choose how much error drama you can handle. π-i/--inputβ read fromINPUTin*,txtformats. Thatβs the source-text main character. π₯-x/--excludeβ exclude names matchingEXCLUDEfrom input paths. Not me filtering out the irrelevant files. π-o/--outputβ write toOUTPUTinpo,potformats. This is where the translated magic lands. π-S/--timestampβ skip conversion if the output file has newer timestamp. Lowkey the βif itβs already fresher, leave it aloneβ option. β-P/--potβ output PO Templates (.pot) rather than PO files (.po). Templates girlies, rise. π§--encodingβ the encoding of the input file (default:UTF-8). Keep those characters from having a whole crisis. πΈ--flavourβ the flavour of text file:plain(default),dokuwiki,mediawiki. Choose your text-file cuisine. π--no-segmentationβ donβt segment the file, treat it like a single message. One big text blob, one big vibe. π¦--duplicatesβ what to do with duplicate strings (identical source text):merge,msgctxt(default:'msgctxt'). Duplicate drama, handled. π
Thatβs the txt2po(1) page, brought to you by Translate Toolkit 3.12.1 β footer date tea was not listed, so Iβm not inventing any, bestie. πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: python313-translate-toolkit 3.12.1-bp160.1.1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms