From: Trevor Parscal Date: Wed, 12 Jan 2011 20:43:23 +0000 (+0000) Subject: Fixed IE bug, you must use html:msg for the msg elements that jquery.localize uses... X-Git-Tag: 1.31.0-rc.0~32590 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=85a453204ce78018fe266dee762ac0b19a89ce27;p=lhc%2Fweb%2Fwiklou.git Fixed IE bug, you must use html:msg for the msg elements that jquery.localize uses to translate things otherwise IE chokes when you insert them cause it doesn't know about the msg element. --- diff --git a/resources/jquery/jquery.localize.js b/resources/jquery/jquery.localize.js index 29f606f049..a94dfe881a 100644 --- a/resources/jquery/jquery.localize.js +++ b/resources/jquery/jquery.localize.js @@ -6,9 +6,12 @@ * with localized text, elements with title-msg and alt-msg attributes will receive localized title * and alt attributes. * + * Note that "msg" elements must have html namespacing such as "" to be compatible with + * Internet Explorer. + * * Example: *

- * + * * *

* @@ -26,10 +29,11 @@ * @param Object: options Map of options * * prefix: Message prefix to use when localizing elements and attributes */ + $.fn.localize = function( options ) { options = $.extend( { 'prefix': '' }, options ); return $(this) - .find( 'msg' ) + .find( 'msg,html\\:msg' ) .each( function() { $(this) .text( mediaWiki.msg( options.prefix + $(this).attr( 'key' ) ) ) @@ -50,4 +54,7 @@ $.fn.localize = function( options ) { .removeAttr( 'alt-msg' ); } ) .end(); -}; \ No newline at end of file +}; + +// Let IE know about the msg tag before it's used... +document.createElement( 'msg' );