tr()-Fixes

This commit is contained in:
Friedemann Kleint
2010-03-23 17:24:59 +01:00
parent cd4b5e24e9
commit 5dd8dfba30
5 changed files with 26 additions and 30 deletions

View File

@@ -38,6 +38,7 @@
#include <QtCore/QMetaObject>
#include <QtCore/QMetaProperty>
#include <QtCore/QXmlStreamReader>
#include <QtCore/QCoreApplication>
#include <QtCore/QDebug>
using namespace QmlJS::Interpreter;
@@ -315,7 +316,7 @@ public:
if (_xml.name() == "module")
readModule();
else
_xml.raiseError(QObject::tr("The file is not module file."));
_xml.raiseError(QCoreApplication::translate("QmlJS::Interpreter::QmlXmlReader", "The file is not module file."));
}
return !_xml.error();
@@ -327,7 +328,7 @@ public:
private:
void unexpectedElement(const QStringRef &child, const QString &parent) {
_xml.raiseError(QObject::tr("Unexpected element <%1> in <%2>").arg(child.toString(), parent));
_xml.raiseError(QCoreApplication::translate("QmlJS::Interpreter::QmlXmlReader", "Unexpected element <%1> in <%2>").arg(child.toString(), parent));
}
void ignoreAttr(const QXmlStreamAttribute &attr) {
@@ -336,11 +337,11 @@ private:
}
void invalidAttr(const QString &value, const QString &attrName, const QString &tag) {
_xml.raiseError(QObject::tr("invalid value '%1' for attribute %2 in <%3>").arg(value, attrName, tag));
_xml.raiseError(QCoreApplication::translate("QmlJS::Interpreter::QmlXmlReader", "invalid value '%1' for attribute %2 in <%3>").arg(value, attrName, tag));
}
void noValidAttr(const QString &attrName, const QString &tag) {
_xml.raiseError(QObject::tr("<%1> has no valid %2 attribute").arg(tag, attrName));
_xml.raiseError(QCoreApplication::translate("QmlJS::Interpreter::QmlXmlReader", "<%1> has no valid %2 attribute").arg(tag, attrName));
}
void readModule()
@@ -1857,7 +1858,7 @@ QStringList MetaTypeSystem::load(const QFileInfoList &xmlFiles)
}
file.close();
} else {
errorMsgs.append(QObject::tr("%1: %2").arg(xmlFile.absoluteFilePath(),
errorMsgs.append(QCoreApplication::translate("QmlJS::Interpreter::QmlXmlReader", "%1: %2").arg(xmlFile.absoluteFilePath(),
file.errorString()));
}
}