jenkins-bot has submitted this change and it was merged.
Change subject: Change loading order of Chinese conversion tables
......................................................................
Change loading order of Chinese conversion tables
Apply the conversion variants from specific zones before zh-hans
and zh-hant, to allow fitting specific linguistic habits before
falling back to the generic ones. The actual rules will be added
in a followup patch.
Previously, the zh-cn table was composed by:
(1) Load zh2Hans as zh-hans table
(2) Load zh2CN + zh2Hans as zh-cn table
(3) Load Conversiontable/zh-hans + zh-hans as zh-hans table
(4) Load Conversiontable/zh-cn + zh-cn as zh-cn table
(5) Load zh-hans + zh-cn as the final zh-cn table
The new loading order is:
(1) Load zh2Hans as zh-hans table
(2) Load zh2CN as zh-cn table
(3) Load Conversiontable/zh-hans + zh-hans as zh-hans table
(4) Load Conversiontable/zh-cn + zh-cn as zh-cn table
(5) Load zh-cn + zh-hans as the final zh-cn table
Change-Id: Ie9d08b85d4911618946fa7efd23eb898412449e5
---
M languages/classes/LanguageZh.php
1 file changed, 24 insertions(+), 12 deletions(-)
Approvals:
Shizhao: Looks good to me, but someone else must approve
Byfserag: Looks good to me, but someone else must approve
Kuailong: Looks good to me, but someone else must approve
Cwek: Looks good to me, but someone else must approve
Nikerabbit: Looks good to me, approved
Chiefwei: Looks good to me, but someone else must approve
Liuxinyu970226: Looks good to me, but someone else must approve
Nemo bis: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/languages/classes/LanguageZh.php b/languages/classes/LanguageZh.php
index dfdc6b1..731b3f8 100644
--- a/languages/classes/LanguageZh.php
+++ b/languages/classes/LanguageZh.php
@@ -67,23 +67,35 @@
$this->mTables = array(
'zh-hans' => new ReplacementArray( $zh2Hans ),
'zh-hant' => new ReplacementArray( $zh2Hant ),
- 'zh-cn' => new ReplacementArray( array_merge( $zh2Hans,
$zh2CN ) ),
- 'zh-hk' => new ReplacementArray( array_merge( $zh2Hant,
$zh2HK ) ),
- 'zh-mo' => new ReplacementArray( array_merge( $zh2Hant,
$zh2HK ) ),
- 'zh-my' => new ReplacementArray( array_merge( $zh2Hans,
$zh2SG ) ),
- 'zh-sg' => new ReplacementArray( array_merge( $zh2Hans,
$zh2SG ) ),
- 'zh-tw' => new ReplacementArray( array_merge( $zh2Hant,
$zh2TW ) ),
+ 'zh-cn' => new ReplacementArray( $zh2CN ),
+ 'zh-hk' => new ReplacementArray( $zh2HK ),
+ 'zh-mo' => new ReplacementArray( $zh2HK ),
+ 'zh-my' => new ReplacementArray( $zh2SG ),
+ 'zh-sg' => new ReplacementArray( $zh2SG ),
+ 'zh-tw' => new ReplacementArray( $zh2TW ),
'zh' => new ReplacementArray
);
}
function postLoadTables() {
- $this->mTables['zh-cn']->merge( $this->mTables['zh-hans'] );
- $this->mTables['zh-hk']->merge( $this->mTables['zh-hant'] );
- $this->mTables['zh-mo']->merge( $this->mTables['zh-hant'] );
- $this->mTables['zh-my']->merge( $this->mTables['zh-hans'] );
- $this->mTables['zh-sg']->merge( $this->mTables['zh-hans'] );
- $this->mTables['zh-tw']->merge( $this->mTables['zh-hant'] );
+ $this->mTables['zh-cn']->setArray(
+ $this->mTables['zh-cn']->getArray() +
$this->mTables['zh-hans']->getArray()
+ );
+ $this->mTables['zh-hk']->setArray(
+ $this->mTables['zh-hk']->getArray() +
$this->mTables['zh-hant']->getArray()
+ );
+ $this->mTables['zh-mo']->setArray(
+ $this->mTables['zh-mo']->getArray() +
$this->mTables['zh-hant']->getArray()
+ );
+ $this->mTables['zh-my']->setArray(
+ $this->mTables['zh-my']->getArray() +
$this->mTables['zh-hans']->getArray()
+ );
+ $this->mTables['zh-sg']->setArray(
+ $this->mTables['zh-sg']->getArray() +
$this->mTables['zh-hans']->getArray()
+ );
+ $this->mTables['zh-tw']->setArray(
+ $this->mTables['zh-tw']->getArray() +
$this->mTables['zh-hant']->getArray()
+ );
}
/**
--
To view, visit https://gerrit.wikimedia.org/r/158366
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie9d08b85d4911618946fa7efd23eb898412449e5
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Liangent <[email protected]>
Gerrit-Reviewer: Byfserag <[email protected]>
Gerrit-Reviewer: Chiefwei <[email protected]>
Gerrit-Reviewer: Cwek <[email protected]>
Gerrit-Reviewer: Kuailong <[email protected]>
Gerrit-Reviewer: Liangent <[email protected]>
Gerrit-Reviewer: Liuxinyu970226 <[email protected]>
Gerrit-Reviewer: Nemo bis <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: Shizhao <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits