[SRU] Bring translations from launchpad

Bug #1999567 reported by Lucas Albuquerque Medeiros de Moura
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
update-notifier (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned
Bionic
Fix Released
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned
Jammy
Fix Released
Undecided
Unassigned
Kinetic
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
In the last couple releases we have not updated the translations from Launchpad. We are bringing them to the source package in an effort to unblock this SRU release:
https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/1991030

This is because the launchpad translations already have the "pro status" string properly translated.

Not only this will unblock this SRU, but it will make the package aligned with the launchpad translations.

[Test Case]
To test this change, we will need to verify if the message:
See https://ubuntu.com/esm or run: sudo pro status

Is correctly translated for the languages that have added support for this message.

[Regression Potential]
Since we are bringing the translations from launchpad, there could be translations done directly in the package that are now missed. Although this is unlikely, since the translations on Launchpad are better maintained them the ones in the package.

Note that update-notifier is not using language pack (reasons in https://launchpad.net/bugs/562900) so it relies on translations updates to be included in the source. We used to do such 'export translations for launchpad and include them in the vcs' but that hadn't been done since 2013 which means none of the strings added in the last years for ua and now ubuntu pro have a working translation today, such the risk of regression a translated string there is rather inexistant

[Other Info]
We have some gray areas regarding the verification of this bug. The target message:

See https://ubuntu.com/esm or run: sudo pro status

Is not translated into all Ubuntu releases, like Xenial. For those releases, we are then just updating the translations using the Launchpad
language packs.

Therefore, we might need future SRUs just to update the translation of new messages into these releases.

Additionally, we are still searching for a good way to just verify translation updates in the package.

description: updated
no longer affects: update-notifier (Ubuntu Trusty)
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I checked the sample string given in the test case, and only Focal and Jammy have that translated to *some* languages:

Xenial:
$ grep "sudo pro status" po/* | grep -v "or run:" | wc -l
0

This SRU for xenial:
$ grep "sudo pro status" po/* | grep -v "or run:" | wc -l
0

Bionic:
$ grep "sudo pro status" po/* | grep -v "or run:" | wc -l
0

This SRU for bionic:
$ grep "sudo pro status" po/* | grep -v "or run:" | wc -l
0

Focal:
$ grep "sudo pro status" po/* | grep -v "or run:" | wc -l
0

This SRU for focal:
$ grep "sudo pro status" po/* | grep -v "or run:" | wc -l
15

Jammy:
$ grep "sudo pro status" po/* | grep -v "or run:" | wc -l
0

This SRU for jammy:
$ grep "sudo pro status" po/* | grep -v "or run:" | wc -l
16

Kinetic:
$ grep "sudo pro status" po/* | grep -v "or run:" | wc -l
0

Lunar:
$ grep "sudo pro status" po/* | grep -v "or run:" | wc -l
0

Additionally, Kinetic and Lunar don't have that string translated, so it would be a regression from jammy. Is this how we want to proceed? Or is there another check I should do instead? I understand we won't get 100% translation coverage, but I picked the string that is in the test case. If the test case is followed, then this SRU will fail verification for X, B, F, and is missing in K and L.

description: updated
Revision history for this message
Sebastien Bacher (seb128) wrote :

@Andreas, thanks for the review. Indeed there was a problem with the xenial and bionic upload. The launchpad template defining the strings-in-use by the package is by serie and hadn't been updated for xenial and bionic. Which means those strings and translations weren't included in the export

@Lucas, sorry for those thinking about that nor noticing when merging the proposed changes for those. Since it was my mistake I've fixed it now (updated the templates on launchpad manually by uploading the pot from the corresponding sources and verified the strings were listed, then requested a new export. I've updated the vcs, moved to tags to the current revision and reuploaded)

I've also uploaded ab update to Lunar. Andreas, I think we don't need to do Kinetic, the package version there is newer than the one used for the SRU to older series so there is no upgrade issue and the fix doesn't really apply since the service is only available to LTSes (updating Lunar was needed though by policy to ensure the fix isn't going to be missing in the next LTS). Let me know if you agree or if you would prefer for me to SRU Kinetic anyway?

Revision history for this message
Julian Andres Klode (juliank) wrote :

The translations from launchpad are shipped, in the language pack, where they belong:

language-pack-gnome-de-base: /usr/share/locale-langpack/de/LC_MESSAGES/update-notifier.mo
language-pack-gnome-en-base: /usr/share/locale-langpack/en_AU/LC_MESSAGES/update-notifier.mo

The package should really not be shipping any translations.

Revision history for this message
Julian Andres Klode (juliank) wrote :

Ugh or rather we should really fix gettext to handle language packs even when we ship bootstrap translations, because that's a huge issue for more places than update-notifer. For APT it's much larger since we literally cannot merge translations at all for governance reasons (and some technical complexity).

Because what happens is the package-provided translations take precedence and that's wrong. We'd want gettext to open both and pick whatever has more translations I'd say.

Anyhow, just missed the bit about language packs in the bug and am still annoyed by how this isn't working properly :)

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I would prefer a kinetic upload as well, because even though the tool itself isn't useful in non-LTS releases, it still spits out messages that could be translated. And it looks like this particular bug is going to be more about "update translations in update-notifier" rather than just the ua->pro switch.

Revision history for this message
Sebastien Bacher (seb128) wrote :

I've uploaded to Kinetic as well. It includes a change to POTFILES.in/skip which define the list of sources that define translatable strings to add 2 source which were missing and skip one. They are basically not going to make a difference for the SRU but that was already in the Vcs and I backported what was uploaded to lunar because that was easier.

Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Lucas, or anyone else affected,

Accepted update-notifier into kinetic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/update-notifier/3.192.59.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-kinetic to verification-done-kinetic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-kinetic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in update-notifier (Ubuntu Kinetic):
status: New → Fix Committed
tags: added: verification-needed verification-needed-kinetic
Changed in update-notifier (Ubuntu):
status: New → Invalid
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Hello Lucas, or anyone else affected,

Accepted update-notifier into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/update-notifier/3.192.54.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in update-notifier (Ubuntu Jammy):
status: New → Fix Committed
tags: added: verification-needed-jammy
Changed in update-notifier (Ubuntu Focal):
status: New → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Hello Lucas, or anyone else affected,

Accepted update-notifier into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/update-notifier/3.192.30.14 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

xenial wasn't accepted because of the bionic ftbfs, otherwise the xenial upload is ok.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Hello Lucas, or anyone else affected,

Accepted update-notifier into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/update-notifier/3.192.1.15 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in update-notifier (Ubuntu Bionic):
status: New → Fix Committed
tags: added: verification-needed-bionic
Changed in update-notifier (Ubuntu Xenial):
status: New → Fix Committed
tags: added: verification-needed-xenial
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Hello Lucas, or anyone else affected,

Accepted update-notifier into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/update-notifier/3.168.18 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-notifier - 3.192.60

---------------
update-notifier (3.192.60) lunar; urgency=medium

  * Refresh the translations using a new launchpad export (lp: #1999567)

 -- Sebastien Bacher <email address hidden> Thu, 15 Dec 2022 10:17:15 +0100

Changed in update-notifier (Ubuntu):
status: Invalid → Fix Released
Revision history for this message
Lucas Albuquerque Medeiros de Moura (lamoura) wrote (last edit ):

I have tested this change by using this script here:

---------------------------
#!/bin/bash
set -e

series=$1
token=$2
name=$series-dev

cleanup () {
  lxc delete $name --force
}

on_err () {
  echo -e "Test Failed"
  cleanup
  exit 1
}

trap on_err ERR

lxc launch ubuntu-daily:$series $name
sleep 10

# Update update-notifier package
lxc exec $name -- sh -c "echo \"deb http://archive.ubuntu.com/ubuntu $series-proposed main\" | tee /etc/apt/sources.list.d/proposed.list"
lxc exec $name -- sudo apt-get update > /dev/null
lxc exec $name -- sudo apt-get install update-notifier-common -y > /dev/null
lxc exec $name -- apt-cache policy update-notifier-common

# Change locales to german
lxc exec $name -- sh -c "DEBIAN_FRONTEND=noninteractive sudo apt-get install language-pack-de -y > /dev/null"
lxc exec $name -- sudo update-locale LANG=de_DE.UTF-8
lxc exec $name -- sudo reboot
sleep 5
lxc config set $name environment.LC_ALL=de_DE.UTF-8

# Running update-motd for machine without an ua subscription
echo -e "\n* Updated update-notifier message"
echo "###########################################"
lxc exec $name -- /usr/lib/update-notifier/apt-check --human-readable
echo -e "###########################################\n"
#
# Attaching machine to a UA subscription
echo "Attaching to a UA subscription"
lxc exec $name -- ua attach $token > /dev/null
lxc exec $name -- ua status

# Running update-motd for attached machine
echo -e "\n* Updated update-notifier message with system attached to UA"
echo -e "###########################################"
lxc exec $name -- /usr/lib/update-notifier/apt-check --human-readable
echo -e "###########################################\n"

# Installing all esm-infra packages
lxc exec $name -- sudo apt-get upgrade -y > /dev/null

# Disabling esm-infra
lxc exec $name -- sudo pro disable esm-infra > /dev/null

echo "* Updated update-notifier message with esm-infra disabled"
echo "###########################################"
lxc exec $name -- /usr/lib/update-notifier/apt-check --human-readable
echo -e "###########################################\n"

cleanup
-----------------------------

And I was able to observe that the translations are properly working.
PS: For kinetic, we don't have esm-infra available, so I have adapted the script for that release to skip that step

tags: added: verification-done verification-done-bionic verification-done-focal verification-done-jammy verification-done-kinetic verification-done-xenial
removed: verification-needed verification-needed-bionic verification-needed-focal verification-needed-jammy verification-needed-kinetic verification-needed-xenial
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-notifier - 3.192.59.1

---------------
update-notifier (3.192.59.1) kinetic; urgency=medium

  * Refresh the translations using a new launchpad export (lp: #1999567)

 -- Sebastien Bacher <email address hidden> Thu, 15 Dec 2022 10:17:15 +0100

Changed in update-notifier (Ubuntu Kinetic):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for update-notifier has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-notifier - 3.192.54.3

---------------
update-notifier (3.192.54.3) jammy; urgency=medium

  * po/*.po:
    - bring translations from launchpad (LP: #1999567)
    - update translation files with intltool-update -r

update-notifier (3.192.54.2) jammy; urgency=medium

  * data/apt_check.py
    - Modify ua status call to pro status (LP: #1991030)
    - Fix pyflakes autopkgtest errors

update-notifier (3.192.54.1) jammy; urgency=medium

  * Update the ESM service name and description for the apt_check.py script
    (LP: #1980368).

 -- Lucas Moura <email address hidden> Tue, 13 Dec 2022 16:43:59 -0300

Changed in update-notifier (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-notifier - 3.192.30.14

---------------
update-notifier (3.192.30.14) focal; urgency=medium

  * po/*.po:
    - bring translations from launchpad (LP: #1999567)
    - update translation files with intltool-update -r

update-notifier (3.192.30.13) focal; urgency=medium

  * data/apt_check.py:
    - Modify ua status call to pro status (LP: #1991030)
    - Fix pyflakes autopkgtest errors

update-notifier (3.192.30.12) focal; urgency=medium

  * Update the ESM service name and description for the apt_check.py script
    (LP: #1980368).

 -- Lucas Moura <email address hidden> Thu, 08 Dec 2022 17:00:40 -0300

Changed in update-notifier (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-notifier - 3.192.1.15

---------------
update-notifier (3.192.1.15) bionic; urgency=medium

  * po/*.po:
    - bring translations from launchpad (LP: #1999567)
    - update translation files with intltool-update -r

update-notifier (3.192.1.14) bionic; urgency=medium

  * data/apt_check.py:
    - Modify ua status call to pro status (LP: #1991030)
    - Fix pyflakes autopkgtest errors

update-notifier (3.192.1.13) bionic; urgency=medium

  * Update the ESM service name and description for the apt_check.py script
    (LP: #1980368).

 -- Lucas Moura <email address hidden> Fri, 09 Dec 2022 11:42:24 -0300

Changed in update-notifier (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-notifier - 3.168.18

---------------
update-notifier (3.168.18) xenial; urgency=medium

  * po/*.po:
    - bring translations from launchpad (LP: #1999567)
    - update translation files with intltool-update -r

update-notifier (3.168.17) xenial; urgency=medium

  * data/apt_check.py:
    - Modify ua status call to pro status (LP: #1991030)
    - Fix pyflakes autopkgtest errors

update-notifier (3.168.16) xenial; urgency=medium

  * Update the ESM service name and description for the apt_check.py script
    (LP: #1980368).

 -- Lucas Moura <email address hidden> Mon, 12 Dec 2022 10:13:57 -0300

Changed in update-notifier (Ubuntu Xenial):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.