Index: trunk/extensions/MoodBar/MoodBar.i18n.php |
— | — | @@ -32,7 +32,10 @@ |
33 | 33 | 'moodbar-what-label' => 'What is this?', |
34 | 34 | 'moodbar-what-expanded' => '▶', // Ignore, do not translate. ▼ |
35 | 35 | 'moodbar-what-collapsed' => '▼', // Ignore, do not translate. ▶ |
36 | | - 'moodbar-what-content' => '--- @todo ---', |
| 36 | + 'moodbar-what-content' => 'This feature is designed to help the Wikipedia community understand the experience of people editing Wikipedia. |
| 37 | +For more information, please visit the $1.', |
| 38 | + 'moodbar-what-link' => 'feature page', |
| 39 | + 'moodbar-disable' => "I'm not interested. Please disable this feature.", |
37 | 40 | 'moodbar-form-title' => 'Because...', |
38 | 41 | 'moodbar-form-note' => '140 character maximum', |
39 | 42 | 'moodbar-form-note-dynamic' => '$1 characters remaining', |
Index: trunk/extensions/MoodBar/modules/ext.moodBar/ext.moodBar.core.js |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | <span class="mw-moodBar-overlayWhatTrigger"></span>\ |
29 | 29 | <span class="mw-moodBar-overlayWhatLabel"><html:msg key="moodbar-what-label" /></span>\ |
30 | 30 | </a>\ |
31 | | - <div class="mw-moodBar-overlayWhatContent"><html:msg key="moodbar-what-content" /></div>\ |
| 31 | + <div class="mw-moodBar-overlayWhatContent"></div>\ |
32 | 32 | </span>\ |
33 | 33 | </div>', |
34 | 34 | type: '\ |
— | — | @@ -95,7 +95,7 @@ |
96 | 96 | .get( 0 ) |
97 | 97 | ); |
98 | 98 | } ); |
99 | | - return elems;ß |
| 99 | + return elems; |
100 | 100 | } ) |
101 | 101 | .hover( function() { |
102 | 102 | $( this ).addClass( 'mw-moodBar-types-hover' ); |
— | — | @@ -124,6 +124,26 @@ |
125 | 125 | } ) |
126 | 126 | } ) |
127 | 127 | .end() |
| 128 | + .find( '.mw-moodBar-overlayWhatContent' ) |
| 129 | + .html( |
| 130 | + function() { |
| 131 | + var message, linkMessage, link; |
| 132 | + |
| 133 | + message = mw.message('moodbar-what-content'); |
| 134 | + linkMessage = mw.msg('moodbar-what-link'); |
| 135 | + link = mw.html.element('a', |
| 136 | + { |
| 137 | + 'href' : mb.conf.infoUrl, |
| 138 | + 'title' : linkMessage |
| 139 | + }, linkMessage ); |
| 140 | + |
| 141 | + message = message.escaped(); |
| 142 | + message = message.replace( /\$1/, link ); |
| 143 | + |
| 144 | + return message; |
| 145 | + } |
| 146 | + ) |
| 147 | + .end() |
128 | 148 | // Submit |
129 | 149 | .find( '.mw-moodBar-formSubmit' ) |
130 | 150 | .val( mw.msg( 'moodbar-form-submit' ) ) |
Index: trunk/extensions/MoodBar/MoodBar.php |
— | — | @@ -77,6 +77,7 @@ |
78 | 78 | 'moodbar-what-expanded', |
79 | 79 | 'moodbar-what-collapsed', |
80 | 80 | 'moodbar-what-content', |
| 81 | + 'moodbar-what-link', |
81 | 82 | 'moodbar-form-title', |
82 | 83 | 'moodbar-form-note', |
83 | 84 | 'moodbar-form-note-dynamic', |
— | — | @@ -104,3 +105,19 @@ |
105 | 106 | /** Configuration **/ |
106 | 107 | /** The registration time after which users will be shown the MoodBar **/ |
107 | 108 | $wgMoodBarCutoffTime = null; |
| 109 | + |
| 110 | +/** MoodBar configuration settings **/ |
| 111 | +$wgMoodBarConfig = array( |
| 112 | + 'bucketConfig' => |
| 113 | + array( |
| 114 | + 'buckets' => |
| 115 | + array( |
| 116 | + 'feedback' => 80, |
| 117 | + 'using' => 10, |
| 118 | + 'share' => 10, |
| 119 | + ), |
| 120 | + 'version' => 1, |
| 121 | + 'expires' => 30, |
| 122 | + ), |
| 123 | + 'infoUrl' => 'http://www.mediawiki.org/wiki/MoodBar', |
| 124 | +); |
Index: trunk/extensions/MoodBar/MoodBar.hooks.php |
— | — | @@ -49,22 +49,11 @@ |
50 | 50 | * ResourceLoaderGetConfigVars hook |
51 | 51 | */ |
52 | 52 | public static function resourceLoaderGetConfigVars( &$vars ) { |
53 | | - global $wgUser; |
| 53 | + global $wgUser, $wgMoodBarConfig; |
54 | 54 | $vars['mbConfig'] = array( |
55 | 55 | 'validTypes' => MBFeedbackItem::getValidTypes(), |
56 | 56 | 'userBuckets' => MoodBarHooks::getUserBuckets( $wgUser ), |
57 | | - 'bucketConfig' => |
58 | | - array( |
59 | | - 'buckets' => |
60 | | - array( |
61 | | - 'feedback' => 80, |
62 | | - 'using' => 10, |
63 | | - 'share' => 10, |
64 | | - ), |
65 | | - 'version' => 1, |
66 | | - 'expires' => 30, |
67 | | - ), |
68 | | - ); |
| 57 | + ) + $wgMoodBarConfig; |
69 | 58 | return true; |
70 | 59 | } |
71 | 60 | |