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

Re: [virt-tools-list] [libosinfo v3 2/4] Load localized values for entity params



On Wed, Oct 24, 2012 at 5:33 PM, Christophe Fergeau <cfergeau redhat com> wrote:
> On Wed, Oct 24, 2012 at 12:02:29AM +0300, Zeeshan Ali (Khattak) wrote:
>> From: "Zeeshan Ali (Khattak)" <zeeshanak 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


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