** Description changed:

  [ Impact ]
  
  Evince shows its user interface in English even when the system language
- is German. This started in Ubuntu 26.04.
+ is German or another language. 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:
+ In 49~alpha-2ubuntu2, the package got X-Ubuntu-Use-Langpack: yes in
+ debian/control. With this header, pkgbinarymangler strips the .mo files
+ from the binary packages, on the assumption that the translations reach
+ users through the language-pack-gnome-* packages. But evince has since
+ moved to universe and was removed from the language packs. So the
+ translations are neither in the evince packages nor in the language
+ packs.
  
- ```
- /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.
+ The fix drops X-Ubuntu-Use-Langpack: yes from debian/control, so the .mo
+ files built from po/*.po stay in evince-common. The same change is
+ already in tenacious (49~alpha-2ubuntu4), where the translations are
+ back.
  
  [ 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.
+ No code changes. The only difference in the binary packages is that
+ evince-common ships the .mo files under /usr/share/locale again. These
+ are the upstream translations that Evince shipped before 26.04. A bad
+ translation would show up as wrong or garbled text in the Evince user
+ interface for that language. Language packs install their files under
+ /usr/share/locale-langpack, so the .mo files can't conflict with a
+ language pack that still contains evince translations.
  
  [ 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
+ The build log also shows that dh_translations can't generate the
+ evince.pot template, because po/POTFILES.in lists files that no longer
+ exist. That template is only needed for importing translations into the
+ language packs, which evince no longer uses, so this SRU doesn't change
+ it.
  
  [ 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