var allowed = params.document && !!(params.document[dir+'Stack'].length),
desc = dir === 'undo' ? gettext('Undo') : gettext('Redo'),
descEmpty = dir === 'undo' ? gettext('There is nothing to undo') : gettext('There is nothing to redo');
var allowed = params.document && !!(params.document[dir+'Stack'].length),
desc = dir === 'undo' ? gettext('Undo') : gettext('Redo'),
descEmpty = dir === 'undo' ? gettext('There is nothing to undo') : gettext('There is nothing to redo');