#1148165 variety: translations are ignored because gettext is bound to missing package-local locale directory

Package:
variety
Source:
variety
Submitter:
Christian Lauinger
Date:
2026-09-30 04:21:03 UTC
Severity:
normal
Tags:
#1148165#5
Date:
2026-09-17 16:52:25 UTC
From:
To:
The Variety UI is displayed in English even when the session uses a locale
for which Variety ships a translation.  I reproduced this with German.

Steps to reproduce:

  $ env LANGUAGE=de LC_ALL=de_DE.UTF-8 /usr/bin/python3 \
      -c 'from variety.Util import _; print(_("_Next"))'
  _Next

Expected result:

  _Nächstes

Cause:

Since upstream commit 3d2778d9ffbd302fb48603ed0be5fcde085645b2,
variety/Util.py unconditionally binds the "variety" gettext domain to the
package-local directory variety/locale:

  gettext.bindtextdomain(
      "variety", localedir=importlib.resources.files("variety") / "locale"
  )

The Debian package does not install that directory.  Its compiled catalogs
are instead installed in the standard system location, for example:

  /usr/share/locale/de/LC_MESSAGES/variety.mo

Consequently gettext searches a nonexistent directory and silently returns
the untranslated msgids.  The catalogs themselves are valid; rebinding the
domain to /usr/share/locale returns the expected German translation.

Possible fix:

Please patch Variety to use the system locale directory when the
package-local locale directory does not exist.  Alternatively, install the
compiled catalogs under the package-local variety/locale directory expected
by the upstream code.

This affects the indicator menu as well as the rest of the gettext-based UI.
The issue appears to be specific to the new 0.9.1 packaging/layout.

#1148165#10
Date:
2026-09-27 09:51:06 UTC
From:
To:
The reported translation issue has been fixed upstream in commit
83b6e9bc7bc2f1b0d4306a84e49ba122537814eb:

https://github.com/varietywalls/variety/commit/83b6e9bc7bc2f1b0d4306a84e49ba122537814eb

The change makes Variety use the default system gettext locale
directory when the package-local variety/locale directory is absent.
This matches the Debian package layout described above. Please include
the upstream fix in the Debian package.

#1148165#15
Date:
2026-09-30 04:20:01 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
variety, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1148165@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
James Lu <jlu@debian.org> (supplier of updated variety package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Tue, 29 Sep 2026 20:59:31 -0700
Source: variety
Architecture: source
Version: 0.9.2-1
Distribution: unstable
Urgency: medium
Maintainer: James Lu <jlu@debian.org>
Changed-By: James Lu <jlu@debian.org>
Closes: 1148165
Changes:
 variety (0.9.2-1) unstable; urgency=medium
 .
   * New upstream release.
     - Fix loading translations for the tray icon (Closes: #1148165)
Checksums-Sha1:
 157e95e937330a555183a4b0c92d85df5ed14ba5 1921 variety_0.9.2-1.dsc
 62b8e375bfd375a8e9d45ee93584fe1a320b6084 777083 variety_0.9.2.orig.tar.gz
 983ab1d89f42774dd9ca992e4294b74599059489 9316 variety_0.9.2-1.debian.tar.xz
 08628f3466062bb38ab4be4e9d5e0315d8e7bda6 6903 variety_0.9.2-1_source.buildinfo
Checksums-Sha256:
 9d833823a82abffdf638f5e372a83c81ed4ef1ff27600fae752201ad1e029780 1921 variety_0.9.2-1.dsc
 d4ad761a95837339c46d93376a915c7a8342cb90ee66cc4cc5e524766ddbf7e1 777083 variety_0.9.2.orig.tar.gz
 13c9d0aa5682207517bb79958be57b5a36eb7529bd56230f1b906c2bbf6bb412 9316 variety_0.9.2-1.debian.tar.xz
 d4a738111b8e88fdcd9d9463e95bda4eb367f6d40343d24afabe7420f22418c1 6903 variety_0.9.2-1_source.buildinfo
Files:
 0fb765d40c3a3fba7848e9d6afa67b4c 1921 graphics optional variety_0.9.2-1.dsc
 b399bc29fedc29c3b84d884150e8ffdf 777083 graphics optional variety_0.9.2.orig.tar.gz
 40d778778e9c8cd9f870b87c056f2118 9316 graphics optional variety_0.9.2-1.debian.tar.xz
 2bfe5788e3c801b47980d4fae0fd0dc2 6903 graphics optional variety_0.9.2-1_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQJDBAEBCgAtFiEE1dVostNKsyozeUTSLsP2DeccC50FAmq8iY4PHGpsdUBkZWJp
YW4ub3JnAAoJEC7D9g3nHAudJBwP/2OG+WleXqVSvU/uFivWlDwhhTHBY2qEYhkR
phySvJ/MtcT2s4pJQfbs/6pZVWuBETvmXlikvxH4NE/yToADQKauqKv5eIMWMN/7
o3EUSGgdCNTeLhUHLAzIpGmT3g/Yf+3LzIsp25RBNiYxEAPmEQfDiQ7XqrR6s75O
i69lAf67GK1Dl2tYRHoqvG6imEWFEDD+YhLq8Rmbrr+6l3aa83No4lmH7SMU0ahm
PW/nHGQG4sDWyAU1r3owOlvbgFZnNmbZt+2aQho6ybVuqrsDXo7yY6BvGMPPE5DQ
hLf4gXvCrZJ4RpR/DtLN7ra0sR9tKJ1u59IomNGWvdE9U6Ro1FvUlptyKR8CMWUl
TnPgvp+OaWGzIhi+VY6M5+I8ThCTrUVhSianABJr6pdj+24NWEJupOcnCgZQmjhp
Iad9+8zrOPdZTnJq6nJDOvf2XeioBmQm97Y9FwJpDp8T83/1mjB0c3Z4dVVP6BEL
yo/FJ/u9StbC30J87esxv59dZ17j6/FgB4E4xfpfhVPevZmItMzX954FccUkXX6K
ghsqh9T/Y6UBpHiWdyhN/LKZK6ib8vRM2A98qndHpW7aDhYYcZ5338lOBffebDkW
boZFzU6VGVjbtslsBoakOdtwNqzu3UswEaTP2cESorJV0riqEqwz/3Dx8t7OYTPG
kaM15Xcf
=FpQL
-----END PGP SIGNATURE-----