forked from qt-creator/qt-creator
Fix i18n issues
Fix some missing Tr::, and some namespace usages that confused lupdate. Change-Id: Ib5a411fc53a28a6b807600db50aacc68955ca5dc Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This commit is contained in:
@@ -375,7 +375,7 @@ void MacroExpander::registerIntVariable(const QByteArray &variable,
|
|||||||
* Convenience function to register several variables with the same \a prefix, that have a file
|
* Convenience function to register several variables with the same \a prefix, that have a file
|
||||||
* as a value. Takes the prefix and registers variables like \c{prefix:FilePath} and
|
* as a value. Takes the prefix and registers variables like \c{prefix:FilePath} and
|
||||||
* \c{prefix:Path}, with descriptions that start with the given \a heading.
|
* \c{prefix:Path}, with descriptions that start with the given \a heading.
|
||||||
* For example \c{registerFileVariables("CurrentDocument", tr("Current Document"))} registers
|
* For example \c{registerFileVariables("CurrentDocument", Tr::tr("Current Document"))} registers
|
||||||
* variables such as \c{CurrentDocument:FilePath} with description
|
* variables such as \c{CurrentDocument:FilePath} with description
|
||||||
* "Current Document: Full path including file name."
|
* "Current Document: Full path including file name."
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -579,7 +579,7 @@ void EditorManagerPrivate::init()
|
|||||||
// Go back in navigation history
|
// Go back in navigation history
|
||||||
ActionBuilder goBack(this, Constants::GO_BACK);
|
ActionBuilder goBack(this, Constants::GO_BACK);
|
||||||
goBack.setIcon(Utils::Icons::PREV.icon());
|
goBack.setIcon(Utils::Icons::PREV.icon());
|
||||||
goBack.setText(Core::Tr::tr("Go Back"));
|
goBack.setText(::Core::Tr::tr("Go Back"));
|
||||||
goBack.bindContextAction(&m_goBackAction);
|
goBack.bindContextAction(&m_goBackAction);
|
||||||
goBack.setContext(editDesignContext);
|
goBack.setContext(editDesignContext);
|
||||||
goBack.setDefaultKeySequence(::Core::Tr::tr("Ctrl+Alt+Left"), ::Core::Tr::tr("Alt+Left"));
|
goBack.setDefaultKeySequence(::Core::Tr::tr("Ctrl+Alt+Left"), ::Core::Tr::tr("Alt+Left"));
|
||||||
@@ -589,7 +589,7 @@ void EditorManagerPrivate::init()
|
|||||||
// Go forward in navigation history
|
// Go forward in navigation history
|
||||||
ActionBuilder goForward(this, Constants::GO_FORWARD);
|
ActionBuilder goForward(this, Constants::GO_FORWARD);
|
||||||
goForward.setIcon(Utils::Icons::NEXT.icon());
|
goForward.setIcon(Utils::Icons::NEXT.icon());
|
||||||
goForward.setText(Core::Tr::tr("Go Forward"));
|
goForward.setText(::Core::Tr::tr("Go Forward"));
|
||||||
goForward.bindContextAction(&m_goForwardAction);
|
goForward.bindContextAction(&m_goForwardAction);
|
||||||
goForward.setContext(editDesignContext);
|
goForward.setContext(editDesignContext);
|
||||||
goForward.setDefaultKeySequence(::Core::Tr::tr("Ctrl+Alt+Right"), ::Core::Tr::tr("Alt+Right"));
|
goForward.setDefaultKeySequence(::Core::Tr::tr("Ctrl+Alt+Right"), ::Core::Tr::tr("Alt+Right"));
|
||||||
@@ -618,7 +618,7 @@ void EditorManagerPrivate::init()
|
|||||||
splitSideBySide.setText(::Core::Tr::tr("Split Side by Side"));
|
splitSideBySide.setText(::Core::Tr::tr("Split Side by Side"));
|
||||||
splitSideBySide.bindContextAction(&m_splitSideBySideAction);
|
splitSideBySide.bindContextAction(&m_splitSideBySideAction);
|
||||||
splitSideBySide.setContext(editManagerContext);
|
splitSideBySide.setContext(editManagerContext);
|
||||||
splitSideBySide.setDefaultKeySequence(::Core::Tr::tr("Meta+E,3"), Core::Tr::tr("Ctrl+E,3"));
|
splitSideBySide.setDefaultKeySequence(::Core::Tr::tr("Meta+E,3"), ::Core::Tr::tr("Ctrl+E,3"));
|
||||||
splitSideBySide.addToContainer(Constants::M_WINDOW, Constants::G_WINDOW_SPLIT);
|
splitSideBySide.addToContainer(Constants::M_WINDOW, Constants::G_WINDOW_SPLIT);
|
||||||
splitSideBySide.addOnTriggered(this, &EditorManager::splitSideBySide);
|
splitSideBySide.addOnTriggered(this, &EditorManager::splitSideBySide);
|
||||||
|
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ using namespace Utils;
|
|||||||
Returns the name of the find filter or scope as presented to the user.
|
Returns the name of the find filter or scope as presented to the user.
|
||||||
|
|
||||||
This is the name that appears in the scope selection combo box, for example.
|
This is the name that appears in the scope selection combo box, for example.
|
||||||
Always return a translatable string. That is, use \c tr() for the return
|
Always return a translatable string. That is, use \c {Tr::tr()} for the return
|
||||||
value.
|
value.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -292,7 +292,7 @@ public:
|
|||||||
VcsEditorFactory commandLogEditorFactory {{
|
VcsEditorFactory commandLogEditorFactory {{
|
||||||
OtherContent,
|
OtherContent,
|
||||||
CVS_COMMANDLOG_EDITOR_ID,
|
CVS_COMMANDLOG_EDITOR_ID,
|
||||||
VcsBase::Tr::tr("CVS Command Log Editor"), // display name
|
::VcsBase::Tr::tr("CVS Command Log Editor"), // display name
|
||||||
"text/vnd.qtcreator.cvs.commandlog",
|
"text/vnd.qtcreator.cvs.commandlog",
|
||||||
[] { return new CvsEditorWidget; },
|
[] { return new CvsEditorWidget; },
|
||||||
std::bind(&CvsPluginPrivate::vcsDescribe, this, _1, _2)
|
std::bind(&CvsPluginPrivate::vcsDescribe, this, _1, _2)
|
||||||
@@ -301,7 +301,7 @@ public:
|
|||||||
VcsEditorFactory logEditorFactory {{
|
VcsEditorFactory logEditorFactory {{
|
||||||
LogOutput,
|
LogOutput,
|
||||||
CVS_FILELOG_EDITOR_ID,
|
CVS_FILELOG_EDITOR_ID,
|
||||||
VcsBase::Tr::tr("CVS File Log Editor"), // display name
|
::VcsBase::Tr::tr("CVS File Log Editor"), // display name
|
||||||
"text/vnd.qtcreator.cvs.log",
|
"text/vnd.qtcreator.cvs.log",
|
||||||
[] { return new CvsEditorWidget; },
|
[] { return new CvsEditorWidget; },
|
||||||
std::bind(&CvsPluginPrivate::vcsDescribe, this, _1, _2)
|
std::bind(&CvsPluginPrivate::vcsDescribe, this, _1, _2)
|
||||||
@@ -310,7 +310,7 @@ public:
|
|||||||
VcsEditorFactory annotateEditorFactory {{
|
VcsEditorFactory annotateEditorFactory {{
|
||||||
AnnotateOutput,
|
AnnotateOutput,
|
||||||
CVS_ANNOTATION_EDITOR_ID,
|
CVS_ANNOTATION_EDITOR_ID,
|
||||||
VcsBase::Tr::tr("CVS Annotation Editor"), // display name
|
::VcsBase::Tr::tr("CVS Annotation Editor"), // display name
|
||||||
"text/vnd.qtcreator.cvs.annotation",
|
"text/vnd.qtcreator.cvs.annotation",
|
||||||
[] { return new CvsEditorWidget; },
|
[] { return new CvsEditorWidget; },
|
||||||
std::bind(&CvsPluginPrivate::vcsDescribe, this, _1, _2)
|
std::bind(&CvsPluginPrivate::vcsDescribe, this, _1, _2)
|
||||||
@@ -319,7 +319,7 @@ public:
|
|||||||
VcsEditorFactory diffEditorFactory {{
|
VcsEditorFactory diffEditorFactory {{
|
||||||
DiffOutput,
|
DiffOutput,
|
||||||
CVS_DIFF_EDITOR_ID,
|
CVS_DIFF_EDITOR_ID,
|
||||||
VcsBase::Tr::tr("CVS Diff Editor"), // display name
|
::VcsBase::Tr::tr("CVS Diff Editor"), // display name
|
||||||
"text/x-patch",
|
"text/x-patch",
|
||||||
[] { return new CvsEditorWidget; },
|
[] { return new CvsEditorWidget; },
|
||||||
std::bind(&CvsPluginPrivate::vcsDescribe, this, _1, _2)
|
std::bind(&CvsPluginPrivate::vcsDescribe, this, _1, _2)
|
||||||
@@ -449,7 +449,7 @@ CvsPluginPrivate::CvsPluginPrivate()
|
|||||||
setupVcsSubmitEditor(this, {
|
setupVcsSubmitEditor(this, {
|
||||||
CVS_SUBMIT_MIMETYPE,
|
CVS_SUBMIT_MIMETYPE,
|
||||||
CVSCOMMITEDITOR_ID,
|
CVSCOMMITEDITOR_ID,
|
||||||
VcsBase::Tr::tr("CVS Commit Editor"),
|
::VcsBase::Tr::tr("CVS Commit Editor"),
|
||||||
VcsBaseSubmitEditorParameters::DiffFiles,
|
VcsBaseSubmitEditorParameters::DiffFiles,
|
||||||
[] { return new CvsSubmitEditor; },
|
[] { return new CvsSubmitEditor; },
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ public:
|
|||||||
|
|
||||||
class EffectComposerView : public QmlDesigner::AbstractView
|
class EffectComposerView : public QmlDesigner::AbstractView
|
||||||
{
|
{
|
||||||
|
Q_DECLARE_TR_FUNCTIONS(EffectComposer::EffectComposerView)
|
||||||
public:
|
public:
|
||||||
EffectComposerView(QmlDesigner::ExternalDependenciesInterface &externalDependencies);
|
EffectComposerView(QmlDesigner::ExternalDependenciesInterface &externalDependencies);
|
||||||
~EffectComposerView() override;
|
~EffectComposerView() override;
|
||||||
|
|||||||
@@ -280,7 +280,7 @@ public:
|
|||||||
Icons::RELOAD_TOOLBAR.icon();
|
Icons::RELOAD_TOOLBAR.icon();
|
||||||
auto button = new QToolButton;
|
auto button = new QToolButton;
|
||||||
button->setIcon(Icons::RELOAD_TOOLBAR.icon());
|
button->setIcon(Icons::RELOAD_TOOLBAR.icon());
|
||||||
button->setToolTip(Tr::tr("Reloads the call hierarchy for the symbol under cursor position."));
|
button->setToolTip(::LanguageClient::Tr::tr("Reloads the call hierarchy for the symbol under cursor position."));
|
||||||
connect(button, &QToolButton::clicked, this, [h] { h->updateHierarchyAtCursorPosition(); });
|
connect(button, &QToolButton::clicked, this, [h] { h->updateHierarchyAtCursorPosition(); });
|
||||||
return {h, {button}};
|
return {h, {button}};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ public:
|
|||||||
VcsEditorFactory logEditorFactory {{
|
VcsEditorFactory logEditorFactory {{
|
||||||
LogOutput,
|
LogOutput,
|
||||||
Constants::FILELOG_ID,
|
Constants::FILELOG_ID,
|
||||||
VcsBase::Tr::tr("Mercurial File Log Editor"),
|
::VcsBase::Tr::tr("Mercurial File Log Editor"),
|
||||||
Constants::LOGAPP,
|
Constants::LOGAPP,
|
||||||
[] { return new MercurialEditorWidget; },
|
[] { return new MercurialEditorWidget; },
|
||||||
std::bind(&MercurialPluginPrivate::vcsDescribe, this, _1, _2)
|
std::bind(&MercurialPluginPrivate::vcsDescribe, this, _1, _2)
|
||||||
@@ -155,7 +155,7 @@ public:
|
|||||||
VcsEditorFactory annotateEditorFactory {{
|
VcsEditorFactory annotateEditorFactory {{
|
||||||
AnnotateOutput,
|
AnnotateOutput,
|
||||||
Constants::ANNOTATELOG_ID,
|
Constants::ANNOTATELOG_ID,
|
||||||
VcsBase::Tr::tr("Mercurial Annotation Editor"),
|
::VcsBase::Tr::tr("Mercurial Annotation Editor"),
|
||||||
Constants::ANNOTATEAPP,
|
Constants::ANNOTATEAPP,
|
||||||
[] { return new MercurialEditorWidget; },
|
[] { return new MercurialEditorWidget; },
|
||||||
std::bind(&MercurialPluginPrivate::vcsDescribe, this, _1, _2)
|
std::bind(&MercurialPluginPrivate::vcsDescribe, this, _1, _2)
|
||||||
@@ -164,7 +164,7 @@ public:
|
|||||||
VcsEditorFactory diffEditorFactory {{
|
VcsEditorFactory diffEditorFactory {{
|
||||||
DiffOutput,
|
DiffOutput,
|
||||||
Constants::DIFFLOG_ID,
|
Constants::DIFFLOG_ID,
|
||||||
VcsBase::Tr::tr("Mercurial Diff Editor"),
|
::VcsBase::Tr::tr("Mercurial Diff Editor"),
|
||||||
Constants::DIFFAPP,
|
Constants::DIFFAPP,
|
||||||
[] { return new MercurialEditorWidget; },
|
[] { return new MercurialEditorWidget; },
|
||||||
std::bind(&MercurialPluginPrivate::vcsDescribe, this, _1, _2)
|
std::bind(&MercurialPluginPrivate::vcsDescribe, this, _1, _2)
|
||||||
@@ -181,7 +181,7 @@ MercurialPluginPrivate::MercurialPluginPrivate()
|
|||||||
setupVcsSubmitEditor(this, {
|
setupVcsSubmitEditor(this, {
|
||||||
Constants::COMMITMIMETYPE,
|
Constants::COMMITMIMETYPE,
|
||||||
Constants::COMMIT_ID,
|
Constants::COMMIT_ID,
|
||||||
VcsBase::Tr::tr("Mercurial Commit Log Editor"),
|
::VcsBase::Tr::tr("Mercurial Commit Log Editor"),
|
||||||
VcsBaseSubmitEditorParameters::DiffFiles,
|
VcsBaseSubmitEditorParameters::DiffFiles,
|
||||||
[] { return new CommitEditor; }
|
[] { return new CommitEditor; }
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -504,7 +504,7 @@ QList<Core::IWizardFactory *> JsonWizardFactory::createWizardFactories()
|
|||||||
currentFile.parentDir(),
|
currentFile.parentDir(),
|
||||||
&errorMessage);
|
&errorMessage);
|
||||||
if (!factory) {
|
if (!factory) {
|
||||||
verboseLog.append(tr("* Failed to create: %1\n").arg(errorMessage));
|
verboseLog.append(Tr::tr("* Failed to create: %1\n").arg(errorMessage));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ private:
|
|||||||
AppManagerInstallPackageStep::AppManagerInstallPackageStep(BuildStepList *bsl, Id id)
|
AppManagerInstallPackageStep::AppManagerInstallPackageStep(BuildStepList *bsl, Id id)
|
||||||
: AbstractRemoteLinuxDeployStep(bsl, id)
|
: AbstractRemoteLinuxDeployStep(bsl, id)
|
||||||
{
|
{
|
||||||
setDisplayName(tr("Install Application Manager package"));
|
setDisplayName(Tr::tr("Install Application Manager package"));
|
||||||
|
|
||||||
controller.setDefaultPathValue(getToolFilePath(Constants::APPMAN_CONTROLLER,
|
controller.setDefaultPathValue(getToolFilePath(Constants::APPMAN_CONTROLLER,
|
||||||
target()->kit(),
|
target()->kit(),
|
||||||
@@ -125,7 +125,7 @@ GroupItem AppManagerInstallPackageStep::deployRecipe()
|
|||||||
};
|
};
|
||||||
const auto doneHandler = [this](const Process &process, DoneWith result) {
|
const auto doneHandler = [this](const Process &process, DoneWith result) {
|
||||||
if (result == DoneWith::Success) {
|
if (result == DoneWith::Success) {
|
||||||
addProgressMessage(tr("Command finished successfully."));
|
addProgressMessage(Tr::tr("Command finished successfully."));
|
||||||
} else {
|
} else {
|
||||||
if (process.error() != QProcess::UnknownError
|
if (process.error() != QProcess::UnknownError
|
||||||
|| process.exitStatus() != QProcess::NormalExit) {
|
|| process.exitStatus() != QProcess::NormalExit) {
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ private:
|
|||||||
void start() override
|
void start() override
|
||||||
{
|
{
|
||||||
if (m_symbolFile.isEmpty()) {
|
if (m_symbolFile.isEmpty()) {
|
||||||
reportFailure(tr("Cannot debug: Local executable is not set."));
|
reportFailure(Tr::tr("Cannot debug: Local executable is not set."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -476,8 +476,8 @@ ProcessResult SshProcessInterface::runInShell(const CommandLine &command, const
|
|||||||
using namespace std::chrono_literals;
|
using namespace std::chrono_literals;
|
||||||
process.runBlocking(2s);
|
process.runBlocking(2s);
|
||||||
if (process.result() == ProcessResult::Canceled) {
|
if (process.result() == ProcessResult::Canceled) {
|
||||||
Core::MessageManager::writeFlashing(tr("Can't send control signal to the %1 device. "
|
Core::MessageManager::writeFlashing(Tr::tr("Can't send control signal to the %1 device. "
|
||||||
"The device might have been disconnected.")
|
"The device might have been disconnected.")
|
||||||
.arg(d->m_device->displayName()));
|
.arg(d->m_device->displayName()));
|
||||||
}
|
}
|
||||||
return process.result();
|
return process.result();
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ public:
|
|||||||
VcsEditorFactory logEditorFactory {{
|
VcsEditorFactory logEditorFactory {{
|
||||||
LogOutput,
|
LogOutput,
|
||||||
Constants::SUBVERSION_LOG_EDITOR_ID,
|
Constants::SUBVERSION_LOG_EDITOR_ID,
|
||||||
VcsBase::Tr::tr("Subversion File Log Editor"),
|
::VcsBase::Tr::tr("Subversion File Log Editor"),
|
||||||
Constants::SUBVERSION_LOG_MIMETYPE,
|
Constants::SUBVERSION_LOG_MIMETYPE,
|
||||||
[] { return new SubversionEditorWidget; },
|
[] { return new SubversionEditorWidget; },
|
||||||
std::bind(&SubversionPluginPrivate::vcsDescribe, this, _1, _2)
|
std::bind(&SubversionPluginPrivate::vcsDescribe, this, _1, _2)
|
||||||
@@ -257,7 +257,7 @@ public:
|
|||||||
VcsEditorFactory blameEditorFactory {{
|
VcsEditorFactory blameEditorFactory {{
|
||||||
AnnotateOutput,
|
AnnotateOutput,
|
||||||
Constants::SUBVERSION_BLAME_EDITOR_ID,
|
Constants::SUBVERSION_BLAME_EDITOR_ID,
|
||||||
VcsBase::Tr::tr("Subversion Annotation Editor"),
|
::VcsBase::Tr::tr("Subversion Annotation Editor"),
|
||||||
Constants::SUBVERSION_BLAME_MIMETYPE,
|
Constants::SUBVERSION_BLAME_MIMETYPE,
|
||||||
[] { return new SubversionEditorWidget; },
|
[] { return new SubversionEditorWidget; },
|
||||||
std::bind(&SubversionPluginPrivate::vcsDescribe, this, _1, _2)
|
std::bind(&SubversionPluginPrivate::vcsDescribe, this, _1, _2)
|
||||||
@@ -468,7 +468,7 @@ SubversionPluginPrivate::SubversionPluginPrivate()
|
|||||||
setupVcsSubmitEditor(this, {
|
setupVcsSubmitEditor(this, {
|
||||||
Constants::SUBVERSION_SUBMIT_MIMETYPE,
|
Constants::SUBVERSION_SUBMIT_MIMETYPE,
|
||||||
Constants::SUBVERSION_COMMIT_EDITOR_ID,
|
Constants::SUBVERSION_COMMIT_EDITOR_ID,
|
||||||
VcsBase::Tr::tr("Subversion Commit Editor"),
|
::VcsBase::Tr::tr("Subversion Commit Editor"),
|
||||||
VcsBaseSubmitEditorParameters::DiffFiles,
|
VcsBaseSubmitEditorParameters::DiffFiles,
|
||||||
[] { return new SubversionSubmitEditor; },
|
[] { return new SubversionSubmitEditor; },
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user