aboutsummaryrefslogtreecommitdiff
path: root/src/protocols/geminiclient.cpp
diff options
context:
space:
mode:
authorOIS <mistresssilvara@hotmail.com>2021-03-16 22:48:37 +0700
committerFelix Queißner <felix@ib-queissner.de>2021-03-16 21:04:07 +0100
commit502219103193c850604110bbfe5e0c456df980bc (patch)
tree1d81b2b92f106497dd0030f442b724027820e0f3 /src/protocols/geminiclient.cpp
parentaab2b50efa1298ba8a5dd1f21f05c306ee8ea4d1 (diff)
downloadkristall-502219103193c850604110bbfe5e0c456df980bc.tar.gz
mark more strings for translation
Diffstat (limited to 'src/protocols/geminiclient.cpp')
-rw-r--r--src/protocols/geminiclient.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/protocols/geminiclient.cpp b/src/protocols/geminiclient.cpp
index 15a05f9..273ced1 100644
--- a/src/protocols/geminiclient.cpp
+++ b/src/protocols/geminiclient.cpp
@@ -173,30 +173,30 @@ void GeminiClient::socketReadyRead()
if(buffer.size() < 4) { // we allow an empty <META>
socket.close();
qDebug() << buffer;
- emit networkError(ProtocolViolation, "Line is too short for valid protocol");
+ emit networkError(ProtocolViolation, QObject::tr("Line is too short for valid protocol"));
return;
}
if(buffer.size() >= 1200)
{
- emit networkError(ProtocolViolation, "response too large!");
+ emit networkError(ProtocolViolation, QObject::tr("response too large!"));
socket.close();
}
if(buffer[buffer.size() - 1] != '\r') {
socket.close();
qDebug() << buffer;
- emit networkError(ProtocolViolation, "Line does not end with <CR> <LF>");
+ emit networkError(ProtocolViolation, QObject::tr("Line does not end with <CR> <LF>"));
return;
}
if(not isdigit(buffer[0])) {
socket.close();
qDebug() << buffer;
- emit networkError(ProtocolViolation, "First character is not a digit.");
+ emit networkError(ProtocolViolation, QObject::tr("First character is not a digit."));
return;
}
if(not isdigit(buffer[1])) {
socket.close();
qDebug() << buffer;
- emit networkError(ProtocolViolation, "Second character is not a digit.");
+ emit networkError(ProtocolViolation, QObject::tr("Second character is not a digit."));
return;
}
// TODO: Implement stricter version
@@ -204,7 +204,7 @@ void GeminiClient::socketReadyRead()
if(not isspace(buffer[2])) {
socket.close();
qDebug() << buffer;
- emit networkError(ProtocolViolation, "Third character is not a space.");
+ emit networkError(ProtocolViolation, QObject::tr("Third character is not a space."));
return;
}
@@ -247,7 +247,7 @@ void GeminiClient::socketReadyRead()
emit redirected(new_url, (secondary_code == 1));
}
else {
- emit networkError(ProtocolViolation, "Invalid URL for redirection!");
+ emit networkError(ProtocolViolation, QObject::tr("Invalid URL for redirection!"));
}
return;
}
@@ -297,7 +297,7 @@ void GeminiClient::socketReadyRead()
return;
default:
- emit networkError(ProtocolViolation, "Unspecified status code used!");
+ emit networkError(ProtocolViolation, QObject::tr("Unspecified status code used!"));
return;
}
@@ -306,7 +306,7 @@ void GeminiClient::socketReadyRead()
}
if((buffer.size() + response.size()) >= 1200)
{
- emit networkError(ProtocolViolation, "META too large!");
+ emit networkError(ProtocolViolation, QObject::tr("META too large!"));
socket.close();
}
buffer.append(response);