Skip to content
This repository
Browse code

MINOR i18n for revert confirmation messages, improved wording

  • Loading branch information...
commit 39208d15e0b02f2bd35ddd06351e580ade49645e 1 parent ca4e8e1
Ingo Schommer authored April 10, 2012
13  javascript/CMSMain.EditForm.js
@@ -254,11 +254,18 @@
254 254
 				// @todo i18n
255 255
 				var form = this.parents('form:first'), version = form.find(':input[name=Version]').val(), message = '';
256 256
 				if(version) {
257  
-					message = "Do you really want to roll back to version #" + version + " of this page?";
  257
+					message = ss.i18n.sprintf(
  258
+						ss.i18n._t('CMSMain.RollbackToVersion'), 
  259
+						version
  260
+					);
258 261
 				} else {
259  
-					message = "Do you really want to copy the published content to the stage site?";
  262
+					message = ss.i18n._t('CMSMain.ConfirmRestoreFromLive');
  263
+				}
  264
+				if(confirm(message)) {
  265
+					return this._super(e);
  266
+				} else {
  267
+					return false;
260 268
 				}
261  
-				return confirm(message);
262 269
 			}
263 270
 		});
264 271
 
4  javascript/lang/en_US.js
@@ -38,6 +38,8 @@ if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') {
38 38
 		'AssetAdmin.ConfirmDelete': 'Do you really want to delete this folder and all contained files?',
39 39
 		'Folder.Name': 'Folder name',
40 40
 		'Tree.AddSubPage': 'Add new page here',
41  
-		'Tree.EditPage': 'Edit'
  41
+		'Tree.EditPage': 'Edit',
  42
+		'CMSMain.ConfirmRestoreFromLive': "Do you really want to copy the published content to the draft site?",
  43
+		'CMSMain.RollbackToVersion': "Do you really want to roll back to version #%s of this page?"
42 44
 	});
43 45
 }

0 notes on commit 39208d1

Please sign in to comment.
Something went wrong with that request. Please try again.