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

@@ -3,6 +3,8 @@
#include "vcsoutputformatter.h"
#include "vcsbasetr.h"
#include <coreplugin/iversioncontrol.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/vcsmanager.h>
@@ -72,12 +74,11 @@ void VcsOutputLineParser::fillLinkContextMenu(
{
QTC_ASSERT(!href.isEmpty(), return);
if (href.startsWith("http://") || href.startsWith("https://")) {
QAction *action = menu->addAction(
tr("&Open \"%1\"").arg(href),
[href] { QDesktopServices::openUrl(QUrl(href)); });
QAction *action = menu->addAction(Tr::tr("&Open \"%1\"").arg(href),
[href] { QDesktopServices::openUrl(QUrl(href)); });
menu->setDefaultAction(action);
menu->addAction(tr("&Copy to clipboard: \"%1\"").arg(href),
[href] { setClipboardAndSelection(href); });
menu->addAction(Tr::tr("&Copy to clipboard: \"%1\"").arg(href),
[href] { setClipboardAndSelection(href); });
return;
}
if (Core::IVersionControl *vcs = Core::VcsManager::findVersionControlForDirectory(workingDirectory))