json2po(1)

✨ NAME ✨

json2po β€” bestie, this is THE glow-up tool that converts JSON files into Gettext PO localization files πŸ’… like it literally takes your cute lil JSON and turns it into .po/.pot royalty πŸ‘‘


🌸 SYNOPSIS 🌸

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

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so real talk, the full examples and usage instructions live right here:

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

go read it, it's giving documentation excellence fr fr πŸ“–βœ¨


πŸ’– OPTIONS πŸ’–

  • --version β€” shows the program's version number and then dips out, bye πŸ‘‹
  • -h/--help β€” prints this help message and exits, no notes πŸ’β€β™€οΈ
  • --manpage β€” spits out a manpage built from the help, meta much? iconic πŸŽ€
  • --progress β€” how do you wanna see progress? choices are: dots, none, bar, names, verbose πŸ‘€
  • --errorlevel β€” how loud should errors be? options: none, message, exception, traceback 😭
  • -i/--input β€” read from INPUT in json format, this is where your source text comes from πŸ“
  • -x/--exclude β€” excludes names matching EXCLUDE from the input paths, so basically "not you, girl" πŸ™ˆ
  • -o/--output β€” write to OUTPUT in po, pot formats πŸ’Ύ
  • -t/--template β€” read from TEMPLATE in json format 🧚
  • -S/--timestamp β€” skips the conversion if the output file already has a newer timestamp, lowkey a timesaver ⏰
  • -P/--pot β€” outputs PO Templates (.pot) instead of PO files (.po) πŸ‘‘
  • --filter β€” leaves to extract, e.g. 'name,desc' (default: extract everything) 🌈
  • --duplicates β€” what to do when you've got duplicate strings (identical source text): merge, msgctxt (default: 'msgctxt') πŸ’€
no cap, that --duplicates default is 'msgctxt' β€” don't forget it bestie πŸ’–

and that's the whole vibe, you ate it 🫢 this was Translate Toolkit 3.19.5, muah πŸ’‹ slay responsibly βœ¨πŸ’…

πŸ“¦ where this page comes from