pocommentclean(1)

πŸ’– POCOMMENTCLEAN πŸ’–

okay bestie, so this is pocommentclean from the Translate Toolkit (v1.3.0, she's a classic) β€” and she has ONE job and she does it flawlessly. no notes. πŸŽ€


✨ SYNOPSIS ✨

pocommentclean [--backup] po-dir

where po-dir is a directory of existing PO files that you want to clean. yes, a directory β€” we'll get to that in a sec, and it's kind of a whole thing. 🫢


🌸 DESCRIPTION 🌸

pocommentclean will remove all translator comments from a directory of PO files.

that's it. that's the whole vibe. she walks in, she takes the translator comments, she leaves. main character energy fr fr. πŸ’…


πŸ¦‹ OPTIONS πŸ¦‹

  • --backup β€” Create a backup file for each PO file converted, with the .po.bak extension.

like, she'll make you a lil safety copy before she starts editing, which is honestly so thoughtful of her. *.po.bak β€” remember it, love it. ✨


πŸ‘‘ OPERATION πŸ‘‘

ngl the way she does it is kind of iconic β€” she's out here using sed, and she will delete all lines starting with # but which are not standard Gettext PO format lines.

so bestie, let's do a vibe check on what SURVIVES, because this is the important part:

  • it won't delete developer comments (#.)
  • it won't delete obsolete messages (#~)
  • it won't delete flags (#,)
  • it won't delete locations (#:)

only the translator comments get the βœ‚οΈ. everyone else is safe and thriving. periodt. πŸ’œ


😭 BUGS 😭

okay so here's the tea, and it's giving limitations:

pocommentclean cannot clean individual PO files, it only cleans directories.

so if you're sitting there like "I just want to clean THIS one file" β€” nope. she does not do that. she does not know that file. she only knows directory. so if you need one single file cleaned, you gotta get creative with how you feed her, iykyk. πŸ™ˆ


🌈 SEE ALSO 🌈

no see-also section in this one bestie, she's a standalone queen. πŸ’…


mwah πŸ’‹ that's the whole page. pocommentclean(1), straight outta Translate Toolkit 1.3.0 β€” go forth and de-comment your PO directories, and don't forget your --backup if you're feeling spicy. πŸ“πŸ§šβ€β™€οΈ