Index: trunk/extensions/Babel/Babel.i18n.php |
— | — | @@ -20,6 +20,7 @@ |
21 | 21 | 'babel-autocreate-reason' => 'Automatically creating Babel category page.', |
22 | 22 | 'babel-autocreate-text-levels' => 'Users in this category indicate they have skill level $1 for language $2.', |
23 | 23 | 'babel-autocreate-text-main' => 'Users in this category indicate they have knowlege of language $1.', |
| 24 | + 'babel-autocreate-user' => 'Babel AutoCreate', |
24 | 25 | |
25 | 26 | 'babel-directionality' => 'ltr', # Optional. |
26 | 27 | |
Index: trunk/extensions/Babel/Babel.php |
— | — | @@ -51,7 +51,6 @@ |
52 | 52 | $wgBabelUseLevelZeroCategory = false; |
53 | 53 | $wgBabelUseSimpleCategories = false; |
54 | 54 | $wgBabelUseMainCategories = true; |
55 | | -$wgBabelAutoCreateUsername = 'Babel AutoCreate'; |
56 | 55 | $wgLanguageCodesFiles = array(); |
57 | 56 | $wgLanguageCodesFiles[ 'ISO_639_1' ] = dirname( __FILE__ ) . '/codes/ISO_639_1.php'; |
58 | 57 | $wgLanguageCodesFiles[ 'ISO_639_3' ] = dirname( __FILE__ ) . '/codes/ISO_639_3.php'; |
\ No newline at end of file |
Index: trunk/extensions/Babel/BabelAutoCreate.class.php |
— | — | @@ -3,10 +3,9 @@ |
4 | 4 | class BabelAutoCreate { |
5 | 5 | static $user = false; |
6 | 6 | public static function RegisterAbort( User $user, &$message ) { |
7 | | - global $wgBabelAutoCreateUsername; |
8 | 7 | wfLoadExtensionMessages( 'Babel' ); |
9 | 8 | $message = wfMsg( 'babel-autocreate-abort' ); |
10 | | - return !( $user->getName() === $wgBabelAutoCreateUsername ); |
| 9 | + return !( $user->getName() === wfMsgForContent( 'babel-autocreate-user' ) ); |
11 | 10 | } |
12 | 11 | public static function create( $category, $language, $level = null ) { |
13 | 12 | global $wgUser; |
— | — | @@ -24,9 +23,8 @@ |
25 | 24 | $wgUser = $olduser; |
26 | 25 | } |
27 | 26 | public static function user() { |
28 | | - global $wgBabelAutoCreateUsername; |
29 | 27 | if( !self::$user ) { |
30 | | - self::$user = User::newFromName( $wgBabelAutoCreateUsername, false ); |
| 28 | + self::$user = User::newFromName( wfMsgForContent( 'babel-autocreate-user' ), false ); |
31 | 29 | if( !self::$user->isLoggedIn() ) self::$user->addToDatabase(); |
32 | 30 | } |
33 | 31 | return self::$user; |