forked from qt-creator/qt-creator
tr()-Fixes
This commit is contained in:
@@ -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()));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user