forked from qt-creator/qt-creator
ADS: Tr::tr()
Following contexts are merged into QtC::ADS ADS::DockAreaTitleBar ADS::DockManager ADS::DockWidgetTab ADS::WorkspaceDialog ADS::WorkspaceModel ADS::WorkspaceNameInputDialog ADS::WorkspaceView Change-Id: Ieb3c8240531ca94f43ec1237c27647a51f59e4f9 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -43117,7 +43117,7 @@ You might find further explanations in the Application Output view.</source>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ADS::WorkspaceDialog</name>
|
||||
<name>QtC::ADS</name>
|
||||
<message>
|
||||
<source>&New</source>
|
||||
<translation>&Neu</translation>
|
||||
@@ -43744,7 +43744,7 @@ Doppelklicken Sie einen Eintrag um ihn zu ändern.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ADS::DockWidgetTab</name>
|
||||
<name>QtC::ADS</name>
|
||||
<message>
|
||||
<source>Detach</source>
|
||||
<translation>Ablösen</translation>
|
||||
@@ -43757,9 +43757,6 @@ Doppelklicken Sie einen Eintrag um ihn zu ändern.</translation>
|
||||
<source>Close Others</source>
|
||||
<translation>Andere schließen</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ADS::WorkspaceModel</name>
|
||||
<message>
|
||||
<source>Workspace</source>
|
||||
<translation type="unfinished"></translation>
|
||||
@@ -43792,10 +43789,6 @@ Doppelklicken Sie einen Eintrag um ihn zu ändern.</translation>
|
||||
<source>Rename Workspace</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Rename</source>
|
||||
<translation>&Umbenennen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Rename and &Open</source>
|
||||
<translation>Umbenennen und ö&ffnen</translation>
|
||||
@@ -49952,7 +49945,7 @@ Teilnamen können verwendet werden, sofern sie eindeutig sind.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ADS::DockAreaTitleBar</name>
|
||||
<name>QtC::ADS</name>
|
||||
<message>
|
||||
<source>Detach Area</source>
|
||||
<translation type="unfinished"></translation>
|
||||
@@ -49965,9 +49958,6 @@ Teilnamen können verwendet werden, sofern sie eindeutig sind.</translation>
|
||||
<source>Close Other Areas</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ADS::DockManager</name>
|
||||
<message>
|
||||
<source>Cannot Save Workspace</source>
|
||||
<translation type="unfinished"></translation>
|
||||
@@ -50001,16 +49991,10 @@ Teilnamen können verwendet werden, sofern sie eindeutig sind.</translation>
|
||||
<source>Could not restore workspace %1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ADS::WorkspaceNameInputDialog</name>
|
||||
<message>
|
||||
<source>Enter the name of the workspace:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ADS::WorkspaceView</name>
|
||||
<message>
|
||||
<source>Import Workspace</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
||||
@@ -41859,7 +41859,7 @@ Output:
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ADS::WorkspaceDialog</name>
|
||||
<name>QtC::ADS</name>
|
||||
<message>
|
||||
<source>&New</source>
|
||||
<translation>新規作成(&N)</translation>
|
||||
@@ -42538,7 +42538,7 @@ Output:
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ADS::DockAreaTitleBar</name>
|
||||
<name>QtC::ADS</name>
|
||||
<message>
|
||||
<source>Detach Area</source>
|
||||
<translation>エリアを切り離す</translation>
|
||||
@@ -42551,9 +42551,6 @@ Output:
|
||||
<source>Close Other Areas</source>
|
||||
<translation>その他のエリアを閉じる</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ADS::DockManager</name>
|
||||
<message>
|
||||
<source>Cannot Save Workspace</source>
|
||||
<translation>ワークスペースを保存できません</translation>
|
||||
@@ -42593,7 +42590,7 @@ Output:
|
||||
<name>QtC::Utils</name>
|
||||
</context>
|
||||
<context>
|
||||
<name>ADS::DockWidgetTab</name>
|
||||
<name>QtC::ADS</name>
|
||||
<message>
|
||||
<source>Detach</source>
|
||||
<translation>切り離す</translation>
|
||||
@@ -42606,16 +42603,10 @@ Output:
|
||||
<source>Close Others</source>
|
||||
<translation>他を閉じる</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ADS::WorkspaceNameInputDialog</name>
|
||||
<message>
|
||||
<source>Enter the name of the workspace:</source>
|
||||
<translation>ワークスペースの名前を入力してください:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ADS::WorkspaceModel</name>
|
||||
<message>
|
||||
<source>Workspace</source>
|
||||
<translation>ワークスペース</translation>
|
||||
@@ -42648,17 +42639,10 @@ Output:
|
||||
<source>Rename Workspace</source>
|
||||
<translation>ワークスペースの名前変更</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Rename</source>
|
||||
<translation>名前を変更(&R)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Rename and &Open</source>
|
||||
<translation>名前変更して開く(&O)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ADS::WorkspaceView</name>
|
||||
<message>
|
||||
<source>Import Workspace</source>
|
||||
<translation>ワークスペースをインポートする</translation>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="ru">
|
||||
<context>
|
||||
<name>ADS::DockAreaTitleBar</name>
|
||||
<name>QtC::ADS</name>
|
||||
<message>
|
||||
<source>Detach Area</source>
|
||||
<translation>Отцепить область</translation>
|
||||
@@ -15,9 +15,6 @@
|
||||
<source>Close Other Areas</source>
|
||||
<translation>Закрыть другие области</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ADS::DockManager</name>
|
||||
<message>
|
||||
<source>Cannot Save Workspace</source>
|
||||
<translation>Не удалось сохранить сессию</translation>
|
||||
@@ -52,9 +49,6 @@
|
||||
<source>Could not restore workspace %1</source>
|
||||
<translation>Не удалось восстановить сессию %1</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ADS::DockWidgetTab</name>
|
||||
<message>
|
||||
<source>Detach</source>
|
||||
<translation>Отцепить</translation>
|
||||
@@ -67,9 +61,6 @@
|
||||
<source>Close Others</source>
|
||||
<translation>Закрыть другие</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ADS::WorkspaceDialog</name>
|
||||
<message>
|
||||
<source>Workspace Manager</source>
|
||||
<translation>Управление сессиями</translation>
|
||||
@@ -114,9 +105,6 @@
|
||||
<source>Export</source>
|
||||
<translation>Экспортировать</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ADS::WorkspaceModel</name>
|
||||
<message>
|
||||
<source>Workspace</source>
|
||||
<translation>Сессия</translation>
|
||||
@@ -149,24 +137,14 @@
|
||||
<source>Rename Workspace</source>
|
||||
<translation>Переименование сессии</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Rename</source>
|
||||
<translation>&Переименовать</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Rename and &Open</source>
|
||||
<translation>П&ереименовать и открыть</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ADS::WorkspaceNameInputDialog</name>
|
||||
<message>
|
||||
<source>Enter the name of the workspace:</source>
|
||||
<translation>Введите название сессии:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ADS::WorkspaceView</name>
|
||||
<message>
|
||||
<source>Import Workspace</source>
|
||||
<translation>Импорт сессии</translation>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="zh_CN">
|
||||
<context>
|
||||
<name>ADS::DockAreaTitleBar</name>
|
||||
<name>QtC::ADS</name>
|
||||
<message>
|
||||
<source>Detach Area</source>
|
||||
<translation>分离区域</translation>
|
||||
@@ -15,9 +15,6 @@
|
||||
<source>Close Other Areas</source>
|
||||
<translation>关闭其它区域</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ADS::DockManager</name>
|
||||
<message>
|
||||
<source>Cannot Save Workspace</source>
|
||||
<translation>无法保存工作区</translation>
|
||||
@@ -52,9 +49,6 @@
|
||||
<source>Could not restore workspace %1</source>
|
||||
<translation>无法恢复 %1 工作区</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ADS::DockWidgetTab</name>
|
||||
<message>
|
||||
<source>Detach</source>
|
||||
<translation>分离</translation>
|
||||
@@ -67,9 +61,6 @@
|
||||
<source>Close Others</source>
|
||||
<translation>关闭其它</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ADS::WorkspaceDialog</name>
|
||||
<message>
|
||||
<source>Workspace Manager</source>
|
||||
<translation>工作区管理器</translation>
|
||||
@@ -114,9 +105,6 @@
|
||||
<source><a href="qthelp://org.qt-project.qtcreator/doc/creator-project-managing-workspaces.html">What is a Workspace?</a></source>
|
||||
<translation><a href="qthelp://org.qt-project.qtcreator/doc/creator-project-managing-workspaces.html">什么是工作区?</a></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ADS::WorkspaceModel</name>
|
||||
<message>
|
||||
<source>Workspace</source>
|
||||
<translation>工作区</translation>
|
||||
@@ -149,24 +137,14 @@
|
||||
<source>Rename Workspace</source>
|
||||
<translation>重命名工作区</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Rename</source>
|
||||
<translation>重命名(&R)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Rename and &Open</source>
|
||||
<translation>重命名并打开(&O)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ADS::WorkspaceNameInputDialog</name>
|
||||
<message>
|
||||
<source>Enter the name of the workspace:</source>
|
||||
<translation>输入工作区名称:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ADS::WorkspaceView</name>
|
||||
<message>
|
||||
<source>Import Workspace</source>
|
||||
<translation>导入工作区</translation>
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
namespace AdvancedDockingSystem {
|
||||
namespace ADS {
|
||||
|
||||
struct Tr
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(QtC::AdvancedDockingSystem)
|
||||
Q_DECLARE_TR_FUNCTIONS(QtC::ADS)
|
||||
};
|
||||
|
||||
} // AdvancedDockingSystem
|
||||
|
||||
@@ -4,8 +4,10 @@
|
||||
#include "dockareatitlebar.h"
|
||||
|
||||
#include "ads_globals.h"
|
||||
#include "advanceddockingsystemtr.h"
|
||||
#include "dockareatabbar.h"
|
||||
#include "dockareawidget.h"
|
||||
#include "dockcomponentsfactory.h"
|
||||
#include "dockmanager.h"
|
||||
#include "dockoverlay.h"
|
||||
#include "dockwidget.h"
|
||||
@@ -13,7 +15,6 @@
|
||||
#include "floatingdockcontainer.h"
|
||||
#include "floatingdragpreview.h"
|
||||
#include "iconprovider.h"
|
||||
#include "dockcomponentsfactory.h"
|
||||
|
||||
#include <QBoxLayout>
|
||||
#include <QLoggingCategory>
|
||||
@@ -119,7 +120,7 @@ namespace ADS
|
||||
#endif
|
||||
QObject::connect(tabsMenu, &QMenu::aboutToShow, q, &DockAreaTitleBar::onTabsMenuAboutToShow);
|
||||
m_tabsMenuButton->setMenu(tabsMenu);
|
||||
internal::setToolTip(m_tabsMenuButton, QObject::tr("List All Tabs"));
|
||||
internal::setToolTip(m_tabsMenuButton, Tr::tr("List All Tabs"));
|
||||
m_tabsMenuButton->setSizePolicy(sizePolicy);
|
||||
m_tabsMenuButton->setIconSize(iconSize);
|
||||
m_tabsMenuButton->setFixedSize(buttonSize);
|
||||
@@ -133,7 +134,7 @@ namespace ADS
|
||||
m_undockButton = new TitleBarButton(testConfigFlag(DockManager::DockAreaHasUndockButton));
|
||||
m_undockButton->setObjectName("detachGroupButton");
|
||||
//m_undockButton->setAutoRaise(true);
|
||||
internal::setToolTip(m_undockButton, QObject::tr("Detach Group"));
|
||||
internal::setToolTip(m_undockButton, Tr::tr("Detach Group"));
|
||||
internal::setButtonIcon(m_undockButton,
|
||||
QStyle::SP_TitleBarNormalButton,
|
||||
ADS::DockAreaUndockIcon);
|
||||
@@ -154,9 +155,9 @@ namespace ADS
|
||||
QStyle::SP_TitleBarCloseButton,
|
||||
ADS::DockAreaCloseIcon);
|
||||
if (testConfigFlag(DockManager::DockAreaCloseButtonClosesTab))
|
||||
internal::setToolTip(m_closeButton, QObject::tr("Close Active Tab"));
|
||||
internal::setToolTip(m_closeButton, Tr::tr("Close Active Tab"));
|
||||
else
|
||||
internal::setToolTip(m_closeButton, QObject::tr("Close Group"));
|
||||
internal::setToolTip(m_closeButton, Tr::tr("Close Group"));
|
||||
|
||||
m_closeButton->setSizePolicy(sizePolicy);
|
||||
m_closeButton->setIconSize(iconSize);
|
||||
@@ -532,14 +533,14 @@ namespace ADS
|
||||
return;
|
||||
|
||||
QMenu menu(this);
|
||||
auto action = menu.addAction(tr("Detach Area"),
|
||||
auto action = menu.addAction(Tr::tr("Detach Area"),
|
||||
this,
|
||||
&DockAreaTitleBar::onUndockButtonClicked);
|
||||
action->setEnabled(d->m_dockArea->features().testFlag(DockWidget::DockWidgetFloatable));
|
||||
menu.addSeparator();
|
||||
action = menu.addAction(tr("Close Area"), this, &DockAreaTitleBar::onCloseButtonClicked);
|
||||
action = menu.addAction(Tr::tr("Close Area"), this, &DockAreaTitleBar::onCloseButtonClicked);
|
||||
action->setEnabled(d->m_dockArea->features().testFlag(DockWidget::DockWidgetClosable));
|
||||
menu.addAction(tr("Close Other Areas"), d->m_dockArea, &DockAreaWidget::closeOtherAreas);
|
||||
menu.addAction(Tr::tr("Close Other Areas"), d->m_dockArea, &DockAreaWidget::closeOtherAreas);
|
||||
menu.exec(event->globalPos());
|
||||
}
|
||||
|
||||
|
||||
@@ -576,8 +576,8 @@ namespace ADS
|
||||
d->m_workspaceDateTimes.insert(activeWorkspace(), QDateTime::currentDateTime());
|
||||
else
|
||||
QMessageBox::warning(parentWidget(),
|
||||
tr("Cannot Save Workspace"),
|
||||
tr("Could not save workspace to file %1")
|
||||
Tr::tr("Cannot Save Workspace"),
|
||||
Tr::tr("Could not save workspace to file %1")
|
||||
.arg(workspaceNameToFilePath(d->m_workspaceName)
|
||||
.toUserOutput()));
|
||||
|
||||
@@ -684,8 +684,8 @@ namespace ADS
|
||||
emit workspaceListChanged();
|
||||
} else {
|
||||
QMessageBox::warning(parentWidget(),
|
||||
tr("Cannot Save Workspace"),
|
||||
tr("Could not save workspace to file %1")
|
||||
Tr::tr("Cannot Save Workspace"),
|
||||
Tr::tr("Could not save workspace to file %1")
|
||||
.arg(workspaceNameToFilePath(d->m_workspaceName)
|
||||
.toUserOutput()));
|
||||
}
|
||||
@@ -752,11 +752,11 @@ namespace ADS
|
||||
*/
|
||||
bool DockManager::confirmWorkspaceDelete(const QStringList &workspace)
|
||||
{
|
||||
const QString title = workspace.size() == 1 ? tr("Delete Workspace")
|
||||
: tr("Delete Workspaces");
|
||||
const QString title = workspace.size() == 1 ? Tr::tr("Delete Workspace")
|
||||
: Tr::tr("Delete Workspaces");
|
||||
const QString question = workspace.size() == 1
|
||||
? tr("Delete workspace %1?").arg(workspace.first())
|
||||
: tr("Delete these workspaces?\n %1")
|
||||
? Tr::tr("Delete workspace %1?").arg(workspace.first())
|
||||
: Tr::tr("Delete these workspaces?\n %1")
|
||||
.arg(workspace.join("\n "));
|
||||
return QMessageBox::question(parentWidget(),
|
||||
title,
|
||||
@@ -964,8 +964,8 @@ namespace ADS
|
||||
|
||||
if (!data) {
|
||||
QMessageBox::warning(parentWidget(),
|
||||
tr("Cannot Restore Workspace"),
|
||||
tr("Could not restore workspace %1")
|
||||
Tr::tr("Cannot Restore Workspace"),
|
||||
Tr::tr("Could not restore workspace %1")
|
||||
.arg(fileName.toUserOutput()));
|
||||
|
||||
qCWarning(adsLog) << QString("Could not restore workspace %1: %2")
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "dockwidgettab.h"
|
||||
|
||||
#include "ads_globals.h"
|
||||
#include "advanceddockingsystemtr.h"
|
||||
#include "dockareawidget.h"
|
||||
#include "dockmanager.h"
|
||||
#include "dockoverlay.h"
|
||||
@@ -158,7 +159,7 @@ namespace ADS
|
||||
m_closeButton->setIconSize(QSize(11, 11));
|
||||
m_closeButton->setFixedSize(QSize(17, 17));
|
||||
q->onDockWidgetFeaturesChanged();
|
||||
internal::setToolTip(m_closeButton, QObject::tr("Close Tab"));
|
||||
internal::setToolTip(m_closeButton, Tr::tr("Close Tab"));
|
||||
QObject::connect(m_closeButton,
|
||||
&QAbstractButton::clicked,
|
||||
q,
|
||||
@@ -410,12 +411,12 @@ namespace ADS
|
||||
const bool isNotOnlyTabInContainer = !d->m_dockArea->dockContainer()->hasTopLevelDockWidget();
|
||||
const bool isDetachable = isFloatable && isNotOnlyTabInContainer;
|
||||
|
||||
auto action = menu.addAction(tr("Detach"), this, &DockWidgetTab::detachDockWidget);
|
||||
auto action = menu.addAction(Tr::tr("Detach"), this, &DockWidgetTab::detachDockWidget);
|
||||
action->setEnabled(isDetachable);
|
||||
menu.addSeparator();
|
||||
action = menu.addAction(tr("Close"), this, &DockWidgetTab::closeRequested);
|
||||
action = menu.addAction(Tr::tr("Close"), this, &DockWidgetTab::closeRequested);
|
||||
action->setEnabled(isClosable());
|
||||
menu.addAction(tr("Close Others"), this, &DockWidgetTab::closeOtherTabsRequested);
|
||||
menu.addAction(Tr::tr("Close Others"), this, &DockWidgetTab::closeOtherTabsRequested);
|
||||
menu.exec(event->globalPos());
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "workspacedialog.h"
|
||||
|
||||
#include "advanceddockingsystemtr.h"
|
||||
#include "dockmanager.h"
|
||||
#include "workspaceview.h"
|
||||
|
||||
@@ -65,7 +66,7 @@ WorkspaceNameInputDialog::WorkspaceNameInputDialog(DockManager *manager, QWidget
|
||||
: QDialog(parent)
|
||||
, m_manager(manager)
|
||||
{
|
||||
auto label = new QLabel(tr("Enter the name of the workspace:"), this);
|
||||
auto label = new QLabel(Tr::tr("Enter the name of the workspace:"), this);
|
||||
m_newWorkspaceLineEdit = new QLineEdit(this);
|
||||
m_newWorkspaceLineEdit->setValidator(new WorkspaceValidator(this, m_manager->workspaces()));
|
||||
auto buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel,
|
||||
@@ -113,21 +114,21 @@ WorkspaceDialog::WorkspaceDialog(DockManager *manager, QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, m_manager(manager)
|
||||
, m_workspaceView(new WorkspaceView(manager))
|
||||
, m_btCreateNew(new QPushButton(tr("&New")))
|
||||
, m_btRename(new QPushButton(tr("&Rename")))
|
||||
, m_btClone(new QPushButton(tr("C&lone")))
|
||||
, m_btDelete(new QPushButton(tr("&Delete")))
|
||||
, m_btReset(new QPushButton(tr("Reset")))
|
||||
, m_btSwitch(new QPushButton(tr("&Switch To")))
|
||||
, m_btImport(new QPushButton(tr("Import")))
|
||||
, m_btExport(new QPushButton(tr("Export")))
|
||||
, m_autoLoadCheckBox(new QCheckBox(tr("Restore last workspace on startup")))
|
||||
, m_btCreateNew(new QPushButton(Tr::tr("&New")))
|
||||
, m_btRename(new QPushButton(Tr::tr("&Rename")))
|
||||
, m_btClone(new QPushButton(Tr::tr("C&lone")))
|
||||
, m_btDelete(new QPushButton(Tr::tr("&Delete")))
|
||||
, m_btReset(new QPushButton(Tr::tr("Reset")))
|
||||
, m_btSwitch(new QPushButton(Tr::tr("&Switch To")))
|
||||
, m_btImport(new QPushButton(Tr::tr("Import")))
|
||||
, m_btExport(new QPushButton(Tr::tr("Export")))
|
||||
, m_autoLoadCheckBox(new QCheckBox(Tr::tr("Restore last workspace on startup")))
|
||||
{
|
||||
setWindowTitle(tr("Workspace Manager"));
|
||||
setWindowTitle(Tr::tr("Workspace Manager"));
|
||||
|
||||
m_workspaceView->setActivationMode(Utils::DoubleClickActivation);
|
||||
|
||||
QLabel *whatsAWorkspaceLabel = new QLabel(tr("<a href=\"qthelp://org.qt-project.qtcreator/doc/"
|
||||
QLabel *whatsAWorkspaceLabel = new QLabel(Tr::tr("<a href=\"qthelp://org.qt-project.qtcreator/doc/"
|
||||
"creator-project-managing-workspaces.html\">What is a Workspace?</a>"));
|
||||
whatsAWorkspaceLabel->setOpenExternalLinks(true);
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "workspacemodel.h"
|
||||
|
||||
#include "advanceddockingsystemtr.h"
|
||||
#include "dockmanager.h"
|
||||
#include "workspacedialog.h"
|
||||
|
||||
@@ -42,10 +43,10 @@ QVariant WorkspaceModel::headerData(int section, Qt::Orientation orientation, in
|
||||
case Qt::DisplayRole:
|
||||
switch (section) {
|
||||
case 0:
|
||||
result = tr("Workspace");
|
||||
result = Tr::tr("Workspace");
|
||||
break;
|
||||
case 1:
|
||||
result = tr("Last Modified");
|
||||
result = Tr::tr("Last Modified");
|
||||
break;
|
||||
} // switch (section)
|
||||
break;
|
||||
@@ -162,8 +163,8 @@ void WorkspaceModel::resetWorkspaces()
|
||||
void WorkspaceModel::newWorkspace(QWidget *parent)
|
||||
{
|
||||
WorkspaceNameInputDialog workspaceInputDialog(m_manager, parent);
|
||||
workspaceInputDialog.setWindowTitle(tr("New Workspace Name"));
|
||||
workspaceInputDialog.setActionText(tr("&Create"), tr("Create and &Open"));
|
||||
workspaceInputDialog.setWindowTitle(Tr::tr("New Workspace Name"));
|
||||
workspaceInputDialog.setActionText(Tr::tr("&Create"), Tr::tr("Create and &Open"));
|
||||
|
||||
runWorkspaceNameInputDialog(&workspaceInputDialog, [this](const QString &newName) {
|
||||
m_manager->createWorkspace(newName);
|
||||
@@ -173,8 +174,8 @@ void WorkspaceModel::newWorkspace(QWidget *parent)
|
||||
void WorkspaceModel::cloneWorkspace(QWidget *parent, const QString &workspace)
|
||||
{
|
||||
WorkspaceNameInputDialog workspaceInputDialog(m_manager, parent);
|
||||
workspaceInputDialog.setWindowTitle(tr("New Workspace Name"));
|
||||
workspaceInputDialog.setActionText(tr("&Clone"), tr("Clone and &Open"));
|
||||
workspaceInputDialog.setWindowTitle(Tr::tr("New Workspace Name"));
|
||||
workspaceInputDialog.setActionText(Tr::tr("&Clone"), Tr::tr("Clone and &Open"));
|
||||
workspaceInputDialog.setValue(workspace + " (2)");
|
||||
|
||||
runWorkspaceNameInputDialog(&workspaceInputDialog, [this, workspace](const QString &newName) {
|
||||
@@ -195,8 +196,8 @@ void WorkspaceModel::deleteWorkspaces(const QStringList &workspaces)
|
||||
void WorkspaceModel::renameWorkspace(QWidget *parent, const QString &workspace)
|
||||
{
|
||||
WorkspaceNameInputDialog workspaceInputDialog(m_manager, parent);
|
||||
workspaceInputDialog.setWindowTitle(tr("Rename Workspace"));
|
||||
workspaceInputDialog.setActionText(tr("&Rename"), tr("Rename and &Open"));
|
||||
workspaceInputDialog.setWindowTitle(Tr::tr("Rename Workspace"));
|
||||
workspaceInputDialog.setActionText(Tr::tr("&Rename"), Tr::tr("Rename and &Open"));
|
||||
workspaceInputDialog.setValue(workspace);
|
||||
|
||||
runWorkspaceNameInputDialog(&workspaceInputDialog, [this, workspace](const QString &newName) {
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "workspaceview.h"
|
||||
|
||||
#include "dockmanager.h"
|
||||
#include "advanceddockingsystemtr.h"
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
|
||||
@@ -95,7 +96,7 @@ void WorkspaceView::importWorkspace()
|
||||
static QString lastDir;
|
||||
const QString currentDir = lastDir.isEmpty() ? "" : lastDir;
|
||||
const auto fileName = QFileDialog::getOpenFileName(this,
|
||||
tr("Import Workspace"),
|
||||
Tr::tr("Import Workspace"),
|
||||
currentDir,
|
||||
"Workspaces (*" + m_manager->workspaceFileExtension() + ")");
|
||||
|
||||
@@ -112,7 +113,7 @@ void WorkspaceView::exportCurrentWorkspace()
|
||||
QFileInfo fileInfo(currentDir, m_manager->workspaceNameToFileName(currentWorkspace()));
|
||||
|
||||
const auto fileName = QFileDialog::getSaveFileName(this,
|
||||
tr("Export Workspace"),
|
||||
Tr::tr("Export Workspace"),
|
||||
fileInfo.absoluteFilePath(),
|
||||
"Workspaces (*" + m_manager->workspaceFileExtension() + ")");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user