Index: trunk/phase3/languages/Language.php |
— | — | @@ -428,9 +428,19 @@ |
429 | 429 | * @since 1.18 |
430 | 430 | */ |
431 | 431 | function needsGenderDistinction() { |
432 | | - global $wgExtraGenderNamespaces; |
433 | | - $aliases = $wgExtraGenderNamespaces + self::$dataCache->getItem( $this->mCode, 'namespaceGenderAliases' ); |
434 | | - return count( $aliases ) > 0; |
| 432 | + global $wgExtraGenderNamespaces, $wgExtraNamespaces; |
| 433 | + if ( count( $wgExtraGenderNamespaces ) > 0 ) { |
| 434 | + // $wgExtraGenderNamespaces overrides everything |
| 435 | + return true; |
| 436 | + } elseif( isset( $wgExtraNamespaces[NS_USER] ) && isset( $wgExtraNamespaces[NS_USER_TALK] ) ) { |
| 437 | + /// @todo There may be other gender namespace than NS_USER & NS_USER_TALK in the future |
| 438 | + // $wgExtraNamespaces overrides any gender aliases specified in i18n files |
| 439 | + return false; |
| 440 | + } else { |
| 441 | + // Check what is in i18n files |
| 442 | + $alises = self::$dataCache->getItem( $this->mCode, 'namespaceGenderAliases' ); |
| 443 | + return count( $aliases ) > 0; |
| 444 | + } |
435 | 445 | } |
436 | 446 | |
437 | 447 | /** |