[virt-tools-list] [libosinfo v3 2/4] Load localized values for entity params
Zeeshan Ali (Khattak)
zeeshanak at gnome.org
Wed Oct 24 15:39:45 UTC 2012
On Wed, Oct 24, 2012 at 5:33 PM, Christophe Fergeau <cfergeau at redhat.com> wrote:
> On Wed, Oct 24, 2012 at 12:02:29AM +0300, Zeeshan Ali (Khattak) wrote:
>> From: "Zeeshan Ali (Khattak)" <zeeshanak at gnome.org>
>>
>> Use the localized values of entity params if available.
>> ---
>> osinfo/osinfo_loader.c | 15 +++++++++++++--
>> 1 file changed, 13 insertions(+), 2 deletions(-)
>>
>> diff --git a/osinfo/osinfo_loader.c b/osinfo/osinfo_loader.c
>> index a0034f5..d592cf6 100644
>> --- a/osinfo/osinfo_loader.c
>> +++ b/osinfo/osinfo_loader.c
>> @@ -228,14 +228,25 @@ static void osinfo_loader_entity(OsinfoLoader *loader,
>>
>> /* Standard well-known keys first, allow single value only */
>> for (i = 0 ; keys[i] != NULL ; i++) {
>> - gchar *xpath = g_strdup_printf("string(./%s)", keys[i]);
>> + gboolean translatable;
>> +
>> + gchar *xpath = g_strdup_printf("string(./%s[@xml:lang])", keys[i]);
>
> If we are looking up the translation from the .mo file, there is no point
> in merging translations back into the XML file, this only makes it bigger
> (ie slower to download, slower to parse) for no good reason, so I would
> make sure that we don't get xml:lang in the xml file. I think gtkbuilder
> files look for a 'translatable' attribute on xml nodes.
Not sure how that works. Do I need to still generate XML files? How do
I tell gettext about this translatable attribute?
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
More information about the virt-tools-list
mailing list