pkgstriptranslations(1)
π 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 thepotandpofiles 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.mofiles 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,pkgstriptranslationsis inactive. to enable it, theenableoption in the configuration file must be set totrue. she's asleep until you wake her up. π΄β‘οΈπ₯
π ENVIRONMENT VARIABLES π
NO_PKG_MANGLEβ if this variable is set to a nonempty value, thenpkgstriptranslationsis 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
- ubuntu resolute: pkgbinarymangler 157ubuntu
- ubuntu stonking: pkgbinarymangler 158
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms