summaryrefslogtreecommitdiff
path: root/languages/classes/LanguageZh.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2009-06-10 13:00:47 +0200
committerPierre Schmitz <pierre@archlinux.de>2009-06-10 13:00:47 +0200
commit72e90545454c0e014318fa3c81658e035aac58c1 (patch)
tree9212e3f46868989c4d57ae9a5c8a1a80e4dc0702 /languages/classes/LanguageZh.php
parent565a0ccc371ec1a2a0e9b39487cbac18e6f60e25 (diff)
applying patch to version 1.15.0
Diffstat (limited to 'languages/classes/LanguageZh.php')
-rw-r--r--languages/classes/LanguageZh.php47
1 files changed, 47 insertions, 0 deletions
diff --git a/languages/classes/LanguageZh.php b/languages/classes/LanguageZh.php
index 09362690..cbb748c3 100644
--- a/languages/classes/LanguageZh.php
+++ b/languages/classes/LanguageZh.php
@@ -34,6 +34,53 @@ class ZhConverter extends LanguageConverter {
'zh-my' => '大马',
);
$this->mVariantNames = array_merge($this->mVariantNames,$names);
+ $this->loadNamespaceTables();
+ }
+
+ function loadNamespaceTables() {
+ global $wgMetaNamespace;
+ $nsproject = $wgMetaNamespace;
+ $projecttable = array(
+ 'Wikipedia' => '维基百科',
+ 'Wikisource' => '维基文库',
+ 'Wikinews' => '维基新闻',
+ 'Wiktionary' => '维基词典',
+ 'Wikibooks' => '维基教科书',
+ 'Wikiquote' => '维基语录',
+ );
+ $this->mNamespaceTables['zh-hans'] = array(
+ 'Media' => '媒体',
+ 'Special' => '特殊',
+ 'Talk' => '讨论',
+ 'User' => '用户',
+ 'User talk' => '用户讨论',
+ $nsproject
+ => isset($projecttable[$nsproject]) ?
+ $projecttable[$nsproject] : $nsproject,
+ $nsproject . ' talk'
+ => isset($projecttable[$nsproject]) ?
+ $projecttable[$nsproject] . '讨论' : $nsproject . '讨论',
+ 'File' => '文件',
+ 'File talk' => '文件讨论',
+ 'MediaWiki' => 'MediaWiki',
+ 'MediaWiki talk' => 'MediaWiki讨论',
+ 'Template' => '模板',
+ 'Template talk' => '模板讨论',
+ 'Help' => '帮助',
+ 'Help talk' => '帮助讨论',
+ 'Category' => '分类',
+ 'Category talk' => '分类讨论',
+ );
+ $this->mNamespaceTables['zh-hant'] = array_merge($this->mNamespaceTables['zh-hans']);
+ $this->mNamespaceTables['zh-hant']['File'] = '檔案';
+ $this->mNamespaceTables['zh-hant']['File talk'] = '檔案討論';
+ $this->mNamespaceTables['zh'] = array_merge($this->mNamespaceTables['zh-hans']);
+ $this->mNamespaceTables['zh-cn'] = array_merge($this->mNamespaceTables['zh-hans']);
+ $this->mNamespaceTables['zh-hk'] = array_merge($this->mNamespaceTables['zh-hant']);
+ $this->mNamespaceTables['zh-mo'] = array_merge($this->mNamespaceTables['zh-hant']);
+ $this->mNamespaceTables['zh-my'] = array_merge($this->mNamespaceTables['zh-hans']);
+ $this->mNamespaceTables['zh-sg'] = array_merge($this->mNamespaceTables['zh-hans']);
+ $this->mNamespaceTables['zh-tw'] = array_merge($this->mNamespaceTables['zh-hant']);
}
function loadDefaultTables() {