Index: trunk/phase3/includes/Title.php |
— | — | @@ -555,7 +555,7 @@ |
556 | 556 | * @return \type{\string} Namespace text |
557 | 557 | */ |
558 | 558 | public function getNsText() { |
559 | | - global $wgCanonicalNamespaceNames; |
| 559 | + global $wgContLang, $wgCanonicalNamespaceNames; |
560 | 560 | |
561 | 561 | if ( '' != $this->mInterwiki ) { |
562 | 562 | // This probably shouldn't even happen. ohh man, oh yuck. |
— | — | @@ -568,35 +568,6 @@ |
569 | 569 | return $wgCanonicalNamespaceNames[$this->mNamespace]; |
570 | 570 | } |
571 | 571 | } |
572 | | - |
573 | | - return $this->getNsTextInternal( $this->mNamespace ); |
574 | | - } |
575 | | - |
576 | | - function getNsTextInternal( $namespace ) { |
577 | | - global $wgContLang, $wgRequest, $wgTitle, $wgSlowGenderAliases; |
578 | | - if( $namespace === NS_USER || $namespace === NS_USER_TALK ) { |
579 | | - static $gender = null; |
580 | | - |
581 | | - $name = $this->getBaseText(); |
582 | | - if( !isset($gender[$name] ) ) { |
583 | | - $gender[$name] = User::getDefaultOption( 'gender' ); |
584 | | - |
585 | | - // wgTitle may not be defined |
586 | | - $mytitle = isset( $wgTitle ) ? $wgTitle : Title::newFromText( $wgRequest->getVal( 'title' ) ); |
587 | | - |
588 | | - // Check stuff |
589 | | - if ( $wgSlowGenderAliases || |
590 | | - // Needs to be checked always to produce desired |
591 | | - // effect when viewing user pages |
592 | | - ( $mytitle && $name === $mytitle->getBaseText() ) ) { |
593 | | - |
594 | | - $user = User::newFromName( $name ); |
595 | | - if ( $user ) $gender[$name] = $user->getOption( 'gender' ); |
596 | | - } |
597 | | - } |
598 | | - |
599 | | - return $wgContLang->getGenderNsText( $this->mNamespace, $gender[$name] ); |
600 | | - } |
601 | 572 | return $wgContLang->getNsText( $this->mNamespace ); |
602 | 573 | } |
603 | 574 | /** |
— | — | @@ -611,14 +582,16 @@ |
612 | 583 | * @return \type{\string} Namespace text |
613 | 584 | */ |
614 | 585 | public function getSubjectNsText() { |
615 | | - return $this->getNsTextInternal( MWNamespace::getSubject( $this->mNamespace ) ); |
| 586 | + global $wgContLang; |
| 587 | + return $wgContLang->getNsText( MWNamespace::getSubject( $this->mNamespace ) ); |
616 | 588 | } |
617 | 589 | /** |
618 | 590 | * Get the namespace text of the talk page |
619 | 591 | * @return \type{\string} Namespace text |
620 | 592 | */ |
621 | 593 | public function getTalkNsText() { |
622 | | - return $this->getNsTextInternal( MWNamespace::getTalk( $this->mNamespace ) ); |
| 594 | + global $wgContLang; |
| 595 | + return( $wgContLang->getNsText( MWNamespace::getTalk( $this->mNamespace ) ) ); |
623 | 596 | } |
624 | 597 | /** |
625 | 598 | * Could this title have a corresponding talk page? |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -2645,12 +2645,6 @@ |
2646 | 2646 | $wgNamespaceAliases = array(); |
2647 | 2647 | |
2648 | 2648 | /** |
2649 | | - * Whether to check correct gender for all titles. If false, correct gender |
2650 | | - * alias is only fetched for wgTitle. |
2651 | | - */ |
2652 | | -$wgSlowGenderAliases = true; |
2653 | | - |
2654 | | -/** |
2655 | 2649 | * Limit images on image description pages to a user-selectable limit. In order |
2656 | 2650 | * to reduce disk usage, limits can only be selected from a list. |
2657 | 2651 | * The user preference is saved as an array offset in the database, by default |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -99,18 +99,6 @@ |
100 | 100 | ); |
101 | 101 | |
102 | 102 | /** |
103 | | - * Array of gender-based namespace aliases per namespace. Only NS_USER and |
104 | | - * NS_USER_TALK works. |
105 | | - * |
106 | | - * Example: |
107 | | - NS_USER => array( |
108 | | - 'male' => 'Male_user', |
109 | | - 'female' => 'Female_user', |
110 | | - ), |
111 | | - */ |
112 | | -$genderAliases = array(); |
113 | | - |
114 | | -/** |
115 | 103 | * Array of namespace aliases, mapping from name to NS_xxx index |
116 | 104 | */ |
117 | 105 | $namespaceAliases = array(); |
Index: trunk/phase3/languages/Language.php |
— | — | @@ -63,7 +63,7 @@ |
64 | 64 | 'defaultUserOptionOverrides', 'linkTrail', 'namespaceAliases', |
65 | 65 | 'dateFormats', 'datePreferences', 'datePreferenceMigrationMap', |
66 | 66 | 'defaultDateFormat', 'extraUserToggles', 'specialPageAliases', |
67 | | - 'imageFiles', 'genderAliases' |
| 67 | + 'imageFiles' |
68 | 68 | ); |
69 | 69 | |
70 | 70 | static public $mMergeableMapKeys = array( 'messages', 'namespaceNames', 'mathNames', |
— | — | @@ -266,18 +266,6 @@ |
267 | 267 | } |
268 | 268 | |
269 | 269 | /** |
270 | | - * Like getNsText, but looks first if there is custom alias for given gender |
271 | | - */ |
272 | | - function getGenderNsText( $index, $gender ) { |
273 | | - $this->load(); |
274 | | - if ( isset( $this->genderAliases[$index][$gender] ) ) { |
275 | | - return $this->genderAliases[$index][$gender]; |
276 | | - } else { |
277 | | - return $this->getNsText( $index ); |
278 | | - } |
279 | | - } |
280 | | - |
281 | | - /** |
282 | 270 | * A convenience function that returns the same thing as |
283 | 271 | * getNsText() except with '_' changed to ' ', useful for |
284 | 272 | * producing output. |
— | — | @@ -2341,7 +2329,7 @@ |
2342 | 2330 | * |
2343 | 2331 | * @return array Dependencies, map of filenames to mtimes |
2344 | 2332 | */ |
2345 | | - static function loadLocalisation( $code, $disableCache = true ) { |
| 2333 | + static function loadLocalisation( $code, $disableCache = false ) { |
2346 | 2334 | static $recursionGuard = array(); |
2347 | 2335 | global $wgMemc, $wgEnableSerializedMessages, $wgCheckSerialized; |
2348 | 2336 | |
— | — | @@ -2609,12 +2597,6 @@ |
2610 | 2598 | foreach ( $this->namespaceNames as $index => $name ) { |
2611 | 2599 | $this->mNamespaceIds[$this->lc($name)] = $index; |
2612 | 2600 | } |
2613 | | - # Add gender aliases to the normal aliases table automatically |
2614 | | - foreach ( $this->genderAliases as $index => $aliases ) { |
2615 | | - foreach ( $aliases as $alias ) { |
2616 | | - $this->namespaceAliases[$alias] = $index; |
2617 | | - } |
2618 | | - } |
2619 | 2601 | if ( $this->namespaceAliases ) { |
2620 | 2602 | foreach ( $this->namespaceAliases as $name => $index ) { |
2621 | 2603 | if ( $index === NS_PROJECT_TALK ) { |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -96,7 +96,6 @@ |
97 | 97 | * Localize time zone regions in Special:Preferences |
98 | 98 | * Add NUMBEROFACTIVEUSERS magic word, which is like NUMBEROFUSERS, but uses |
99 | 99 | the active users data from site_stats. |
100 | | -* (bug 13040) Gender-aware user namespace aliases |
101 | 100 | * Add a <link rel="canonical"> tag on redirected page views |
102 | 101 | * Replace hardcoded '...' as indication of a truncation with the |
103 | 102 | 'ellipsis' message |