author | zautrix <zautrix> | 2005-01-18 21:15:17 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-18 21:15:17 (UTC) |
commit | 7200aeadd415cf88b909c00d1414f212cf85b3df (patch) (side-by-side diff) | |
tree | 2626afd67e4db3ce2ae5995857ef3221f59603e0 /microkde | |
parent | c8401418d054bf32810a5f9e07091a177bdeae37 (diff) | |
download | kdepimpi-7200aeadd415cf88b909c00d1414f212cf85b3df.zip kdepimpi-7200aeadd415cf88b909c00d1414f212cf85b3df.tar.gz kdepimpi-7200aeadd415cf88b909c00d1414f212cf85b3df.tar.bz2 |
fixes
-rw-r--r-- | microkde/kdecore/klocale.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/microkde/kdecore/klocale.cpp b/microkde/kdecore/klocale.cpp index aec74fa..7f31ab1 100644 --- a/microkde/kdecore/klocale.cpp +++ b/microkde/kdecore/klocale.cpp @@ -1,75 +1,75 @@ #include <qregexp.h> #include <qapplication.h> #include "kdebug.h" #include "kcalendarsystemgregorian.h" #include "klocale.h" #include <qstringlist.h> -#define COLLECT_TRANSLATION +//#define COLLECT_TRANSLATION QDict<QString> *mLocaleDict = 0; void setLocaleDict( QDict<QString> * dict ) { mLocaleDict = dict; } #ifdef COLLECT_TRANSLATION QStringList missingTrans; QStringList existingTrans1; QStringList existingTrans2; void addMissing(const char *text) { QString mis ( text ); if ( !missingTrans.contains( mis ) ) missingTrans.append(mis); } void addExist(const char *text,QString trans ) { //return; QString mis ( text ); if ( !existingTrans1.contains( mis ) ) { existingTrans1.append(mis); existingTrans2.append(trans); } } #include <qfile.h> #include <qtextstream.h> #include <qtextcodec.h> #endif void dumpMissing() { #ifdef COLLECT_TRANSLATION QString fileName = "/tmp/usernewtrans.txt"; QFile file( fileName ); if (!file.open( IO_WriteOnly ) ) { return ; } QTextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); int i; for ( i = 0; i< missingTrans.count(); ++i ) { QString text = missingTrans[i].replace( QRegExp("\n"),"\\n" ); ts << "{ \""<<text<< "\",\""<< text <<"\" },\n"; } file.close(); { QString fileName = "/tmp/usertrans.txt"; QFile file( fileName ); if (!file.open( IO_WriteOnly ) ) { return ; } |