X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/2687ec6cbbe8101a4faa232c79f5c1321dcebe6d..c031ffaa79a223a05a4a58de2854c9855e94cc18:/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) {