Permalink
Browse files

MINOR Making some JavaScript strings in cms/javascript translatable, …

…and updated their cs_CZ and sk_SK translations (fixes #6085, thanks Pike)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@113689 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent 6df2e74 commit c19aa2ce85a2f1bdc4ee30faa4635a0df2d4488c @chillu chillu committed with sminnee Nov 13, 2010
@@ -29,7 +29,7 @@ function action_upload_right(e) {
}.bind(this));
if(values.length == 0) {
- alert("Please select at least one file for uploading");
+ alert(ss.i18n._t('TABLEFIELD.SELECTUPLOAD', 'Please select at least one file for uploading.'));
openTab("Root_Upload");
} else {
frames['AssetAdmin_upload'].document.getElementById('Form_UploadForm').submit();
@@ -70,7 +70,7 @@ MarkingPropertiesButton.prototype = {
}
if(list == "") {
- alert(this.noneCheckedError);
+ alert(ss.i18n._t('TABLEFIELD.SELECTDELETE', 'Please select some files to delete!'));
return false;
} else {
@@ -79,7 +79,7 @@ MarkingPropertiesButton.prototype = {
// If there is a confirmation message, show it before submitting
if('' != this.confirmMessage) {
// Only submit if OK button is clicked
- if (confirm(this.confirmMessage)) {
+ if (confirm(ss.i18n._t('TABLEFIELD.CONFIRMDELETEV2', 'Do you really want to delete the marked files?'))) {
$('Form_EditForm').save(false, null, this.action);
}
} else {
@@ -293,7 +293,7 @@ addfolder.prototype = {
},
onclick : function() {
- statusMessage('Creating new folder...');
+ statusMessage(ss.i18n._t('CMSMAIN.CREATINGFOLDER', 'Creating new folder...'));
this.form_submit();
/*
if(treeactions.toggleSelection(this)) {
@@ -424,7 +424,7 @@ var deletefolder = {
if(csvIDs) {
$('Form_DeleteItemsForm').elements.csvIDs.value = csvIDs;
- statusMessage('deleting pages');
+ statusMessage(ss.i18n._t('CMSMAIN.DELETINGFOLDERS', 'Deleting folders...'));
Ajax.SubmitForm('Form_DeleteItemsForm', null, {
onSuccess : deletefolder.submit_success,
@@ -53,8 +53,8 @@ AssetTableField.prototype = {
if(linkCount) linkCount = linkCount.innerHTML;
var confirmMessage = ss.i18n._t('TABLEFIELD.DELETECONFIRMMESSAGE', 'Are you sure you want to delete this record?');
- if(linkCount) confirmMessage += '\nThere are ' + linkCount + ' page(s) that use this file, please review the list of pages on the Links tab of the file before continuing.';
-
+ if(linkCount>0) confirmMessage += ss.i18n.sprintf(ss.i18n._t('TABLEFIELD.DELETECONFIRMMESSAGEV2','\nThere are %s page(s) that use this file, please review the list of pages on the Links tab of the file before continuing.'),linkCount);
+
// TODO ajaxErrorHandler and loading-image are dependent on cms, but formfield is in sapphire
var confirmed = confirm(confirmMessage);
if(confirmed)
@@ -384,7 +384,7 @@ function ajaxLink(href) {
* Load a URL into the given form
*/
function ajaxLoadPage() {
- statusMessage('loading...', 2, true);
+ statusMessage(ss.i18n._t('LOADING', 'loading...'),2,true);
new Ajax.Request(this.URL + '&ajax=1', {
method : 'get',
onSuccess : ajaxLoadPage_success.bind(this)
@@ -58,7 +58,7 @@ TreeAPI.prototype = {
},
reload: function(options) {
- this.innerHTML = 'Loading...';
+ this.innerHTML = ss.i18n._t('LOADING', 'loading...');
var args = {ajax:1, ID:0};
if ($('LangSelector')) args.locale = $('LangSelector').value;
@@ -227,7 +227,7 @@ TreeNodeAPI.prototype = {
ajaxExpansion : function() {
this.addNodeClass('loading');
var ul = this.treeNodeHolder(false);
- ul.innerHTML = 'loading...';
+ ul.innerHTML = ss.i18n._t('LOADING', 'loading...');
// Any attempts to add children to this page should, in fact, cue them up for insertion later
ul.cuedNewNodes = [];
@@ -309,7 +309,7 @@ CMSRightForm.prototype = {
url += '&locale='+lang;
}
- statusMessage("loading...");
+ statusMessage(ss.i18n._t('LOADING', 'loading...'));
this.loadURLFromServer(url);
} else {
throw("getPageFromServer: Bad page ID: " + id);
@@ -28,7 +28,7 @@ Behaviour.register({
if(treeNode) treeNode.addNodeClass('loading');
- statusMessage("loading...");
+ statusMessage(ss.i18n._t('LOADING', 'loading...'));
var requestURL = 'admin/reports/show/' + id;
new Ajax.Request(requestURL, {
@@ -11,15 +11,17 @@ if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') {
'CMSMAIN.ERRORUNFILTER' : 'Nefiltrovaná struktura',
'CMSMAIN.PUBLISHINGPAGES' : 'Zveřejňování stránek...',
'CMSMAIN.SELECTONEPAGE' : "Prosím, vyberte nejméně 1 stránku.",
+ 'CMSMAIN.SELECTMOREPAGES' : "Máte vybráno %s stránek.\n\nSkutečně je chcete %s?",
'CMSMAIN.ERRORPUBLISHING' : 'Chyba při zveřejňování stránek',
'CMSMAIN.REALLYDELETEPAGES' : "Skutečně chcete smazat %s označené stránky?",
'CMSMAIN.DELETINGPAGES' : 'Mazání stránek...',
+ 'CMSMAIN.CREATINGFOLDER' : 'Vytváření složky...',
+ 'CMSMAIN.DELETINGFOLDERS' : 'Mazání složek...',
'CMSMAIN.ERRORDELETINGPAGES': 'Chyba při mazání stránek',
'CMSMAIN.PUBLISHING' : 'Zveřejňování...',
'CMSMAIN.RESTORING': 'Obnovování...',
'CMSMAIN.ERRORREVERTING': 'Chyba převádění na živý obsah',
'CMSMAIN.SAVING' : 'ukládání...',
- 'CMSMAIN.SELECTMOREPAGES' : "Máte vybráno %s stránek.\n\nSkutečně je chcete?",
'ModelAdmin.SAVED': "Uloženo",
'ModelAdmin.REALLYDELETE': "Skutečně chcete smazat?",
'ModelAdmin.DELETED': "Smazáno",
@@ -29,6 +29,13 @@ if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') {
'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'
+ 'CMSMAIN.PageTypeSaveAlert': 'The page type will be updated after the page is saved',
+ 'LOADING': 'loading...',
+ 'TABLEFIELD.DELETECONFIRMMESSAGEV2': '\nThere are %s page(s) that use this file, please review the list of pages on the Links tab of the file before continuing.',
+ 'TABLEFIELD.SELECTUPLOAD': 'Please select at least one file for uploading.',
+ 'TABLEFIELD.SELECTDELETE': 'Please select some files to delete!',
+ 'TABLEFIELD.CONFIRMDELETEV2': 'Do you really want to delete the marked files?',
+ 'CMSMAIN.CREATINGFOLDER': 'Creating new folder...',
+ 'CMSMAIN.DELETINGFOLDERS': 'Deleting folders...'
});
}
@@ -11,15 +11,17 @@ if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') {
'CMSMAIN.ERRORUNFILTER' : 'Nefiltrovaná štruktúra',
'CMSMAIN.PUBLISHINGPAGES' : 'Zverejňovanie stránok...',
'CMSMAIN.SELECTONEPAGE' : "Prosím, vyberte najmenej 1 stránku.",
+ 'CMSMAIN.SELECTMOREPAGES' : "Máte vybraté %s stránok.\n\nSkutočne ich chcete %s?",
'CMSMAIN.ERRORPUBLISHING' : 'Chyba pri zverejňovaní stránok',
'CMSMAIN.REALLYDELETEPAGES' : "Skutočne chcete zmazať %s označené stránky?",
'CMSMAIN.DELETINGPAGES' : 'Mazanie stránok...',
+ 'CMSMAIN.CREATINGFOLDER' : 'Vytváranie složky...',
+ 'CMSMAIN.DELETINGFOLDERS' : 'Mazanie složiek...',
'CMSMAIN.ERRORDELETINGPAGES': 'Chyba pri mazaní stránok',
'CMSMAIN.PUBLISHING' : 'Zverejňovanie...',
'CMSMAIN.RESTORING': 'Obnovovanie...',
'CMSMAIN.ERRORREVERTING': 'Chyba prevádzania na živý obsah',
'CMSMAIN.SAVING' : 'ukladanie...',
- 'CMSMAIN.SELECTMOREPAGES' : "Máte vybraté %s stránok.\n\nSkutočne ich chcete?",
'ModelAdmin.SAVED': "Uložené",
'ModelAdmin.REALLYDELETE': "Skutočně chcete zmazať?",
'ModelAdmin.DELETED': "Zmazané",

0 comments on commit c19aa2c

Please sign in to comment.