Index: trunk/phase3/tests/qunit/suites/resources/jquery/jquery.localize.js |
— | — | @@ -6,7 +6,7 @@ |
7 | 7 | } ); |
8 | 8 | |
9 | 9 | test( 'Handle basic replacements', function() { |
10 | | - expect(4); |
| 10 | + expect(3); |
11 | 11 | |
12 | 12 | var html, $lc; |
13 | 13 | mw.messages.set( 'basic', 'Basic stuff' ); |
— | — | @@ -17,12 +17,6 @@ |
18 | 18 | |
19 | 19 | strictEqual( $lc.text(), 'Basic stuff', 'Tag: html:msg' ); |
20 | 20 | |
21 | | - // Tag: msg (deprecated) |
22 | | - html = '<div><span><msg key="basic"></span></div>'; |
23 | | - $lc = $( html ).localize().find( 'span' ); |
24 | | - |
25 | | - strictEqual( $lc.text(), 'Basic stuff', 'Tag: msg' ); |
26 | | - |
27 | 21 | // Attribute: title-msg |
28 | 22 | html = '<div><span title-msg="basic"></span></div>'; |
29 | 23 | $lc = $( html ).localize().find( 'span' ); |
Index: trunk/phase3/resources/jquery/jquery.localize.js |
— | — | @@ -1,14 +1,11 @@ |
2 | 2 | /** |
3 | 3 | * Simple Placeholder-based Localization |
4 | 4 | * |
5 | | - * Call on a selection of HTML which contains <msg key="message-key" /> elements or elements with |
6 | | - * title-msg="message-key" or alt-msg="message-key" attributes. <msg /> elements will be replaced |
| 5 | + * Call on a selection of HTML which contains <html:msg key="message-key" /> elements or elements with |
| 6 | + * title-msg="message-key" or alt-msg="message-key" attributes. <html:msg /> elements will be replaced |
7 | 7 | * with localized text, elements with title-msg and alt-msg attributes will receive localized title |
8 | 8 | * and alt attributes. |
9 | | - * |
10 | | - * Note that "msg" elements must have html namespacing such as "<html:msg />" to be compatible with |
11 | | - * Internet Explorer. |
12 | | - * |
| 9 | + * * |
13 | 10 | * Example: |
14 | 11 | * <p class="somethingCool"> |
15 | 12 | * <html:msg key="my-message" /> |
— | — | @@ -23,7 +20,7 @@ |
24 | 21 | */ |
25 | 22 | ( function( $ ) { |
26 | 23 | /** |
27 | | - * Localizes a DOM selection by replacing <msg /> elements with localized text and adding |
| 24 | + * Localizes a DOM selection by replacing <html:msg /> elements with localized text and adding |
28 | 25 | * localized title and alt attributes to elements with title-msg and alt-msg attributes |
29 | 26 | * respectively. |
30 | 27 | * |
— | — | @@ -40,7 +37,7 @@ |
41 | 38 | return mw.msg.apply( mw, args ); |
42 | 39 | }; |
43 | 40 | return $(this) |
44 | | - .find( 'msg,html\\:msg' ) |
| 41 | + .find( 'html\\:msg' ) |
45 | 42 | .each( function() { |
46 | 43 | var $el = $(this); |
47 | 44 | $el |