Index: trunk/extensions/ArticleFeedback/modules/ext.articleFeedback-beta/ext.articleFeedback-beta.js |
— | — | @@ -5,9 +5,6 @@ |
6 | 6 | ( function( $, mw ) { |
7 | 7 | |
8 | 8 | $.articleFeedback = { |
9 | | - 'cfg': { |
10 | | - 'msgPrefix': 'articlefeedback-beta-', |
11 | | - }, |
12 | 9 | 'fn': { |
13 | 10 | 'build': function( context ) { |
14 | 11 | context.$ui |
— | — | @@ -16,35 +13,35 @@ |
17 | 14 | .append( '\ |
18 | 15 | <div class="articleFeedback-tabs">\ |
19 | 16 | <div class="articleFeedback-tab articleFeedback-tab-current" rel="form">\ |
20 | | - <div class="articleFeedback-buffer" msg-text="form-tab-label"></div>\ |
| 17 | + <div class="articleFeedback-buffer"><msg key="form-tab-label" /></div>\ |
21 | 18 | </div>\ |
22 | 19 | <div class="articleFeedback-tab" rel="report">\ |
23 | | - <div class="articleFeedback-buffer" msg-text="report-tab-label"></div>\ |
| 20 | + <div class="articleFeedback-buffer"><msg key="report-tab-label" /></div>\ |
24 | 21 | </div>\ |
25 | 22 | </div>\ |
26 | 23 | <div class="articleFeedback-panel" rel="form">\ |
27 | 24 | <div class="articleFeedback-buffer">\ |
28 | | - <div class="articleFeedback-title" msg-text="form-panel-title"></div>\ |
29 | | - <div class="articleFeedback-instructions" msg-text="form-panel-instructions"></div>\ |
| 25 | + <div class="articleFeedback-title"><msg key="form-panel-title" /></div>\ |
| 26 | + <div class="articleFeedback-instructions"><msg key="form-panel-instructions" /></div>\ |
30 | 27 | <div style="clear:both;"></div>\ |
31 | 28 | <div class="articleFeedback-ratings">\ |
32 | 29 | <div class="articleFeedback-rating" rel="wellsourced">\ |
33 | | - <span class="articleFeedback-label" msg-text="field-wellsourced-label" msg-tip="field-wellsourced-tip"></span>\ |
| 30 | + <span class="articleFeedback-label" title-msg="field-wellsourced-tip"><msg key="field-wellsourced-label" /></span>\ |
34 | 31 | <div class="articleFeedback-rating-fields"><input type="radio" /><input type="radio" /><input type="radio" /><input type="radio" /><input type="radio" /></div>\ |
35 | 32 | <div class="articleFeedback-rating-labels"><label></label><label></label><label></label><label></label><label></label></div>\ |
36 | 33 | </div>\ |
37 | 34 | <div class="articleFeedback-rating" rel="neutral">\ |
38 | | - <span class="articleFeedback-label" msg-text="field-neutral-label" msg-tip="field-neutral-tip"></span>\ |
| 35 | + <span class="articleFeedback-label" title-msg="field-neutral-tip"><msg key="field-neutral-label" /></span>\ |
39 | 36 | <div class="articleFeedback-rating-fields"><input type="radio" /><input type="radio" /><input type="radio" /><input type="radio" /><input type="radio" /></div>\ |
40 | 37 | <div class="articleFeedback-rating-labels"><label></label><label></label><label></label><label></label><label></label></div>\ |
41 | 38 | </div>\ |
42 | 39 | <div class="articleFeedback-rating" rel="complete">\ |
43 | | - <span class="articleFeedback-label" msg-text="field-complete-label" msg-tip="field-complete-tip"></span>\ |
| 40 | + <span class="articleFeedback-label" title-msg="field-complete-tip"><msg key="field-complete-label" /></span>\ |
44 | 41 | <div class="articleFeedback-rating-fields"><input type="radio" /><input type="radio" /><input type="radio" /><input type="radio" /><input type="radio" /></div>\ |
45 | 42 | <div class="articleFeedback-rating-labels"><label></label><label></label><label></label><label></label><label></label></div>\ |
46 | 43 | </div>\ |
47 | 44 | <div class="articleFeedback-rating" rel="readable">\ |
48 | | - <span class="articleFeedback-label" msg-text="field-readable-label" msg-tip="field-readable-tip"></span>\ |
| 45 | + <span class="articleFeedback-label" title-msg="field-readable-tip"><msg key="field-readable-label" /></span>\ |
49 | 46 | <div class="articleFeedback-rating-fields"><input type="radio" /><input type="radio" /><input type="radio" /><input type="radio" /><input type="radio" /></div>\ |
50 | 47 | <div class="articleFeedback-rating-labels"><label></label><label></label><label></label><label></label><label></label></div>\ |
51 | 48 | </div>\ |
— | — | @@ -54,23 +51,14 @@ |
55 | 52 | </div>\ |
56 | 53 | <div class="articleFeedback-panel" rel="report">\ |
57 | 54 | <div class="articleFeedback-buffer">\ |
58 | | - <div class="articleFeedback-title" msg-text="report-panel-title"></div>\ |
| 55 | + <div class="articleFeedback-title"><msg key="report-panel-title" /></div>\ |
59 | 56 | </div>\ |
60 | 57 | </div>\ |
61 | 58 | ' ) |
62 | | - // Insert messages |
63 | | - .find( '[msg-text]' ) |
64 | | - .each( function() { |
65 | | - $(this).text( $.articleFeedback.fn.msg( $(this).attr( 'msg-text' ) ) ); |
66 | | - } ) |
| 59 | + .localize( { 'prefix': 'articlefeedback-beta-' } ) |
| 60 | + .find( '[title]' ) |
| 61 | + .tipsy( { 'gravity': 'sw', 'fade': true } ) |
67 | 62 | .end() |
68 | | - .find( '[msg-tip]' ) |
69 | | - .each( function() { |
70 | | - $(this) |
71 | | - .attr( 'title', $.articleFeedback.fn.msg( $(this).attr( 'msg-tip' ) ) ) |
72 | | - .tipsy( { 'gravity': 'sw', 'fade': true } ); |
73 | | - } ) |
74 | | - .end() |
75 | 63 | // Setup tab behavior |
76 | 64 | .find( '.articleFeedback-tab' ) |
77 | 65 | .click( function( e ) { |
— | — | @@ -89,13 +77,7 @@ |
90 | 78 | e.preventDefault(); |
91 | 79 | return false; |
92 | 80 | } ); |
93 | | - }, |
94 | | - 'msg': function() { |
95 | | - if ( arguments.length ) { |
96 | | - arguments[0] = $.articleFeedback.cfg.msgPrefix + arguments[0]; |
97 | | - } |
98 | | - return mediaWiki.msg.apply( mediaWiki, arguments ); |
99 | | - }, |
| 81 | + } |
100 | 82 | } |
101 | 83 | }; |
102 | 84 | |