Spreadsheet: Issue #0004473: Expose openCommand() to translation

Continuing the work to expose the undo/redo functionality to translation. This commit does so for the Spreadsheet Wb.  
Ticket: https://tracker.freecadweb.org/view.php?id=4473
This commit is contained in:
luz paz
2020-11-28 13:54:55 -05:00
committed by wwmayer
parent faa8688ee5
commit 7b6af35e6c
6 changed files with 22 additions and 22 deletions

View File

@@ -125,7 +125,7 @@ void WorkbenchHelper::setForegroundColor(const QColor & color)
if (ranges.size() > 0) {
std::vector<Range>::const_iterator i = ranges.begin();
Gui::Command::openCommand("Set foreground color");
Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Set foreground color"));
for (; i != ranges.end(); ++i)
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.setForeground('%s', (%f,%f,%f))", sheet->getNameInDocument(),
i->rangeString().c_str(), color.redF(), color.greenF(), color.blueF());
@@ -152,7 +152,7 @@ void WorkbenchHelper::setBackgroundColor(const QColor & color)
if (ranges.size() > 0) {
std::vector<Range>::const_iterator i = ranges.begin();
Gui::Command::openCommand("Set background color");
Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Set background color"));
for (; i != ranges.end(); ++i)
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.setBackground('%s', (%f,%f,%f))", sheet->getNameInDocument(),
i->rangeString().c_str(), color.redF(), color.greenF(), color.blueF());