Skip to content

Commit

Permalink
MINOR Javascript translations in CMSMain_right.js (fixes #6142)
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@113248 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information
chillu authored and Sam Minnee committed Feb 2, 2011
1 parent c0f8b44 commit ba4da1f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
11 changes: 6 additions & 5 deletions javascript/CMSMain_right.js
Expand Up @@ -35,11 +35,12 @@ function action_rollback_right() {
} }


if($('Form_EditForm').elements.Version && $('Form_EditForm').elements.Version.value) { if($('Form_EditForm').elements.Version && $('Form_EditForm').elements.Version.value) {
var message = "Do you really want to roll back to version #" var message = ss.i18n.sprintf(
+ $('Form_EditForm').elements.Version.value + " of this page?"; ss.i18n._t('CMSMAIN.RollbackConfirmation'),

$('Form_EditForm').elements.Version.value
);
} else { } else {
var message = "Do you really want to copy the published content to the stage site?"; var message = ss.i18n._t('CMSMAIN.CopyPublishedConfirmation');
} }


if(confirm(message)) { if(confirm(message)) {
Expand Down Expand Up @@ -91,7 +92,7 @@ Behaviour.register({
Behaviour.register({ Behaviour.register({
'select#Form_EditForm_ClassName' : { 'select#Form_EditForm_ClassName' : {
onchange: function() { onchange: function() {
alert('The page type will be updated after the page is saved'); alert(ss.i18n._t('CMSMAIN.PageTypeSaveAlert'));
} }
}, },


Expand Down
5 changes: 4 additions & 1 deletion javascript/lang/en_US.js
Expand Up @@ -26,6 +26,9 @@ if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') {
'ModelAdmin.VALIDATIONERROR': "Validation Error", 'ModelAdmin.VALIDATIONERROR': "Validation Error",
'LeftAndMain.PAGEWASDELETED': "This page was deleted. To edit a page, select it from the left.", 'LeftAndMain.PAGEWASDELETED': "This page was deleted. To edit a page, select it from the left.",
'LeftAndMain.CONFIRMUNSAVED': "Are you sure you want to navigate away from this page?\n\nWARNING: Your changes have not been saved.\n\nPress OK to continue, or Cancel to stay on the current page.", 'LeftAndMain.CONFIRMUNSAVED': "Are you sure you want to navigate away from this page?\n\nWARNING: Your changes have not been saved.\n\nPress OK to continue, or Cancel to stay on the current page.",
'WidgetAreaEditor.TOOMANY': 'Sorry, you have reached the maximum number of widgets in this area' 'WidgetAreaEditor.TOOMANY': 'Sorry, you have reached the maximum number of widgets in this area',
'CMSMAIN.RollbackConfirmation': 'Do you really want to roll back to version #%s of this page?',
'CMSMAIN.CopyPublishedConfirmation': 'Do you really want to copy the published content to the stage site?',
'CMSMAIN.PageTypeSaveAlert': 'The page type will be updated after the page is saved'
}); });
} }

0 comments on commit ba4da1f

Please sign in to comment.