Debian Bug report logs - #1002673
sphinx-copybutton: reproducible builds: html documentation contains translated content

Package: src:sphinx-copybutton; Maintainer for src:sphinx-copybutton is Sandro Tosi <morph@debian.org>;

Reported by: Vagrant Cascadian <vagrant@reproducible-builds.org>

Date: Mon, 27 Dec 2021 03:15:01 UTC

Severity: normal

Tags: patch

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, reproducible-bugs@lists.alioth.debian.org, Sandro Tosi <morph@debian.org>:
Bug#1002673; Package src:sphinx-copybutton. (Mon, 27 Dec 2021 03:15:03 GMT) (full text, mbox, link).


Acknowledgement sent to Vagrant Cascadian <vagrant@reproducible-builds.org>:
New Bug report received and forwarded. Copy sent to reproducible-bugs@lists.alioth.debian.org, Sandro Tosi <morph@debian.org>. (Mon, 27 Dec 2021 03:15:03 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Vagrant Cascadian <vagrant@reproducible-builds.org>
To: submit@bugs.debian.org
Subject: sphinx-copybutton: reproducible builds: html documentation contains translated content
Date: Sun, 26 Dec 2021 19:10:10 -0800
[Message part 1 (text/plain, inline)]
Source: sphinx-copybutton
Severity: normal
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: locale
X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org

Various .html files generated and shipped in the .deb package differ
depending on the locale of the build environment:

  https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/diffoscope-results/sphinx-copybutton.html

  /usr/share/doc/python-sphinx-copybutton-doc/html/genindex.html

  ... placeholder="Search·the·docs·..."·aria-label="Search·the·docs·..."·autocomplete="off"·>

vs.

  ... placeholder="Dokumentidest·otsimine·..."·aria-label="Dokumentidest·otsimine·..."·autocomplete="off"·>


The attached patch fixes this by exporting LANGUAGE=en when calling
sphinxdoc from debian/rules.


Thanks for maintaining sphinx-copybutton!


live well,
  vagrant
[0001-debian-rules-Set-LANGUAGE-when-building-documentatio.patch (text/x-diff, inline)]
From 6afc886f7fa911b76a7367e2837741f578150cda Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Mon, 27 Dec 2021 02:57:47 +0000
Subject: [PATCH] debian/rules: Set LANGUAGE when building documentation.

https://tests.reproducible-builds.org/debian/issues/bookworm/sphinxdoc_translations_issue.html
---
 debian/rules | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index f6ae964..7729685 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,7 +9,7 @@ export PYBUILD_NAME=sphinx-copybutton
 override_dh_auto_build:
 	ln -sf /usr/share/javascript/clipboard.js/clipboard.js sphinx_copybutton/_static/clipboard.min.js
 	dh_auto_build
-	PYTHONPATH=. http_proxy='127.0.0.1:9' python3 -m sphinx -N -bhtml docs docs/build/html
+	PYTHONPATH=. LANGUAGE=en http_proxy='127.0.0.1:9' python3 -m sphinx -N -bhtml docs docs/build/html
 
 override_dh_auto_install:
 	dh_auto_install
-- 
2.34.1

[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#1002673; Package src:sphinx-copybutton. (Mon, 27 Dec 2021 03:39:03 GMT) (full text, mbox, link).


Acknowledgement sent to Sandro Tosi <morph@debian.org>:
Extra info received and forwarded to list. (Mon, 27 Dec 2021 03:39:03 GMT) (full text, mbox, link).


Message #10 received at 1002673@bugs.debian.org (full text, mbox, reply):

From: Sandro Tosi <morph@debian.org>
To: Vagrant Cascadian <vagrant@reproducible-builds.org>, 1002673@bugs.debian.org
Subject: Re: Bug#1002673: sphinx-copybutton: reproducible builds: html documentation contains translated content
Date: Sun, 26 Dec 2021 22:34:54 -0500
> Various .html files generated and shipped in the .deb package differ
> depending on the locale of the build environment:
>
>   https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/diffoscope-results/sphinx-copybutton.html
>
>   /usr/share/doc/python-sphinx-copybutton-doc/html/genindex.html
>
>   ... placeholder="Search·the·docs·..."·aria-label="Search·the·docs·..."·autocomplete="off"·>
>
> vs.
>
>   ... placeholder="Dokumentidest·otsimine·..."·aria-label="Dokumentidest·otsimine·..."·autocomplete="off"·>
>
>
> The attached patch fixes this by exporting LANGUAGE=en when calling
> sphinxdoc from debian/rules.

this is a problem that could happen with every package that uses
sphinx and has multi-language doc available.

that said, i dont believe this should be fixed in each individual
package, but it should either be enforced at the sphinx level or in
the build environment.

-- 
Sandro "morph" Tosi
My website: http://sandrotosi.me/
Me at Debian: http://wiki.debian.org/SandroTosi
Twitter: https://twitter.com/sandrotosi



Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed May 17 11:09:39 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.