dtd2po(1)
π dtd2po(1) β your Mozilla .dtd to Gettext PO bestie π
okay so welcome to the dtd2po(1) manual page from Translate Toolkit 3.12.1. This is the little icon that converts a Mozilla .dtd UTF-8 localization format into a Gettext PO localization file. no cap.
π NAME π
dtd2po β converts a Mozilla .dtd UTF-8 localization format to a Gettext PO localization file. π
β¨ 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]
π¦ DESCRIPTION π¦
So this tool uses the po and dtd modules, plus the dtd2po convertor class that lives in this module. Yes, βconvertorβ β thatβs the spelling in the source, bestie, weβre not correcting it. π
You can convert back to .dtd using po2dtd.py. round-trip queen behavior, honestly. β¨
πΈ OPTIONS πΈ
--versionβ shows the programβs version number and exits.-h/--helpβ shows the help message and exits.--manpageβ outputs a manpage based on the help.--progressβ shows progress as:dots,none,bar,names,verbose.--errorlevelβ shows errorlevel as:none,message,exception,traceback.-i/--inputβ reads fromINPUTindtdformat.-x/--excludeβ excludes names matchingEXCLUDEfrom input paths.-o/--outputβ writes toOUTPUTinpo,potformats.-t/--templateβ reads fromTEMPLATEindtdformat.-S/--timestampβ skips conversion if the output file has a newer timestamp.-P/--potβ outputs PO Templates (.pot) rather than PO files (.po).--duplicatesβ what to do with duplicate strings (identical source text):merge,msgctxt(default:'msgctxt').
lowkey important:--duplicatesdefaults to'msgctxt', so if you donβt touch it, thatβs the duplicate-string behavior. π
cute little sign-off: this page is serving Translate Toolkit 3.12.1 source/version energy, and thereβs no date stamped on this footer, bestie β thatβs the whole footer vibe. πβ¨
π¦ 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