Skip to content

Commit

Permalink
Gui: [skip ci] support of translation in undo/redo dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Nov 3, 2020
1 parent 50208b8 commit 30e18cd
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/Gui/DlgUndoRedo.cpp
Expand Up @@ -22,6 +22,9 @@


#include "PreCompiled.h"
#ifndef _PreComp_
#include <QCoreApplication>
#endif

#include "DlgUndoRedo.h"
#include "Application.h"
Expand Down Expand Up @@ -77,8 +80,10 @@ void UndoDialog::onFetchInfo()
Gui::Document* pcDoc = mdi->getGuiDocument();
if (pcDoc) {
std::vector<std::string> vecUndos = pcDoc->getUndoVector();
for (std::vector<std::string>::iterator i = vecUndos.begin(); i != vecUndos.end(); ++i)
addAction(QString::fromUtf8((*i).c_str()), this, SLOT(onSelected()));
for (std::vector<std::string>::iterator i = vecUndos.begin(); i != vecUndos.end(); ++i) {
QString text = QCoreApplication::translate("Command", i->c_str());
addAction(text, this, SLOT(onSelected()));
}
}
}
}
Expand Down Expand Up @@ -140,8 +145,10 @@ void RedoDialog::onFetchInfo()
Gui::Document* pcDoc = mdi->getGuiDocument();
if (pcDoc) {
std::vector<std::string> vecRedos = pcDoc->getRedoVector();
for (std::vector<std::string>::iterator i = vecRedos.begin(); i != vecRedos.end(); ++i)
addAction(QString::fromUtf8((*i).c_str()), this, SLOT(onSelected()));
for (std::vector<std::string>::iterator i = vecRedos.begin(); i != vecRedos.end(); ++i) {
QString text = QCoreApplication::translate("Command", i->c_str());
addAction(text, this, SLOT(onSelected()));
}
}
}
}
Expand Down

0 comments on commit 30e18cd

Please sign in to comment.