KConfig <-> KLocale problem

Stephan Kulow coolo at kde.org
Tue Apr 9 16:34:44 BST 2002


On Tuesday 09 April 2002 14:46, Carsten Pfeiffer wrote:
> 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.

A complete reparsing sounds like a perfect performance killer. It used to
work just fine, don't know when it was broken ;(

I don't like your patch, but I don't know a better solution off head either.

Greetings, Stephan





More information about the kde-core-devel mailing list