From c0cda562d9eecf2d14cdfec57b4ddcfe25812b03 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Sat, 11 Feb 2006 15:35:03 +0000 Subject: [PATCH] * (bug 4960) Add additional namespaces variants to Yiddish for compatibility Patch from gangleri --- RELEASE-NOTES | 1 + languages/LanguageYi.php | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 86f2b33557..5b7078af15 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -233,6 +233,7 @@ i18n / Languages: * Default main page content improved per bug 4690 * (bug 4615) Update for Portuguese language (pt) * Separated MessagesSl.php as the other languages. +* (bug 4960) Add additional namespaces variants to Yiddish for compatibility Parser: * (bug 2522) {{CURRENTDAY2}} now shows the current day number with two digits diff --git a/languages/LanguageYi.php b/languages/LanguageYi.php index 78ed14b8b5..da05216f81 100644 --- a/languages/LanguageYi.php +++ b/languages/LanguageYi.php @@ -46,6 +46,34 @@ class LanguageYi extends LanguageUtf8 { function isRTL() { return true; } + + function getNsIndex( $text ) { + global $wgNamespaceNamesYi, $wgSitename; + + foreach ( $wgNamespaceNamesYi as $i => $n ) { + if ( 0 == strcasecmp( $n, $text ) ) { return $i; } + } + if( $wgSitename == 'װיקיפּעדיע' ) { + if( 0 == strcasecmp( 'וויקיפעדיע', $text ) ) return NS_PROJECT; + if( 0 == strcasecmp( 'וויקיפעדיע_רעדן', $text ) ) return NS_PROJECT_TALK; + } + if( $wgSitename == 'װיקיביבליאָטעק' ) { + if( 0 == strcasecmp( 'וויקיביבליאטעק', $text ) ) return NS_PROJECT; + if( 0 == strcasecmp( 'וויקיביבליאטעק_רעדן', $text ) ) return NS_PROJECT_TALK; + } + if( $wgSitename == 'װיקיװערטערבוך' ) { + if( 0 == strcasecmp( 'וויקיווערטערבוך', $text ) ) return NS_PROJECT; + if( 0 == strcasecmp( 'וויקיווערטערבוך_רעדן', $text ) ) return NS_PROJECT_TALK; + } + if( 0 == strcasecmp( 'באזונדער', $text ) ) return NS_SPECIAL; + if( 0 == strcasecmp( 'באנוצער', $text ) ) return NS_USER; + if( 0 == strcasecmp( 'באנוצער_רעדן', $text ) ) return NS_USER_TALK; + if( 0 == strcasecmp( 'מעדיעוויקי', $text ) ) return NS_MEDIAWIKI; + if( 0 == strcasecmp( 'מעדיעוויקי_רעדן', $text ) ) return NS_MEDIAWIKI_TALK; + if( 0 == strcasecmp( 'קאטעגאריע', $text ) ) return NS_CATEGORY; + if( 0 == strcasecmp( 'קאטעגאריע_רעדן', $text ) ) return NS_CATEGORY_TALK; + return false; + } } ?> -- 2.20.1