diff -r 1316404e4ea8 -r a6ed8b6cdbe1 includes/clientside/static/ajax.js --- a/includes/clientside/static/ajax.js Sun Oct 28 21:19:36 2007 -0400 +++ b/includes/clientside/static/ajax.js Sun Oct 28 23:50:10 2007 -0400 @@ -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)) @@ -226,7 +222,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 +244,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 +274,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 +299,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 +315,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 +453,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() { @@ -565,11 +561,11 @@ var inner_html = ''; inner_html += '
'; - var chtheme_mb = new messagebox(MB_OKCANCEL|MB_ICONQUESTION, 'Change your theme', inner_html); + var chtheme_mb = new messagebox(MB_OKCANCEL|MB_ICONQUESTION, $lang.get('ajax_changestyle_title'), inner_html); chtheme_mb.onbeforeclick['OK'] = ajaxChangeStyleComplete; } @@ -643,7 +639,7 @@ var style = $('chtheme_sel_style'); if ( !theme.object || !style.object ) { - alert('Please select a theme from the list.'); + alert($lang.get('ajax_changestyle_pleaseselect_theme')); return true; } var theme_id = theme.object.value; @@ -667,7 +663,7 @@ { if ( ajax.responseText == 'GOOD' ) { - var c = confirm('Your theme preference has been changed.\nWould you like to reload the page now to see the changes?'); + var c = confirm($lang.get('ajax_changestyle_success')); if ( c ) window.location.reload(); } @@ -876,7 +872,7 @@ // IE <6 pseudo-compatibility if ( KILL_SWITCH ) return true; - if ( !confirm('Are you really sure you want to do this? Some pages might not function if this emergency-only feature is activated.') ) + if ( !confirm($lang.get('ajax_killphp_confirm')) ) return false; var $killdiv = $dynano('php_killer'); if ( !$killdiv.object ) @@ -897,7 +893,7 @@ var newdiv = document.createElement('div'); // newdiv.style = $killdiv.object.style; newdiv.className = $killdiv.object.className; - newdiv.innerHTML = '