Commit 691bdc95 authored by David Kahles's avatar David Kahles

Make new user-visible messages translatable

They where introduced in 17.12 and were
not translated due to the string freeze.
parent 7df27a22
......@@ -103,7 +103,7 @@ void AuthWidget::authenticate()
d->server = new QTcpServer(this);
if (!d->server->listen(QHostAddress::LocalHost)) {
Q_EMIT error(InvalidAccount, QStringLiteral("Could not start oauth http server"));
Q_EMIT error(InvalidAccount, tr("Could not start oauth http server"));
return;
}
connect(d->server, &QTcpServer::acceptError, d, &AuthWidgetPrivate::socketError);
......
......@@ -251,7 +251,7 @@ void AuthWidgetPrivate::socketError(QAbstractSocket::SocketError socketError)
if (connection)
connection->deleteLater();
qCDebug(KGAPIDebug) << QStringLiteral("Socket error when recieving response: %1").arg(socketError);
emitError(InvalidResponse, QStringLiteral("Error recieving response: %1").arg(socketError));
emitError(InvalidResponse, tr("Error recieving response: %1").arg(socketError));
}
void AuthWidgetPrivate::socketReady()
......@@ -271,7 +271,7 @@ void AuthWidgetPrivate::socketReady()
const auto line = data.split(' ');
if (line.size() != 3 || line.at(0) != QByteArray("GET") || !line.at(2).startsWith(QByteArray("HTTP/1.1"))) {
qCDebug(KGAPIDebug) << QStringLiteral("Token response invalid");
emitError(InvalidResponse, QStringLiteral("Token response invalid"));
emitError(InvalidResponse, tr("Token response invalid"));
return;
}
......@@ -286,7 +286,7 @@ void AuthWidgetPrivate::socketReady()
qCDebug(KGAPIDebug) << error;
} else {
qCDebug(KGAPIDebug) << QStringLiteral("Could not extract token from HTTP answer");
emitError(InvalidResponse, QStringLiteral("Could not extract token from HTTP answer"));
emitError(InvalidResponse, tr("Could not extract token from HTTP answer"));
}
return;
}
......
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