some more UI related fix
authorZheng Zhu <zhengzhu@users.mediawiki.org>
Sun, 26 Sep 2004 01:50:26 +0000 (01:50 +0000)
committerZheng Zhu <zhengzhu@users.mediawiki.org>
Sun, 26 Sep 2004 01:50:26 +0000 (01:50 +0000)
includes/Skin.php
includes/SkinPHPTal.php
skins/CologneBlue.php
skins/WikimediaWiki.php

index d24cac3..91b49f8 100644 (file)
@@ -587,10 +587,10 @@ class Skin {
                $action = $wgRequest->getText( 'action' );
 
                $s = $this->printableLink();
-               if ( wfMsg ( 'disclaimers' ) != '-' )
+               if ( wfMsgForContent ( 'disclaimers' ) != '-' )
                        $s .= ' | ' . $this->makeKnownLink( 
                                wfMsgForContent( 'disclaimerpage' ), 
-                               wfMsg( 'disclaimers' ) ) ;
+                               wfMsgForContent( 'disclaimers' ) ) ;
 
                if ( $wgOut->isArticleRelated() ) {
                        if ( $wgTitle->getNamespace() == Namespace::getImage() ) {
@@ -887,7 +887,7 @@ class Skin {
                $oldid = $wgRequest->getVal( 'oldid' );
                $diff = $wgRequest->getVal( 'diff' );
 
-               if ( !is_null( $oldid ) && is_null( $diff ) && wfMsg( 'history_copyright' ) !== '-' ) {
+               if ( !is_null( $oldid ) && is_null( $diff ) && wfMsgForContent( 'history_copyright' ) !== '-' ) {
                        $msg = 'history_copyright';
                } else {
                        $msg = 'copyright';
@@ -902,7 +902,7 @@ class Skin {
                        # Give up now
                        return $out;
                }
-               $out .= wfMsg( $msg, $link );
+               $out .= wfMsgForContent( $msg, $link );
                return $out;
        }
 
@@ -986,7 +986,7 @@ class Skin {
 
                }
                // only show watchlist link if logged in
-               if ( wfMsg ( 'currentevents' ) != '-' ) 
+               if ( wfMsgForContent ( 'currentevents' ) != '-' ) 
                        $s .= $sep . $this->makeKnownLink( wfMsgForContent( 'currentevents' ), '' ) ;
                $s .= "\n<br /><hr class='sep' />";
                $articleExists = $wgTitle->getArticleId();
index 1956891..fee3ea0 100644 (file)
@@ -527,8 +527,8 @@ class SkinPHPTal extends Skin {
                $nav_urls['mainpage'] = array('href' => htmlspecialchars( $this->makeI18nUrl('mainpage')));
                $nav_urls['randompage'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Randompage')));
                $nav_urls['recentchanges'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Recentchanges')));
-               $nav_urls['currentevents'] = (wfMsg('currentevents') != '-') ? array('href' => htmlspecialchars( $this->makeI18nUrl('currentevents'))) : false;
-               $nav_urls['portal'] = (wfMsg('portal') != '-') ? array('href' => htmlspecialchars( $this->makeI18nUrl('portal-url'))) : false;
+               $nav_urls['currentevents'] = (wfMsgForContent('currentevents') != '-') ? array('href' => htmlspecialchars( $this->makeI18nUrl('currentevents'))) : false;
+               $nav_urls['portal'] = (wfMsgForContent('portal') != '-') ? array('href' => htmlspecialchars( $this->makeI18nUrl('portal-url'))) : false;
                $nav_urls['bugreports'] = array('href' => htmlspecialchars( $this->makeI18nUrl('bugreportspage')));
                // $nav_urls['sitesupport'] = array('href' => htmlspecialchars( $this->makeI18nUrl('sitesupportpage')));
                $nav_urls['sitesupport'] = array('href' => htmlspecialchars( $wgSiteSupportPage));
index 64501b7..33b854f 100644 (file)
@@ -78,7 +78,7 @@ class SkinCologneBlue extends Skin {
                $s .= "<td class='bottom' align='center' valign='top'>";
 
                $s .= $this->bottomLinks();
-               $s .= "\n<br />" . $this->makeKnownLink( wfMsg( "mainpage" ) ) . " | "
+               $s .= "\n<br />" . $this->makeKnownLink( wfMsgForContent( "mainpage" ) ) . " | "
                  . $this->aboutLink() . " | "
                  . $this->searchForm( wfMsg( "qbfind" ) );
 
@@ -116,9 +116,9 @@ class SkinCologneBlue extends Skin {
        }
        function sysLinks()
        {
-               global $wgUser, $wgLang, $wgTitle;
-               $li = $wgLang->specialPage("Userlogin");
-               $lo = $wgLang->specialPage("Userlogout");
+               global $wgUser, $wgContLang, $wgTitle;
+               $li = $wgContLang->specialPage("Userlogin");
+               $lo = $wgContLang->specialPage("Userlogout");
 
                $rt = $wgTitle->getPrefixedURL();
                if ( 0 == strcasecmp( urlencode( $lo ), $rt ) ) {
@@ -128,13 +128,13 @@ class SkinCologneBlue extends Skin {
                }
                
                $s = "" .
-                 $this->makeKnownLink( wfMsg( "mainpage" ), wfMsg( "mainpage" ) )
+                 $this->makeKnownLink( wfMsgForContent( "mainpage" ), wfMsg( "mainpage" ) )
                  . " | " .
-                 $this->makeKnownLink( wfMsg( "aboutpage" ), wfMsg( "about" ) )
+                 $this->makeKnownLink( wfMsgForContent( "aboutpage" ), wfMsg( "about" ) )
                  . " | " .
-                 $this->makeKnownLink( wfMsg( "helppage" ), wfMsg( "help" ) )
+                 $this->makeKnownLink( wfMsgForContent( "helppage" ), wfMsg( "help" ) )
                  . " | " .
-                 $this->makeKnownLink( wfMsg( "faqpage" ), wfMsg("faq") )
+                 $this->makeKnownLink( wfMsgForContent( "faqpage" ), wfMsg("faq") )
                  . " | " .
                  $this->specialLink( "specialpages" ) . " | ";
 
@@ -152,7 +152,7 @@ class SkinCologneBlue extends Skin {
 
        function quickBar()
        {
-               global $wgOut, $wgTitle, $wgUser, $wgLang, $wgDisableUploads;
+               global $wgOut, $wgTitle, $wgUser, $wgLang, $wgContLang, $wgDisableUploads;
 
                $tns=$wgTitle->getNamespace();
 
@@ -166,14 +166,14 @@ class SkinCologneBlue extends Skin {
                  . $this->mainPageLink()
                  . $sep . $this->specialLink( "recentchanges" )
                  . $sep . $this->specialLink( "randompage" );
-               if ( wfMsg ( "currentevents" ) != "-" ) $s .= $sep . $this->makeKnownLink( wfMsg( "currentevents" ), "" ) ;
+               if ( wfMsgForContent ( "currentevents" ) != "-" ) $s .= $sep . $this->makeKnownLink( wfMsgForContent( "currentevents" ), "" ) ;
                        $s .= "\n";
 
                if ( $wgOut->isArticle() ) {
                        $s .= $this->menuHead( "qbedit" );
                        $s .= "<strong>" . $this->editThisPage() . "</strong>";
 
-                       $s .= $sep . $this->makeKnownLink( wfMsg( "edithelppage" ), wfMsg( "edithelp" ) );
+                       $s .= $sep . $this->makeKnownLink( wfMsgForContent( "edithelppage" ), wfMsg( "edithelp" ) );
 
                        if ( 0 != $wgUser->getID() ) {
                                $s .= $sep . $this->moveThisPage();
@@ -220,16 +220,16 @@ class SkinCologneBlue extends Skin {
                $s .= $this->menuHead( "qbmyoptions" );
                if ( 0 != $wgUser->getID() ) {
                        $name = $wgUser->getName();
-                       $tl = $this->makeKnownLink( $wgLang->getNsText(
+                       $tl = $this->makeKnownLink( $wgContLang->getNsText(
                          Namespace::getTalk( Namespace::getUser() ) ) . ":{$name}",
                          wfMsg( "mytalk" ) );
                        if ( 0 != $wgUser->getNewtalk() ) { $tl .= " *"; }
 
-                       $s .= $this->makeKnownLink( $wgLang->getNsText(
+                       $s .= $this->makeKnownLink( $wgContLang->getNsText(
                          Namespace::getUser() ) . ":{$name}", wfMsg( "mypage" ) )
                          . $sep . $tl
                          . $sep . $this->specialLink( "watchlist" )
-                         . $sep . $this->makeKnownLink( $wgLang->specialPage( "Contributions" ),
+                         . $sep . $this->makeKnownLink( $wgContLang->specialPage( "Contributions" ),
                                wfMsg( "mycontris" ), "target=" . wfUrlencode($wgUser->getName() ) )            
                          . $sep . $this->specialLink( "preferences" )
                          . $sep . $this->specialLink( "userlogout" );
@@ -251,7 +251,7 @@ class SkinCologneBlue extends Skin {
                              .wfMsg( "sitesupport" )."</a>";
                }
                
-               $s .= $sep . $this->makeKnownLink( $wgLang->specialPage( "Specialpages" ), wfMsg("moredotdotdot") );
+               $s .= $sep . $this->makeKnownLink( $wgContLang->specialPage( "Specialpages" ), wfMsg("moredotdotdot") );
 
                $s .= $sep . "\n</div>\n";
                return $s;
index 2977ac4..3e125b3 100644 (file)
@@ -40,13 +40,13 @@ class SkinWikimediawiki extends SkinMonoBook {
                // XXX: remove htmlspecialchars when tal:attributes works with i18n:attributes
                $nav_urls = array();
                $nav_urls['mainpage'] = array('href' => htmlspecialchars( $this->makeI18nUrl('mainpage')));
-               $nav_urls['randompage'] = (wfMsg('randompage') != '-') ? array('href' => htmlspecialchars( $this->makeSpecialUrl('Randompage'))) : false;
-               $nav_urls['recentchanges'] = (wfMsg('recentchanges') != '-') ? array('href' => htmlspecialchars( $this->makeSpecialUrl('Recentchanges'))) : false;
+               $nav_urls['randompage'] = (wfMsgForContent('randompage') != '-') ? array('href' => htmlspecialchars( $this->makeSpecialUrl('Randompage'))) : false;
+               $nav_urls['recentchanges'] = (wfMsgForContent('recentchanges') != '-') ? array('href' => htmlspecialchars( $this->makeSpecialUrl('Recentchanges'))) : false;
                $nav_urls['whatlinkshere'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Whatlinkshere', 'target='.urlencode( $this->thispage ))));
-               $nav_urls['currentevents'] = (wfMsg('currentevents') != '-') ? array('href' => htmlspecialchars( $this->makeI18nUrl('currentevents'))) : false;
-               $nav_urls['portal'] = (wfMsg('portal') != '-') ? array('href' => htmlspecialchars( $this->makeI18nUrl('portal-url'))) : false;
+               $nav_urls['currentevents'] = (wfMsgForContent('currentevents') != '-') ? array('href' => htmlspecialchars( $this->makeI18nUrl('currentevents'))) : false;
+               $nav_urls['portal'] = (wfMsgForContent('portal') != '-') ? array('href' => htmlspecialchars( $this->makeI18nUrl('portal-url'))) : false;
                $nav_urls['recentchangeslinked'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Recentchangeslinked', 'target='.urlencode( $this->thispage ))));
-               $nav_urls['bugreports'] = (wfMsg('bugreports') != '-') ? array('href' => htmlspecialchars( $this->makeI18nUrl('bugreportspage'))) : false;
+               $nav_urls['bugreports'] = (wfMsgForContent('bugreports') != '-') ? array('href' => htmlspecialchars( $this->makeI18nUrl('bugreportspage'))) : false;
                $nav_urls['sitesupport'] = array('href' => htmlspecialchars( $wgSiteSupportPage));
                $nav_urls['help'] = array('href' => htmlspecialchars( $this->makeI18nUrl('helppage')));
                $nav_urls['upload'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Upload')));
@@ -54,13 +54,13 @@ class SkinWikimediawiki extends SkinMonoBook {
 
 
                # Specific for mediawiki.org menu
-               $nav_urls['aboutmediawiki'] = (wfMsg('aboutmediawiki') != '-') ? array('href' => htmlspecialchars( $this->makeI18nUrl('aboutmediawiki-url'))) : false;
-               $nav_urls['projects'] = (wfMsg('projects') != '-') ? array('href' => htmlspecialchars( $this->makeI18nUrl('projects-url'))) : false;
-               $nav_urls['membership'] = (wfMsg('membership') != '-') ? array('href' => htmlspecialchars( $this->makeI18nUrl('membership-url'))) : false;
-               $nav_urls['pressroom'] = (wfMsg('pressroom') != '-') ? array('href' => htmlspecialchars( $this->makeI18nUrl('pressroom-url'))) : false;
-               $nav_urls['software'] = (wfMsg('software') != '-') ? array('href' => htmlspecialchars( $this->makeI18nUrl('software-url'))) : false;
-               $nav_urls['localchapters'] = (wfMsg('localchapters') != '-') ? array('href' => htmlspecialchars( $this->makeI18nUrl('localchapters-url'))) : false;
-               $nav_urls['contactus'] = (wfMsg('contactus') != '-') ? array('href' => htmlspecialchars( $this->makeI18nUrl('contactus-url'))) : false;
+               $nav_urls['aboutmediawiki'] = (wfMsgForContent('aboutmediawiki') != '-') ? array('href' => htmlspecialchars( $this->makeI18nUrl('aboutmediawiki-url'))) : false;
+               $nav_urls['projects'] = (wfMsgForContent('projects') != '-') ? array('href' => htmlspecialchars( $this->makeI18nUrl('projects-url'))) : false;
+               $nav_urls['membership'] = (wfMsgForContent('membership') != '-') ? array('href' => htmlspecialchars( $this->makeI18nUrl('membership-url'))) : false;
+               $nav_urls['pressroom'] = (wfMsgForContent('pressroom') != '-') ? array('href' => htmlspecialchars( $this->makeI18nUrl('pressroom-url'))) : false;
+               $nav_urls['software'] = (wfMsgForContent('software') != '-') ? array('href' => htmlspecialchars( $this->makeI18nUrl('software-url'))) : false;
+               $nav_urls['localchapters'] = (wfMsgForContent('localchapters') != '-') ? array('href' => htmlspecialchars( $this->makeI18nUrl('localchapters-url'))) : false;
+               $nav_urls['contactus'] = (wfMsgForContent('contactus') != '-') ? array('href' => htmlspecialchars( $this->makeI18nUrl('contactus-url'))) : false;
 
                if( $wgTitle->getNamespace() == NS_USER || $wgTitle->getNamespace() == NS_USER_TALK ) {
                        $id = User::idFromName($wgTitle->getText());