author | zautrix <zautrix> | 2005-01-18 22:46:53 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-18 22:46:53 (UTC) |
commit | bfb2947510c52f9c6b35c35786490f261adf30e3 (patch) (side-by-side diff) | |
tree | 63b0efc7fcfb7715cf99cf8d8594ec5278926a77 /microkde | |
parent | 7200aeadd415cf88b909c00d1414f212cf85b3df (diff) | |
download | kdepimpi-bfb2947510c52f9c6b35c35786490f261adf30e3.zip kdepimpi-bfb2947510c52f9c6b35c35786490f261adf30e3.tar.gz kdepimpi-bfb2947510c52f9c6b35c35786490f261adf30e3.tar.bz2 |
another fix
-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 7f31ab1..aec74fa 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 ; } |