Bug 18674

Summary: pkcon doesn't use translations at all
Product: PackageKit Reporter: Ville-Pekka Vainio <vpivaini>
Component: client-libraryAssignee: Richard Hughes <richard>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
i915 platform: i915 features:
Attachments: fixes issue for me

Description Ville-Pekka Vainio 2008-11-23 03:35:54 UTC
I noticed pkcon doesn't use its translations at all. I have translated packagekit's fi.po completely, but pkcon doesn't display any of the messages in Finnish on a system with the Finnish locale set.

I haven't looked at the code yet at all (I won't have time to in the next few days) but by doing strace it seems pkcon never even reads anything from /usr/share/locale/*/LC_MESSAGES/

An example:

$ pkcon install foo
Command failed:  The package 'foo' could not be installed: The package could not be found

Should be translated but is not.

$ strace pkcon install foo 2>&1|grep LC_MESSAGES

Returns nothing.

But if we look at gnome-packagekit:

strace gpk-log 2>&1|grep LC_MESSAGES

Returns multiple lines, one of which is 

open("/usr/share/locale/fi/LC_MESSAGES/gnome-packagekit.mo", O_RDONLY) = 3

This is how it should work in pkcon too.
Comment 1 Richard Hughes 2008-11-23 09:21:07 UTC
Created attachment 20523 [details] [review]
fixes issue for me

I've applied this fix, which fixes the problem for me -- thanks for reporting.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.