<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Richard Hughes wrote:
<blockquote cite="mid:1193405356.2825.18.camel@hughsie-laptop"
type="cite">
<pre wrap="">On Fri, 2007-10-26 at 15:23 +0200, Tim Lauridsen wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I have done a little thinking about what could be useful to have in the
packagekit backend API.
* get-group-list : Get a list groups found in the repositories.
To make it possible to make dynamic group view in a frontend client.
(search-group should be used to get the packages in the groups)
signals:
</pre>
</blockquote>
<pre wrap=""><!---->
We already have this; see backend_get_groups:
/**
* backend_get_groups:
*/
static void
backend_get_groups (PkBackend *backend, PkEnumList *elist)
{
g_return_if_fail (backend != NULL);
pk_enum_list_append_multiple (elist,
PK_GROUP_ENUM_ACCESSIBILITY,
PK_GROUP_ENUM_GAMES,
PK_GROUP_ENUM_SYSTEM,
-1);
}
</pre>
<blockquote type="cite">
<pre wrap="">group<tab>categoryid;groupid<tab>translated categoryname;translated
groupname<tab>translated group describtion
</pre>
</blockquote>
<pre wrap=""><!---->
We can't have any translations done by the daemon, they all have to be
enumerated types - the daemon has to be C locale, and the client
converts the enums to localised text. It's the same as what we do with
errors.
</pre>
<blockquote type="cite">
<pre wrap="">examples:
group<tab>application;editors<tab>Application;Editors<tab>"Sometimes
called text editors, these are programs that allow you to create and
edit files. These include Emacs and Vi."
</pre>
</blockquote>
<pre wrap=""><!---->
The translations can be done in pk-common-gui.c in gnome-packagekit - we
can add as many translations and enumerated values there are you like. I
don't mind making the translators work harder :-)
</pre>
</blockquote>
The problem is in yum you have dynamic Category/Groups defined in a
comps.xml file loaded from the repositories.<br>
The comps files from different repos is joined into one category/group
tree.<br>
<br>
Category1<br>
Group1<br>
Group2<br>
Category2 <br>
Group3<br>
Group4<br>
<br>
The Category/Group contains a id and a descriptive name and a
translated names & decriptions all stored in the comps.xml files.<br>
These can not easily, be mapped to the enumerated groups used by
packagekit.<br>
There translation is done in the comps files, so the backend dont need
to that translation, it just passes on the translation<br>
<br>
Tim<br>
</body>
</html>