From: Brion Vibber Date: Wed, 28 Apr 2004 06:03:45 +0000 (+0000) Subject: Localize the 'Categories:' link. X-Git-Tag: 1.3.0beta1~228 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=4a7467853cfff3e4620ef73bf0664f38dad95e00;p=lhc%2Fweb%2Fwiklou.git Localize the 'Categories:' link. Move getCategories() into Skin:: where it belongs (there was a problem with the PHP caching used long long long long ago that temporarily prevented changing the class on one computer at one time. That's not a general problem.) Added some eo local bits. --- diff --git a/includes/Skin.php b/includes/Skin.php index f6cbadd99e..8734b8b9ec 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -24,22 +24,6 @@ if( $wgUsePHPTal ) { include_once( "RecentChange.php" ); -# For some odd PHP bug, this function can't be part of a class -function getCategories () -{ - global $wgOut , $wgTitle , $wgUseCategoryMagic , $wgUser , $wgParser ; - if ( !isset ( $wgUseCategoryMagic ) || !$wgUseCategoryMagic ) return "" ; - if ( count ( $wgOut->mCategoryLinks ) == 0 ) return "" ; - if ( !$wgOut->isArticle() ) return "" ; - $sk = $wgUser->getSkin() ; - $s = "" ; - $s .= $sk->makeKnownLink ( "Special:Categories" , "Categories" , "article=".$wgTitle->getDBkey() ) ; - $t = implode ( " | " , $wgOut->mCategoryLinks ) ; - if ( $t != "" ) $s .= ": " ; - $s .= $t ; - return ""; -} - class RCCacheEntry extends RecentChange { var $secureName, $link; @@ -368,10 +352,24 @@ class Skin { $s .= $this->pageTitle(); $s .= $this->pageSubtitle() ; - $s .= getCategories(); // For some odd reason, zhis can't be a function of the object + $s .= $this->getCategories(); wfProfileOut( $fname ); return $s; } + + function getCategories () { + global $wgOut, $wgTitle, $wgUser, $wgParser; + global $wgUseCategoryMagic; + if( !$wgUseCategoryMagic ) return "" ; + if( count( $wgOut->mCategoryLinks ) == 0 ) return ""; + if( !$wgOut->isArticle() ) return ""; + + $t = implode ( " | " , $wgOut->mCategoryLinks ) ; + $s = $this->makeKnownLink( "Special:Categories", + wfMsg( "categories" ), "article=" . urlencode( $wgTitle->getPrefixedDBkey() ) ) + . ": " . $t; + return ""; + } function getQuickbarCompensator( $rows = 1 ) { diff --git a/includes/SkinPHPTal.php b/includes/SkinPHPTal.php index ed42f8babb..d0152e1926 100644 --- a/includes/SkinPHPTal.php +++ b/includes/SkinPHPTal.php @@ -88,7 +88,7 @@ $tpl->setRef( "thispage", &$this->thispage ); $tpl->set( "subtitle", $out->getSubtitle() ); - $tpl->set( 'catlinks', getCategories()); + $tpl->set( 'catlinks', $this->getCategories()); if( $wgOut->isSyndicated() ) { $feeds = array(); foreach( $wgFeedClasses as $format => $class ) { diff --git a/languages/Language.php b/languages/Language.php index d170f9faed..8f2271c75d 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -459,7 +459,7 @@ $wgLanguageNamesEn =& $wgLanguageNames; # Bits of text used by many pages: # -"categories" => "Page categories", +"categories" => "Categories", "category" => "category", "category_header" => "Articles in category \"$1\"", "subcategories" => "Subcategories", diff --git a/languages/LanguageEo.php b/languages/LanguageEo.php index ebee12824e..0b8d699685 100644 --- a/languages/LanguageEo.php +++ b/languages/LanguageEo.php @@ -159,12 +159,18 @@ $wgEditEncoding = "x"; # Teksteroj uzataj fare de diversaj paĝoj: # +"categories" => "Kategorioj", +"category" => "kategorio", +"category_header" => "Artikoloj en kategorio \"$1\"", +"subcategories" => "Subkategorioj", + # Tiuj literoj, kiuj aperu kiel parto de la ligilo en formo "[[lingvo]]jn" ktp: "linktrail" => "/^([a-z]+)(.*)\$/sD", "mainpage" => "Ĉefpaĝo", "about" => "Enkonduko", "aboutwikipedia" => "Pri {{SITENAME}}", #FIXME "aboutpage" => "{{ns:4}}:Enkonduko", +'article' => "Artikolo", "help" => "Helpo", "helppage" => "{{ns:4}}:Helpo", "wikititlesuffix" => "{{SITENAME}}", @@ -196,6 +202,7 @@ $wgEditEncoding = "x"; "search" => "Serĉu", "go" => "Ek", "history" => "Malnovaj versioj", +"history_short" => "Historio", "printableversion" => "Presebla versio", "editthispage" => "Redaktu la paĝon", "deletethispage" => "Forigu la paĝon", @@ -206,6 +213,8 @@ $wgEditEncoding = "x"; "postcomment" => "Afiŝu komenton", "articlepage" => "Vidu la artikolon", "subjectpage" => "Vidu la artikolon", #FIXME: ? +"talk" => "Diskuto", +"toolbox" => "Iloj", "userpage" => "Vidu personan paĝon", "wikipediapage" => "Vidu meta-paĝon", "imagepage" => "Vidu dosieropaĝon",