VcsBase: Convert to Tr::tr

To reduce the amount of duplicated strings for translators to handle.
The problem is not very prominent in vcsbase, but that's where we
are moving everywhere else.

Change-Id: Icb11fad3bccfea8a1408420e729566a75adccb66
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
hjk
2023-01-18 09:38:35 +01:00
parent 7e815270f1
commit fa7dd2fd3b
46 changed files with 293 additions and 1510 deletions

View File

@@ -7,6 +7,7 @@
#include "nicknamedialog.h"
#include "vcsbaseconstants.h"
#include "vcsbasesubmiteditor.h"
#include "vcsbasetr.h"
#include "vcsoutputwindow.h"
#include "wizard/vcscommandpage.h"
#include "wizard/vcsconfigurationpage.h"
@@ -85,7 +86,7 @@ bool VcsPlugin::initialize(const QStringList &arguments, QString *errorMessage)
MacroExpander *expander = globalMacroExpander();
expander->registerVariable(Constants::VAR_VCS_NAME,
tr("Name of the version control system in use by the current project."),
Tr::tr("Name of the version control system in use by the current project."),
[]() -> QString {
IVersionControl *vc = nullptr;
if (Project *project = ProjectTree::currentProject())
@@ -94,7 +95,7 @@ bool VcsPlugin::initialize(const QStringList &arguments, QString *errorMessage)
});
expander->registerVariable(Constants::VAR_VCS_TOPIC,
tr("The current version control topic (branch or tag) identification of the current project."),
Tr::tr("The current version control topic (branch or tag) identification of the current project."),
[]() -> QString {
IVersionControl *vc = nullptr;
FilePath topLevel;
@@ -104,7 +105,7 @@ bool VcsPlugin::initialize(const QStringList &arguments, QString *errorMessage)
});
expander->registerVariable(Constants::VAR_VCS_TOPLEVELPATH,
tr("The top level path to the repository the current project is in."),
Tr::tr("The top level path to the repository the current project is in."),
[]() -> QString {
if (Project *project = ProjectTree::currentProject())
return VcsManager::findTopLevelForDirectory(project->projectDirectory()).toString();