dtd2po(1)

πŸ’– dtd2po β€” like, the whole vibe πŸ’–

okay bestie, welcome to dtd2po(1) from the Translate Toolkit 3.19.5 era β€” she's a little old-school but she ATE, fr fr. Sit down, grab a strawberry πŸ“, and let's get into it.


✨ NAME ✨

dtd2po β€” the girl whose whole job is turning a Mozilla .dtd UTF-8 localization file into a Gettext PO localization file. That's it. That's the gig. She's the translator from DTD-land to PO-land and she does it flawlessly πŸ’…


✨ SYNOPSIS ✨

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

no cap, that's the whole shape of her 🌸


✨ DESCRIPTION ✨

So like. Under the hood? She's built on the po module and the dtd module, plus the dtd2po convertor class which lives in this very module. iykyk. 🧚

And the important part, bestie β€” you can absolutely convert back to .dtd using po2dtd.py. round trip queen πŸ‘‘


✨ OPTIONS ✨

  • --version β€” shows the program's version number and then dips out. exit stage left 🫢
  • -h/--help β€” shows you this help message and then dips out too. the two of them leave together, iconic.
  • --manpage β€” spits out a manpage built straight from the help. meta af.
  • --progress β€” how loud she is about progress ✨ the options are: dots, none, bar, names, verbose. pick your vibe.
  • --errorlevel β€” how loud she is about errors 😭 the options are: none, message, exception, traceback. choose your chaos level.
  • -i/--input β€” read from INPUT in dtd format. she needs her snack.
  • -x/--exclude β€” exclude any names matching EXCLUDE from the input paths. not me ghosting half your files πŸ’€
  • -o/--output β€” write to OUTPUT in po, pot formats. both formats, she's flexible like that.
  • -t/--template β€” read from TEMPLATE in dtd format. a little blueprint, a little inspo πŸŽ€
  • -S/--timestamp β€” skip the conversion if the output file already has a newer timestamp. she checks before she works, lowkey respectful of your time.
  • -P/--pot β€” output PO Templates (.pot) rather than PO files (.po). template girlies rise 🌈
  • --duplicates β€” what to do with duplicate strings (identical source text). the options are: merge, msgctxt. the default is 'msgctxt'. heads up though β€” if you don't say anything, she goes with msgctxt, so don't be surprised when she does.

⚠️ bestie note: --duplicates is doing choices about your identical strings. merge and msgctxt are genuinely different outcomes for your file. pick with intention, don't just let the default happen to you. βœ‹

and that's the whole page!! 🌟 this gorgeous thing came to you courtesy of Translate Toolkit 3.19.5 β€” that's the version and the source of this very manpage, mwah πŸ’‹. stay translating, stay hydrated, and remember: .dtd in, .po out, po2dtd.py to come home. periodt. πŸ’œπŸ¦‹β­

πŸ“¦ where this page comes from