* @private
*/
function applyManualConv( $convRule ) {
- // use syntax -{T|zh:TitleZh;zh-tw:TitleTw}- for custom
- // conversion in title
- $this->mConvRuleTitle = $convRule->getTitle();
+ // Use syntax -{T|zh-cn:TitleCN; zh-tw:TitleTw}- to custom
+ // title conversion.
+ // Bug 24072: mConvRuleTitle won't work if the title conversion
+ // rule was followed by other manual conversion rule(s).
+ $newConvRuleTitle = $convRule->getTitle();
+ if( $newConvRuleTitle ) {
+ $this->mConvRuleTitle = $newConvRuleTitle;
+ }
// apply manual conversion table to global table
$convTable = $convRule->getConvTable();
</p>
!! end
+!! test
+Bug 24072: more test on conversion rule for title
+!! options
+language=zh variant=zh-tw showtitle
+!! input
+This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
+This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
+!! result
+Taiwan
+<p>This should be stripped!
+This won't take interferes with the title rule.
+</p>
+!! end
+
!! test
Raw output of variant escape tags (R flag)
!! options