[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

PackageKit, localisation and koji



RPM spec files are rarely localised. This doesn't matter much if you
speak English, but really sucks if you don't. We can't add all
translations to all the packages in the world, but we can do our best to
be clever:

http://people.freedesktop.org/~hughsient/temp/pk-application-extra.png

This is with my locale set to "en_GB" and the libpackagekit results
hardcoded to "fr" - the two will match up eventually of course.

There's new functionality in libpackagekit that lets you query (as a
user) a small cached sqlite repository containing all the localisations
and icon names. The data from this is populated per system
(as root) from a few information sources:

* All the installed desktop files in /usr/share/applications (this works
now)
* Metadata from the online desktop project (to get things like
popularity, WIP)
* Information about non-installed packages generated from the distro
builder (WIP)

I don't think caching the installed icons and shipping them separately
is a good idea, just from a size point of view.

The sqlite database is currently at 200kb in size with over 200
applications installed (i.e. things that ship desktop files) so I'm
guessing it would be few Mb with the entire distro repository of
information in and the online desktop stuff.

Updating the offline repo would be left to the distro packager, as of
course, this stuff is all per-distribution.

Now, for the difficult request. Would it be possible for koji (or some
other tool) to copy the all the compiled .desktop files into a random
directory somewhere after a successful build? In this way PackageKit
will get translations for applications that are not yet installed, and
PackageKit can have the sqlite database populated by an extra
sub-package.

The information has to come from koji, rather than operate on .srpm
files directly, as many applications have to merge a .desktop.in file
with a .po file into a .desktop file. Something like this is what is
going to be done for conary on foresight linux.

I appreciate this would be a pretty giant hack, but there's no way I
could do an "everything" install on every package in fedora just to get
at the desktop files. Ideas welcome.

Richard.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]