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 *, txt formats
  • -x/--exclude β€” skip over names matching EXCLUDE in the input paths. not today 🚫
  • -o/--output β€” write to OUTPUT in po, pot formats
  • -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 are merge, msgctxt (default: 'msgctxt')
lowkey important: --duplicates defaults to 'msgctxt', so if you wanted merge, 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