From: Owen Leonard Date: Tue, 12 Mar 2013 00:44:00 +0000 (-0400) Subject: Bug 9797 - Untranslatable strings have returned to ajax.js X-Git-Tag: v3.12.00-beta3~218^2~1 X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;h=c0bc0eaa2bf7638ed53d9687d19fdf68352fb1ea;p=koha_ffzg Bug 9797 - Untranslatable strings have returned to ajax.js The patch for Bug 8942 undid the changes to ajax.js made by Bug 9331. This patch puts those changes back. To test that preference-related error messages continue to work, open the system preferences editor in two tabs. Log out in one tab and try to save a system preference in the other. You should see correct error messages. Signed-off-by: Pierre Angot Signed-off-by: Jonathan Druart Signed-off-by: Jared Camins-Esakov --- diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/ajax.js b/koha-tmpl/intranet-tmpl/prog/en/js/ajax.js index 968334bc88..c9a45c0bfd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/ajax.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/ajax.js @@ -15,20 +15,20 @@ KOHA.AJAX = { KOHA.xhr = xhr; if ( !xhr.getResponseHeader( 'content-type' ).match( 'application/json' ) ) { // Something really failed - humanMsg.displayAlert( _("Internal Server Error, please reload the page") ); + humanMsg.displayAlert( MSG_INTERNAL_SERVER_ERROR ); return; } var error = eval( '(' + xhr.responseText + ')' ); if ( error.type == 'auth' ) { - humanMsg.displayMsg( _("You need to log in again, your session has timed out") ); + humanMsg.displayMsg( MSG_SESSION_TIMED_OUT ); } if ( callback ) { callback( error ); } else { - humanMsg.displayAlert( _("Error; your data might not have been saved") ); + humanMsg.displayAlert( MSG_DATA_NOT_SAVED ); } }, MarkRunning: function ( selector, text ) {