Index: trunk/extensions/LiveTranslate/LiveTranslate.php |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | die( 'Not an entry point.' ); |
26 | 26 | } |
27 | 27 | |
28 | | -define( 'LiveTranslate_VERSION', '1.2.1' ); |
| 28 | +define( 'LiveTranslate_VERSION', '1.2.2' ); |
29 | 29 | |
30 | 30 | $wgExtensionCredits['other'][] = array( |
31 | 31 | 'path' => __FILE__, |
— | — | @@ -92,16 +92,16 @@ |
93 | 93 | if ( defined( 'MW_SUPPORTS_RESOURCE_MODULES' ) ) { |
94 | 94 | $moduleTemplate = array( |
95 | 95 | 'localBasePath' => dirname( __FILE__ ), |
96 | | - 'remoteBasePath' => $egLiveTranslateScriptPath, |
| 96 | + 'remoteExtPath' => 'LiveTranslate', |
97 | 97 | 'group' => 'ext.livetranslate' |
98 | 98 | ); |
99 | 99 | |
100 | 100 | $wgResourceModules['ext.livetranslate'] = $moduleTemplate + array( |
101 | 101 | 'scripts' => array( |
| 102 | + 'includes/jquery.replaceText.js', |
102 | 103 | 'includes/ext.livetranslate.js', |
| 104 | + 'includes/jquery.liveTranslate.js', |
103 | 105 | 'includes/ext.lt.tm.js', |
104 | | - 'includes/jquery.replaceText.js', |
105 | | - 'includes/jquery.liveTranslate.js' |
106 | 106 | ), |
107 | 107 | 'dependencies' => array( 'jquery'/*, 'jquery.ui.button'*/ ), |
108 | 108 | 'messages' => $egLTJSMessages |
Index: trunk/extensions/LiveTranslate/RELEASE-NOTES |
— | — | @@ -4,6 +4,11 @@ |
5 | 5 | Latest version of the release notes: http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/LiveTranslate/RELEASE-NOTES?view=co |
6 | 6 | |
7 | 7 | |
| 8 | +=== Version 1.2.2 === |
| 9 | +2011-09-15 |
| 10 | + |
| 11 | +* Fixed script loading issue occuring when resource loader debugging is off. |
| 12 | + |
8 | 13 | === Version 1.2.1 === |
9 | 14 | 2011-09-12 |
10 | 15 | |
Index: trunk/extensions/LiveTranslate/includes/jquery.liveTranslate.js |
— | — | @@ -8,6 +8,18 @@ |
9 | 9 | |
10 | 10 | ( function ( $, lt ) { $.fn.liveTranslate = function( options ) { |
11 | 11 | |
| 12 | + /** |
| 13 | + * Regex text escaping function. |
| 14 | + * Borrowed from http://simonwillison.net/2006/Jan/20/escape/ |
| 15 | + */ |
| 16 | + RegExp.escape = function( text ) { |
| 17 | + if ( !arguments.callee.sRE ) { |
| 18 | + var specials = [ '/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\' ]; |
| 19 | + arguments.callee.sRE = new RegExp( '(\\' + specials.join('|\\') + ')', 'g' ); |
| 20 | + } |
| 21 | + return text.replace(arguments.callee.sRE, '\\$1'); |
| 22 | + } |
| 23 | + |
12 | 24 | var _this = this; |
13 | 25 | |
14 | 26 | /** |
— | — | @@ -241,4 +253,4 @@ |
242 | 254 | |
243 | 255 | return this; |
244 | 256 | |
245 | | -}; } )( jQuery, window.liveTranslate ); |
\ No newline at end of file |
| 257 | +}; } )( window.jQuery, window.liveTranslate ); |
\ No newline at end of file |
Index: trunk/extensions/LiveTranslate/includes/jquery.replaceText.js |
— | — | @@ -8,16 +8,4 @@ |
9 | 9 | */ |
10 | 10 | ( function ( $ ) { |
11 | 11 | $.fn.replaceText=function(b,a,c){return this.each(function(){var f=this.firstChild,g,e,d=[];if(f){do{if(f.nodeType===3){g=f.nodeValue;e=g.replace(b,a);if(e!==g){if(!c&&/</.test(e)){$(f).before(e);d.push(f)}else{f.nodeValue=e}}}}while(f=f.nextSibling)}d.length&&$(d).remove()})}; |
12 | | -} )( jQuery ); |
13 | | - |
14 | | -/** |
15 | | - * Regex text escaping function. |
16 | | - * Borrowed from http://simonwillison.net/2006/Jan/20/escape/ |
17 | | - */ |
18 | | -RegExp.escape = function( text ) { |
19 | | - if ( !arguments.callee.sRE ) { |
20 | | - var specials = [ '/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\' ]; |
21 | | - arguments.callee.sRE = new RegExp( '(\\' + specials.join('|\\') + ')', 'g' ); |
22 | | - } |
23 | | - return text.replace(arguments.callee.sRE, '\\$1'); |
24 | | -} |
\ No newline at end of file |
| 12 | +} )( window.jQuery ); |