Re: [libosinfo v2 2/4] Load localized values for entity params

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

 



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.

Christophe

Attachment: pgpNVCRVtHgI8.pgp
Description: PGP signature


[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux