diff -r 90b7a52bea45 -r b0a4d179be85 includes/clientside/static/ajax.js
--- a/includes/clientside/static/ajax.js Sat Oct 20 21:59:27 2007 -0400
+++ b/includes/clientside/static/ajax.js Sat Nov 03 07:40:54 2007 -0400
@@ -71,7 +71,7 @@
if(ajax.readyState == 4) {
unsetAjaxLoading();
if(edit_open) {
- c=confirm('Do you really want to revert your changes?');
+ c=confirm($lang.get('editor_msg_revert_confirm'));
if(!c) return;
}
edit_open = true;
@@ -82,18 +82,18 @@
// Allow the textarea grippifier to re-create the resizer control on the textarea
grippied_textareas.pop(in_array('ajaxEditArea', grippied_textareas));
}
- disableUnload('If you do, any changes that you have made to this page will be lost.');
+ disableUnload($lang.get('editor_msg_unload'));
var switcher = ( readCookie('enano_editor_mode') == 'tinymce' ) ?
- 'wikitext editor | graphical editor' :
- 'wikitext editor | graphical editor' ;
+ '' + $lang.get('editor_btn_wikitext') + ' | ' + $lang.get('editor_btn_graphical') :
+ $lang.get('editor_btn_wikitext') + ' | ' + $lang.get('editor_btn_graphical') + '' ;
document.getElementById('ajaxEditContainer').innerHTML = '\
\
' + switcher + ' \
';
@@ -110,14 +110,14 @@
{
$('ajaxEditArea').switchToMCE();
createCookie('enano_editor_mode', 'tinymce', 365);
- $('switcher').object.innerHTML = 'wikitext editor | graphical editor';
+ $('switcher').object.innerHTML = '' + $lang.get('editor_btn_wikitext') + ' | ' + $lang.get('editor_btn_graphical');
}
function setEditorText()
{
$('ajaxEditArea').destroyMCE();
createCookie('enano_editor_mode', 'text', 365);
- $('switcher').object.innerHTML = 'wikitext editor | graphical editor';
+ $('switcher').object.innerHTML = $lang.get('editor_btn_wikitext') + ' | ' + $lang.get('editor_btn_graphical') + '';
}
function ajaxViewSource()
@@ -129,11 +129,7 @@
ajaxGet(stdAjaxPrefix+'&_mode=getsource', function() {
if(ajax.readyState == 4) {
unsetAjaxLoading();
- if(edit_open) {
- c=confirm('Do you really want to revert your changes?');
- if(!c) return;
- }
- edit_open = true;
+ edit_open = false;
selectButtonMajor('article');
selectButtonMinor('edit');
if(in_array('ajaxEditArea', grippied_textareas))
@@ -144,7 +140,7 @@
document.getElementById('ajaxEditContainer').innerHTML = '\
';
initTextareas();
}
@@ -194,7 +190,7 @@
// IE <6 pseudo-compatibility
if ( KILL_SWITCH )
return true;
- c = confirm('Do you really want to discard your changes?');
+ c = confirm($lang.get('editor_msg_discard_confirm'));
if(!c) return;
ajaxReset();
}
@@ -204,6 +200,9 @@
// IE <6 pseudo-compatibility
if ( KILL_SWITCH )
return true;
+ var ns_id = strToPageID(title);
+ if ( ns_id[1] == 'Special' || ns_id[1] == 'Admin' )
+ return false;
enableUnload();
setAjaxLoading();
ajaxGet(stdAjaxPrefix+'&_mode=getpage&noheaders', function() {
@@ -226,7 +225,7 @@
if(shift) {
r = 'NO_REASON';
} else {
- r = prompt('Reason for (un)protecting:');
+ r = prompt($lang.get('ajax_protect_prompt_reason'));
if(!r || r=='') return;
}
setAjaxLoading();
@@ -248,7 +247,7 @@
// IE <6 pseudo-compatibility
if ( KILL_SWITCH )
return true;
- r = prompt('What title should this page be renamed to?\nNote: This does not and will never change the URL of this page, that must be done from the admin panel.');
+ r = prompt($lang.get('ajax_rename_prompt'));
if(!r || r=='') return;
setAjaxLoading();
ajaxPost(stdAjaxPrefix+'&_mode=rename', 'newtitle='+escape(r), function() {
@@ -278,12 +277,12 @@
// IE <6 pseudo-compatibility
if ( KILL_SWITCH )
return true;
- var reason = prompt('Please enter your reason for deleting this page.');
+ var reason = prompt($lang.get('ajax_delete_prompt_reason'));
if ( !reason || reason == '' )
{
return false;
}
- c = confirm('You are about to REVERSIBLY delete this page. Do you REALLY want to do this?\n\n(Comments and categorization data, as well as any attached files, will be permanently lost)');
+ c = confirm($lang.get('ajax_delete_confirm'));
if(!c)
{
return;
@@ -303,7 +302,7 @@
// IE <6 pseudo-compatibility
if ( KILL_SWITCH )
return true;
- c = confirm('Are you sure that you want to vote that this page be deleted?');
+ c = confirm($lang.get('ajax_delvote_confirm'));
if(!c) return;
setAjaxLoading();
ajaxGet(stdAjaxPrefix+'&_mode=delvote', function() {
@@ -319,7 +318,7 @@
// IE <6 pseudo-compatibility
if ( KILL_SWITCH )
return true;
- c = confirm('This will reset the number of votes against this page to zero. Do you really want to do this?');
+ c = confirm($lang.get('ajax_delvote_reset_confirm'));
if(!c) return;
setAjaxLoading();
ajaxGet(stdAjaxPrefix+'&_mode=resetdelvotes', function() {
@@ -457,9 +456,9 @@
// IE <6 pseudo-compatibility
if ( KILL_SWITCH )
return true;
- c = confirm('You are about to DESTROY all log entries for this page. As opposed to (example) deleting this page, this action is completely IRREVERSIBLE and should not be used except in dire circumstances. Do you REALLY want to do this?');
+ c = confirm($lang.get('ajax_clearlogs_confirm'));
if(!c) return;
- c = confirm('You\'re ABSOLUTELY sure???');
+ c = confirm($lang.get('ajax_clearlogs_confirm_nag'));
if(!c) return;
setAjaxLoading();
ajaxGet(stdAjaxPrefix+'&_mode=flushlogs', function() {
@@ -563,13 +562,13 @@
if ( KILL_SWITCH )
return true;
var inner_html = '';
- inner_html += '