forked from qt-creator/qt-creator
QmlJS: Tr::Tr
Excluding the Qml parser, which needs to remain in sync with it's copy in Qt. Change-Id: I22f475f265dd74687e3239c4d6916c777798a447 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -4,11 +4,13 @@
|
||||
#include "qmljslink.h"
|
||||
|
||||
#include "parser/qmljsast_p.h"
|
||||
#include "qmljsdocument.h"
|
||||
|
||||
#include "qmljsbind.h"
|
||||
#include "qmljsutils.h"
|
||||
#include "qmljsmodelmanagerinterface.h"
|
||||
#include "qmljsconstants.h"
|
||||
#include "qmljsdocument.h"
|
||||
#include "qmljsmodelmanagerinterface.h"
|
||||
#include "qmljstr.h"
|
||||
#include "qmljsutils.h"
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/filepath.h>
|
||||
@@ -293,7 +295,7 @@ void LinkPrivate::populateImportedTypes(Imports *imports, const Document::Ptr &d
|
||||
imports->setImportFailed();
|
||||
if (info.ast()) {
|
||||
error(doc, info.ast()->fileNameToken,
|
||||
Link::tr("File or directory not found."));
|
||||
Tr::tr("File or directory not found."));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -455,7 +457,7 @@ Import LinkPrivate::importNonFile(const Document::Ptr &doc, const ImportInfo &im
|
||||
error(doc,
|
||||
locationFromRange(importInfo.ast()->firstSourceLocation(),
|
||||
importInfo.ast()->lastSourceLocation()),
|
||||
Link::tr(
|
||||
Tr::tr(
|
||||
"QML module not found (%1).\n\n"
|
||||
"Import paths:\n"
|
||||
"%2\n\n"
|
||||
@@ -525,19 +527,19 @@ bool LinkPrivate::importLibrary(const Document::Ptr &doc,
|
||||
if (!(optional || (toImport.flags & QmlDirParser::Import::Optional))) {
|
||||
error(doc,
|
||||
errorLoc,
|
||||
Link::tr("Implicit import '%1' of QML module '%2' not found.\n\n"
|
||||
"Import paths:\n"
|
||||
"%3\n\n"
|
||||
"For qmake projects, use the QML_IMPORT_PATH variable to add import "
|
||||
"paths.\n"
|
||||
"For Qbs projects, declare and set a qmlImportPaths property in "
|
||||
"your product "
|
||||
"to add import paths.\n"
|
||||
"For qmlproject projects, use the importPaths property to add "
|
||||
"import paths.\n"
|
||||
"For CMake projects, make sure QML_IMPORT_PATH variable is in "
|
||||
"CMakeCache.txt.\n")
|
||||
.arg(importName,
|
||||
Tr::tr("Implicit import '%1' of QML module '%2' not found.\n\n"
|
||||
"Import paths:\n"
|
||||
"%3\n\n"
|
||||
"For qmake projects, use the QML_IMPORT_PATH variable to add import "
|
||||
"paths.\n"
|
||||
"For Qbs projects, declare and set a qmlImportPaths property in "
|
||||
"your product "
|
||||
"to add import paths.\n"
|
||||
"For qmlproject projects, use the importPaths property to add "
|
||||
"import paths.\n"
|
||||
"For CMake projects, make sure QML_IMPORT_PATH variable is in "
|
||||
"CMakeCache.txt.\n")
|
||||
.arg(importName,
|
||||
importInfo.name(),
|
||||
Utils::transform(m_importPaths, [](const Utils::FilePath &p) {
|
||||
return p.toString();
|
||||
@@ -569,8 +571,9 @@ bool LinkPrivate::importLibrary(const Document::Ptr &doc,
|
||||
if (!optional && errorLoc.isValid()) {
|
||||
appendDiagnostic(doc, DiagnosticMessage(
|
||||
Severity::ReadingTypeInfoWarning, errorLoc,
|
||||
Link::tr("QML module contains C++ plugins, "
|
||||
"currently reading type information... %1").arg(import->info.name())));
|
||||
Tr::tr("QML module contains C++ plugins, "
|
||||
"currently reading type information... %1")
|
||||
.arg(import->info.name())));
|
||||
import->valid = false;
|
||||
}
|
||||
} else if (libraryInfo.pluginTypeInfoStatus() == LibraryInfo::DumpError
|
||||
|
||||
Reference in New Issue
Block a user