Index: branches/REL1_18/phase3/RELEASE-NOTES-1.18 |
— | — | @@ -619,6 +619,7 @@ |
620 | 620 | * Kashmiri (ks) split into Kashmiri (Perso-Arabic) (ks-arab) and Kashmiri |
621 | 621 | (Devanagari) (ks-deva). Defaults to ks-arab. |
622 | 622 | * (bug 30817) Restored linktrail for kk (Kazakh) |
| 623 | +* (bug 27398) Add $wgExtraGenderNamespaces for configured gendered namespaces |
623 | 624 | |
624 | 625 | === Other changes in 1.18 === |
625 | 626 | * Removed legacy wgAjaxWatch javascript global object, no longer in use. |
Property changes on: branches/REL1_18/phase3/RELEASE-NOTES-1.18 |
___________________________________________________________________ |
Modified: svn:mergeinfo |
626 | 627 | Merged /trunk/phase3/RELEASE-NOTES-1.18:r97296,97298 |
Index: branches/REL1_18/phase3/includes/DefaultSettings.php |
— | — | @@ -2597,6 +2597,14 @@ |
2598 | 2598 | $wgExtraNamespaces = array(); |
2599 | 2599 | |
2600 | 2600 | /** |
| 2601 | + * Same as above, but for namespaces with gender distinction. |
| 2602 | + * Note: the default form for the namespace should also be set |
| 2603 | + * using $wgExtraNamespaces for the same index. |
| 2604 | + * @since 1.18 |
| 2605 | + */ |
| 2606 | +$wgExtraGenderNamespaces = array(); |
| 2607 | + |
| 2608 | +/** |
2601 | 2609 | * Namespace aliases |
2602 | 2610 | * These are alternate names for the primary localised namespace names, which |
2603 | 2611 | * are defined by $wgExtraNamespaces and the language file. If a page is |
Index: branches/REL1_18/phase3/languages/Language.php |
— | — | @@ -372,7 +372,9 @@ |
373 | 373 | * @since 1.18 |
374 | 374 | */ |
375 | 375 | function getGenderNsText( $index, $gender ) { |
376 | | - $ns = self::$dataCache->getItem( $this->mCode, 'namespaceGenderAliases' ); |
| 376 | + global $wgExtraGenderNamespaces; |
| 377 | + |
| 378 | + $ns = $wgExtraGenderNamespaces + self::$dataCache->getItem( $this->mCode, 'namespaceGenderAliases' ); |
377 | 379 | return isset( $ns[$index][$gender] ) ? $ns[$index][$gender] : $this->getNsText( $index ); |
378 | 380 | } |
379 | 381 | |
— | — | @@ -383,7 +385,8 @@ |
384 | 386 | * @since 1.18 |
385 | 387 | */ |
386 | 388 | function needsGenderDistinction() { |
387 | | - $aliases = self::$dataCache->getItem( $this->mCode, 'namespaceGenderAliases' ); |
| 389 | + global $wgExtraGenderNamespaces; |
| 390 | + $aliases = $wgExtraGenderNamespaces + self::$dataCache->getItem( $this->mCode, 'namespaceGenderAliases' ); |
388 | 391 | return count( $aliases ) > 0; |
389 | 392 | } |
390 | 393 | |
— | — | @@ -419,7 +422,8 @@ |
420 | 423 | } |
421 | 424 | } |
422 | 425 | |
423 | | - $genders = self::$dataCache->getItem( $this->mCode, 'namespaceGenderAliases' ); |
| 426 | + global $wgExtraGenderNamespaces; |
| 427 | + $genders = $wgExtraGenderNamespaces + self::$dataCache->getItem( $this->mCode, 'namespaceGenderAliases' ); |
424 | 428 | foreach ( $genders as $index => $forms ) { |
425 | 429 | foreach ( $forms as $alias ) { |
426 | 430 | $aliases[$alias] = $index; |