1 --- qt-x11-preview-4.0.0-tp1/src/core/codecs/qtextcodec.cpp.orig 2004-07-08 11:14:42.000000000 +0200
2 +++ qt-x11-preview-4.0.0-tp1/src/core/codecs/qtextcodec.cpp 2004-07-14 13:30:02.957937568 +0200
3 @@ -2630,14 +2630,35 @@
4 // Get the first nonempty value from $LC_ALL, $LC_CTYPE, and $LANG
5 // environment variables.
6 char * lang = qstrdup(getenv("LC_ALL"));
7 - if (!lang || lang[0] == 0 || strcmp(lang, "C") == 0) {
8 + if (!lang || lang[0] == 0 ) {
9 if (lang) delete [] lang;
10 lang = qstrdup(getenv("LC_CTYPE"));
12 - if (!lang || lang[0] == 0 || strcmp(lang, "C") == 0) {
13 + if (!lang || lang[0] == 0 ) {
14 if (lang) delete [] lang;
15 lang = qstrdup(getenv("LANG"));
17 + QString lang_s (lang);
19 + QFile * plik = new QFile("/usr/share/locale/locale.alias");
20 + if (plik->open(QIODevice::ReadOnly))
22 + QTextStream stream(plik);
25 + while (!stream.atEnd()) {
26 + line = stream.readLine();
27 + if (!line.startsWith("#") && ( line.left(line.indexOf(QChar('t'))) == lang_s.toLower() ) )
29 + if (lang) delete [] lang;
30 + lang = qstrdup((line.mid(line.lastIndexOf(QChar('t')))).ascii());
35 + if (plik) delete plik;
39 // Now try these in order:
40 // 1. CODESET from ctype if it contains a .CODESET part (e.g. en_US.ISO8859-15)
41 --- qt-x11-preview-4.0.0-tp1/tools/assistant/main.cpp.orig 2004-07-08 11:14:30.000000000 +0200
42 +++ qt-x11-preview-4.0.0-tp1/tools/assistant/main.cpp 2004-07-13 22:14:09.000000000 +0200
44 resourceDir = QFile::decodeName(qInstallPathTranslations());
46 QTranslator translator( 0 );
47 - translator.load( QLatin1String("assistant_") + QLatin1String(QTextCodec::locale()), resourceDir );
48 + translator.load( QLatin1String("assistant"), resourceDir + QLatin1String("/") + QLatin1String(QTextCodec::locale()) + QLatin1String("/LC_MESSAGES") );
49 a.installTranslator( &translator );
51 QTranslator qtTranslator( 0 );
52 - qtTranslator.load( QLatin1String("qt_") + QLatin1String(QTextCodec::locale()), resourceDir );
53 + qtTranslator.load( QLatin1String("qt"), resourceDir + QLatin1String("/") + QLatin1String(QTextCodec::locale()) + QLatin1String("/LC_MESSAGES") );
54 a.installTranslator( &qtTranslator );
56 Config *conf = Config::loadConfig( profileName );