Skip to content

Commit

Permalink
Merge pull request #4934 from Jojo-Schmitz/translate-toolbar-editor
Browse files Browse the repository at this point in the history
partial fix #287858: make elements in Toolbar Editor translatable
  • Loading branch information
dmitrio95 committed Apr 18, 2019
2 parents 06d9cc7 + 36c9902 commit f21f2f4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions mscore/toolbarEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
namespace Ms {

static const char* toolbars[] = {
"Note Input",
"File Operations",
"Playback Controls"
QT_TRANSLATE_NOOP("toolbar", "Note Input"),
QT_TRANSLATE_NOOP("toolbar", "File Operations"),
QT_TRANSLATE_NOOP("toolbar", "Playback Controls")
};

//---------------------------------------------------------
Expand All @@ -46,7 +46,7 @@ ToolbarEditor::ToolbarEditor(QWidget* parent)
setupUi(this);

for (auto i : toolbars)
toolbarList->addItem(QString(i));
toolbarList->addItem(qApp->translate("toolbar", i));
toolbarList->setCurrentRow(0);

new_toolbars = new std::vector<std::list<const char*>*>();
Expand All @@ -73,7 +73,7 @@ void ToolbarEditor::init()
QString name = Workspace::currentWorkspace->name();
bool writable = !Workspace::currentWorkspace->readOnly();
if (!writable) {
name += tr(" (not changeable)");
name += " " + tr("(not changeable)");
}
add->setEnabled(writable);
remove->setEnabled(writable);
Expand Down Expand Up @@ -121,7 +121,7 @@ void ToolbarEditor::populateLists(const std::list<const char*>& all, std::list<c
if (a)
item = new QListWidgetItem(a->icon(), actionName);
else if (actionName.isEmpty())
item = new QListWidgetItem(tr("Spacer"));
item = new QListWidgetItem(tr("Separator"));
else
item = new QListWidgetItem(actionName);
item->setData(Qt::UserRole, QVariant::fromValue((void*)i));
Expand Down Expand Up @@ -149,7 +149,7 @@ void ToolbarEditor::populateLists(const std::list<const char*>& all, std::list<c
}
}
}
QListWidgetItem* item = new QListWidgetItem(tr("Spacer"));
QListWidgetItem* item = new QListWidgetItem(tr("Separator"));
item->setData(Qt::UserRole, QVariant::fromValue((void*)""));
availableList->addItem(item);
}
Expand Down

0 comments on commit f21f2f4

Please sign in to comment.