[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    AW: KConfig not reading translated entries
From:       "Nhuh Put" <nhuh.put () web ! de>
Date:       2007-09-27 20:08:59
Message-ID: 001b01c80142$3edd29d0$3301a8c0 () spika
[Download RAW message or body]

> Von: Mauricio Piacentini
> Gesendet: Donnerstag, 27. September 2007 18:27
> An: kde-core-devel@kde.org; KDE games development
> Betreff: Re: KConfig not reading translated entries
> 
>  >Just to complement, while the example that Albert posted uses
>  >setLocale() explicitally, the bug can also be reproduced without it.
> In >other words, unstranslated strings would be returned as well when
>  >KDE_LANG is set for example. Not sure if the patch attached covers
> this >case as well.
> 
> After a whole morning of debugging and the patch committed earliear
> today, the case where the client application calls
> 
> configobj->setLocale("x-test")
> 
> works. However, if I do
> 
> KDE_LANG=xtest testapp
> 
> Then en_US is assumed to be the locale, and no translated test returns.
> I could not find a way to make .desktop files return translated entries
> that respect KDE_LANG.
> 
> Regards,
> Mauricio Piacentini

The reason for this is rather simple:
The test is not translated into "x-test". KLocale checks whether an
application is translated into a language before enabling it. So, if your
application is not translated into KDE_LANG, "en_US" is used as the
fallback.
Check the output of KGlobal::locale()->language().
For a reason for this behaviour, look at KLocalePrivate::setLanguage in
klocale.cpp.

	PutHuhn


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic