KConfig <-> KLocale problem

Carsten Pfeiffer carpdjih at sp.zrz.tu-berlin.de
Tue Apr 9 13:46:24 BST 2002


Hiya,

currently, KConfig doesn't read translated entries from some configfiles. See 
e.g. http://bugs.kde.org/db/39/39990.html (klipper's actions appear 
untranslated, although they are translated in the configfile).

The problem is the following chain:

KApplication::init() -> 
KGlobal::locale() -> 
KLocale::initInstance() -> 
KLocale() -> 
KInstance::config() ->
KConfig() ->
KConfig::reparseConfiguration()
KConfigBase::parseConfigFiles()

In parseConfigFiles(), KGlobal::_locale is still 0L, as KLocale's c'tor isn't 
finished yet. So KConfig reads the files, taking only untranslated entries 
into account.

Here's a patch that causes a reparsing after the language is set. 

Or maybe KConfigINIBackEnd::parseConfigFiles() should try to read the language 
settings before parsing everything else.

Cheers
Carsten Pfeiffer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: text/x-diff
Size: 1738 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20020409/34e81bef/attachment.diff>


More information about the kde-core-devel mailing list