Package: variety
Version: 0.9.1-1
Severity: normal
Tags: l10n

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.


-- System Information:
Debian Release: forky/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 7.1.13+deb14-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to 
C.UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages variety depends on:
ii  gir1.2-gdkpixbuf-2.0             2.44.7+dfsg-1
ii  gir1.2-gexiv2-0.16               0.16.2-1
ii  gir1.2-glib-2.0                  2.90.0-1
ii  gir1.2-gtk-3.0                   3.24.52-1
ii  gir1.2-notify-0.7                0.8.8-1+b1
ii  gir1.2-pango-1.0                 1.58.0-1
ii  imagemagick                      8:7.1.2.31+dfsg1-1
ii  imagemagick-7.q16 [imagemagick]  8:7.1.2.31+dfsg1-1
ii  python3                          3.14.7-3
ii  python3-bs4                      4.15.0-1
ii  python3-cairo                    1.29.0-1+b1
ii  python3-configobj                5.0.9-1
ii  python3-dbus                     1.4.0-1+b2
ii  python3-gi                       3.57.1-1+b1
ii  python3-gi-cairo                 3.57.1-1+b1
ii  python3-httplib2                 0.32.0-1
ii  python3-lxml                     6.1.0-1+b1
ii  python3-packaging                26.2-2
ii  python3-pil                      12.3.0-1+b1
ii  python3-requests                 2.34.2-1

Versions of packages variety recommends:
ii  fortune-mod                      1:1.99.1-9.2
ii  gir1.2-ayatanaappindicator3-0.1  0.5.94-1.1
ii  libavif-gdk-pixbuf               1.4.2-1
ii  procps                           2:4.0.7-1
ii  webp-pixbuf-loader               0.2.7-3

Versions of packages variety suggests:
pn  feh | nitrogen                      <none>
ii  gnome-shell-extension-appindicator  64-2

-- no debconf information

Reply via email to