[packagekit] Res: Multiple Package installation UI

Richard Hughes hughsient at gmail.com
Tue Jul 22 08:32:56 PDT 2008

On Tue, 2008-06-03 at 17:45 -0700, mirttex85-pk at yahoo.com.br wrote:
> hi,
> well we discussed some time ago about the way that
> gnome-pk displayed the localized description of 
> some package.

cc'ing the PK list, I hope this is okay.

> So here is the result of the native package manager
> on Debian, imho this is the right way to have
> these strings localized.

Right, if the backend supports localisation, then it's only correct we
use it. rpm spec files are not normally localised (unless you count the
spectacularly crap specspo package) but I'm aware there's at least one
distro doing the Polish translations of the summary and description.

> This way we don't have to wait parsing all the .desktop files
> and the most important, packages like this one is not
> installed and i can see the sumary and descriptio on pt_BR,
> of course not all packages have the description translated
> specially the new ones...

Sure, but I'm guessing apt falls back to C locale in this case, which is

> unfortunately the apt backend doestn't uses this feature
> but i think it might be good to use the gnome or kde lang settings
> don't ask me why, for now i think that should be used the language
> chosen on the install.

Not on install, whatever language is being used by the calling session.
All the important stuff like errors are still locale agnostic, but
package summaries and descriptions are never shared between sessions, so
I think it makes sense to localise these.

I'll merge a local branch which adds a SetLocale() method when I return.
If you are using libpackagekit, then the locale will be set
automatically, and no futher action is required. If you are using the
raw DBUS interface, you'll need to call SetLocale() after you've done
GetTid() with the output of setlocale.

For backends to support this, I'm setting LANG for the spawned backends,
and doing a local SetLocale() method for the DBUS backends. It doesn't
matter if you ignore these. Other backend types can just get the locale
using pk_backend_get_locale().


More information about the PackageKit mailing list