Index: trunk/extensions/EditUser/EditUser_body.php |
— | — | @@ -11,7 +11,7 @@ |
12 | 12 | var $mReset, $mPosted, $mToggles, $mUseAjaxSearch, $mSearchNs, $mRealName, $mImageSize; |
13 | 13 | var $mUnderline, $mWatchlistEdits; |
14 | 14 | |
15 | | - function EditUser() { |
| 15 | + public function __construct() { |
16 | 16 | SpecialPage::SpecialPage('EditUser', 'edituser'); |
17 | 17 | } |
18 | 18 | |
— | — | @@ -89,12 +89,15 @@ |
90 | 90 | return true; |
91 | 91 | } |
92 | 92 | |
93 | | - function execute( $par ) { |
| 93 | + public function execute( $par ) { |
94 | 94 | global $wgOut, $wgUser, $wgRequest; |
95 | 95 | if( !$wgUser->isAllowed( 'edituser' ) ) { |
96 | 96 | $wgOut->permissionRequired( 'edituser' ); |
97 | 97 | return false; |
98 | 98 | } |
| 99 | + |
| 100 | + wfLoadExtensionMessages( 'EditUser' ); |
| 101 | + |
99 | 102 | $this->setHeaders(); |
100 | 103 | if(!isset($par)) |
101 | 104 | $wgOut->addHtml($this->makeSearchForm()); |
Index: trunk/extensions/EditUser/EditUser.i18n.php |
— | — | @@ -1,23 +1,29 @@ |
2 | 2 | <?php |
| 3 | +/** |
| 4 | + * Internationalisation file for extension EditUser. |
| 5 | + * |
| 6 | + * @addtogroup Extensions |
| 7 | +*/ |
3 | 8 | |
4 | | -function efEditUserMessages() { |
5 | | - $messages = array( |
6 | | - |
7 | | - /* English (Ryan Schmidt) */ |
8 | | - 'en' => array( |
9 | | - 'edituser' => 'Edit User', |
10 | | - 'edituser-logout' => 'Log user out', |
11 | | - 'edituser-username' => 'Name', |
12 | | - 'edituser-dosearch' => 'Search', |
13 | | - ), |
14 | | - /* Finnish (Jack Phoenix) */ |
15 | | - 'fi' => array( |
16 | | - 'edituser' => 'Muokkaa käyttäjää', |
17 | | - 'edituser-logout' => 'Kirjaa käyttäjä ulos', |
18 | | - 'edituser-username' => 'Nimi', |
19 | | - 'edituser-dosearch' => 'Hae', |
20 | | - ), |
21 | | - ); |
| 9 | +$messages = array(); |
22 | 10 | |
23 | | - return $messages; |
24 | | -} |
| 11 | +/* English |
| 12 | + @ author Ryan Schmidt |
| 13 | + */ |
| 14 | +$messages['en'] = array( |
| 15 | + 'edituser-desc' => 'Allows privileged users to edit other users\' preferences', |
| 16 | + 'edituser' => 'Edit User', |
| 17 | + 'edituser-logout' => 'Log user out', |
| 18 | + 'edituser-username' => 'Name', |
| 19 | + 'edituser-dosearch' => 'Search', |
| 20 | +); |
| 21 | + |
| 22 | +/* Finnish |
| 23 | + * @author Jack Phoenix |
| 24 | + */ |
| 25 | +$messages['fi'] = array( |
| 26 | + 'edituser' => 'Muokkaa käyttäjää', |
| 27 | + 'edituser-logout' => 'Kirjaa käyttäjä ulos', |
| 28 | + 'edituser-username' => 'Nimi', |
| 29 | + 'edituser-dosearch' => 'Hae', |
| 30 | +); |
Index: trunk/extensions/EditUser/EditUser.php |
— | — | @@ -9,25 +9,16 @@ |
10 | 10 | } |
11 | 11 | |
12 | 12 | $wgExtensionCredits['specialpage'][] = array( |
13 | | -'name' => 'EditUser', |
14 | | -'description' => 'Allows privelaged users to edit other users\' preferences', |
15 | | -'author' => 'Ryan Schmidt', |
16 | | -'version' => '1.2', |
17 | | -'url' => 'http://www.mediawiki.org/wiki/Extension:EditUser', |
| 13 | + 'name' => 'EditUser', |
| 14 | + 'version' => '1.3', |
| 15 | + 'author' => 'Ryan Schmidt', |
| 16 | + #'description' => 'Allows privileged users to edit other users\' preferences', |
| 17 | + 'descriptionmsg' => 'edituser-desc', |
| 18 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:EditUser', |
18 | 19 | ); |
19 | 20 | |
20 | | -$wgAutoloadClasses['EditUser'] = dirname(__FILE__) . '/EditUser.page.php'; |
| 21 | +$dir = dirname(__FILE__) . '/'; |
| 22 | +$wgExtensionMessagesFiles['EditUser'] = $dir .'EditUser.i18n.php'; |
| 23 | +$wgAutoloadClasses['EditUser'] = $dir . 'EditUser_body.php'; |
21 | 24 | $wgSpecialPages['EditUser'] = 'EditUser'; |
22 | 25 | $wgAvailableRights[] = 'edituser'; |
23 | | - |
24 | | -$wgExtensionFunctions[] = 'efEditUser'; |
25 | | - |
26 | | -/** |
27 | | -* Populate the message cache and register the special page |
28 | | -*/ |
29 | | -function efEditUser() { |
30 | | - global $wgMessageCache; |
31 | | - require_once( dirname( __FILE__ ) . '/EditUser.i18n.php' ); |
32 | | - foreach( efEditUserMessages() as $lang => $messages ) |
33 | | - $wgMessageCache->addMessages( $messages, $lang ); |
34 | | -} |
Index: trunk/extensions/Translate/Translate.php |
— | — | @@ -11,7 +11,7 @@ |
12 | 12 | * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later |
13 | 13 | */ |
14 | 14 | |
15 | | -define( 'TRANSLATE_VERSION', '8.2' ); |
| 15 | +define( 'TRANSLATE_VERSION', '8.3' ); |
16 | 16 | |
17 | 17 | $wgExtensionCredits['specialpage'][] = array( |
18 | 18 | 'name' => 'Translate', |
— | — | @@ -128,6 +128,7 @@ |
129 | 129 | 'ext-dismissablesitenotice' => 'DismissableSiteNoticeMessageGroup', |
130 | 130 | 'ext-duplicator' => 'DuplicatorMessageGroup', |
131 | 131 | 'ext-editcount' => 'EditcountMessageGroup', |
| 132 | +'ext-edituser' => 'EditUserMessageGroup', |
132 | 133 | 'ext-eval' => 'EvalMessageGroup', |
133 | 134 | 'ext-expandtemplates' => 'ExpandTemplatesMessageGroup', |
134 | 135 | 'ext-farmer' => 'FarmerMessageGroup', |
Index: trunk/extensions/Translate/MessageGroups.php |
— | — | @@ -1083,6 +1083,14 @@ |
1084 | 1084 | protected $messageFile = 'Editcount/SpecialEditcount.i18n.php'; |
1085 | 1085 | } |
1086 | 1086 | |
| 1087 | +class EditUserMessageGroup extends ExtensionMessageGroup { |
| 1088 | + protected $label = 'Edit User'; |
| 1089 | + protected $id = 'ext-edituser'; |
| 1090 | + |
| 1091 | + protected $arrName = 'messages'; |
| 1092 | + protected $messageFile = 'EditUser/EditUser.i18n.php'; |
| 1093 | +} |
| 1094 | + |
1087 | 1095 | class EvalMessageGroup extends ExtensionMessageGroup { |
1088 | 1096 | protected $label = 'Eval'; |
1089 | 1097 | protected $id = 'ext-eval'; |