pkgbinarymangler and building translated Sphinx documentation

Evan Broder evan at
Tue Mar 13 03:55:20 UTC 2012

On Mon, Mar 12, 2012 at 8:46 PM, Andrew Starr-Bochicchio
<a.starr.b at> wrote:
> I sent this to pitti a few days ago, seems like he hasn't had a chance
> to get to it. In retrospect, he's probably not the only one that has
> the answer to this question so there's really no reason to have
> contacted him directly. Additionally, folks on this list might know of
> packages that could benefit from a rebuild if this change is made.
> ---------- Forwarded message ----------
> From: Andrew Starr-Bochicchio <a.starr.b at>
> Date: Thu, Mar 8, 2012 at 6:36 PM
> Subject: pkgbinarymangler and building translated Sphinx documentation
> To: Martin Pitt <martin.pitt at>
> Hi Martin,
> I've been working on making the Ubuntu Packaging guide translatable.
> [1] I ran into an issue with sphinx's .mo files being stripped by
> pkgbinarymangler. With sphinx, in order to build the translated files
> you seem to need to have the files for the languages you
> want installed. So any package that trys to use sphinx's baked in i18n
> support won't actually work. It seems this has already been reported
> against the sphinx source package. [2]
> Temporarily, we can work around this for the packaging guide, as it's
> not actually in the archive, by providing a non-stripped version in
> our PPA. Obviously this isn't ideal, and this might be breaking other
> packages we're not aware of. David Planella suggested I talk to you.
> He thinks that there might be an option on pkgbinarymangler (or
> perhaps it can be specified in the same package, on the control file?)
> to blacklist a package from getting its translations stripped.

Looking through the code for pkgbinarymangler, I don't see a way for a
package to opt out of translations on its own.

However, there is a way for packages to opt in: the
X-Ubuntu-Use-Langpack: yes tag in the control file
( - seems like that could be fairly easily
extended to support "no".

Also, there is a blacklist of packages that shouldn't be translated in
the pkgbinarymangler package: <> - you could have
the packaging guide added to that.

More information about the ubuntu-devel mailing list