Index: trunk/extensions/EducationProgram/specials/SpecialInstitutions.php |
— | — | @@ -100,7 +100,7 @@ |
101 | 101 | |
102 | 102 | $out->addHTML( Xml::inputLabel( wfMsg( 'ep-institutions-newname' ), 'newname', 'newname' ) ); |
103 | 103 | |
104 | | - $out->addHTML( Html::input( |
| 104 | + $out->addHTML( ' ' . Html::input( |
105 | 105 | 'addneworg', |
106 | 106 | wfMsg( 'ep-institutions-add' ), |
107 | 107 | 'submit' |
Index: trunk/extensions/EducationProgram/includes/EPPager.php |
— | — | @@ -168,9 +168,7 @@ |
169 | 169 | $c = $this->className; |
170 | 170 | |
171 | 171 | foreach ( $fields as $fieldName ) { |
172 | | - $headers[$c::getPrefixedField( $fieldName )] = wfMsg( |
173 | | - 'educationprogram-pager-' . strtolower( $c ) . '-' . str_replace( '_', '-', $fieldName ) |
174 | | - ); |
| 172 | + $headers[$c::getPrefixedField( $fieldName )] = $this->getMsg( 'header-' . $fieldName ); |
175 | 173 | } |
176 | 174 | |
177 | 175 | return $headers; |
— | — | @@ -235,6 +233,8 @@ |
236 | 234 | break; |
237 | 235 | } |
238 | 236 | |
| 237 | + $control = ' ' . $this->getMsg( 'filter-' . $optionName ) . ' ' . $control; |
| 238 | + |
239 | 239 | $controls[] = $control; |
240 | 240 | } |
241 | 241 | |
— | — | @@ -242,11 +242,11 @@ |
243 | 243 | |
244 | 244 | return |
245 | 245 | '<fieldset>' . |
246 | | - '<legend>' . wfMsgHtml( 'reviews-reviews-showonly' ) . '</legend>' . |
| 246 | + '<legend>' . wfMsgHtml( 'educationprogram-pager-showonly' ) . '</legend>' . |
247 | 247 | '<form method="post" action="' . htmlspecialchars( $GLOBALS['wgScript'] . '?title=' . $title ) . '">' . |
248 | 248 | Html::hidden( 'title', $title ) . |
249 | 249 | implode( '', $controls ) . |
250 | | - '<input type="submit" value="' . wfMsgHtml( 'reviews-reviews-go' ) . '">' . |
| 250 | + ' <input type="submit" value="' . wfMsgHtml( 'reviews-reviews-go' ) . '">' . |
251 | 251 | '</form>' . |
252 | 252 | '</fieldset>'; |
253 | 253 | } |
— | — | @@ -279,5 +279,19 @@ |
280 | 280 | |
281 | 281 | return $changed; |
282 | 282 | } |
| 283 | + |
| 284 | + /** |
| 285 | + * Takes a message key and prefixes it with the extension name and name of the pager, |
| 286 | + * feeds it to wfMsg, and returns it. |
| 287 | + * |
| 288 | + * @since 0.1 |
| 289 | + * |
| 290 | + * @param string $messageKey |
| 291 | + * |
| 292 | + * @return string |
| 293 | + */ |
| 294 | + protected function getMsg( $messageKey ) { |
| 295 | + return wfMsg( strtolower( $this->className ) . 'pager-' . str_replace( '_', '-', $messageKey ) ); |
| 296 | + } |
283 | 297 | |
284 | 298 | } |
Index: trunk/extensions/EducationProgram/EducationProgram.i18n.php |
— | — | @@ -64,10 +64,14 @@ |
65 | 65 | 'ep-institutions-newname' => 'Institution name:', |
66 | 66 | 'ep-institutions-add' => 'Add institution', |
67 | 67 | |
| 68 | + // Pager |
| 69 | + 'educationprogram-pager-showonly' => 'Show only these items', |
| 70 | + |
68 | 71 | // Org pager |
69 | | - 'educationprogram-pager-eporg-name' => 'Name', |
70 | | - 'educationprogram-pager-eporg-city' => 'City', |
71 | | - 'educationprogram-pager-eporg-country' => 'Country', |
| 72 | + 'eporgpager-header-name' => 'Name', |
| 73 | + 'eporgpager-header-city' => 'City', |
| 74 | + 'eporgpager-header-country' => 'Country', |
| 75 | + 'eporgpager-filter-country' => 'Country', |
72 | 76 | |
73 | 77 | // Special:EditInstitution |
74 | 78 | 'editinstitution-text' => 'Enter the institution details below and click submit to save your changes.', |