From: Brion Vibber Date: Thu, 21 Jul 2011 17:45:03 +0000 (+0000) Subject: Followup r92329: Fixes the localize test cases in IE 6 and 7. X-Git-Tag: 1.31.0-rc.0~28699 X-Git-Url: http://git.cyclocoop.org/%28%5B%5E/404?a=commitdiff_plain;h=96dc4b7e8af1bf4e8fc2246de44727a2440afce4;p=lhc%2Fweb%2Fwiklou.git Followup r92329: Fixes the localize test cases in IE 6 and 7. Looks like we do in fact need to select on 'msg,html\\:msg' in order to find the bits on both IE 6/7 (search for 'msg') and everything-else (search for 'html:msg'). --- diff --git a/resources/jquery/jquery.localize.js b/resources/jquery/jquery.localize.js index 97072e2700..3a7925bf53 100644 --- a/resources/jquery/jquery.localize.js +++ b/resources/jquery/jquery.localize.js @@ -37,7 +37,12 @@ $.fn.localize = function( options ) { return mw.msg.apply( mw, args ); }; return $(this) - .find( 'html\\:msg' ) + // Ok, so here's the story on this selector. + // In IE 6/7, searching for 'msg' turns up the 'html:msg', but searching for 'html:msg' does not. + // In later IE and other browsers, searching for 'html:msg' turns up the 'html:msg', but searching for 'msg' does not. + // So searching for both 'msg' and 'html:msg' seems to get the job done. + // This feels pretty icky, though. + .find( 'msg,html\\:msg' ) .each( function() { var $el = $(this); $el