diff --git a/javascript/CMSMain.EditForm.js b/javascript/CMSMain.EditForm.js index 119b5e7e..4ded0c02 100644 --- a/javascript/CMSMain.EditForm.js +++ b/javascript/CMSMain.EditForm.js @@ -254,11 +254,18 @@ // @todo i18n var form = this.parents('form:first'), version = form.find(':input[name=Version]').val(), message = ''; if(version) { - message = "Do you really want to roll back to version #" + version + " of this page?"; + message = ss.i18n.sprintf( + ss.i18n._t('CMSMain.RollbackToVersion'), + version + ); } else { - message = "Do you really want to copy the published content to the stage site?"; + message = ss.i18n._t('CMSMain.ConfirmRestoreFromLive'); + } + if(confirm(message)) { + return this._super(e); + } else { + return false; } - return confirm(message); } }); diff --git a/javascript/lang/en_US.js b/javascript/lang/en_US.js index 0e552a0d..5ee4affc 100644 --- a/javascript/lang/en_US.js +++ b/javascript/lang/en_US.js @@ -38,6 +38,8 @@ if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') { 'AssetAdmin.ConfirmDelete': 'Do you really want to delete this folder and all contained files?', 'Folder.Name': 'Folder name', 'Tree.AddSubPage': 'Add new page here', - 'Tree.EditPage': 'Edit' + 'Tree.EditPage': 'Edit', + 'CMSMain.ConfirmRestoreFromLive': "Do you really want to copy the published content to the draft site?", + 'CMSMain.RollbackToVersion': "Do you really want to roll back to version #%s of this page?" }); }