]> git.pld-linux.org Git - packages/qt4.git/blob - qt4-locale.patch
- merged make_use_of_locale, updated for qt4, only assistant for now
[packages/qt4.git] / qt4-locale.patch
1 --- qt-x11-preview-4.0.0-tp1/tools/assistant/main.cpp.orig      2004-07-08 11:14:30.000000000 +0200
2 +++ qt-x11-preview-4.0.0-tp1/tools/assistant/main.cpp   2004-07-13 22:14:09.707927256 +0200
3 @@ -254,11 +254,11 @@
4          resourceDir = QFile::decodeName(qInstallPathTranslations());
5  
6      QTranslator translator( 0 );
7 -    translator.load( QLatin1String("assistant_") + QLatin1String(QTextCodec::locale()), resourceDir );
8 +    translator.load( QLatin1String("assistant"), resourceDir + QLatin1String("/") + QLatin1String(QTextCodec::locale()) + QLatin1String("/LC_MESSAGES") );
9      a.installTranslator( &translator );
10  
11      QTranslator qtTranslator( 0 );
12 -    qtTranslator.load( QLatin1String("qt_") + QLatin1String(QTextCodec::locale()), resourceDir );
13 +    qtTranslator.load( QLatin1String("qt"), resourceDir + QLatin1String("/") + QLatin1String(QTextCodec::locale()) + QLatin1String("/LC_MESSAGES") );
14      a.installTranslator( &qtTranslator );
15  
16      Config *conf = Config::loadConfig( profileName );
17 --- qt-x11-preview-4.0.0-tp1/src/core/tools/qlocale.cpp.orig    2004-07-08 11:14:43.000000000 +0200
18 +++ qt-x11-preview-4.0.0-tp1/src/core/tools/qlocale.cpp 2004-07-13 22:22:00.160407608 +0200
19 @@ -1629,7 +1629,15 @@
20  const char* QLocalePrivate::systemLocaleName()
21  {
22      static QByteArray lang;
23 -    lang = getenv("LANG");
24 +    lang = getenv( "LC_ALL" );
25 +    if ( lang.isEmpty() )
26 +    {
27 +           lang = getenv( "LC_MESSAGES" );
28 +    }
29 +    if ( lang.isEmpty() )
30 +    {
31 +           lang = getenv( "LANG" );
32 +    }
33  
34  #if !defined(QWS) && defined(Q_OS_MAC)
35      if (!lang.isEmpty())
36 --- qt-x11-preview-4.0.0-tp1/src/core/codecs/qtextcodec.cpp.orig        2004-07-08 11:14:42.000000000 +0200
37 +++ qt-x11-preview-4.0.0-tp1/src/core/codecs/qtextcodec.cpp     2004-07-13 22:22:35.636014496 +0200
38 @@ -2630,11 +2630,11 @@
39          // Get the first nonempty value from $LC_ALL, $LC_CTYPE, and $LANG
40          // environment variables.
41          char * lang = qstrdup(getenv("LC_ALL"));
42 -        if (!lang || lang[0] == 0 || strcmp(lang, "C") == 0) {
43 +        if (!lang || lang[0] == 0 ) {
44              if (lang) delete [] lang;
45              lang = qstrdup(getenv("LC_CTYPE"));
46          }
47 -        if (!lang || lang[0] == 0 || strcmp(lang, "C") == 0) {
48 +        if (!lang || lang[0] == 0 ) == 0) {
49              if (lang) delete [] lang;
50              lang = qstrdup(getenv("LANG"));
51          }
This page took 0.050972 seconds and 4 git commands to generate.