diff --git a/src/Mod/Spreadsheet/Gui/Command.cpp b/src/Mod/Spreadsheet/Gui/Command.cpp index 0e7b62ada1..87d5cf4346 100644 --- a/src/Mod/Spreadsheet/Gui/Command.cpp +++ b/src/Mod/Spreadsheet/Gui/Command.cpp @@ -88,7 +88,7 @@ void CmdSpreadsheetMergeCells::activated(int iMsg) // Execute mergeCells commands if (ranges.size() > 0) { - Gui::Command::openCommand("Merge cells"); + Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Merge cells")); std::vector::const_iterator i = ranges.begin(); for (; i != ranges.end(); ++i) if (i->size() > 1) @@ -141,7 +141,7 @@ void CmdSpreadsheetSplitCell::activated(int iMsg) if (current.isValid()) { std::string address = CellAddress(current.row(), current.column()).toString(); - Gui::Command::openCommand("Split cell"); + Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Split cell")); Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.splitCell('%s')", sheet->getNameInDocument(), address.c_str()); Gui::Command::commitCommand(); @@ -287,7 +287,7 @@ void CmdSpreadsheetAlignLeft::activated(int iMsg) if (ranges.size() > 0) { std::vector::const_iterator i = ranges.begin(); - Gui::Command::openCommand("Left-align cell"); + Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Left-align cell")); for (; i != ranges.end(); ++i) Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.setAlignment('%s', 'left', 'keep')", sheet->getNameInDocument(), i->rangeString().c_str()); @@ -339,7 +339,7 @@ void CmdSpreadsheetAlignCenter::activated(int iMsg) if (ranges.size() > 0) { std::vector::const_iterator i = ranges.begin(); - Gui::Command::openCommand("Center cell"); + Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Center cell")); for (; i != ranges.end(); ++i) Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.setAlignment('%s', 'center', 'keep')", sheet->getNameInDocument(), i->rangeString().c_str()); @@ -391,7 +391,7 @@ void CmdSpreadsheetAlignRight::activated(int iMsg) if (ranges.size() > 0) { std::vector::const_iterator i = ranges.begin(); - Gui::Command::openCommand("Right-align cell"); + Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Right-align cell")); for (; i != ranges.end(); ++i) Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.setAlignment('%s', 'right', 'keep')", sheet->getNameInDocument(), i->rangeString().c_str()); @@ -443,7 +443,7 @@ void CmdSpreadsheetAlignTop::activated(int iMsg) if (ranges.size() > 0) { std::vector::const_iterator i = ranges.begin(); - Gui::Command::openCommand("Top-align cell"); + Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Top-align cell")); for (; i != ranges.end(); ++i) Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.setAlignment('%s', 'top', 'keep')", sheet->getNameInDocument(), i->rangeString().c_str()); @@ -495,7 +495,7 @@ void CmdSpreadsheetAlignBottom::activated(int iMsg) if (ranges.size() > 0) { std::vector::const_iterator i = ranges.begin(); - Gui::Command::openCommand("Bottom-align cell"); + Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Bottom-align cell")); for (; i != ranges.end(); ++i) Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.setAlignment('%s', 'bottom', 'keep')", sheet->getNameInDocument(), i->rangeString().c_str()); @@ -547,7 +547,7 @@ void CmdSpreadsheetAlignVCenter::activated(int iMsg) if (ranges.size() > 0) { std::vector::const_iterator i = ranges.begin(); - Gui::Command::openCommand("Vertically center cells"); + Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Vertically center cells")); for (; i != ranges.end(); ++i) Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.setAlignment('%s', 'vcenter', 'keep')", sheet->getNameInDocument(), i->rangeString().c_str()); @@ -616,7 +616,7 @@ void CmdSpreadsheetStyleBold::activated(int iMsg) std::vector ranges = sheetView->selectedRanges(); std::vector::const_iterator i = ranges.begin(); - Gui::Command::openCommand("Set bold text"); + Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Set bold text")); for (; i != ranges.end(); ++i) { if (!allBold) Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.setStyle('%s', 'bold', 'add')", sheet->getNameInDocument(), @@ -690,7 +690,7 @@ void CmdSpreadsheetStyleItalic::activated(int iMsg) std::vector ranges = sheetView->selectedRanges(); std::vector::const_iterator i = ranges.begin(); - Gui::Command::openCommand("Set italic text"); + Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Set italic text")); for (; i != ranges.end(); ++i) { if (!allItalic) Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.setStyle('%s', 'italic', 'add')", sheet->getNameInDocument(), @@ -764,7 +764,7 @@ void CmdSpreadsheetStyleUnderline::activated(int iMsg) std::vector ranges = sheetView->selectedRanges(); std::vector::const_iterator i = ranges.begin(); - Gui::Command::openCommand("Set underline text"); + Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Set underline text")); for (; i != ranges.end(); ++i) { if (!allUnderline) Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.setStyle('%s', 'underline', 'add')", sheet->getNameInDocument(), @@ -875,7 +875,7 @@ void CmdCreateSpreadsheet::activated(int iMsg) Q_UNUSED(iMsg); std::string FeatName = getUniqueObjectName("Spreadsheet"); - openCommand("Create Spreadsheet"); + openCommand(QT_TRANSLATE_NOOP("Command", "Create Spreadsheet")); doCommand(Doc,"App.activeDocument().addObject('Spreadsheet::Sheet','%s\')",FeatName.c_str()); doCommand(Gui,"Gui.Selection.clearSelection()\n"); doCommand(Gui,"Gui.Selection.addSelection(App.activeDocument().Name,'%s\')",FeatName.c_str()); diff --git a/src/Mod/Spreadsheet/Gui/PropertiesDialog.cpp b/src/Mod/Spreadsheet/Gui/PropertiesDialog.cpp index a34b3c5552..ab6e95358b 100644 --- a/src/Mod/Spreadsheet/Gui/PropertiesDialog.cpp +++ b/src/Mod/Spreadsheet/Gui/PropertiesDialog.cpp @@ -225,7 +225,7 @@ PropertiesDialog::~PropertiesDialog() void PropertiesDialog::apply() { if (ranges.size() > 0) { - Gui::Command::openCommand("Set cell properties"); + Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Set cell properties")); std::vector::const_iterator i = ranges.begin(); bool changes = false; diff --git a/src/Mod/Spreadsheet/Gui/SheetModel.cpp b/src/Mod/Spreadsheet/Gui/SheetModel.cpp index f9a6b51521..ab1dde1c47 100644 --- a/src/Mod/Spreadsheet/Gui/SheetModel.cpp +++ b/src/Mod/Spreadsheet/Gui/SheetModel.cpp @@ -529,7 +529,7 @@ bool SheetModel::setData(const QModelIndex & index, const QVariant & value, int try { QString str = value.toString(); - Gui::Command::openCommand("Edit cell"); + Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Edit cell")); // Because of possible complication of recursively escaped // characters, let's take a shortcut and bypass the command // interface for now. diff --git a/src/Mod/Spreadsheet/Gui/SheetTableView.cpp b/src/Mod/Spreadsheet/Gui/SheetTableView.cpp index 24fa527244..3a589d6ae1 100644 --- a/src/Mod/Spreadsheet/Gui/SheetTableView.cpp +++ b/src/Mod/Spreadsheet/Gui/SheetTableView.cpp @@ -158,7 +158,7 @@ void SheetTableView::insertRows() std::sort(sortedRows.begin(), sortedRows.end()); /* Insert rows */ - Gui::Command::openCommand("Insert rows"); + Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Insert rows")); std::vector::const_reverse_iterator it = sortedRows.rbegin(); while (it != sortedRows.rend()) { int prev = *it; @@ -195,7 +195,7 @@ void SheetTableView::removeRows() std::sort(sortedRows.begin(), sortedRows.end(), std::greater()); /* Remove rows */ - Gui::Command::openCommand("Remove rows"); + Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Remove rows")); for (std::vector::const_iterator it = sortedRows.begin(); it != sortedRows.end(); ++it) { Gui::cmdAppObjectArgs(sheet, "removeRows('%s', %d)", rowName(*it).c_str(), 1); } @@ -216,7 +216,7 @@ void SheetTableView::insertColumns() std::sort(sortedColumns.begin(), sortedColumns.end()); /* Insert columns */ - Gui::Command::openCommand("Insert columns"); + Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Insert columns")); std::vector::const_reverse_iterator it = sortedColumns.rbegin(); while (it != sortedColumns.rend()) { int prev = *it; @@ -254,7 +254,7 @@ void SheetTableView::removeColumns() std::sort(sortedColumns.begin(), sortedColumns.end(), std::greater()); /* Remove columns */ - Gui::Command::openCommand("Remove rows"); + Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Remove rows")); for (std::vector::const_iterator it = sortedColumns.begin(); it != sortedColumns.end(); ++it) Gui::cmdAppObjectArgs(sheet, "removeColumns('%s', %d)", columnName(*it).c_str(), 1); @@ -419,7 +419,7 @@ void SheetTableView::deleteSelection() QModelIndexList selection = selectionModel()->selectedIndexes(); if (selection.size() > 0) { - Gui::Command::openCommand("Clear cell(s)"); + Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Clear cell(s)")); std::vector ranges = selectedRanges(); std::vector::const_iterator i = ranges.begin(); diff --git a/src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp b/src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp index 1255661ef8..6032380cad 100644 --- a/src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp +++ b/src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp @@ -157,7 +157,7 @@ bool SheetView::onMsg(const char *pMsg, const char **) else if(strcmp("Std_Delete",pMsg) == 0) { std::vector ranges = selectedRanges(); if (sheet->hasCell(ranges)) { - Gui::Command::openCommand("Clear cell(s)"); + Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Clear cell(s)")); std::vector::const_iterator i = ranges.begin(); for (; i != ranges.end(); ++i) { FCMD_OBJ_CMD(sheet, "clear('" << i->rangeString() << "')"); diff --git a/src/Mod/Spreadsheet/Gui/Workbench.cpp b/src/Mod/Spreadsheet/Gui/Workbench.cpp index 2be95e60a8..2a578426f3 100644 --- a/src/Mod/Spreadsheet/Gui/Workbench.cpp +++ b/src/Mod/Spreadsheet/Gui/Workbench.cpp @@ -125,7 +125,7 @@ void WorkbenchHelper::setForegroundColor(const QColor & color) if (ranges.size() > 0) { std::vector::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::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());