[RFE] Automatically update the Ubuntu version strings in python-apt

Bug #1727470 reported by AsciiWolf
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Ubuntu Translations
Fix Released
Medium
Unassigned
python-apt (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Every time there is a new Ubuntu release, some strings need to be manually translated although the only thing that is changing is the Ubuntu version and code name. Please, consider updating these strings automatically based on a translated template. It would help many translators.

These strings are:
Ubuntu xx.yy 'Code Name'
Cdrom with Ubuntu xx.yy 'Code Name'

Tags: l10n
AsciiWolf (asciiwolf)
summary: - [RFE] Automatically update the Ubuntu version strings
+ [RFE] Automatically update the Ubuntu version strings in python-apt
Revision history for this message
AsciiWolf (asciiwolf) wrote :

Any news about this?

Revision history for this message
AsciiWolf (asciiwolf) wrote :

I didn't have time to look into the source code, but the problem is that instead of having something like "Cdrom with %s", there is a new translatable string with hardcoded version added every time a python-apt is released for a new Ubuntu version. You could probably make the "Ubuntu xx.yy 'Code Name'" string not translatable (I don't think anyone actually translates this) and use it as a part of the "Cdrom with ..." string.

Changed in ubuntu-translations:
status: New → Triaged
importance: Undecided → Medium
Changed in python-apt (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
AsciiWolf (asciiwolf) wrote :

Similar issue was just fixed in ubuntu-release-upgrader (https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1727472). It would be great if the issue could be fixed in python-apt as well.

Revision history for this message
AsciiWolf (asciiwolf) wrote :

I see that the version strings are hardcoded in data/templates/Ubuntu.info.in, for example for Ubuntu 19.10:

_Description: Ubuntu 19.10 'Eoan Ermine'

_Description: Cdrom with Ubuntu 19.10 'Eoan Ermine'

Not sure if my suggested solution from #2 could be applied on the .in file, but it would be great if this issue could be finally fixed. It is really annoying for translators to update these strings manually every time a new Ubuntu release is out.

Revision history for this message
AsciiWolf (asciiwolf) wrote :

Possible solution would be changing the "Cdrom with" part to something that can be used in most languages without a translation.

Revision history for this message
AsciiWolf (asciiwolf) wrote :

Any chance this could be improved? It is really frustrating that we have to manually translate this string every time before a new Ubuntu release.

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

I guess we could have two variables CODENAME and ??? and then you can say

Ubuntu %(CODENAME)s '%(???)s'

or like

Ubuntu %(CODENAME)s <<%(???)s>>

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

e.g. for the french:

#. Description
#: ../data/templates/Ubuntu.info.in:158
msgid "Cdrom with Ubuntu 12.04 'Precise Pangolin'"
msgstr "CD contenant Ubuntu 12.04 « Precise Pangolin »"

Revision history for this message
AsciiWolf (asciiwolf) wrote :

The example from #7 looks good to me! :-)

Revision history for this message
AsciiWolf (asciiwolf) wrote :

Julian, feel free to let me know if you need any help, for example with testing etc. It would be great if this could be fixed before Ubuntu 20.04 (or at least 20.10) is released. :-) Thanks!

Revision history for this message
Julian Andres Klode (juliank) wrote :
Changed in python-apt (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Julian Andres Klode (juliank) wrote :

Released upstream as python-apt 2.1.15

Changed in python-apt (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Julian Andres Klode (juliank) wrote :

Not syncing this, want to get the existing upload migrated first. Which is Stuck on apt-clone regression.

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

In proposed now

Changed in ubuntu-translations:
status: Triaged → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-apt - 2.1.7

---------------
python-apt (2.1.7) unstable; urgency=medium

  * SECURITY UPDATE: various memory and file descriptor leaks (LP: #1899193)
    - python/arfile.cc, python/generic.h, python/tag.cc, python/tarfile.cc:
      fix file descriptor and memory leaks
    - python/apt_instmodule.cc, python/apt_instmodule.h, python/arfile.h:
      Avoid reference cycle with control,data members in apt_inst.DebFile
      objects
    - tests/test_cve_2020_27351.py: Test cases for DebFile (others not easily
      testable)
  * Regression fixes for the updates merged too:
    - arfile.cc: Fix segmentation fault when opening fd, track lifetime correctly
      (Closes: #977000)
    - arfile: Regression: Collect file<->deb/ar reference cycles

 -- Julian Andres Klode <email address hidden> Thu, 10 Dec 2020 15:35:32 +0100

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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