From 39208d15e0b02f2bd35ddd06351e580ade49645e Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 10 Apr 2012 14:02:05 +0200 Subject: [PATCH] MINOR i18n for revert confirmation messages, improved wording --- javascript/CMSMain.EditForm.js | 13 ++++++++++--- javascript/lang/en_US.js | 4 +++- 2 files changed, 13 insertions(+), 4 deletions(-) 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?" }); }