From: Gabriel Wicke Date: Sat, 1 May 2004 10:51:13 +0000 (+0000) Subject: * namespace-specific 'article' tabs X-Git-Tag: 1.3.0beta1~165 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=a09694b69048925625c6d090a181632d7348e316;p=lhc%2Fweb%2Fwiklou.git * namespace-specific 'article' tabs --- diff --git a/includes/SkinPHPTal.php b/includes/SkinPHPTal.php index d31980597d..2848df9f2a 100644 --- a/includes/SkinPHPTal.php +++ b/includes/SkinPHPTal.php @@ -300,7 +300,7 @@ if( $this->iscontent ) { $content_actions['article'] = array('class' => (!Namespace::isTalk( $wgTitle->getNamespace())) ? 'selected' : false, - 'text' => wfMsg('article'), + 'text' => $this->getNameSpaceWord(), 'href' => $this->makeArticleUrl($this->thispage), 'ttip' => wfMsg('tooltip-article'), 'akey' => wfMsg('accesskey-article')); @@ -507,6 +507,43 @@ return $nav_urls; } + function getNameSpaceWord () { + global $wgTitle; + switch ($wgTitle->getNamespace()) { + case NS_MAIN: + case NS_TALK: + return wfMsg('nstab-main'); + case NS_USER: + case NS_USER_TALK: + return wfMsg('nstab-user'); + case NS_MEDIA: + return wfMsg('nstab-media'); + case NS_SPECIAL: + return wfMsg('nstab-special'); + case NS_WP: + case NS_WP_TALK: + return wfMsg('nstab-wp'); + case NS_IMAGE: + case NS_IMAGE_TALK: + return wfMsg('nstab-image'); + case NS_MEDIAWIKI: + case NS_MEDIAWIKI_TALK: + return wfMsg('nstab-mediawiki'); + case NS_TEMPLATE: + case NS_TEMPLATE_TALK: + return wfMsg('nstab-template'); + case NS_HELP: + case NS_HELP_TALK: + return wfMsg('nstab-help'); + case NS_CATEGORY: + case NS_CATEGORY_TALK: + return wfMsg('nstab-category'); + default: + return wfMsg('nstab-main'); + } + } + + /*static*/ function makeSpecialUrl( $name, $urlaction='' ) { $title = Title::makeTitle( NS_SPECIAL, $name ); $this->checkTitle(&$title, &$name); diff --git a/languages/Language.php b/languages/Language.php index b165d3fcc1..53ffab9d1b 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -572,6 +572,18 @@ performed by sysops with \"bureaucrat\" status.", "restorelink" => "$1 deleted edits", 'feedlinks' => 'Feed:', +# Short words for each namespace, by default used in the 'article' tab in monobook +'nstab-main' => 'Article', +'nstab-user' => 'User page', +'nstab-media' => 'Media', +'nstab-special' => 'Special', +'nstab-wp' => 'About', +'nstab-image' => 'Image', +'nstab-mediawiki' => 'Message', +'nstab-template' => 'Template', +'nstab-help' => 'Help', +'nstab-category' => 'Category', + # Main script and global functions # "nosuchaction" => "No such action", diff --git a/templates/xhtml_slim.pt b/templates/xhtml_slim.pt index e38d0803c7..d7b20d52ac 100644 --- a/templates/xhtml_slim.pt +++ b/templates/xhtml_slim.pt @@ -68,7 +68,7 @@
Navigation