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

List:       kde-core-devel
Subject:    KConfig not reading translated entries
From:       Albert Astals Cid <aacid () kde ! org>
Date:       2007-09-26 22:01:41
Message-ID: 200709270001.42308.aacid () kde ! org
[Download RAW message or body]

Hi, today in kdegames we realized that KConfig seems not to read localized 
entries from .desktop files.

That is quite critical in my opinion. (Not kdegames failing but kdelibs not 
handling translations correctly)

I'm attaching a code and a .desktop file that according to what we understand 
from the API should give me the localized version although i get the original 
one.

Is there anyone with enough KConfig knowledge to have a look at this?

Albert

P.S: Of course if you want to test, you have to change the path to the desktop 
file in main.cpp

["main.cpp" (text/x-c++src)]

#include <kaboutdata.h>
#include <kapplication.h>
#include <kcmdlineargs.h>
#include <kconfig.h>

int main(int argc, char **argv)
{
    KAboutData aboutData("test", 0, ki18n("test"),
            "", ki18n("test"), KAboutData::License_GPL);
    KCmdLineArgs::init(argc, argv, &aboutData);
    KApplication app;
    
    KConfig c("/home/kdesvn/bugs/kconfig/test.desktop", KConfig::OnlyLocal);
    c.setGroup("Test");
    c.setLocale("ca");
    qDebug() << c.readEntry("Name");
}

["test.desktop" (application/x-desktop)]

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

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