pkgstriptranslations(1)

πŸ“¦
version 158 Β· 2 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– pkgstriptranslations πŸ’–

okay bestie, so this one is a General Commands Manual situation, and it's literally called pkgstriptranslations β€” say that five times fast, i dare you. it's giving "tiny script, huge job" energy and honestly? iconic. πŸŽ€


✨ NAME ✨

pkgstriptranslations β€” extract translation files and remove gettext *.mo files from package build directories πŸ¦‹


🌸 SYNOPSIS 🌸

pkgstriptranslations

no flags, no arguments, no drama. she just does it. periodt. πŸ’…


πŸ’« DESCRIPTION πŸ’«

okay so here's the tea. pkgstriptranslations goes through your source and package build directories and extracts literally all the gettext related files, then tucks them into:

<pkg-build-dir>/../package_version_arch_suffix.tar.gz

and that suffix? it's configurable in /etc/pkgbinarymangler/striptranslations.conf and defaults to translations. so if you don't touch anything, that's what you get. πŸ’–

πŸŽ€ Tarball layout πŸŽ€

  • source/ β€” contains all the pot and po files from the source package, and yes it preserves the directory structure, she's respectful like that 🫢
  • debname1/, debname2/, ... β€” there's literally one directory per generated binary deb package, and each one contains all the .mo files from that deb, again with the directory structure preserved. no cap. ✨

🧚 the deleting part 🧚

this script also removes all gettext *.mo files below <pkg-build-dir>/usr/share/locale from all the built binary packages. and bestie, she's thorough β€” she'll also remove subdirectories that became empty after the gettext files were yeeted. πŸ§ΉπŸ’€

however. there's a plot twist. if a file /CurrentlyBuilding is present (like on the Ubuntu autobuilders), then the *.mo files are only deleted if the Component: value inside that file matches one of the components configured in /etc/pkgbinarymangler/striptranslations.conf. this is the whole point, actually β€” it lets you selectively strip files only for source packages that are in e.g. main and restricted, but not in e.g. universe. selective queen behavior. πŸ‘‘

lowkey important: by default, pkgstriptranslations is inactive. to enable it, the enable option in the configuration file must be set to true. she's asleep until you wake her up. 😴➑️πŸ”₯

🌈 ENVIRONMENT VARIABLES 🌈

  • NO_PKG_MANGLE β€” if this variable is set to a nonempty value, then pkgstriptranslations is disabled. this is most useful if source packages build nested binary packages as part of their build. πŸ›‘

πŸ‘‘ AUTHOR πŸ‘‘

pkgstriptranslations is developed by Martin Pitt <martin.pitt@canonical.com>. πŸ’œ


and that's the whole page, bestie. the source/version and date on this one? it's Martin Pitt, dated December 17, 2004 β€” so yeah, she's been slaying since way before you were born, and she's still serving. πŸ«Άβœ¨πŸŽ€πŸ’–

πŸ“¦ where this page comes from