** Description changed:

+ [ Impact ]
+ 
+ Evince shows its user interface in English even when the system language
+ is German. This started in Ubuntu 26.04.
+ 
+ Evince uses language packs (X-Ubuntu-Use-Langpack: yes): its .mo files
+ are stripped from the binary packages, and translations reach users
+ through Launchpad Translations and the language-pack-gnome-* packages.
+ That requires a translation template (evince.pot), which dh_translations
+ generates during the build by running the meson evince-pot target. This
+ step fails because po/POTFILES.in lists two files that no longer exist
+ in the source tree:
+ 
+ ```
+ /usr/bin/xgettext: error while opening "properties/ev-properties-view.c" for 
reading: No such file or directory
+ FAILED: [code=1] meson-internal__evince-pot
+ ```
+ 
+ The failure doesn't stop the build, but no template is generated, so
+ Evince translations don't reach the language packs.
+ 
+ The fix combines two upstream commits that update po/POTFILES.in: one
+ fixes the paths of the moved and removed files, the other adds
+ translatable files that were missing from the list.
+ 
+ [ Test Plan ]
+ 
+ The translations are shipped as .mo files in evince-common, so this can
+ be tested in an LXD container.
+ 
+ 1. Launch a container and get a root shell in it:
+ 
+ ```
+ lxc launch ubuntu-daily:stonking evince-l10n
+ lxc shell evince-l10n
+ ```
+ 
+ 2. In that shell, generate a German locale and install evince:
+ 
+ ```
+ locale-gen de_DE.UTF-8
+ apt update
+ apt install -y evince
+ apt policy evince-common
+ ```
+ 
+ The installed version should be 49~alpha-2ubuntu3.
+ 
+ 3. Check for the German translation:
+ 
+ ```
+ ls -l /usr/share/locale/de/LC_MESSAGES/evince.mo
+ LANG=de_DE.UTF-8 gettext -d evince Print
+ ```
+ 
+ Bug: the .mo file doesn't exist and gettext prints "Print".
+ 
+ 4. Enable -proposed and install the fixed packages:
+ 
+ ```
+ add-apt-repository -y --pocket proposed
+ apt install -y -t stonking-proposed evince evince-common libevview-4.0-5 
libevdocument-4.0-6
+ apt policy evince-common
+ ```
+ 
+ evince-common should be installed from stonking-proposed with version
+ 49~alpha-2ubuntu3.1.
+ 
+ 5. Repeat step 3. Expected: /usr/share/locale/de/LC_MESSAGES/evince.mo
+ exists and gettext prints "Drucken".
+ 
+ 6. Check the amd64 build log of 49~alpha-2ubuntu3.1 on Launchpad: the
+ evince-pot step run by dh_translations must not contain the "xgettext:
+ error while opening" error.
+ 
+ [ Where problems could occur ]
+ 
+ The patch only touches po/POTFILES.in, which is used to generate the
+ translation template at build time. No code is changed. If the list were
+ wrong, template generation would fail again, as it does now, or some
+ strings would be missing from the template and stay untranslated.
+ 
+ [ Other Info ]
+ 
+ The upload also drops X-Ubuntu-Use-Langpack: yes from debian/control. It
+ was added in 49~alpha-2ubuntu2, when evince was still meant to get its
+ translations from language packs. Since then evince was moved to
+ universe, is no longer the default document viewer, and was removed from
+ the language packs, but pkgbinarymangler still strips the .mo files from
+ the binary packages because of this header. So the translations are
+ neither in the packages nor in the language packs. Without the header,
+ the .mo files built from po/*.po stay in evince-common.
+ 
+ Upstream commits:
+ 
https://gitlab.gnome.org/GNOME/evince/-/commit/ad1aaf50875df436dc1ab00c5f195680de56b381
+ 
https://gitlab.gnome.org/GNOME/evince/-/commit/ed4cb87730a934e59bb2f75ec43b685f37387759
+ 
+ [ Original Description ]
+ 
  Evince lacks the German translation since Ubuntu 26.04. Evince has been
  demoted to universe in resolute and the build log shows this failure:
  
  [0/1] Running external command evince-pot
  /usr/bin/xgettext: error while opening "properties/ev-properties-view.c" for 
reading: No such file or directory
  FAILED: [code=1] meson-internal__evince-pot

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to evince in Ubuntu.
https://bugs.launchpad.net/bugs/2171416

Title:
  German translation missing in Evince

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/evince/+bug/2171416/+subscriptions


-- 
desktop-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs

Reply via email to