forked from qt-creator/qt-creator
LSP: Fix punctuation and capitalization of UI text
Change-Id: Ifc04d979ec7e989ed50d6af23d18819dd91dc0be Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -77,7 +77,7 @@ static QPair<QByteArray, QByteArray> splitHeaderFieldLine(
|
|||||||
return {headerFieldLine.mid(0, assignmentIndex),
|
return {headerFieldLine.mid(0, assignmentIndex),
|
||||||
headerFieldLine.mid(assignmentIndex + fieldSeparatorLength)};
|
headerFieldLine.mid(assignmentIndex + fieldSeparatorLength)};
|
||||||
}
|
}
|
||||||
parseError = BaseMessage::tr("Unexpected header line \"%1\"")
|
parseError = BaseMessage::tr("Unexpected header line \"%1\".")
|
||||||
.arg(QLatin1String(headerFieldLine));
|
.arg(QLatin1String(headerFieldLine));
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
@@ -97,8 +97,8 @@ static void parseContentType(BaseMessage &message, QByteArray contentType, QStri
|
|||||||
if (equalindex > 0)
|
if (equalindex > 0)
|
||||||
codec = QTextCodec::codecForName(charset);
|
codec = QTextCodec::codecForName(charset);
|
||||||
if (!codec) {
|
if (!codec) {
|
||||||
parseError = BaseMessage::tr("Cannot decode content with \"%1\" "
|
parseError = BaseMessage::tr("Cannot decode content with \"%1\". "
|
||||||
"falling back to \"%2\"")
|
"Falling back to \"%2\".")
|
||||||
.arg(QLatin1String(charset),
|
.arg(QLatin1String(charset),
|
||||||
QLatin1String(defaultCharset));
|
QLatin1String(defaultCharset));
|
||||||
}
|
}
|
||||||
@@ -113,7 +113,7 @@ static void parseContentLength(BaseMessage &message, QByteArray contentLength, Q
|
|||||||
bool ok = true;
|
bool ok = true;
|
||||||
message.contentLength = QString::fromLatin1(contentLength).toInt(&ok);
|
message.contentLength = QString::fromLatin1(contentLength).toInt(&ok);
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
parseError = BaseMessage::tr("Expected an integer in \"%1\", but got \"%2\"")
|
parseError = BaseMessage::tr("Expected an integer in \"%1\", but got \"%2\".")
|
||||||
.arg(contentLengthFieldName, QLatin1String(contentLength));
|
.arg(contentLengthFieldName, QLatin1String(contentLength));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -146,7 +146,7 @@ void BaseMessage::parse(QBuffer *data, QString &parseError, BaseMessage &message
|
|||||||
} else if (headerFieldName == contentTypeFieldName) {
|
} else if (headerFieldName == contentTypeFieldName) {
|
||||||
parseContentType(message, headerFieldValue, parseError);
|
parseContentType(message, headerFieldValue, parseError);
|
||||||
} else {
|
} else {
|
||||||
parseError = tr("Unexpected header field \"%1\" in \"%2\"")
|
parseError = tr("Unexpected header field \"%1\" in \"%2\".")
|
||||||
.arg(QLatin1String(headerFieldName),
|
.arg(QLatin1String(headerFieldName),
|
||||||
QLatin1String(headerFieldLine));
|
QLatin1String(headerFieldLine));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ QString JsonObject::valueTypeString(QJsonValue::Type type)
|
|||||||
|
|
||||||
QString JsonObject::errorString(QJsonValue::Type expected, QJsonValue::Type actual)
|
QString JsonObject::errorString(QJsonValue::Type expected, QJsonValue::Type actual)
|
||||||
{
|
{
|
||||||
return tr("Expected Type %1 but value contained %2")
|
return tr("Expected type %1 but value contained %2")
|
||||||
.arg(valueTypeString(expected), valueTypeString(actual));
|
.arg(valueTypeString(expected), valueTypeString(actual));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -141,9 +141,9 @@ QJsonObject JsonRpcMessageHandler::toJsonObject(const QByteArray &_content,
|
|||||||
if (doc.isObject())
|
if (doc.isObject())
|
||||||
return doc.object();
|
return doc.object();
|
||||||
if (doc.isNull())
|
if (doc.isNull())
|
||||||
parseError = tr("Could not parse Json message '%1'").arg(error.errorString());
|
parseError = tr("Could not parse JSON message \"%1\".").arg(error.errorString());
|
||||||
else
|
else
|
||||||
parseError = tr("Expected Json object, but got a json '%1'").arg(docTypeName(doc));
|
parseError = tr("Expected a JSON object, but got a JSON \"%1\".").arg(docTypeName(doc));
|
||||||
return QJsonObject();
|
return QJsonObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ public:
|
|||||||
}
|
}
|
||||||
if (errorMessage)
|
if (errorMessage)
|
||||||
*errorMessage = QCoreApplication::translate("LanguageServerProtocol::Notification",
|
*errorMessage = QCoreApplication::translate("LanguageServerProtocol::Notification",
|
||||||
"No parameters in '%1'").arg(method());
|
"No parameters in \"%1\".").arg(method());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -274,7 +274,7 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
if (errorMessage) {
|
if (errorMessage) {
|
||||||
*errorMessage = QCoreApplication::translate("LanguageServerProtocol::Request",
|
*errorMessage = QCoreApplication::translate("LanguageServerProtocol::Request",
|
||||||
"No id set in '%1'").arg(this->method());
|
"No ID set in \"%1\".").arg(this->method());
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -331,7 +331,7 @@ bool MarkedString::isValid(QStringList *errorHierarchy) const
|
|||||||
*errorHierarchy << QCoreApplication::translate(
|
*errorHierarchy << QCoreApplication::translate(
|
||||||
"LanguageServerProtocol::MarkedString",
|
"LanguageServerProtocol::MarkedString",
|
||||||
"MarkedString should be either MarkedLanguageString, "
|
"MarkedString should be either MarkedLanguageString, "
|
||||||
"MarkupContent or QList<MarkedLanguageString>");
|
"MarkupContent, or QList<MarkedLanguageString>.");
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -356,7 +356,7 @@ bool DocumentFormattingProperty::isValid(QStringList *error) const
|
|||||||
if (error) {
|
if (error) {
|
||||||
*error << QCoreApplication::translate(
|
*error << QCoreApplication::translate(
|
||||||
"LanguageServerProtocol::MarkedString",
|
"LanguageServerProtocol::MarkedString",
|
||||||
"DocumentFormattingProperty should be either bool, double or QString");
|
"DocumentFormattingProperty should be either bool, double, or QString.");
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ bool MarkupOrString::isValid(QStringList *error) const
|
|||||||
return true;
|
return true;
|
||||||
if (error) {
|
if (error) {
|
||||||
*error << QCoreApplication::translate("LanguageServerProtocoll::MarkupOrString",
|
*error << QCoreApplication::translate("LanguageServerProtocoll::MarkupOrString",
|
||||||
"Expected a string or MarkupContent in MarkupOrString");
|
"Expected a string or MarkupContent in MarkupOrString.");
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user