forked from qt-creator/qt-creator
10n: Fix tr() issues.
This commit is contained in:
@@ -44,6 +44,7 @@
|
||||
#include <texteditor/snippets/snippeteditor.h>
|
||||
|
||||
#include <QtCore/QLatin1String>
|
||||
#include <QtCore/QCoreApplication>
|
||||
|
||||
using namespace CppEditor;
|
||||
using namespace Internal;
|
||||
@@ -62,7 +63,7 @@ QString CppSnippetProvider::groupId() const
|
||||
|
||||
QString CppSnippetProvider::displayName() const
|
||||
{
|
||||
return tr("C++");
|
||||
return QCoreApplication::translate("CppEditor::Internal::CppSnippetProvider", "C++");
|
||||
}
|
||||
|
||||
void CppSnippetProvider::decorateEditor(TextEditor::SnippetEditor *editor) const
|
||||
|
||||
@@ -475,7 +475,7 @@ QWidget *DebuggerMainWindow::createContents(IMode *mode)
|
||||
debugToolBarLayout->addStretch();
|
||||
debugToolBarLayout->addWidget(new Utils::StyledSeparator);
|
||||
|
||||
QDockWidget *dock = new QDockWidget(tr("Debugger Toolbar"));
|
||||
QDockWidget *dock = new QDockWidget(DebuggerMainWindowPrivate::tr("Debugger Toolbar"));
|
||||
dock->setObjectName(QLatin1String("Debugger Toolbar"));
|
||||
dock->setWidget(debugToolBar);
|
||||
dock->setFeatures(QDockWidget::NoDockWidgetFeatures);
|
||||
|
||||
@@ -536,7 +536,7 @@ bool DebuggerRunControlFactory::canRun(RunConfiguration *runConfiguration, const
|
||||
|
||||
QString DebuggerRunControlFactory::displayName() const
|
||||
{
|
||||
return tr("Debug");
|
||||
return DebuggerRunControl::tr("Debug");
|
||||
}
|
||||
|
||||
// Find Qt installation by running qmake
|
||||
@@ -638,7 +638,7 @@ DebuggerRunControl *DebuggerRunControlFactory::create
|
||||
|
||||
if (!check) {
|
||||
//appendMessage(errorMessage, true);
|
||||
Core::ICore::instance()->showWarningWithOptions(tr("Debugger"),
|
||||
Core::ICore::instance()->showWarningWithOptions(DebuggerRunControl::tr("Debugger"),
|
||||
check.errorMessage, QString(), check.settingsCategory, check.settingsPage);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -92,13 +92,9 @@ BaseGitArgumentsWidget::BaseGitArgumentsWidget(GitSettings *settings,
|
||||
Q_ASSERT(client);
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Git
|
||||
|
||||
namespace {
|
||||
|
||||
class BaseGitDiffArgumentsWidget : public Git::Internal::BaseGitArgumentsWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
BaseGitDiffArgumentsWidget(Git::Internal::GitSettings *settings,
|
||||
Git::Internal::GitClient *client,
|
||||
@@ -164,6 +160,7 @@ protected:
|
||||
|
||||
class GitCommitDiffArgumentsWidget : public BaseGitDiffArgumentsWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GitCommitDiffArgumentsWidget(Git::Internal::GitSettings *settings,
|
||||
Git::Internal::GitClient *client, const QString &directory,
|
||||
@@ -186,6 +183,7 @@ private:
|
||||
|
||||
class GitFileDiffArgumentsWidget : public BaseGitDiffArgumentsWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GitFileDiffArgumentsWidget(Git::Internal::GitSettings *settings,
|
||||
Git::Internal::GitClient *client, const QString &directory,
|
||||
@@ -205,6 +203,7 @@ private:
|
||||
|
||||
class GitBranchDiffArgumentsWidget : public BaseGitDiffArgumentsWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GitBranchDiffArgumentsWidget(Git::Internal::GitSettings *settings,
|
||||
Git::Internal::GitClient *client, const QString &directory,
|
||||
@@ -224,6 +223,7 @@ private:
|
||||
|
||||
class GitShowArgumentsWidget : public Git::Internal::BaseGitArgumentsWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GitShowArgumentsWidget(Git::Internal::GitSettings *settings,
|
||||
Git::Internal::GitClient *client,
|
||||
@@ -289,6 +289,7 @@ private:
|
||||
|
||||
class GitBlameArgumentsWidget : public Git::Internal::BaseGitArgumentsWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GitBlameArgumentsWidget(Git::Internal::GitSettings *settings,
|
||||
Git::Internal::GitClient *client, const QString &directory,
|
||||
@@ -365,8 +366,6 @@ private:
|
||||
QString m_fileName;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
inline Core::IEditor* locateEditor(const Core::ICore *core, const char *property, const QString &entry)
|
||||
{
|
||||
foreach (Core::IEditor *ed, core->editorManager()->openedEditors())
|
||||
@@ -400,9 +399,6 @@ static inline VCSBase::VCSBaseOutputWindow *outputWindow()
|
||||
return VCSBase::VCSBaseOutputWindow::instance();
|
||||
}
|
||||
|
||||
namespace Git {
|
||||
namespace Internal {
|
||||
|
||||
static inline QString msgRepositoryNotFound(const QString &dir)
|
||||
{
|
||||
return GitClient::tr("Unable to determine the repository for %1.").arg(dir);
|
||||
@@ -2457,3 +2453,5 @@ unsigned GitClient::synchronousGitVersion(bool silent, QString *errorMessage /*
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Git
|
||||
|
||||
#include "gitclient.moc"
|
||||
|
||||
@@ -34,8 +34,7 @@
|
||||
#include "helpmode.h"
|
||||
#include "helpconstants.h"
|
||||
|
||||
#include <QtGui/QIcon>
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtCore/QCoreApplication>
|
||||
|
||||
using namespace Help;
|
||||
using namespace Help::Internal;
|
||||
@@ -47,3 +46,23 @@ HelpMode::HelpMode(QObject *parent)
|
||||
{
|
||||
setObjectName(QLatin1String("HelpMode"));
|
||||
}
|
||||
|
||||
QString HelpMode::displayName() const
|
||||
{
|
||||
return QCoreApplication::translate("Help::Internal::HelpMode", "Help");
|
||||
}
|
||||
|
||||
int HelpMode::priority() const
|
||||
{
|
||||
return Constants::P_MODE_HELP;
|
||||
}
|
||||
|
||||
QString HelpMode::id() const
|
||||
{
|
||||
return QLatin1String(Constants::ID_MODE_HELP);
|
||||
}
|
||||
|
||||
Core::Context HelpMode::context() const
|
||||
{
|
||||
return Core::Context(Constants::C_MODE_HELP);
|
||||
}
|
||||
|
||||
@@ -34,9 +34,6 @@
|
||||
#ifndef HELPMODE_H
|
||||
#define HELPMODE_H
|
||||
|
||||
#include "helpmode.h"
|
||||
#include "helpconstants.h"
|
||||
|
||||
#include <coreplugin/imode.h>
|
||||
|
||||
#include <QtCore/QString>
|
||||
@@ -48,15 +45,15 @@ namespace Internal {
|
||||
class HelpMode : public Core::IMode
|
||||
{
|
||||
public:
|
||||
HelpMode(QObject *parent = 0);
|
||||
explicit HelpMode(QObject *parent = 0);
|
||||
|
||||
QString displayName() const { return tr("Help"); }
|
||||
QString displayName() const;
|
||||
QIcon icon() const { return m_icon; }
|
||||
int priority() const { return Constants::P_MODE_HELP; }
|
||||
int priority() const;
|
||||
QWidget *widget() { return m_widget; }
|
||||
QString id() const { return QLatin1String(Constants::ID_MODE_HELP); }
|
||||
QString id() const;
|
||||
QString type() const { return QString(); }
|
||||
Core::Context context() const { return Core::Context(Constants::C_MODE_HELP); }
|
||||
Core::Context context() const;
|
||||
QString contextHelpId() const { return QString(); }
|
||||
void setWidget(QWidget *widget) { m_widget = widget; }
|
||||
|
||||
|
||||
@@ -221,7 +221,7 @@ class ProjectsMode : public Core::IMode
|
||||
public:
|
||||
ProjectsMode(QWidget *proWindow) : m_widget(proWindow) {}
|
||||
|
||||
QString displayName() const { return tr("Projects"); }
|
||||
QString displayName() const { return QCoreApplication::translate("ProjectExplorer::ProjectsMode", "Projects"); }
|
||||
QIcon icon() const { return QIcon(QLatin1String(":/fancyactionbar/images/mode_Project.png")); }
|
||||
int priority() const { return Constants::P_MODE_SESSION; }
|
||||
QWidget *widget() { return m_widget; }
|
||||
|
||||
@@ -34,12 +34,12 @@
|
||||
#ifndef STATESEDITORIMAGEPROVIDER_H
|
||||
#define STATESEDITORIMAGEPROVIDER_H
|
||||
|
||||
#include <QDeclarativeImageProvider>
|
||||
#include <QWeakPointer>
|
||||
#include"abstractview.h"
|
||||
|
||||
namespace QmlDesigner {
|
||||
#include <QtDeclarative/QDeclarativeImageProvider>
|
||||
#include <QtCore/QWeakPointer>
|
||||
|
||||
namespace QmlDesigner {
|
||||
namespace Internal {
|
||||
|
||||
class StatesEditorView;
|
||||
@@ -57,9 +57,8 @@ private:
|
||||
QWeakPointer<NodeInstanceView> m_nodeInstanceView;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
} // namespace Internal
|
||||
} // namespace QmlDesigner
|
||||
|
||||
#endif // STATESEDITORIMAGEPROVIDER_H
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
#include <texteditor/snippets/snippeteditor.h>
|
||||
|
||||
#include <QtCore/QLatin1String>
|
||||
#include <QtCore/QCoreApplication>
|
||||
|
||||
using namespace QmlJSEditor;
|
||||
using namespace Internal;
|
||||
@@ -62,7 +63,7 @@ QString QmlJSSnippetProvider::groupId() const
|
||||
|
||||
QString QmlJSSnippetProvider::displayName() const
|
||||
{
|
||||
return tr("QML");
|
||||
return QCoreApplication::translate("QmlJSEditor::Internal::QmlJSSnippetProvider", "QML");
|
||||
}
|
||||
|
||||
void QmlJSSnippetProvider::decorateEditor(TextEditor::SnippetEditor *editor) const
|
||||
|
||||
@@ -36,20 +36,19 @@
|
||||
#include "maemoconstants.h"
|
||||
#include "maemodeviceconfigurations.h"
|
||||
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
|
||||
#include <coreplugin/filemanager.h>
|
||||
#include <coreplugin/ssh/sshconnection.h>
|
||||
#include <qt4projectmanager/qt4projectmanagerconstants.h>
|
||||
#include <qt4projectmanager/qtversionmanager.h>
|
||||
#include <utils/environment.h>
|
||||
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtGui/QDesktopServices>
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QProcess>
|
||||
#include <QtCore/QString>
|
||||
|
||||
#define TR(text) QCoreApplication::translate("Qt4ProjectManager::Internal::MaemoGlobal", text)
|
||||
|
||||
namespace Qt4ProjectManager {
|
||||
namespace Internal {
|
||||
namespace {
|
||||
@@ -136,23 +135,23 @@ QString MaemoGlobal::remoteEnvironment(const QList<Utils::EnvironmentItem> &list
|
||||
QString MaemoGlobal::failedToConnectToServerMessage(const Core::SshConnection::Ptr &connection,
|
||||
const MaemoDeviceConfig::ConstPtr &deviceConfig)
|
||||
{
|
||||
QString errorMsg = TR("Could not connect to host: %1")
|
||||
QString errorMsg = tr("Could not connect to host: %1")
|
||||
.arg(connection->errorString());
|
||||
|
||||
if (deviceConfig->type() == MaemoDeviceConfig::Simulator) {
|
||||
if (connection->errorState() == Core::SshTimeoutError
|
||||
|| connection->errorState() == Core::SshSocketError) {
|
||||
errorMsg += TR("\nDid you start Qemu?");
|
||||
errorMsg += tr("\nDid you start Qemu?");
|
||||
}
|
||||
} else if (connection->errorState() == Core::SshTimeoutError) {
|
||||
errorMsg += TR("\nIs the device connected and set up for network access?");
|
||||
errorMsg += tr("\nIs the device connected and set up for network access?");
|
||||
}
|
||||
return errorMsg;
|
||||
}
|
||||
|
||||
QString MaemoGlobal::deviceConfigurationName(const MaemoDeviceConfig::ConstPtr &devConf)
|
||||
{
|
||||
return devConf ? devConf->name() : TR("(No device)");
|
||||
return devConf ? devConf->name() : tr("(No device)");
|
||||
}
|
||||
|
||||
QString MaemoGlobal::maddeRoot(const QtVersion *qtVersion)
|
||||
@@ -209,13 +208,13 @@ bool MaemoGlobal::removeRecursively(const QString &filePath, QString &error)
|
||||
}
|
||||
dir.cdUp();
|
||||
if (!dir.rmdir(fileInfo.fileName())) {
|
||||
error = TR("Failed to remove directory '%1'.")
|
||||
error = tr("Failed to remove directory '%1'.")
|
||||
.arg(QDir::toNativeSeparators(filePath));
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (!QFile::remove(filePath)) {
|
||||
error = TR("Failed to remove file '%1'.")
|
||||
error = tr("Failed to remove file '%1'.")
|
||||
.arg(QDir::toNativeSeparators(filePath));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -36,12 +36,12 @@
|
||||
|
||||
#include <utils/environment.h>
|
||||
|
||||
#include <projectexplorer/deployconfiguration.h>
|
||||
#include <projectexplorer/buildsteplist.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/deployconfiguration.h>
|
||||
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QSharedPointer>
|
||||
#include <QtCore/QCoreApplication>
|
||||
|
||||
#define ASSERT_STATE_GENERIC(State, expected, actual) \
|
||||
MaemoGlobal::assertState<State>(expected, actual, Q_FUNC_INFO)
|
||||
@@ -52,7 +52,6 @@ class QString;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Core { class SshConnection; }
|
||||
|
||||
namespace Qt4ProjectManager {
|
||||
class QtVersion;
|
||||
namespace Internal {
|
||||
@@ -60,6 +59,7 @@ class MaemoDeviceConfig;
|
||||
|
||||
class MaemoGlobal
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(Qt4ProjectManager::Internal::MaemoGlobal)
|
||||
public:
|
||||
enum MaemoVersion { Maemo5, Maemo6 };
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <texteditor/texteditorconstants.h>
|
||||
|
||||
#include <QtCore/QLatin1String>
|
||||
#include <QtCore/QCoreApplication>
|
||||
|
||||
using namespace TextEditor;
|
||||
using namespace Internal;
|
||||
@@ -53,7 +54,7 @@ QString PlainTextSnippetProvider::groupId() const
|
||||
|
||||
QString PlainTextSnippetProvider::displayName() const
|
||||
{
|
||||
return tr("Text");
|
||||
return QCoreApplication::translate("TextEditor::Internal::PlainTextSnippetProvider", "Text");
|
||||
}
|
||||
|
||||
void PlainTextSnippetProvider::decorateEditor(TextEditor::SnippetEditor *) const
|
||||
|
||||
Reference in New Issue
Block a user