Bug 504483

Summary: intltool does not extract translations from .ui files properly
Product: [Fedora] Fedora Reporter: Ville-Pekka Vainio <vpvainio>
Component: intltoolAssignee: Matthias Clasen <mclasen>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: mclasen, pnemade, rhughes, richard
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-06-28 12:49:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 446451    

Description Ville-Pekka Vainio 2009-06-07 12:10:07 UTC
Description of problem:
I'm using gnome-packagekit in Finnish. Lots of translations which are in the po/mo file are missing from the UIs of the gpk applications.

$ rpm -q gnome-packagekit
gnome-packagekit-2.27.2-1.fc11.i586 (This is from updates-testing)

$ msgunfmt /usr/share/locale/fi/LC_MESSAGES/gnome-packagekit.mo > gpk.fi.po

$ msgfmt -cvo /dev/null gpk.fi.po 
722 translated messages.

This shows the Finnish translation in the package is complete and has no formatting errors. However, when I start the different gpk applications, many messages are in English. Some screenshots:

http://vpv.fedorapeople.org/misc/gpk-translations/gpk-application.png
The menus are almost completely in English (the parts which are in Finnish probably come from GTK or somewhere else than gpk)

http://vpv.fedorapeople.org/misc/gpk-translations/gpk-log.png
"Filter" in English

http://vpv.fedorapeople.org/misc/gpk-translations/gpk-prefs.png
Most messages in English

http://vpv.fedorapeople.org/misc/gpk-translations/gpk-repo.png
"Show debug..." in English

http://vpv.fedorapeople.org/misc/gpk-translations/gpk-update-viewer.png
"Software updates..." in English

How reproducible:
Always

Steps to Reproduce:
1. Start any gpk app with the fi_FI.utf8 locale
  
Actual results:
Many messages untranslated

Expected results:
Every message provided in the fi.po file should be shown in Finnish in the UI

Comment 1 Richard Hughes 2009-06-07 16:11:56 UTC
In po/

[hughsie@localhost po]$ INTLTOOL_EXTRACT=/usr/bin/intltool-extract srcdir=. /usr/bin/intltool-update --gettext-package gnome-packagekit --headers --verbose
Wrote ../data/gnome-packagekit.schemas.in.h
Wrote ../data/gpk-application.desktop.in.h
Wrote ../data/gpk-application.ui.h
Wrote ../data/gpk-backend-status.ui.h
Wrote ../data/gpk-client.ui.h
Wrote ../data/gpk-error.ui.h
Wrote ../data/gpk-eula.ui.h
Wrote ../data/gpk-install-catalog.desktop.in.h
...

But all these files have zero size, and thus none of the translations get added to the pot file. :-(

Comment 2 Matthias Clasen 2009-06-11 20:11:13 UTC
intltool thinks .ui files are bonobo ui descriptions...

Comment 3 Richard Hughes 2009-06-12 08:43:03 UTC
By adding [type: gettext/glade] prefix to the .ui files in POTFILES.in I can get them to be recognised as translatable. I've added this bodge in git until intltool is fixed. Can you verify the translations are now present please? Thanks.

Comment 4 Ville-Pekka Vainio 2009-06-13 05:28:09 UTC
(In reply to comment #3)
> Can you verify the translations are now present please?

I don't think all of them are. I haven't tried installing a compiled gnome-packagekit, but if I take a current git clone, run autogen.sh, go to the po directory, run refresh.sh, some of these messages still don't show up in the pot file.

- The gpk-prefs messages seem to be there. 
- The gpk-application menu messages *seem to be missing*.
- The description in gpk-update-viewer *seems to be missing*.
- The Filter button text in gpk-log seems to be there.
- The Show debug message in gpk-repo seems to be there.

Comment 5 Ville-Pekka Vainio 2009-06-13 07:29:09 UTC
I decided to build and install an rpm of the latest git source. The results are different that what I got in Comment #4, maybe I missed some gnome-magic there, so you can probably disregard that comment. Here are the results of actually running the apps:

http://vpv.fedorapeople.org/misc/gpk-translations/try2/gpk-application.png
Still many of the actual menu items are not translated, the "menu headers" are this time, though. The Järjestelmä (System) menu has both gpk related items in English, the Quit item is in Finnish, that probably comes from GTK. Also the Ohje (Help) menu item Contents is in English.

Looking at http://l10n.gnome.org/POT/gnome-packagekit.master/gnome-packagekit.master.pot the missing translations such as "Project homepage", "Run program", etc. (basically the whole Selection menu) aren't in the pot file.

gpk-{log,repo,update-viewer,prefs} seem to be ok now, it's getting better, thanks :)

Comment 6 Ville-Pekka Vainio 2009-06-18 08:39:09 UTC
Richard: I think the remaining issue with gpk-application's menu entries not being translatable has something to do with the change to GtkBuilder and it's not related to intltool. Should I make another bug report about it?

Comment 7 Ville-Pekka Vainio 2009-07-03 18:28:29 UTC
Richard: Could you comment on what I wrote in comment #6? I built latest git today and the menus in gpk-application still can't be translated (don't end up into the po(t) file).

Comment 8 Matthias Clasen 2009-07-03 18:39:56 UTC
I think the intltool bugs here in b.g.o are dead, now that dobey took his toys to launchpad...

Comment 9 Matthias Clasen 2009-07-03 18:40:45 UTC
Sorry, ignore that last comment, I had momentary bugzilla confusion :-)

Comment 10 Parag Nemade 2010-04-05 09:43:37 UTC
Is there any updates here? Just want to know if its still possible to extract messages from .ui files or not yet?

Comment 11 Ville-Pekka Vainio 2010-04-05 10:27:15 UTC
I haven't seen translations problems as bad as I originally described in a while with gnome-packagekit. Based on Comment 3 maybe Richard would be the right person to answer this question, though.

Comment 12 Bug Zapper 2010-04-27 14:41:18 UTC
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 13 Bug Zapper 2010-06-28 12:49:30 UTC
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.