Translated String (zh_TW) Not Showed within aptdaemon

Bug #690270 reported by Cheng-Chia Tseng
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Aptdaemon
Fix Released
Medium
Sebastian Heinlein
Ubuntu Translations
Invalid
Medium
Unassigned
aptdaemon (Ubuntu)
Fix Released
Medium
Martin Pitt

Bug Description

Translations were correctly exported to aptdaemon, but are not loaded for Traditional Chinese (which has already translated too).

I also used msgunfmt to convert the aptdaemon.mo in /usr/share/locale-langpack/zh_TW/LC_MESSAGES to do a recheck, the string has TRANSLATED indeed while it still shows the English string.

It has also mentioned in bug #655642, Gabor Kelemen also took a screenshot, please refer it at https://bugs.launchpad.net/aptdaemon/+bug/655642 .

Tags: aptdaemon
Revision history for this message
Cheng-Chia Tseng (zerng07) wrote :
Revision history for this message
Cheng-Chia Tseng (zerng07) wrote :

Upload the screenshot by Gabor Kelemen for you to see it directly.

Revision history for this message
David Planella (dpm) wrote :

This is really strange, the string seems to be translated in /usr/share/polkit-1/actions/org.debian.apt.policy (at least in Natty):

    <message>To install or remove software, you need to authenticate.</message>
    [...]
    <message xml:lang="zh_TW">若要安裝或移除軟體,您需要通過認證。</message>

Perhaps an encoding problem?

Cheng-Chia Tseng, what happens if you manually modify the /usr/share/polkit-1/actions/org.debian.apt.policy file and translate the "<message xml:lang="zh_TW">" line to something else? (you might need to log out of the session and log back in for the new translation to be loaded)

Changed in aptdaemon:
status: New → Incomplete
Changed in ubuntu-translations:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Cheng-Chia Tseng (zerng07) wrote :

I have changed all zh_TW strings which has "authenticate" into "Test", but they are still in English after log in again and after reboot.

It seems that aptdaemon loads the English strings for zh_TW.

Revision history for this message
Cheng-Chia Tseng (zerng07) wrote :

PS. not displaying "Test", but still the original English strings instead.

Revision history for this message
David Planella (dpm) wrote :

Oh, sorry, I forgot that now aptdaemon loads .policy translations from the .mo files, but even in that case it should have probably loaded the ones from the .policy files if present.

For the sake of completeness, Cheng-Chia Tseng, do you think you could repeat the same test, but this time modifying the translations in the aptdaemon.mo file?

You can use msgunfmt to recreate a po file from /usr/share/locale/zh_TW/LC_MESSAGES/aptdaemon.mo, modify it, use msgfmt to rebuild a .mo file and then copy it to /usr/share/locale/zh_TW/LC_MESSAGES again.

Revision history for this message
Cheng-Chia Tseng (zerng07) wrote :

I built a new aptdaemon.mo which all "authenticate" related translatoins are all turned into "test." under /usr/share/locale-langpack/zh_TW/LC_MESSAGES folder.

However, the aptdaemon still shows the original strings instead of "test.".

Revision history for this message
Robert Ancell (robert-ancell) wrote :

There are a couple of issues here.
1. The aptdaemon packaging uses Debhelper 7, so it doesn't run the langpack stuff at all
2. It does have a gettext-domain, but only for the description (not the message). This is not valid upstream behaviour as the gettext-domain is a patch in Ubuntu (not yet accepted upstream).
3. The translations are not stripped from the file, due to the langpack magic not being used

Revision history for this message
Robert Ancell (robert-ancell) wrote :

I think the correct solution is:
1. Remove gettext-domain in the .policy file from the upstream source (subscribing mvo as I think he's upstream)
2. Switch to using cdbs (subscribing mvo as he seems to be the package maintainer) or create a dh_langpacks (subscribing pitti as he said he'd look at it).

Changed in aptdaemon:
status: Incomplete → In Progress
assignee: nobody → Sebastian Heinlein (glatzor)
importance: Undecided → Medium
Revision history for this message
Martin Pitt (pitti) wrote :

As this is an increasingly important issue, I'll create a dh_langpack. See bug 735934.

Revision history for this message
Martin Pitt (pitti) wrote :

I removed the extra gettext-domain field from upstream's data/org.debian.apt.policy.in (Rober's first point).

Changed in aptdaemon:
status: In Progress → Fix Released
Changed in aptdaemon (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Martin Pitt (pitti)
Revision history for this message
Martin Pitt (pitti) wrote :

Added dh_translations support to aptdaemon packaging bzr. I tested this with zh_TW.UTF-8, works fine now.

Changed in aptdaemon (Ubuntu):
assignee: Martin Pitt (pitti) → nobody
status: In Progress → Fix Committed
Martin Pitt (pitti)
Changed in aptdaemon (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package aptdaemon - 0.41+bzr597-0ubuntu1

---------------
aptdaemon (0.41+bzr597-0ubuntu1) natty; urgency=low

  * New upstream bzr snapshot:
    - data/org.debian.apt.policy.in: Drop gettext domain field, it will be
      added during package build. (LP #690270 upstream task)
  * debian/control, debian/rules: Build with dh_translations. (LP: #690270)
 -- Martin Pitt <email address hidden> Thu, 17 Mar 2011 12:30:25 +0100

Changed in aptdaemon (Ubuntu):
status: Fix Committed → Fix Released
Changed in ubuntu-translations:
status: Triaged → Invalid
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.