html2po(1)

πŸ’– html2po(1) β€” the bestie guide πŸ’–

okay so. bestie. listen. html2po is the little command that takes your HTML files and turns them into Gettext PO localization files, and honestly? it's giving translator-core. it's part of the Translate Toolkit (version 3.19.5, for the record πŸ‘‘), and this is its manual page but make it make sense.


✨ NAME ✨

html2po β€” convert HTML files to Gettext PO localization files. that's the whole vibe. HTML in, PO out, slay. πŸ¦‹


🌸 SYNOPSIS 🌸

html2po [--version] [-h|--help] [--manpage] [--progress PROGRESS]
[--errorlevel ERRORLEVEL] [-i|--input] INPUT [-x|--exclude EXCLUDE]
[-o|--output] OUTPUT [-t|--template TEMPLATE] [-S|--timestamp]
[-P|--pot] [--keepcomments] [--duplicates DUPLICATESTYLE] [--multifile
MULTIFILESTYLE]

like, that's a LOT of flags but don't panic, we're going through every single one below πŸ’…


πŸŽ€ DESCRIPTION πŸŽ€

so the actual examples and usage instructions live here:

http://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/html2po.html

go read that for the receipts, iykyk. this page is just the flags, but i'll hold your hand through all of them 🫢


πŸ’… OPTIONS πŸ’…

every single one. no skips. periodt.

  • --version β€” shows the program's version number and then dips out. bye ✌️
  • -h, --help β€” shows this help message and then also dips. iconic behaviour honestly.
  • --manpage β€” outputs a manpage built from the help. meta much? πŸ’€
  • --progress β€” shows progress as one of: dots, none, bar, names, verbose. pick your vibe check.
  • --errorlevel β€” shows error level as one of: none, message, exception, traceback. how much drama do you want when something goes wrong, bestie?
  • -i, --input β€” read from INPUT in htm, html, xhtml formats. this is where the source files come from πŸ‘‘
  • -x, --exclude β€” exclude names matching EXCLUDE from the input paths. not you, not you, not you πŸ™ˆ
  • -o, --output β€” write to OUTPUT in po, pot formats. the destination, the main character of the file system ✨
  • -t, --template β€” read from TEMPLATE in. (yes, the formats list after "in" is literally empty in the original, so i'm not gonna invent one, okay? leave her alone 😭)
  • -S, --timestamp β€” skip conversion if the output file has a newer timestamp. if it's fresher than you, don't touch it πŸ’…
  • -P, --pot β€” output PO Templates (.pot) rather than PO files (.po). template era.
  • --keepcomments β€” preserve html comments as translation notes in the output. keeping the receipts, love that for us πŸŽ€
  • --duplicates β€” what to do with duplicate strings (identical source text): merge, msgctxt (default: 'msgctxt'). so like, same words showing up twice? you decide if they get merged or handled with msgctxt. the default is msgctxt, no cap.
  • --multifile β€” how to split po/pot files: single, toplevel or onefile. choose your splitting situation 🌈

🌟 little reminder bestie: don't guess at what these do beyond what's written here β€” the flags are the flags, and the defaults are the defaults. respect the manpage πŸ“œ

🧚 and that's the page 🧚

that's it, that's the whole manual. go localize something pretty and text your translator bestie about it. πŸ’œ

this page is part of Translate Toolkit 3.19.5, and it's the html2po(1) manual. bye bye, ily, drink water πŸŒΈπŸ¦‹βœ¨

πŸ“¦ where this page comes from