[Kst] branches/work/kst/portto4/kst/src/libkst

Adam Treat treat at kde.org
Tue Jul 3 19:02:43 CEST 2007


SVN commit 682913 by treat:

* More internationalization


 M  +1 -1      kstamatrix.cpp  
 M  +9 -9      kstdebug.cpp  
 M  +1 -1      kstmatrix.cpp  
 M  +3 -3      kstrmatrix.cpp  
 M  +3 -3      kstrvector.cpp  
 M  +1 -1      kstscalar.cpp  
 M  +1 -1      kststring.cpp  
 M  +2 -2      kstvector.cpp  


--- branches/work/kst/portto4/kst/src/libkst/kstamatrix.cpp #682912:682913
@@ -76,7 +76,7 @@
             qds >> _z[i];  // stored in the same order as it was saved
           }
           if (i < in_nX*in_nY) {
-            KstDebug::self()->log(i18n("Saved matrix contains less data than it claims."), KstDebug::Warning);
+            KstDebug::self()->log(tr("Saved matrix contains less data than it claims."), KstDebug::Warning);
             resizeZ(i, false);
           }
         }
--- branches/work/kst/portto4/kst/src/libkst/kstdebug.cpp #682912:682913
@@ -118,28 +118,28 @@
 QString KstDebug::label(LogLevel level) const {
   switch (level) {
     case Notice:
-      return i18nc("log level notice", "Notice");
+      return tr("log level notice", "Notice");
     case Warning:
-      return i18nc("log level warning", "Warning");
+      return tr("log level warning", "Warning");
     case Error:
-      return i18nc("log level error", "Error");
+      return tr("log level error", "Error");
     case Debug:
-      return i18nc("log level debug", "Debug");
+      return tr("log level debug", "Debug");
     default:
-      return i18nc("log level other", "Other");
+      return tr("log level other", "Other");
   }    
 }
 
 
 QString KstDebug::text() {
   QMutexLocker ml(&_lock);
-  QString body = i18n("Kst version %1\n\n\nKst log:\n", QString::fromLatin1(KSTVERSION));
+  QString body = QString("Kst version %1\n\n\nKst log:\n").arg(QString::fromLatin1(KSTVERSION));
 
   for (int i = 0; i < _messages.count(); i++ ) {
-    body += i18nc("date leveltext: message", "%1 %2: %3\n", KGlobal::locale()->formatDateTime(_messages[i].date), label(_messages[i].level), _messages[i].msg);
+    body += QString("%1 %2: %3\n").arg(KGlobal::locale()->formatDateTime(_messages[i].date), label(_messages[i].level), _messages[i].msg);
   }
 
-  body += i18n("\n\nData-source plugins:");
+  body += tr("\n\nData-source plugins:");
   QStringList dsp = dataSourcePlugins();
   for (QStringList::ConstIterator it = dsp.begin(); it != dsp.end(); ++it) {
     body += '\n';
@@ -158,7 +158,7 @@
 
 
 void KstDebug::sendEmail() {
-  KToolInvocation::invokeMailer(QString::null, QString::null, QString::null, i18n("Kst Debugging Information"), text());
+  KToolInvocation::invokeMailer(QString::null, QString::null, QString::null, tr("Kst Debugging Information"), text());
 }
 
 
--- branches/work/kst/portto4/kst/src/libkst/kstmatrix.cpp #682912:682913
@@ -53,7 +53,7 @@
   QString _tag = in_tag.tag();
   if (!in_tag.isValid()) {
     do {
-      _tag = i18n("Anonymous Matrix %1", anonymousMatrixCounter++);
+      _tag = QString("Anonymous Matrix %1").arg(anonymousMatrixCounter++);
     } while (KstData::self()->matrixTagNameNotUnique(_tag, false));
     KstObject::setTagName(KstObjectTag(_tag, in_tag.context()));
   } else {
--- branches/work/kst/portto4/kst/src/libkst/kstrmatrix.cpp #682912:682913
@@ -208,7 +208,7 @@
   if (ok && _file) {
     _file->readLock();
     if (_file->fileType() == "ASCII") {
-      returnLabel = i18n("Column %1").arg(_field);
+      returnLabel = QString("Column %1").arg(_field);
     } else {
       returnLabel = _field;
     }
@@ -539,7 +539,7 @@
   _editable = true;
 
   if (!_file) {
-    KstDebug::self()->log(i18n("Data file for matrix %1 was not opened.", tagName()), KstDebug::Warning);
+    KstDebug::self()->log(QString("Data file for matrix %1 was not opened.").arg(tagName()), KstDebug::Warning);
   } else {
     _samplesPerFrameCache = _file->samplesPerFrame(_field);
   }
@@ -589,7 +589,7 @@
   Q_ASSERT(myLockStatus() == KstRWLock::WRITELOCKED);
 
   if (!file) {
-    KstDebug::self()->log(i18n("Data file for vector %1 was not opened.", tagName()), KstDebug::Warning);
+    KstDebug::self()->log(QString("Data file for vector %1 was not opened.").arg(tagName()), KstDebug::Warning);
   }
   _file = file;
   if (_file) {
--- branches/work/kst/portto4/kst/src/libkst/kstrvector.cpp #682912:682913
@@ -168,7 +168,7 @@
   _dirty = true;
 
   if (!in_file) {
-    KstDebug::self()->log(i18n("Data file for vector %1 was not opened.", tagName()), KstDebug::Warning);
+    KstDebug::self()->log(QString("Data file for vector %1 was not opened.").arg(tagName()), KstDebug::Warning);
   }
 }
 
@@ -215,7 +215,7 @@
   Q_ASSERT(myLockStatus() == KstRWLock::WRITELOCKED);
 
   if (!in_file) {
-    KstDebug::self()->log(i18n("Data file for vector %1 was not opened.", tagName()), KstDebug::Warning);
+    KstDebug::self()->log(QString("Data file for vector %1 was not opened.").arg(tagName()), KstDebug::Warning);
   }
   _file = in_file;
   if (_file) {
@@ -383,7 +383,7 @@
   if (ok && _file) {
     _file->readLock();
     if (_file->fileType() == "ASCII") {
-      label = i18n("Column %1", _field);
+      label = QString("Column %1").arg(_field);
     } else {
       label = _field;
     }
--- branches/work/kst/portto4/kst/src/libkst/kstscalar.cpp #682912:682913
@@ -46,7 +46,7 @@
   QString _tag = in_tag.tag();
   if (_tag.isEmpty()) {
     do {
-      _tag = i18n("Anonymous Scalar %1", iAnonymousScalarCounter++);
+      _tag = QString("Anonymous Scalar %1").arg(iAnonymousScalarCounter++);
     } while (KstData::self()->vectorTagNameNotUniqueInternal(_tag));  // FIXME: why vector?
     KstObject::setTagName(KstObjectTag(_tag, in_tag.context()));
   } else {
--- branches/work/kst/portto4/kst/src/libkst/kststring.cpp #682912:682913
@@ -29,7 +29,7 @@
   QString _tag = in_tag.tag();
   if (!in_tag.isValid()) {
     do {
-      _tag = i18n("Anonymous String %1", anonymousStringCounter++);
+      _tag = QString("Anonymous String %1").arg(anonymousStringCounter++);
     } while (KstData::self()->vectorTagNameNotUniqueInternal(_tag));  // FIXME: why vector?
     KstObject::setTagName(KstObjectTag(_tag, in_tag.context()));
   } else {
--- branches/work/kst/portto4/kst/src/libkst/kstvector.cpp #682912:682913
@@ -59,7 +59,7 @@
 
   if (!in_tag.isValid()) {
     do {
-      KstObject::setTagName(KstObjectTag(i18n("Anonymous Vector %1", anonymousVectorCounter++), in_tag.context()));
+      KstObject::setTagName(KstObjectTag(QString("Anonymous Vector %1").arg(anonymousVectorCounter++), in_tag.context()));
     } while (KstData::self()->vectorTagNameNotUnique(tagName(), false));
   } else {
     KstObject::setTagName(KST::suggestUniqueVectorTag(in_tag));
@@ -117,7 +117,7 @@
 
   if (!in_tag.isValid()) {
     do {
-      KstObject::setTagName(KstObjectTag(i18n("Anonymous Vector %1", anonymousVectorCounter++), in_tag.context()));
+      KstObject::setTagName(KstObjectTag(QString("Anonymous Vector %1").arg(anonymousVectorCounter++), in_tag.context()));
     } while (KstData::self()->vectorTagNameNotUnique(tagName(), false));
   } else {
     KstObject::setTagName(KST::suggestUniqueVectorTag(in_tag));


More information about the Kst mailing list