Hi all,
I'm working on fixing bug #1052803 for golang-github-gosexy-gettext.
That package's tests started failing, and I'm pretty sure it was caused
by the upload of src:glibc 2.37-8 which backported a patch from bug
#874160 that treats language encodings like C.UTF-8 as the C locale.
This change effectively "turns off" translations, unless you specify
some specific encoding like "en_US.utf8". While I can apply the
attached patch that fixes the tests, it feels less than ideal. And as
this will be a NMU to prevent the package from being AUTORM'ed and
taking src:lxd along with it, I'd like to fix this properly. I'm just
not familiar enough with gettext to know if there's a better solution.
A simple reproducer is listed below. On a sid system, the first
invocation will fail to return the properly translated string, but the
second will (substitute with your preferred locale).
Thanks for any advice!
Mathias
(BCC: bug #1052803)
> $ dget
> https://deb.debian.org/debian/pool/main/g/golang-github-gosexy-gettext/golang-github-gosexy-gettext_0~git20130221-2.1.dsc
> $ cd golang-github-gosexy-gettext-0~git20130221/
> $ LC_ALL=C.UTF-8 LANGUAGE="es_MX.utf8" TEXTDOMAINDIR=./examples/ gettext -d
> example "Hello, world!"
> $ LC_ALL=en_US.utf8 LANGUAGE="es_MX.utf8" TEXTDOMAINDIR=./examples/ gettext
> -d example "Hello, world!"
diff --git a/debian/control b/debian/control
index d1364e1..18690eb 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: optional
Maintainer: Steve Langasek
Build-Depends: debhelper (>= 11~),
dh-golang,
- golang-any,
+ golang-any, locales-all
Standards-Version: 4.2.1
Homepage: https://github.com/gosexy/gettext
XS-Go-Import-Path: github.com/gosexy/gettext
diff --git a/debian/rules b/debian/rules
index 2d9b72c..1451b07 100755
--- a/debian/rules
+++ b/debian/rules
@@ -20,7 +20,7 @@ override_dh_auto_build:
rm obj-*/src/github.com/gosexy/gettext/examples/*/*.pot
override_dh_auto_test:
- LC_ALL=C.UTF-8 dh_auto_test
+ LC_ALL=en_US.utf8 dh_auto_test
get-orig-source:
rm -rf $(PKG)
signature.asc
Description: This is a digitally signed message part