From 2d3564d626abbb8dceaaf1df914209596992585d Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 28 Jun 2020 06:45:21 -0400 Subject: [PATCH] INodeEditor: Mark strings as translatable where applicable --- src/Editor/INodeEditor.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Editor/INodeEditor.cpp b/src/Editor/INodeEditor.cpp index 3cbaa0e5..69e8666d 100644 --- a/src/Editor/INodeEditor.cpp +++ b/src/Editor/INodeEditor.cpp @@ -8,15 +8,15 @@ INodeEditor::INodeEditor(QWidget *pParent) , mpSelection(new CNodeSelection) { // Create gizmo actions - mGizmoActions.append(new QAction(QIcon(":/icons/SelectMode.svg"), "Select Objects", this)); - mGizmoActions.append(new QAction(QIcon(":/icons/Translate.svg"), "Translate", this)); - mGizmoActions.append(new QAction(QIcon(":/icons/Rotate.svg"), "Rotate", this)); - mGizmoActions.append(new QAction(QIcon(":/icons/Scale.svg"), "Scale", this)); + mGizmoActions.append(new QAction(QIcon(QStringLiteral(":/icons/SelectMode.svg")), tr("Select Objects"), this)); + mGizmoActions.append(new QAction(QIcon(QStringLiteral(":/icons/Translate.svg")), tr("Translate"), this)); + mGizmoActions.append(new QAction(QIcon(QStringLiteral(":/icons/Rotate.svg")), tr("Rotate"), this)); + mGizmoActions.append(new QAction(QIcon(QStringLiteral(":/icons/Scale.svg")), tr("Scale"), this)); - mGizmoActions[0]->setShortcut(QKeySequence("Ctrl+Q")); - mGizmoActions[1]->setShortcut(QKeySequence("Ctrl+W")); - mGizmoActions[2]->setShortcut(QKeySequence("Ctrl+E")); - mGizmoActions[3]->setShortcut(QKeySequence("Ctrl+R")); + mGizmoActions[0]->setShortcut(QKeySequence(Qt::Key_Control, Qt::Key_Q)); + mGizmoActions[1]->setShortcut(QKeySequence(Qt::Key_Control, Qt::Key_W)); + mGizmoActions[2]->setShortcut(QKeySequence(Qt::Key_Control, Qt::Key_E)); + mGizmoActions[3]->setShortcut(QKeySequence(Qt::Key_Control, Qt::Key_R)); mpGizmoGroup = new QActionGroup(this); @@ -30,8 +30,8 @@ INodeEditor::INodeEditor(QWidget *pParent) // Create transform combo box mpTransformCombo = new QComboBox(this); - mpTransformCombo->addItem("World"); - mpTransformCombo->addItem("Local"); + mpTransformCombo->addItem(tr("World")); + mpTransformCombo->addItem(tr("Local")); // Connect signals and slots connect(mGizmoActions[0], SIGNAL(triggered()), this, SLOT(OnSelectObjectsTriggered())); @@ -195,7 +195,7 @@ void INodeEditor::ClearAndSelectNode(CSceneNode *pNode) else { - mUndoStack.beginMacro("Select"); + mUndoStack.beginMacro(tr("Select")); mUndoStack.push(new CClearSelectionCommand(mpSelection)); mUndoStack.push(new CSelectNodeCommand(mpSelection, pNode)); mUndoStack.endMacro(); @@ -293,7 +293,7 @@ void INodeEditor::OnGizmoMoved() { if (mCloneState == ECloneState::ReadyToClone) { - mUndoStack.beginMacro("Clone"); + mUndoStack.beginMacro(tr("Clone")); mUndoStack.push(new CCloneSelectionCommand(this)); mCloneState = ECloneState::Cloning; }