[I18N] Wrong translation domain in ui_gtk.py, some translations not shown

Bug #344704 reported by Timo Jyrinki
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
computer-janitor (Ubuntu)
Fix Released
Undecided
Adi Roiban
Nominated for Jaunty by Timo Jyrinki

Bug Description

Binary package hint: computer-janitor

Translations are now working otherwise fine, but the title and the description aren't shown correctly. The reason for this is in ui_gtk.py:

        gtk.glade.bindtextdomain("computerjanitor", locpath)
        gtk.glade.textdomain("computerjanitor")

The domain in use in the program is however computerjanitorapp. If changing the domain, the translations (which are already included in language packs) are shown.

Can be tested eg. with LANG=fi_FI.UTF-8 ./computer-janitor-gtk

Bug added to https://wiki.ubuntu.com/TranslatingUbuntu/JauntyTranslationIssues

Tags: i18n
to be removed (liw)
Changed in computer-janitor:
status: New → Confirmed
description: updated
Revision history for this message
Adi Roiban (adiroiban) wrote :

We can also work the other way round and change the domain of POT file from Launchpad.

Changed in computer-janitor (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Adi Roiban (adiroiban) wrote :

Timo can you please test again?

I have done an export and now the exported filenames/domain is 'computerjanitor.mo' :D

Changed in computer-janitor (Ubuntu):
assignee: nobody → adiroiban
status: In Progress → Fix Committed
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Hi. The problem is that some parts of the application already use computerjanitorapp.mo. So changing that breaks the other parts.

Changed in computer-janitor:
status: Fix Committed → Confirmed
Revision history for this message
Adi Roiban (adiroiban) wrote :

Ok. Then let me take a look and submit a patch...if there is not already a patch :)

Changed in computer-janitor (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Adi Roiban (adiroiban) wrote :

I have defined a single "computerjanitor" domain across all application.
This should simply the handling of gettext files.

The diff is made on : https://code.edge.launchpad.net/~systemcleaner-hackers/systemcleaner/trunk
... updtream link is somehow fuzzy :)

tags: added: i18n
Revision history for this message
Adi Roiban (adiroiban) wrote :

Can someone please take a look at this bug and commit the changes.

computer-janitor is one of the new GUI apps in Ubuntu and it's translations is very important

Changed in computer-janitor (Ubuntu):
assignee: adiroiban → ubuntu-main-sponsors
Revision history for this message
to be removed (liw) wrote :

Adi, thanks for the patch. Unfortunately, the "computerjanitor" domain is wrong, and "computerjanitorapp" is right.

I already verified this (when I marked it confirmed), but now I can't reproduce it again. One way or another, I'll get this fixed today. Sorry for the delay.

Revision history for this message
to be removed (liw) wrote :

Things seem a bit more complicated than I thought. computer-janitor code is divided into two source trees: one part is in the update-manager tree (so that u-m can use c-j plugins), and the other is in the computer-janitor tree. When I set this up, I divided things so that the u-m part used "computerjanitor" as the gettext domain, and the c-j part used "computerjanitorapp". Unfortunately, I forgot to fix the domain for the glade file.

As far as I can see, the correct fix would have been to fix the domain for the glade file to be "computerjanitorapp" too.

However, in the meanwhile, Michael changed the c-j code in u-m to use "update-manager" as the gettext domain. Also, it seems the pot files built by the buildds now use "computerjanitor". Thus, the change to computer-janitor code now also needs to be that all domains use "computerjanitor". I'll commit changes to that effect in minute.

to be removed (liw)
Changed in computer-janitor:
status: In Progress → Fix Committed
Adi Roiban (adiroiban)
Changed in computer-janitor (Ubuntu):
assignee: ubuntu-main-sponsors → adiroiban
Revision history for this message
Adi Roiban (adiroiban) wrote :

Right now in Rosetta we have set "computerjanitor" domain.

You can see it under "Template details" from here:
https://translations.edge.launchpad.net/ubuntu/jaunty/+source/computer-janitor/+pots/computerjanitor

If some part of c-j are using "update-manager" domain, just make sure those string are included in the update-manager.pot from update-manager package. We can also share stings between packages, but this is not recommended.

There is no restriction of using "computerjanitor" domain. We only need to check the domain name is unique and the string are included in the associated pot file.

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

So, if Computer Janitor is not using "computerjanitorapp" domain anymore, please change the X-Ubuntu-Gettext-Domain to "computerjanitor" in computer-janitor-gtk.desktop, in order to get the Computer Janitor menu entry correctly translated. (See bug #352770)

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

This bug was fixed in the package computer-janitor - 1.12.1-0ubuntu2

---------------
computer-janitor (1.12.1-0ubuntu2) jaunty; urgency=low

  * Fix gettext translation domain to be "computerjanitor" everywhere.
    (Closes: LP: #344704)
  * Fix NameError crash when closing an error dialog. Can't reproduce
    this, but I suspect it is some kind of weird race condition with
    threads and GTK+. (Closes: LP: #335828)
  * Fix typo on computerjanitorapp/app.py's help text for --no-act.
  * When a cruft is selected, scroll it into view after the label has
    been updated with the description. (Closes: LP: #349653)
  * plugins/unsupported_plugin.py: Don't mark as cruft stuff that has
    installed reverse dependencies. (Closes: LP: #345939)
  * data/computer-janitor.desktop.in: Use the right translation
    domain. (Closes: LP: #352770)

 -- Lars Wirzenius <email address hidden> Wed, 01 Apr 2009 17:20:45 +0300

Changed in computer-janitor (Ubuntu):
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.