# supports this function, to convert between Traditional and Simplified
# Chinese. This flag is meant to isolate the (untested) conversion
# code, so that if it breaks, only zh will be affected
-$wgDisableLangConversion = true;
+$wgDisableLangConversion = false;
# Whether to use zhdaemon to perform Chinese text processing
+# zhdaemon is under developement, so normally you don't want to
+# use it unless for testing
$wgUseZhdaemon = false;
$wgZhdaemonHost="localhost";
$wgZhdaemonPort=2004;
*/
$wgForceUIMsgAsContentMsg = array();
+
/**
* Authentication plugin.
*/
# Many people don't like this dropdown box
#$s .= $sep . $this->specialPagesList();
+ /* show links to different language variants */
+ global $wgDisableLangConversion, $wgContLang, $wgTitle;
+ $variants = $wgContLang->getVariants();
+ if( !$wgDisableLangConversion && sizeof( $variants ) > 1 ) {
+ foreach( $variants as $code ) {
+ $varname = $wgContLang->getVariantname( $code );
+ if( $varname == 'disable' )
+ continue;
+ $s .= ' | <a href="' . $wgTitle->getLocalUrl( 'variant=' . $code ) . '">' . $varname . '</a>';
+ }
+ }
+
+
+
return $s;
}
* @access private
*/
function buildContentActionUrls () {
+ global $wgContLang;
$fname = 'SkinTemplate::buildContentActionUrls';
wfProfileIn( $fname );
}
}
wfProfileOut( "$fname-live" );
-
+
if ( $wgUser->getID() != 0 and $action != 'submit' ) {
if( !$wgTitle->userIsWatching()) {
$content_actions['watch'] = array(
'href' => $wgTitle->getLocalUrl( 'action=validate'.$article_time)
);
}
+
} else {
/* show special page tab */
);
}
+ /* show links to different language variants */
+ global $wgDisableLangConversion;
+ $variants = $wgContLang->getVariants();
+ if( !$wgDisableLangConversion && sizeof( $variants ) > 1 ) {
+ $preferred = $wgContLang->getPreferredVariant();
+ $actstr = '';
+ if( $action )
+ $actstr = 'action=' . $action . '&';
+ $vcount=0;
+ foreach( $variants as $code ) {
+ $varname = $wgContLang->getVariantname( $code );
+ if( $varname == 'disable' )
+ continue;
+ $selected = ( $code == $preferred )? 'selected' : false;
+ $content_actions['varlang-' . $vcount] = array(
+ 'class' => $selected,
+ 'text' => $varname,
+ 'href' => $wgTitle->getLocalUrl( $actstr . 'variant=' . $code )
+ );
+ $vcount ++;
+ }
+ }
+
wfProfileOut( $fname );
return $content_actions;
}
}
# Output header
- $rctext = wfMsg( "recentchangestext" );
+ $rctext = wfMsgForContent( "recentchangestext" );
$wgOut->addWikiText( $rctext );
$confstr .= '!' . $this->getOption( 'language' );
// add in language specific options, if any
$extra = $wgContLang->getExtraHashOptions();
- foreach( $extra as $e ) {
- $confstr .= '!' . $this->getOption( $e );
- }
+ $confstr .= $extra;
$this->mHash = $confstr;
return $confstr ;
class ZhClientFake {
function ZhClientFake() {
global $wgMemc, $wgDBname;
- $this->zh2TW = $wgMemc->get($key1 = "$wgDBname:zhConvert:tw");
- $this->zh2CN = $wgMemc->get($key2 = "$wgDBname:zhConvert:cn");
- $this->zh2SG = $wgMemc->get($key3 = "$wgDBname:zhConvert:sg");
- $this->zh2HK = $wgMemc->get($key4 = "$wgDBname:zhConvert:hk");
- if(empty($this->zh2TW) || empty($this->zh2CN) || empty($this->zh2SG) || empty($this->zh2HK)) {
+ $this->mZh2TW = $wgMemc->get($key1 = "$wgDBname:zhConvert:tw");
+ $this->mZh2CN = $wgMemc->get($key2 = "$wgDBname:zhConvert:cn");
+ $this->mZh2SG = $wgMemc->get($key3 = "$wgDBname:zhConvert:sg");
+ $this->mZh2HK = $wgMemc->get($key4 = "$wgDBname:zhConvert:hk");
+ if(empty($this->mZh2TW) || empty($this->mZh2CN) || empty($this->mZh2SG) || empty($this->mZh2HK)) {
require("includes/ZhConversion.php");
- $this->zh2TW = $zh2TW;
- $this->zh2CN = $zh2CN;
- $this->zh2HK = $zh2HK;
- $this->zh2SG = $zh2SG;
- $wgMemc->set($key1, $this->zh2TW);
- $wgMemc->set($key2, $this->zh2CN);
- $wgMemc->set($key3, $this->zh2SG);
- $wgMemc->set($key4, $this->zh2HK);
+ $this->mZh2TW = $zh2TW;
+ $this->mZh2CN = $zh2CN;
+ $this->mZh2HK = $zh2HK;
+ $this->mZh2SG = $zh2SG;
+ $wgMemc->set($key1, $this->mZh2TW);
+ $wgMemc->set($key2, $this->mZh2CN);
+ $wgMemc->set($key3, $this->mZh2SG);
+ $wgMemc->set($key4, $this->mZh2HK);
}
}
* @access private
*/
function zh2tw($text) {
- return strtr($text, $this->zh2TW);
+ return strtr($text, $this->mZh2TW);
}
/**
* @access private
*/
function zh2cn($text) {
- return strtr($text, $this->zh2CN);
+ return strtr($text, $this->mZh2CN);
}
/**
* @access private
*/
function zh2sg($text) {
- return strtr(strtr($text, $this->zh2CN), $this->zh2SG);
+ return strtr(strtr($text, $this->mZh2CN), $this->mZh2SG);
}
/**
* @access private
*/
function zh2hk($text) {
- return strtr(strtr($text, $this->zh2TW), $this->zh2HK);
+ return strtr(strtr($text, $this->mZh2TW), $this->mZh2HK);
}
/**
'blocklogpage' => 'Block_log',
'blocklogentry' => 'blocked "$1" with an expiry time of $2',
'blocklogtext' => 'This is a log of user blocking and unblocking actions. Automatically
-blocked IP addresses are not be listed. See the [[Special:Ipblocklist|IP block list]] for
+blocked IP addresses are not listed. See the [[Special:Ipblocklist|IP block list]] for
the list of currently operational bans and blocks.',
'unblocklogentry' => 'unblocked "$1"',
'range_block_disabled' => 'The sysop ability to create range blocks is disabled.',
'allmessages' => 'All system messages',
'allmessagestext' => 'This is a list of all system messages available in the MediaWiki: namespace.',
-'allmessagesnotsupportedUI' => 'Your current interface language <b>$1</b> is not supported by Special:AllMessages at this site.',
+'allmessagesnotsupportedUI' => 'Your current interface language <b>$1</b> is not supported by Special:AllMessages at this site. ',
'allmessagesnotsupportedDB' => 'Special:AllMessages not supported because wgUseDatabaseMessages is off.',
# Thumbnails
'sitesettings-performance' => 'Performance',
'sitesettings-images' => 'Images',
+# short names for language variants used for language conversion links.
+# to disable showing a particular link, set it to 'disable', e.g.
+# 'variantname-zh-sg' => 'disable',
+'variantname-zh-cn' => 'cn',
+'variantname-zh-tw' => 'tw',
+'variantname-zh-hk' => 'hk',
+'variantname-zh-sg' => 'sg',
+'variantname-zh' => 'zh',
);
return false;
}
+ # short names for language variants used for language conversion links.
+ # so far only used by zh
+ function getVariantname( $code ) {
+ return wfMsg( 'variantname-' . $code );
+ }
+
function specialPage( $name ) {
return $this->getNsText(NS_SPECIAL) . ':' . $name;
}
function getMonthName( $key ) {
global $wgMonthNamesEn, $wgContLang;
- if( get_class( $wgContLang ) == get_class( $this ) )
+ // see who called us and use the correct message function
+ if( get_class( $wgContLang->getLangObj() ) == get_class( $this ) )
return wfMsgForContent($wgMonthNamesEn[$key-1]);
else
return wfMsg($wgMonthNamesEn[$key-1]);
function getMonthAbbreviation( $key ) {
global $wgMonthAbbreviationsEn, $wgContLang;
- if( get_class( $wgContLang ) == get_class( $this ) )
+ // see who called us and use the correct message function
+ if( get_class( $wgContLang->getLangObj() ) == get_class( $this ) )
return wfMsgForContent(@$wgMonthAbbreviationsEn[$key-1]);
else
return wfMsg(@$wgMonthAbbreviationsEn[$key-1]);
}
function getWeekdayName( $key ) {
- global $wgWeekdayNamesEn, $wgContLang;
- if( get_class( $wgContLang ) == get_class( $this ) )
+ global $wgWeekdayNamesEn, $wgContLang;
+ // see who called us and use the correct message function
+ if( get_class( $wgContLang->getLangObj() ) == get_class( $this ) )
return wfMsgForContent($wgWeekdayNamesEn[$key-1]);
else
return wfMsg($wgWeekdayNamesEn[$key-1]);
return $text;
}
- # convert text to different variants of a language. the automatic
- # conversion is done in autoConvert(). here we parse the text
- # marked with -{}-, which specifies special conversions of the
- # text that can not be accomplished in autoConvert()
- #
- # syntax of the markup:
- # -{code1:text1;code2:text2;...}- or
- # -{text}- in which case no conversion should take place for text
+ # convert text to different variants of a language.
function convert( $text , $isTitle=false) {
- global $wgDisableLangConversion;
- if($wgDisableLangConversion)
- return $text;
- if(sizeof($this->getVariants())<2)
- return $text;
-
- if($isTitle)
- return $this->convertTitle($text);
-
- // no conversion if redirecting
- if(substr($text,0,9) == "#REDIRECT") {
- return $text;
- }
-
-
- $plang = $this->getPreferredVariant();
- $fallback = $this->getVariantFallback($plang);
-
- $tarray = explode("-{", $text);
- $tfirst = array_shift($tarray);
- $text = $this->autoConvert($tfirst);
-
- foreach($tarray as $txt) {
- $marked = explode("}-", $txt);
-
- $choice = explode(";", $marked{0});
- if(!array_key_exists(1, $choice)) {
- /* a single choice */
- $text .= $choice{0};
- } else {
- $choice1=false;
- $choice2=false;
- foreach($choice as $c) {
- $v = explode(":", $c);
- if(!array_key_exists(1, $v)) {
- //syntax error in the markup, give up
- break;
- }
- $code = trim($v{0});
- $content = trim($v{1});
- if($code == $plang) {
- $choice1 = $content;
- break;
- }
- if($code == $fallback)
- $choice2 = $content;
- }
- if ( $choice1 )
- $text .= $choice1;
- elseif ( $choice2 )
- $text .= $choice2;
- else
- $text .= $marked{0};
- }
- if(array_key_exists(1, $marked))
- $text .= $this->autoConvert($marked{1});
- }
-
- return $text;
- }
-
- /* this does the real conversion to the preferred variant.
- see LanguageZh.php for example
- */
- function autoConvert( $text, $toVariant=false ) {
- return $text;
- }
-
- /* returns all possible variants of the given text
-
- normally we will just call autoConvert() for each variant, but
- in case of zh where the conversion is performed by zhdaemon,
- possibily over the network, we want to
- cut down the number of connections to save time.
- */
- function autoConvertToAllVariants($text) {
- $ret = array();
- $variants = $this->getVariants();
- if(sizeof($variants)==1) {
- return $false;
- }
- foreach( $variants as $lang=>$v ) {
- $ret[$v] = $this->autoConvert( $text, $v );
- }
- return $ret;
- }
-
- /* hook for converting the title, which may needs special treatment
- */
- function convertTitle( $text ) {
return $text;
}
}
function getPreferredVariant() {
- global $wgUser;
-
- $lang ='';
-
- // if user logged in, get in from user's preference
- if( $wgUser->getID() != 0 ) {
- $lang = $wgUser->getOption( 'variant' );
- }
- if($lang != '')
- return $lang;
-
- // if we have multiple variants for this langauge,
- // pick the first one that's not utf8 (it could be
- // utf8 if the language does not have a language file)
- $v = $this->getVariants();
- if( !empty( $v ) ) {
- return $v[0];
- }
- if($lang != '')
- return $lang;
-
- // get it from the class name
- $lang = strtolower( substr( get_class( $this ), 8 ) );
-
- return $lang;
+ return strtolower( substr( get_class( $this ), 8 ) );
}
/* if a language supports multiple variants, it is
possible that non-existing link in one variant
actually exists in another variant. this function
- tries to find it.
+ tries to find it. See e.g. LanguageZh.php
*/
function findVariantLink( &$link, &$nt ) {
- static $count=0; //used to limit this operation
- static $cache=array();
- global $wgDisableLangConversion;
- $count++;
- if( $wgDisableLangConversion || $count > 50)
- return;
- $variants = $this->autoConvertToAllVariants($link);
- if($variants == false) //give up
- return;
- foreach( $variants as $v ) {
- if(isset($cache[$v]))
- continue;
- $cache[$v] = 1;
- $varnt = Title::newFromText( $v );
- if( $varnt && $varnt->getArticleID() > 0 ) {
- $nt = $varnt;
- $link = $v;
- break;
- }
- }
+ return;
}
/*
returns an array of extra options used by User::getPageRenderHash()
*/
function getExtraHashOptions() {
- return array();
+ return '';
}
/**
return $trail;
}
+ function getLangObj() {
+ return $this;
+ }
+
}
# This should fail gracefully if there's not a localization available
return utf8_decode( $this->lang->convert( utf8_encode( $text ), $isTitle ) );
}
- function autoConvert($text, $toVariant=false) {
- return utf8_decode( $this->lang->autoConvert( utf8_encode( $text ), $toVariant ) );
- }
-
- /* hook for converting the title, which may needs special treatment
- */
- function convertTitle($text) {
- return utf8_decode( $this->lang->convertTitle( utf8_encode( $text ) ) );
+ function getVariantname( $code ) {
+ return utf8_decode( $this->lang->getVariantname( $code ) );
}
function getVariants() {
}
function getExtraHashOptions() {
- return array();
+ return '';
+ }
+
+ function linkTrail() {
+ return $this->lang->linkTrail();
}
+ function getLangObj() {
+ return $this->lang;
+ }
}
?>
function LanguageZh() {
global $wgUseZhdaemon, $wgZhdaemonHost, $wgZhdaemonPort;
global $wgDisableLangConversion, $wgUser;
-
- if( $wgUser->getID()!=0 ) {
- /* allow user to diable conversion */
- if( $wgDisableLangConversion == false &&
- $wgUser->getOption('nolangconversion') == 1)
- $wgDisableLangConversion = true;
- }
-
- $this->mZhLanguageCode = $this->getPreferredVariant();
+
if($wgUseZhdaemon) {
$this->mZhClient=new ZhClient($wgZhdaemonHost, $wgZhdaemonPort);
if(!$this->mZhClient->isconnected())
}
/*
- get preferred language variants. eventually this will check the
- user's preference setting as well, once the language option in
- the setting pages is finalized.
+ get preferred language variants.
*/
function getPreferredVariant() {
- global $wgUser;
+ global $wgUser, $wgRequest;
if($this->mZhLanguageCode)
return $this->mZhLanguageCode;
-
- // get language variant preference for logged in users
+
+ // see if the preference is set in the request
+ $zhreq = $wgRequest->getText( 'variant' );
+ if( in_array( $zhreq, $this->getVariants() ) ) {
+ $this->mZhLanguageCode = $zhreq;
+ return $zhreq;
+ }
+
+ // get language variant preference from logged in users
if($wgUser->getID()!=0) {
$this->mZhLanguageCode = $wgUser->getOption('variant');
}
- else {
+
+ if( !$this->mZhLanguageCode ) {
// see if some zh- variant is set in the http header,
- $this->mZhLanguageCode="zh-cn";
+ $this->mZhLanguageCode="zh";
$header = str_replace( '_', '-', strtolower($_SERVER["HTTP_ACCEPT_LANGUAGE"]));
$zh = strstr($header, 'zh-');
if($zh) {
"\"$1\"", $text);
}
-
-
function autoConvert($text, $toVariant=false) {
if(!$toVariant)
$toVariant = $this->getPreferredVariant();
+ if($toVariant == 'zh')
+ return $text;
$fname="zhautoConvert";
wfProfileIn( $fname );
$t = $this->mZhClient->convert($text, $toVariant);
wfProfileIn( $fname );
$ret = $this->mZhClient->convertToAllVariants($text);
if($ret == false) {//fall back...
- $ret = Language::autoConvertToAllVariants($text);
+ $ret = ZhClientFake::autoConvertToAllVariants($text);
}
wfProfileOut( $fname );
return $ret;
}
+ # convert text to different variants of a language. the automatic
+ # conversion is done in autoConvert(). here we parse the text
+ # marked with -{}-, which specifies special conversions of the
+ # text that can not be accomplished in autoConvert()
+ #
+ # syntax of the markup:
+ # -{code1:text1;code2:text2;...}- or
+ # -{text}- in which case no conversion should take place for text
+ function convert( $text , $isTitle=false) {
+ global $wgDisableLangConversion;
+
+ if($wgDisableLangConversion)
+ return $text;
+
+ // no conversion if redirecting
+ if(strtolower( substr( $text,0,9 ) ) == "#redirect") {
+ return $text;
+ }
+
+ if( $isTitle ) {
+ global $wgRequest;
+ $isredir = $wgRequest->getText( 'redirect', 'yes' );
+ $action = $wgRequest->getText( 'action' );
+ if ( $isredir == 'no' || $action == 'edit' ) {
+ return $text;
+ }
+ else {
+ $text = $this->convertTitle($text);
+ return $text;
+ }
+ }
+
+ $plang = $this->getPreferredVariant();
+ $fallback = $this->getVariantFallback($plang);
+
+ $tarray = explode("-{", $text);
+ $tfirst = array_shift($tarray);
+ $text = $this->autoConvert($tfirst);
+ foreach($tarray as $txt) {
+ $marked = explode("}-", $txt);
+
+ $choice = explode(";", $marked{0});
+ if(!array_key_exists(1, $choice)) {
+ /* a single choice */
+ $text .= $choice{0};
+ } else {
+ $choice1=false;
+ $choice2=false;
+ foreach($choice as $c) {
+ $v = explode(":", $c);
+ if(!array_key_exists(1, $v)) {
+ //syntax error in the markup, give up
+ break;
+ }
+ $code = trim($v{0});
+ $content = trim($v{1});
+ if($code == $plang) {
+ $choice1 = $content;
+ break;
+ }
+ if($code == $fallback)
+ $choice2 = $content;
+ }
+ if ( $choice1 )
+ $text .= $choice1;
+ elseif ( $choice2 )
+ $text .= $choice2;
+ else
+ $text .= $marked{0};
+ }
+ if(array_key_exists(1, $marked))
+ $text .= $this->autoConvert($marked{1});
+ }
+
+ return $text;
+ }
+
+
# only convert titles having more than one character
function convertTitle($text) {
$len=0;
}
function getVariants() {
- return array("zh-cn", "zh-tw", "zh-sg", "zh-hk");
+ return array("zh", "zh-cn", "zh-tw", "zh-sg", "zh-hk");
}
function getVariantFallback($v) {
switch ($v) {
+ case 'zh': return 'zh-cn'; break;
case 'zh-cn': return 'zh-sg'; break;
case 'zh-sg': return 'zh-cn'; break;
case 'zh-tw': return 'zh-hk'; break;
return $ret;
}
+ function findVariantLink( &$link, &$nt ) {
+ static $count=0; //used to limit this operation
+ static $cache=array();
+ global $wgDisableLangConversion;
+ $pref = $this->getPreferredVariant();
+ if( $wgDisableLangConversion || $pref == 'zh' || $count > 50)
+ return;
+ $count++;
+ $variants = $this->autoConvertToAllVariants($link);
+ if($variants == false) //give up
+ return;
+ foreach( $variants as $v ) {
+ if(isset($cache[$v]))
+ continue;
+ $cache[$v] = 1;
+ $varnt = Title::newFromText( $v );
+ if( $varnt && $varnt->getArticleID() > 0 ) {
+ $nt = $varnt;
+ $link = $v;
+ break;
+ }
+ }
+ }
+
function getExtraHashOptions() {
- return array('variant', 'nolangconversion');
+ global $wgUser;
+ $variant = $this->getPreferredVariant();
+ return '!' . $variant ;
}
}
?>
"tog-watchdefault" => "监视新的以及更改过的文章", /* "Watch new and modified articles", */
"tog-minordefault" => "细微编辑为默认设置", /* "Mark all edits minor by default", */
"tog-previewontop" => "在编辑框上方显示预览", /* "Show preview before edit box and not after it" */
-"tog-nolangconversion" => "不进行繁简体转换", /* "disable language conversion" */
+
# Dates
'sunday' => "星期日",
"rcnote" => "下面是最近<strong>$2</strong>天内最新的<strong>$1</strong>次改动。",
"rcnotefrom" => "下面是自<b>$2</b>(最多显示<b>$1</b>)。",
"rclistfrom" => "显示自$1以来的新更改",
-# "rclinks" => "显示最后$2小时/$3天内的$1此修改",
-"rclinks" => "显示最近 $2 天内最新的 $1 次改动。",
+"rclinks" => "显示最近 $2 天内最新的 $1 次改动。<br />$3",
"rchide" => "以$4形式;$1个小修改;$2个二级名字空间;$3个多重修改",
"diff" => "差异",
"hist" => "历史",
'mw_math_source' => "显示为TeX代码(使用文字浏览器时)", /* "Leave it as TeX (for text browsers)" */
'mw_math_modern' => "推荐为新版浏览器使用", /* "Recommended for modern browsers" */
+# some untranslated messages as of 1.4 beta1
+'1movedto2' => "$1移动到$2", //"$1 moved to $2",
+'1movedto2_redir' => "$1重定向到$2", //"$1 moved to $2 over redirect",
+'acct_creation_throttle_hit' => "对不起,您已经注册了$1账号。你不能再注册了。", //"Sorry, you have already created $1 accounts. You can't make any more.",
+'addgroup' => "增加新的组", //"Add Group",
+'allarticles' => "所有条目", //"All articles",
+'allmessages' => "系统界面", //"All system messages",
+'allmessagesnotsupportedDB' => "系统界面功能处于关闭状态 (wgUseDatabaseMessages)。", //"Special:AllMessages not supported because wgUseDatabaseMessages is off.",
+'allmessagestext' => "这里列出所有可定制的系统界面。", //"This is a list of all system messages available in the MediaWiki: namespace.",
+'allpagesformtext1' => "列出从 $1 起的条目", //"Display pages starting at: $1",
+'allpagesformtext2' => "选定名字空间: $1 $1", //"Choose namespace: $1 $2",
+'allpagesnamespace' => "所有 $1 名字空间的条目", //"All pages ($1 namespace)",
+'allpagesnext' => "下一页", //"Next",
+'allpagesprev' => "上一页", //"Previous",
+'allpagessubmit' => "提交", //"Go",
+'ancientpages' => "老条目", //"Oldest pages",
+'and' => "和", //"and",
+'anontalk' => "该IP的对话页", //"Talk for this IP",
+'anonymous' => "匿名用户", //"Anonymous user(s) of 1.4",
+'article' => "条目", //"Content page",
+'autoblocker' => "你的IP和被封了的 \"$1\" 是一样的。封锁原因: \"$2\".",//"Autoblocked because you share an IP address with \"$1\". Reason \"$2\".",
+'blocklogentry' => "封锁 $1, $2",//"blocked \"$1\" with an expiry time of $2",
+'blocklogpage' => "封锁记录", //"Block_log",
+'categoriespagetext' => "以下列出所有的页面分类。", //"The following categories exists in the wiki.",
+'categoryarticlecount' => "该类页面共有 $1 条目", //There are $1 articles in this category.",
+'clearyourcache' => "'''注意:''' 保存设置后,要清掉浏览器的缓存才能生效:'''Mozilla:''' 点''刷新'' (或用快键''Ctrl-R''),'''IE / Opera:''' ''Ctrl-F5'', '''Safari:''' ''Cmd-R'', '''Konqueror''' ''Ctrl-R''。",//"'''Note:''' After saving, you have to clear your browser cache to see the changes: '''Mozilla:''' click ''Reload'' (or ''Ctrl-R''), '''IE / Opera:''' ''Ctrl-F5'', '''Safari:''' ''Cmd-R'', '''Konqueror''' ''Ctrl-R''.",
+'edit' => "编辑", //"Edit",
+'navigation' => "导航", //"Navigation",
+'nstab-category' => "分类", //"Category",
+'nstab-help' => "帮助",//"Help",
+'nstab-image' => "图像",//"Image",
+'nstab-main' => "条目", //"Article",
+'nstab-mediawiki' => "界面",//"Message",
+'nstab-special' => "特殊",//"Special",
+'nstab-template' => "模板", //"Template",
+'nstab-user' => "用户页面", //"User page",
+'nstab-wp' => "关于", //"About",
+'portal' => "社区",//"Community portal",
+'prefs-help-userdata' => "*<strong>真实姓名</strong>(可选):用以对您的贡献署名。<br />*<strong>点子邮件</strong>(可选):让他人通过网站在不知道您的电子邮件地址的情况下通过电子邮件与您联络,以及通过电子邮件取得遗忘的密码。", /*"* <strong>Real name</strong> (optional): if you choose to provide it this will be used for giving you attribution for your work.<br />
+* <strong>Email</strong> (optional): Enables people to contact you through the website without you having to reveal your
+email address to them, and it can be used to send you a new password if you forget it.", */
+'prefs-misc' => "杂项", //"Misc settings",
+'prefs-personal' => "用户数据",//"User data",
+'prefs-rc' => "最近更新", //"Recent changes and stub display",
+'showhideminor' => "$1 小修改 | $2 bots | $3 登录用户 | $4 检查过的", //"$1 minor edits | $2 bots | $3 logged in users | $4 patrolled edits ",
+'skin' => "皮肤", //"Skin",
+'talk' => "讨论",//"Discussion",
+'timezonelegend' => "时区", //"Time zone",
+'toolbox' => "工具",//"Toolbox",
+'watch' => "监视",//"Watch",
+'yourlanguage' => "界面语言", //"Your language"
+'yourrealname' => "真实姓名*", //"Your real name"
+'yourvariant' => "中文字体", //"language variant"
+
+# short names for language variants used for language conversion links.
+# to disable showing a particular link, set it to 'disable', e.g.
+# 'variantname-zh-sg' => 'disable',
+'variantname-zh-cn' => '大陆简体',
+'variantname-zh-tw' => '台湾繁体',
+'variantname-zh-hk' => '香港繁体',
+'variantname-zh-sg' => '新加坡简体',
+'variantname-zh' => '不转换',
+
);
class LanguageZh_cn extends LanguageUtf8 {
"rcnote" => "下面是最近<strong>$2</strong>天內最新的<strong>$1</strong>次改動。",
"rcnotefrom" => "下面是自<b>$2</b>(最多顯示<b>$1</b>)。",
"rclistfrom" => "顯示自$1以來的新更改",
-# "rclinks" => "顯示最後$2小時/$3天內的$1此修改",
-"rclinks" => "顯示最近 $2 天內最新的 $1 次改動。",
+"rclinks" => "顯示最近 $2 天內最新的 $1 次改動。<br />$3",
"rchide" => "以$4形式;$1個小修改;$2個二級名字空間;$3個多重修改",
"diff" => "差異",
"hist" => "歷史",
"talkpagemoved" => "相應的對話頁也已經移動。",
"talkpagenotmoved" => "相應的對話頁<strong>沒有</strong>被移動。",
+
+# some untranslated messages as of 1.4 beta1
+'1movedto2' => "$1移動到$2", //"$1 moved to $2",
+'1movedto2_redir' => "$1重定向到$2", //"$1 moved to $2 over redirect",
+'acct_creation_throttle_hit' => "對不起,您已經註冊了$1賬號。你不能再註冊了。", //"Sorry, you have already created $1 accounts. You can't make any more.",
+'addgroup' => "增加新的組", //"Add Group",
+'allarticles' => "所有條目", //"All articles",
+'allmessages' => "系統界面", //"All system messages",
+'allmessagesnotsupportedDB' => "系統界面功能處於關閉狀態 (wgUseDatabaseMessages)。", //"Special:AllMessages not supported because wgUseDatabaseMessages is off.",
+'allmessagestext' => "這裡列出所有可定製的系統界面。", //"This is a list of all system messages available in the MediaWiki: namespace.",
+'allpagesformtext1' => "列出從 $1 起的條目", //"Display pages starting at: $1",
+'allpagesformtext2' => "選定名字空間: $1 $1", //"Choose namespace: $1 $2",
+'allpagesnamespace' => "所有 $1 名字空間的條目", //"All pages ($1 namespace)",
+'allpagesnext' => "下一頁", //"Next",
+'allpagesprev' => "上一頁", //"Previous",
+'allpagessubmit' => "提交", //"Go",
+'ancientpages' => "老條目", //"Oldest pages",
+'and' => "和", //"and",
+'anontalk' => "該IP的對話頁", //"Talk for this IP",
+'anonymous' => "匿名用戶", //"Anonymous user(s) of 1.4",
+'article' => "條目", //"Content page",
+'autoblocker' => "你的IP和被封了的 \"$1\" 是一樣的。封鎖原因: \"$2\".",//"Autoblocked because you share an IP address with \"$1\". Reason \"$2\".",
+'blocklogentry' => "封鎖 $1, $2",//"blocked \"$1\" with an expiry time of $2",
+'blocklogpage' => "封鎖記錄", //"Block_log",
+'categoriespagetext' => "以下列出所有的頁面分類。", //"The following categories exists in the wiki.",
+'categoryarticlecount' => "該類頁面共有 $1 條目", //There are $1 articles in this category.",
+'clearyourcache' => "'''註意:''' 保存設置後,要清掉瀏覽器的緩存才能生效:'''Mozilla:''' 點''刷新'' (或用快鍵''Ctrl-R''),'''IE / Opera:''' ''Ctrl-F5'', '''Safari:''' ''Cmd-R'', '''Konqueror''' ''Ctrl-R''。",//"'''Note:''' After saving, you have to clear your browser cache to see the changes: '''Mozilla:''' click ''Reload'' (or ''Ctrl-R''), '''IE / Opera:''' ''Ctrl-F5'', '''Safari:''' ''Cmd-R'', '''Konqueror''' ''Ctrl-R''.",
+'edit' => "編輯", //"Edit",
+'navigation' => "導航", //"Navigation",
+'nstab-category' => "分類", //"Category",
+'nstab-help' => "幫助",//"Help",
+'nstab-image' => "圖像",//"Image",
+'nstab-main' => "條目", //"Article",
+'nstab-mediawiki' => "界面",//"Message",
+'nstab-special' => "特殊",//"Special",
+'nstab-template' => "模板", //"Template",
+'nstab-user' => "用戶頁面", //"User page",
+'nstab-wp' => "關於", //"About",
+'portal' => "社區",//"Community portal",
+'prefs-help-userdata' => "*<strong>真實姓名</strong>(可選):用以對您的貢獻署名。<br />*<strong>點子郵件</strong>(可選):讓他人通過網站在不知道您的電子郵件地址的情況下通過電子郵件與您聯絡,以及通過電子郵件取得遺忘的密碼。", /*"* <strong>Real name</strong> (optional): if you choose to provide it this will be used for giving you attribution for your work.<br />
+* <strong>Email</strong> (optional): Enables people to contact you through the website without you having to reveal your
+email address to them, and it can be used to send you a new password if you forget it.", */
+'prefs-misc' => "雜項", //"Misc settings",
+'prefs-personal' => "用戶數據",//"User data",
+'prefs-rc' => "最近更新", //"Recent changes and stub display",
+'showhideminor' => "$1 小修改 | $2 bots | $3 登錄用戶 | $4 檢查過的", //"$1 minor edits | $2 bots | $3 logged in users | $4 patrolled edits ",
+'skin' => "皮膚", //"Skin",
+'talk' => "討論",//"Discussion",
+'timezonelegend' => "時區", //"Time zone",
+'toolbox' => "工具",//"Toolbox",
+'watch' => "監視",//"Watch",
+'yourlanguage' => "界面語言", //"Your language"
+'yourrealname' => "真實姓名*", //"Your real name"
+'yourvariant' => "中文字體", //"language variant"
+
);
class LanguageZh_tw extends LanguageZh_cn {
$s .= $this->makeKnownLink( $li, wfMsg( "login" ), $q );
}
+ /* show links to different language variants */
+ global $wgDisableLangConversion;
+ $variants = $wgContLang->getVariants();
+ if( !$wgDisableLangConversion && sizeof( $variants ) > 1 ) {
+ $actstr = '';
+ foreach( $variants as $code ) {
+ $varname = $wgContLang->getVariantname( $code );
+ if( $varname == 'disable' )
+ continue;
+ $s .= ' | <a href="' . $wgTitle->getLocalUrl( 'variant=' . $code ) . '">' . $varname . '</a>';
+ }
+ }
+
+
+
return $s;
}
}
/* offsets to distinguish the tab groups */
li#ca-talk { margin-right: 1.6em; }
-li#ca-watch, li#ca-watch { margin-left: 1.6em; }
+li#ca-watch, li#ca-watch, li#ca-varlang-0 { margin-left: 1.6em; }
/*