[Bug 1999567] Re: [SRU] Bring translations from launchpad

Lucas Albuquerque Medeiros de Moura 1999567 at bugs.launchpad.net
Tue Jan 17 12:58:56 UTC 2023


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

** Attachment added: "update-notifier-test-results.tar.xz"
   https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/1999567/+attachment/5641945/+files/update-notifier-test-results.tar.xz

** Tags removed: verification-needed verification-needed-bionic verification-needed-focal verification-needed-jammy verification-needed-kinetic verification-needed-xenial
** Tags added: verification-done verification-done-bionic verification-done-focal verification-done-jammy verification-done-kinetic verification-done-xenial

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to update-notifier in Ubuntu.
https://bugs.launchpad.net/bugs/1999567

Title:
  [SRU] Bring translations from launchpad

Status in update-notifier package in Ubuntu:
  Fix Released
Status in update-notifier source package in Xenial:
  Fix Committed
Status in update-notifier source package in Bionic:
  Fix Committed
Status in update-notifier source package in Focal:
  Fix Committed
Status in update-notifier source package in Jammy:
  Fix Committed
Status in update-notifier source package in Kinetic:
  Fix Committed

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/1999567/+subscriptions




More information about the foundations-bugs mailing list