Core: Tr::tr

Change-Id: I0064814b0689f0f65072d2b0f60e26162587fd54
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
hjk
2023-01-16 17:20:07 +01:00
parent 8f8150db2d
commit 015b1ee53c
104 changed files with 1481 additions and 11072 deletions

View File

@@ -2,11 +2,14 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "versiondialog.h"
#include "coreicons.h"
#include "coreplugintr.h"
#include "coreicons.h"
#include "icore.h"
#include <app/app_version.h>
#include <coreplugin/coreicons.h>
#include <coreplugin/icore.h>
#include <utils/algorithm.h>
#include <utils/hostosinfo.h>
#include <utils/qtcassert.h>
@@ -29,7 +32,7 @@ VersionDialog::VersionDialog(QWidget *parent)
if (Utils::HostOsInfo::isLinuxHost())
setWindowIcon(Icons::QTCREATORLOGO_BIG.icon());
setWindowTitle(tr("About %1").arg(Core::Constants::IDE_DISPLAY_NAME));
setWindowTitle(Tr::tr("About %1").arg(Core::Constants::IDE_DISPLAY_NAME));
auto layout = new QGridLayout(this);
layout->setSizeConstraint(QLayout::SetFixedSize);
@@ -37,13 +40,13 @@ VersionDialog::VersionDialog(QWidget *parent)
#ifdef IDE_REVISION
const QString revUrl = QString::fromLatin1(Constants::IDE_REVISION_URL);
const QString rev = QString::fromLatin1(Constants::IDE_REVISION_STR);
ideRev = tr("<br/>From revision %1<br/>")
ideRev = Tr::tr("<br/>From revision %1<br/>")
.arg(revUrl.isEmpty() ? rev
: QString::fromLatin1("<a href=\"%1\">%2</a>").arg(revUrl, rev));
#endif
QString buildDateInfo;
#ifdef QTC_SHOW_BUILD_DATE
buildDateInfo = tr("<br/>Built on %1 %2<br/>").arg(QLatin1String(__DATE__), QLatin1String(__TIME__));
buildDateInfo = Tr::tr("<br/>Built on %1 %2<br/>").arg(QLatin1String(__DATE__), QLatin1String(__TIME__));
#endif
const QString br = QLatin1String("<br/>");
@@ -52,7 +55,7 @@ VersionDialog::VersionDialog(QWidget *parent)
QStringList(Utils::transform(additionalInfoLines, &QString::toHtmlEscaped)).join(br);
const QString description
= tr("<h3>%1</h3>"
= Tr::tr("<h3>%1</h3>"
"%2<br/>"
"%3"
"%4"
@@ -71,7 +74,7 @@ VersionDialog::VersionDialog(QWidget *parent)
QLatin1String(Constants::IDE_YEAR),
QLatin1String(Constants::IDE_AUTHOR))
+ "<br/>"
+ tr("The Qt logo as well as Qt®, Qt Quick®, Built with Qt®, Boot to Qt®, "
+ Tr::tr("The Qt logo as well as Qt®, Qt Quick®, Built with Qt®, Boot to Qt®, "
"Qt Quick Compiler®, Qt Enterprise®, Qt Mobile® and Qt Embedded® are "
"registered trademarks of The Qt Company Ltd.");