X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/471df249233a0064cdd3c4efe890536d8b304037..869d237d2f1675068423f664f13ce5b0f8707218:/src/editor/plugins/core/switch.js diff --git a/src/editor/plugins/core/switch.js b/src/editor/plugins/core/switch.js index 9b34721..edb8e95 100644 --- a/src/editor/plugins/core/switch.js +++ b/src/editor/plugins/core/switch.js @@ -14,7 +14,7 @@ var createSwitchAction = function(createParams) { }, getState: function(params) { var state = { - label: this.config.label + label: createParams.to.name }, f = params.fragment, description; @@ -39,9 +39,9 @@ var createSwitchAction = function(createParams) { toSwitch = toSwitch.getParent(createParams.from); } - description = 'Switch to ' + createParams.to.name; + description = gettext('Switch to') + ' ' + createParams.to.name; return _.extend(state, { - allowed: !!toSwitch, + allowed: !!toSwitch || alreadyInTarget, toggled: alreadyInTarget, description: description, execute: alreadyInTarget ? function() {} : function(callback) {