- _("Remove a path point from %s"), _(LevelEditor::blockNames[target->type]));
+ _("Remove a path point from %s"), LevelEditor::getLocalizedBlockName(target->type));
}
std::string RemovePathCommand::describe() {
/// TRANSLATORS: Context: Undo/Redo ...
- return tfm::format(_("Remove all paths from %s"), _(LevelEditor::blockNames[target->type]));
+ return tfm::format(_("Remove all paths from %s"), LevelEditor::getLocalizedBlockName(target->type));
}
std::string AddLinkCommand::describe() {
/// TRANSLATORS: Context: Undo/Redo ...
- return tfm::format(_("Add link from %s to %s"), _(LevelEditor::blockNames[target->type]), _(LevelEditor::blockNames[clickedObj->type]));
+ return tfm::format(_("Add link from %s to %s"), LevelEditor::getLocalizedBlockName(target->type), LevelEditor::getLocalizedBlockName(clickedObj->type));
}
std::string RemoveLinkCommand::describe() {
/// TRANSLATORS: Context: Undo/Redo ...
- return tfm::format(_("Remove all links from %s"), _(LevelEditor::blockNames[target->type]));
+ return tfm::format(_("Remove all links from %s"), LevelEditor::getLocalizedBlockName(target->type));
//Add the window to the GUIObjectRoot and the objectWindows map.
GUIObjectRoot->addChild(root);
parent->objectWindows[root] = target;
//And dismiss this popup.
dismiss();
return;
} else if (action == "DeleteLayer") {
// delete selected layer
if (parent->selectedLayer.empty()) {
// can't delete Blocks layer
actions->value = -1;
return;
}
if (parent->sceneryLayers.find(parent->selectedLayer) == parent->sceneryLayers.end()) {
// can't find the layer with given name
actions->value = -1;
return;
}
if (msgBox(imageManager, renderer,
tfm::format(
(parent->selectedLayer < "f") ? _("Are you sure you want to delete background layer '%s'?") : _("Are you sure you want to delete foreground layer '%s'?"),