Commit 88f3c894 authored by hjk's avatar hjk
Browse files

debugger: make some of the dumper generated static strings translatable

parent 1c702357
......@@ -451,6 +451,21 @@ static inline QString formattedValue(const WatchData &data, int format)
}
QString result = data.value;
result.replace(QLatin1Char('\n'), QLatin1String("\\n"));
if (result.startsWith(QLatin1Char('<'))) {
if (result == QLatin1String("<Edit>"))
result = WatchHandler::tr("<Edit>");
else if (result == QLatin1String("<empty>"))
result = WatchHandler::tr("<empty>");
else if (result == QLatin1String("<uninitialized>"))
result = WatchHandler::tr("<uninitialized>");
else if (result == QLatin1String("<invalid>"))
result = WatchHandler::tr("<invalid>");
else if (result == QLatin1String("<not accessible>"))
result = WatchHandler::tr("<not accessible>");
else if (result.endsWith(" items>"))
result = WatchHandler::tr("<%1 items>")
.arg(result.mid(1, result.indexOf(' ') - 1));
}
return result;
}
......
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