mozlang2po(1)

✨ NAME ✨

mozlang2po β€” the little glow-up machine that turns Mozilla .lang files into Gettext PO localization files πŸ’– yes bestie, that's literally the whole job, and it does it flawlessly.

This one lives in the Translate Toolkit family, so if you already hang out with po2mozlang and the rest of the squad, you know the vibe 🫢


🌈 SYNOPSIS 🌈

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

okay so here's the tea πŸ“ you give it an INPUT in lang format, you tell it an OUTPUT in po, pot formats, and you sprinkle in whatever flags your heart desires. That's it. That's the whole main character moment πŸ‘‘


πŸ’… OPTIONS πŸ’…

  • --version β€” shows the program's version number and dips ✌️
  • -h, --help β€” shows this help message and exits, the classic "wait what do I do" save 🌸
  • --manpage β€” outputs a manpage based on the help. yes, a manpage about a manpage. meta icon behavior ✨
  • --progress β€” how to show progress. your options are: dots, none, bar, names, verbose. pick your aesthetic, bestie πŸŽ€
  • --errorlevel β€” how to show errorlevel. your options are: none, message, exception, traceback. start at message, escalate only if you must 😭
  • -i, --input β€” read from INPUT in lang format. this is where your Mozilla .lang file goes πŸ“₯
  • -x, --exclude β€” exclude names matching EXCLUDE from input paths. not me ghosting files I don't want πŸ’€
  • -o, --output β€” write to OUTPUT in po, pot formats. this is the destination, the final form, the slay πŸ“€
  • -S, --timestamp β€” skip conversion if the output file has newer timestamp. lowkey lazy, highkey efficient πŸ’…
  • -P, --pot β€” output PO Templates (.pot) rather than PO files (.po). template era πŸ¦‹
  • --encoding β€” the encoding of the input file. default: UTF-8 🧚
  • --duplicates β€” what to do with duplicate strings (identical source text): merge, msgctxt. default is 'msgctxt'. choose wisely, this one changes how your whole file reads πŸ‘‘
lowkey important: --duplicates defaults to 'msgctxt', so if you were expecting merge energy, you have to ask for it fr fr πŸ‘€

🌸 that's a wrap 🌸

go forth, convert your .lang files, and be the localization icon you were always meant to be πŸ’œ no cap.

written under the Translate Toolkit 3.19.5 banner β€” that's the source and the version, bestie, it's giving official πŸŽ€

bye pookie, go run it 🫢✨

πŸ“¦ where this page comes from