On Tue, Oct 23, 2012 at 4:09 PM, Zeeshan Ali (Khattak) <zeeshanak@xxxxxxxxx> wrote: > On Tue, Oct 23, 2012 at 10:58 AM, Christophe Fergeau > <cfergeau@xxxxxxxxxx> wrote: >> On Tue, Oct 23, 2012 at 04:54:53AM +0300, Zeeshan Ali (Khattak) wrote: >>> From: "Zeeshan Ali (Khattak)" <zeeshanak@xxxxxxxxx> >>> >>> Use the localized values of entity params if available. >>> --- >>> osinfo/osinfo_loader.c | 3 ++- >>> 1 file changed, 2 insertions(+), 1 deletion(-) >>> >>> diff --git a/osinfo/osinfo_loader.c b/osinfo/osinfo_loader.c >>> index 47db85b..88de701 100644 >>> --- a/osinfo/osinfo_loader.c >>> +++ b/osinfo/osinfo_loader.c >>> @@ -232,7 +232,8 @@ static void osinfo_loader_entity(OsinfoLoader *loader, >>> return; >>> >>> if (value) { >>> - osinfo_entity_set_param(entity, keys[i], value); >>> + const gchar *local_value = g_dgettext(GETTEXT_PACKAGE, value); >>> + osinfo_entity_set_param(entity, keys[i], local_value); >> >> We want to check some 'is_translatable' marker, otherwise if a >> non-translatable string is present in the database and has the same value >> as a translatable string, then we'll get a translation for it. > > Given that only strings that we explicitly ask to be translated (using > _ and *gettext) in the code will be translated, is that going to be a > problem? A sip more of the coffee, I realize that the answer is 'yes' since we wont then have any means to not translate a particular string in a particular context *in the XML*. -- Regards, Zeeshan Ali (Khattak) FSF member#5124