I10N: First translation fixes for 2.1

Fix README, some spelling errors, remove contractions,
exclamation marks, correct some plural forms, join split messages.
Add QCoreApplication::translate to non-Q_OBJECT-classes.
Fix some lupdate warnings about discarding meta-data (//:).
This commit is contained in:
Friedemann Kleint
2010-09-10 10:51:43 +02:00
parent 4dd844d76a
commit 24cadd34a1
31 changed files with 107 additions and 75 deletions

View File

@@ -31,7 +31,6 @@
#define DEBUGGER_ABSTRACT_GDB_ADAPTER
#include <QtCore/QObject>
#include <QtCore/QProcess>
#include "gdbengine.h"

View File

@@ -441,7 +441,6 @@ void GdbEngine::handleDebuggingHelperValue3Classic(const GdbResponse &response)
out.chop(1);
QList<QByteArray> list = out.split(' ');
if (list.isEmpty()) {
//: Value for variable
data.setError(WatchData::msgNotInScope());
data.setAllUnneeded();
insertData(data);
@@ -487,7 +486,6 @@ void GdbEngine::handleDebuggingHelperValue3Classic(const GdbResponse &response)
}
}
} else {
//: Value for variable
data.setError(WatchData::msgNotInScope());
data.setAllUnneeded();
insertData(data);

View File

@@ -3525,15 +3525,14 @@ WatchData GdbEngine::localVariable(const GdbMi &item,
WatchData data;
QString nam = _(name);
data.iname = "local." + name + QByteArray::number(n + 1);
//: Variable %1 is the variable name, %2 is a simple count.
data.name = WatchData::shadowedName(nam, n);
if (uninitializedVariables.contains(data.name)) {
data.setError(WatchData::msgNotInScope());
return data;
}
setWatchDataValue(data, item);
//: Type of local variable or parameter shadowed by another
//: variable of the same name in a nested block.
setWatchDataValue(data, item);
data.setType(GdbEngine::tr("<shadowed>").toUtf8());
data.setHasChildren(false);
return data;

View File

@@ -70,9 +70,9 @@ QString SnapshotData::toString() const
{
QString res;
QTextStream str(&res);
str << SnapshotHandler::tr("Function:") << ' ' << function() << ' '
/* str << SnapshotHandler::tr("Function:") << ' ' << function() << ' '
<< SnapshotHandler::tr("File:") << ' ' << m_location << ' '
<< SnapshotHandler::tr("Date:") << ' ' << m_date.toString();
<< SnapshotHandler::tr("Date:") << ' ' << m_date.toString(); */
return res;
}
@@ -81,11 +81,12 @@ QString SnapshotData::toToolTip() const
QString res;
QTextStream str(&res);
str << "<html><body><table>"
/*
<< "<tr><td>" << SnapshotHandler::tr("Function:")
<< "</td><td>" << function() << "</td></tr>"
<< "<tr><td>" << SnapshotHandler::tr("File:")
<< "</td><td>" << QDir::toNativeSeparators(m_location) << "</td></tr>"
<< "</table></body></html>";
<< "</table></body></html>"; */
return res;
}
@@ -167,7 +168,8 @@ QVariant SnapshotHandler::data(const QModelIndex &index, int role) const
const DebuggerStartParameters &sp = engine->startParameters();
if (role == Qt::DisplayRole) {
switch (role) {
case Qt::DisplayRole:
switch (index.column()) {
case 0:
return sp.displayName;
@@ -175,18 +177,18 @@ QVariant SnapshotHandler::data(const QModelIndex &index, int role) const
return sp.coreFile.isEmpty() ? sp.executable : sp.coreFile;
}
return QVariant();
}
if (role == Qt::ToolTipRole) {
//: Tooltip for variable
//return snapshot.toToolTip();
}
case Qt::ToolTipRole:
return QVariant();
if (role == Qt::DecorationRole && index.column() == 0) {
// Return icon that indicates whether this is the active stack frame
return (index.row() == m_currentIndex) ? m_positionIcon : m_emptyIcon;
}
case Qt::DecorationRole: // Return icon that indicates whether this is the active stack frame
if (index.column() == 0)
return (index.row() == m_currentIndex) ? m_positionIcon : m_emptyIcon;
break;
default:
break;
}
return QVariant();
}

View File

@@ -30,8 +30,6 @@
#ifndef DEBUGGER_SNAPSHOTHANDLER_H
#define DEBUGGER_SNAPSHOTHANDLER_H
#include "stackframe.h"
#include <QtCore/QAbstractItemModel>
#include <QtCore/QPointer>

View File

@@ -130,7 +130,6 @@ QVariant StackHandler::data(const QModelIndex &index, int role) const
if (role == StackFrameAddressRole)
return frame.address;
//: Tooltip for variable
if (role == Qt::ToolTipRole)
return frame.toToolTip();

View File

@@ -244,12 +244,16 @@ QString WatchData::toToolTip() const
QString WatchData::msgNotInScope()
{
//: Value of variable in Debugger Locals display for variables out of scope (stopped above initialization).
static const QString rc = QCoreApplication::translate("Debugger::Internal::WatchData", "<not in scope>");
return rc;
}
const QString &WatchData::shadowedNameFormat()
{
//: Display of variables shadowed by variables of the same name
//: in nested scopes: Variable %1 is the variable name, %2 is a
//: simple count.
static const QString format = QCoreApplication::translate("Debugger::Internal::WatchData", "%1 <shadowed %2>");
return format;
}