Commit cf938262 authored by Ronan Abhamon's avatar Ronan Abhamon

fix(src/app/translator/DefaultTranslator): ignore qrc QtQuick files

parent f50be474
......@@ -92,7 +92,7 @@ App::App (int &argc, char *argv[]) : SingleApplication(argc, argv, true) {
}
App::~App () {
qInfo() << "Destroying app...";
qInfo() << QStringLiteral("Destroying app...");
}
// -----------------------------------------------------------------------------
......
......@@ -34,8 +34,12 @@ DefaultTranslator::DefaultTranslator (QObject *parent) : QTranslator(parent) {
if (info.suffix() == "qml") {
// Ignore extra selectors.
QString dir = info.absoluteDir().dirName();
if (dir == "+linux" || dir == "+mac" || dir == "+windows")
QString dir = info.absoluteDir().absolutePath();
if (dir.contains("+linux") || dir.contains("+mac") || dir.contains("+windows"))
continue;
// Ignore default imports.
if (dir.startsWith(":/QtQuick"))
continue;
QString basename = info.baseName();
......@@ -53,6 +57,9 @@ QString DefaultTranslator::translate (
const char *disambiguation,
int n
) const {
if (!context)
return QStringLiteral("");
QString translation = QTranslator::translate(context, source_text, disambiguation, n);
if (translation.length() == 0 && m_contexts.contains(context))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment