1 --- qt-copy/src/corelib/codecs/qtextcodec.cpp.orig 2005-05-13 16:34:37.000000000 +0200
2 +++ qt-copy/src/corelib/codecs/qtextcodec.cpp 2005-05-13 19:55:18.876291072 +0200
4 lang = qstrdup(qgetenv("LANG"));
7 + QString lang_s (lang);
9 + QFile * plik = new QFile("/usr/share/locale/locale.alias");
10 + if (plik->open(QIODevice::ReadOnly))
12 + QTextStream stream(plik);
14 + while (!stream.atEnd()) {
15 + line = stream.readLine();
16 + if (!line.startsWith("#") && ( line.left(line.indexOf(QChar('t'))) == lang_s.toLower() ) )
18 + if (lang) delete [] lang;
19 + lang = qstrdup((line.mid(line.lastIndexOf(QChar('t')))).ascii());
24 + if (plik) delete plik;
27 // Now try these in order:
28 // 1. CODESET from ctype if it contains a .CODESET part (e.g. en_US.ISO8859-15)
29 // 2. CODESET from lang if it contains a .CODESET part
30 --- qt-copy/tools/assistant/main.cpp.orig 2005-05-13 16:39:06.000000000 +0200
31 +++ qt-copy/tools/assistant/main.cpp 2005-05-13 19:58:41.956418200 +0200
33 resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
35 QTranslator translator( 0 );
36 - translator.load( QLatin1String("assistant_") + QLocale::system().name().toLower(), resourceDir );
37 + translator.load( QLatin1String("assistant"), resourceDir + QLatin1String("/") + QLatin1String(QTextCodec::locale()) + QLatin1String("/LC_MESSAGES") );
38 a.installTranslator( &translator );
40 QTranslator qtTranslator( 0 );
41 - qtTranslator.load( QLatin1String("qt_") + QLocale::system().name().toLower(), resourceDir );
42 + qtTranslator.load( QLatin1String("qt"), resourceDir + QLatin1String("/") + QLatin1String(QTextCodec::locale()) + QLatin1String("/LC_MESSAGES") );
43 a.installTranslator( &qtTranslator );
45 Config *conf = Config::loadConfig( profileName );