r37373 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r37372‎ | r37373 | r37374 >
Date:08:16, 9 July 2008
Author:shinjiman
Status:old
Tags:
Comment:
* (bug 14604) Update LanguageConverter for compatibility on -{*|xxx}- usage
patch by fdcn
Modified paths:
  • /trunk/phase3/languages/LanguageConverter.php (modified) (history)
  • /trunk/phase3/languages/classes/LanguageZh.php (modified) (history)

Diff [purge]

Index: trunk/phase3/languages/classes/LanguageZh.php
@@ -14,6 +14,8 @@
1515 $markup=array(),
1616 $flags = array(),
1717 $manualLevel = array() ) {
 18+ $this->mDescCodeSep = ':';
 19+ $this->mDescVarSep = ';';
1820 parent::__construct($langobj, $maincode,
1921 $variants,
2022 $variantfallbacks,
@@ -65,14 +67,6 @@
6668 function markNoConversion($text, $noParse = false) {
6769 return $text;
6870 }
69 -
70 - /* description of convert code in chinese language*/
71 - function getRulesDesc($bidtable,$unidtable){
72 - $text=parent::getRulesDesc($bidtable,$unidtable);
73 - $text=str_replace(':',':',$text);
74 - $text=str_replace(';',';',$text);
75 - return $text;
76 - }
7771
7872 function convertCategoryKey( $key ) {
7973 return $this->autoConvert( $key, 'zh' );
Index: trunk/phase3/languages/LanguageConverter.php
@@ -1,13 +1,20 @@
22 <?php
33
44 /**
5 - * @ingroup Language
6 - *
7 - * @author Zhengzhu Feng <zhengzhu@gmail.com>
8 - * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
9 - * @maintainers fdcn <fdcn64@gmail.com>, shinjiman <shinjiman@gmail.com>
10 - */
 5+ * Contains the LanguageConverter class and ConverterRule class
 6+ * @ingroup Language
 7+ *
 8+ * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
 9+ * @file
 10+ */
1111
 12+/**
 13+ * base class for language convert
 14+ * @ingroup Language
 15+ *
 16+ * @author Zhengzhu Feng <zhengzhu@gmail.com>
 17+ * @maintainers fdcn <fdcn64@gmail.com>, shinjiman <shinjiman@gmail.com>
 18+ */
1219 class LanguageConverter {
1320 var $mPreferredVariant='';
1421 var $mMainLanguageCode;
@@ -22,6 +29,7 @@
2330 var $mLangObj;
2431 var $mMarkup;
2532 var $mFlags;
 33+ var $mDescCodeSep = ':',$mDescVarSep = ';';
2634 var $mUcfirst = false;
2735
2836 const CACHE_VERSION_KEY = 'VERSION 6';
@@ -34,7 +42,7 @@
3543 * @param array $variantfallback the fallback language of each variant
3644 * @param array $markup array defining the markup used for manual conversion
3745 * @param array $flags array defining the custom strings that maps to the flags
38 - * @access public
 46+ * @public
3947 */
4048 function __construct($langobj, $maincode,
4149 $variants=array(),
@@ -94,7 +102,7 @@
95103 *
96104 * @param string $v the language code of the variant
97105 * @return string array the code of the fallback language or false if there is no fallback
98 - * @private
 106+ * @public
99107 */
100108 function getVariantFallbacks($v) {
101109 if( isset( $this->mVariantFallbacks[$v] ) ) {
@@ -304,6 +312,31 @@
305313
306314
307315 /**
 316+ * apply manual conversion
 317+ * @private
 318+ */
 319+ function applyManualConv($convRule){
 320+ // use syntax -{T|zh:TitleZh;zh-tw:TitleTw}- for custom conversion in title
 321+ $title = $convRule->getTitle();
 322+ if($title){
 323+ $this->mTitleFromFlag = true;
 324+ $this->mTitleDisplay = $title;
 325+ }
 326+
 327+ //add manual conversion table to global table
 328+ $convTable = $convRule->getConvTable();
 329+ $isAdd = $convRule->getRulesAction()=="add";
 330+ $isRemove = $convRule->getRulesAction()=="remove";
 331+ foreach($convTable as $v=>$t) {
 332+ if( !in_array($v,$this->mVariants) )continue;
 333+ if( $isAdd )
 334+ $this->mTables[$v]->mergeArray($t);
 335+ elseif ( $isRemove )
 336+ $this->mTables[$v]->removeArray($t);
 337+ }
 338+ }
 339+
 340+ /**
308341 * Convert text using a parser object for context
309342 * @public
310343 */
@@ -325,66 +358,6 @@
326359 }
327360
328361 /**
329 - * @private
330 - */
331 - function applyManualConv($convRule,$variant){
332 - if(!$variant) $variant = $this->getPreferredVariant();
333 - $rules = $convRule->getRules();
334 - $flags = $convRule->getFlags();
335 - list($bidtable, $unidtable) = $convRule->getConvTable();
336 -
337 - $is_title_flag = in_array('T', $flags);
338 - // use syntax -{T|zh:TitleZh;zh-tw:TitleTw}- for custom conversion in title
339 - if($is_title_flag){
340 - $this->mTitleFromFlag = true;
341 - $this->mTitleDisplay = $convRule->getTitle();
342 - }
343 -
344 - if($this->mManualLevel[$variant]=='disable') return;
345 -
346 - $is_remove_flag = !$is_title_flag && in_array('-', $flags);
347 - $is_add_flag = !$is_remove_flag && in_array('+', $flags);
348 - $is_bidMC = $this->mManualLevel[$variant]=='bidirectional';
349 - $is_unidMC = $this->mManualLevel[$variant]=='unidirectional';
350 - $vmarked=array();
351 -
352 - foreach($this->mVariants as $v) {
353 - /* for bidirectional array
354 - fill in the missing variants, if any,
355 - with fallbacks */
356 - if($is_bidMC && !array_key_exists($v, $bidtable)) {
357 - $vf = $convRule->getTextInBidtable($this->getVariantFallbacks($v) );
358 - if($vf) $bidtable[$v] = $vf;
359 - }
360 - if($is_bidMC && array_key_exists($v,$bidtable)){
361 - foreach($vmarked as $vo){
362 - // use syntax:
363 - // -{A|zh:WordZh;zh-tw:WordTw}- or -{+|zh:WordZh;zh-tw:WordTw}-
364 - // to introduce a custom mapping between
365 - // words WordZh and WordTw in the whole text
366 - if($is_add_flag){
367 - $this->mTables[$v]->setPair($bidtable[$vo], $bidtable[$v]);
368 - $this->mTables[$vo]->setPair($bidtable[$v], $bidtable[$vo]);
369 - }
370 - // use syntax -{-|zh:WordZh;zh-tw:WordTw}- to remove a conversion
371 - // words WordZh and WordTw in the whole text
372 - if($is_remove_flag){
373 - $this->mTables[$v]->removePair($bidtable[$vo]);
374 - $this->mTables[$vo]->removePair($bidtable[$v]);
375 - }
376 - }
377 - $vmarked[]=$v;
378 - }
379 - /*for unidirectional array
380 - fill to convert tables */
381 - if($is_unidMC && array_key_exists($v,$unidtable)){
382 - if($is_add_flag)$this->mTables[$v]->mergeArray($unidtable[$v]);
383 - if($is_remove_flag)$this->mTables[$v]->removeArray($unidtable[$v]);
384 - }
385 - }
386 - }
387 -
388 - /**
389362 * convert title
390363 * @private
391364 */
@@ -447,33 +420,23 @@
448421 if ($isTitle) return $this->convertTitle($text);
449422
450423 $plang = $this->getPreferredVariant();
451 -
452 - $tarray = explode($this->mMarkup['begin'], $text);
453 - $tfirst = array_shift($tarray);
454 - if($this->mDoContentConvert)
455 - $text = $this->autoConvert($tfirst,$plang);
456 - else
457 - $text = $tfirst;
 424+ $tarray = explode($this->mMarkup['end'], $text);
 425+ $text = '';
458426 foreach($tarray as $txt) {
459 - $marked = explode($this->mMarkup['end'], $txt, 2);
 427+ $marked = explode($this->mMarkup['begin'], $txt, 2);
460428
461 - // strip the flags from syntax like -{T| ... }-
462 - $crule = new ConverterRule($marked[0],
463 - $this->mMarkup, $this->mFlags,
464 - $this->mVariantNames,
465 - $this->mDoContentConvert,
466 - $this->mDoTitleConvert);
467 - $crule->parse($plang,
468 - $this->getVariantFallbacks($plang),
469 - $this->mManualLevel[$plang]=='disable');
470 - $text .= $crule->getDisplay();
471 - $this->applyManualConv($crule,$plang);
 429+ if( $this->mDoContentConvert )
 430+ $text .= $this->autoConvert($marked[0],$plang);
 431+ else
 432+ $text .= $marked[0];
472433
473434 if(array_key_exists(1, $marked)){
474 - if( $this->mDoContentConvert )
475 - $text .= $this->autoConvert($marked[1],$plang);
476 - else
477 - $text .= $marked[1];
 435+ // strip the flags from syntax like -{T| ... }-
 436+ $crule = new ConverterRule($marked[1], $this);
 437+ $crule->parse($plang);
 438+
 439+ $text .= $crule->getDisplay();
 440+ $this->applyManualConv($crule);
478441 }
479442 }
480443
@@ -805,37 +768,29 @@
806769 */
807770 class ConverterRule {
808771 var $mText; // original text in -{text}-
809 - var $mVariantNames;
810 - var $mMarkup;
811 - var $mRules;
812 - var $mFlags;
813 - var $mManualCodeError='<span style="color: red;">code error!</span>';
814 - var $mDoTitleConvert=true, $mDoContentConvert=true;
815 - var $ruleDisplay = '',$ruleTitle=false;
816 - var $rules = '';// string $rule the text of the rule
817 - var $flags = array();
818 - var $bidtable = array();// array of the translation in each variant
819 - var $unidtable = array();// array of the translation in each variant
 772+ var $mConverter; // LanguageConverter object
 773+ var $mManualCodeError='<strong class="error">code error!</strong>';
 774+ var $mRuleDisplay = '',$mRuleTitle=false;
 775+ var $mRules = '';// string : the text of the rules
 776+ var $mRulesAction = 'none';
 777+ var $mFlags = array();
 778+ var $mConvTable = array();
 779+ var $mBidtable = array();// array of the translation in each variant
 780+ var $mUnidtable = array();// array of the translation in each variant
820781
821782 /**
822783 * Constructor
823784 *
824785 * @param string $text the text between -{ and }-
825 - * @param array $markup the supported markup for conversion
826 - * @param array $flags the supported flags for conversion
827 - * @param array $variantNames the names list of supported language
828 - * @param bool $doTitleConvert if do title convert
829 - * @param bool $doContentConvert if do content convert
 786+ * @param object $converter a LanguageConverter object
830787 * @access public
831788 */
832 - function __construct($text,$markup,$flags,$variantNames,
833 - $doTitleConvert=true, $doContentConvert=true){
 789+ function __construct($text,$converter){
834790 $this->mText = $text;
835 - $this->mMarkup = $markup;
836 - $this->mFlags = $flags;
837 - $this->mVariantNames = $variantNames;
838 - $this->mDoTitleConvert=$doTitleConvert;
839 - $this->mDoContentConvert=$doContentConvert;
 791+ $this->mConverter=$converter;
 792+ foreach($converter->mVariants as $v){
 793+ $this->mConvTable[$v]=array();
 794+ }
840795 }
841796
842797 /**
@@ -849,13 +804,13 @@
850805 if(is_string($variants)){ $variants=array($variants); }
851806 if(!is_array($variants)) return false;
852807 foreach ($variants as $variant){
853 - if(array_key_exists($variant, $this->bidtable)){
854 - return $this->bidtable[$variant];
 808+ if(array_key_exists($variant, $this->mBidtable)){
 809+ return $this->mBidtable[$variant];
855810 }
856811 }
857812 return false;
858813 }
859 -
 814+
860815 /**
861816 * Parse flags with syntax -{FLAG| ... }-
862817 * @private
@@ -863,21 +818,23 @@
864819 function parseFlags(){
865820 $text = $this->mText;
866821 if(strlen($text) < 2 ) {
867 - $this->flags = array( 'R' );
868 - $this->rules = $text;
 822+ $this->mFlags = array( 'R' );
 823+ $this->mRules = $text;
869824 return;
870825 }
871826
872827 $flags = array();
873 - $tt = explode($this->mMarkup['flagsep'], $text, 2);
 828+ $markup = $this->mConverter->mMarkup;
 829+ $validFlags = $this->mConverter->mFlags;
874830
 831+ $tt = explode($markup['flagsep'], $text, 2);
875832 if(count($tt) == 2) {
876 - $f = explode($this->mMarkup['varsep'], $tt[0]);
 833+ $f = explode($markup['varsep'], $tt[0]);
877834 foreach($f as $ff) {
878835 $ff = trim($ff);
879 - if(array_key_exists($ff, $this->mFlags) &&
880 - !in_array($this->mFlags[$ff], $flags))
881 - $flags[] = $this->mFlags[$ff];
 836+ if(array_key_exists($ff, $validFlags) &&
 837+ !in_array($validFlags[$ff], $flags))
 838+ $flags[] = $validFlags[$ff];
882839 }
883840 $rules = $tt[1];
884841 } else {
@@ -917,27 +874,29 @@
918875 }
919876 if ( count($flags)==0 )
920877 $flags = array('S');
921 - $this->rules=$rules;
922 - $this->flags=$flags;
 878+ $this->mRules=$rules;
 879+ $this->mFlags=$flags;
923880 }
924881
925882 /**
926883 * generate conversion table
927884 * @private
928885 */
929 - function generateConvTable() {
930 - $rules = $this->rules;
931 - $flags = $this->flags;
 886+ function parseRules() {
 887+ $rules = $this->mRules;
 888+ $flags = $this->mFlags;
932889 $bidtable = array();
933890 $unidtable = array();
934 - $choice = explode($this->mMarkup['varsep'], $rules );
 891+ $markup = $this->mConverter->mMarkup;
 892+
 893+ $choice = explode($markup['varsep'], $rules );
935894 foreach($choice as $c) {
936 - $v = explode($this->mMarkup['codesep'], $c);
 895+ $v = explode($markup['codesep'], $c);
937896 if(count($v) != 2)
938897 continue;// syntax error, skip
939898 $to=trim($v[1]);
940899 $v=trim($v[0]);
941 - $u = explode($this->mMarkup['unidsep'], $v);
 900+ $u = explode($markup['unidsep'], $v);
942901 if(count($u) == 1) {
943902 $bidtable[$v] = $to;
944903 } else if(count($u) == 2){
@@ -948,23 +907,28 @@
949908 $unidtable[$v][$from]=$to;
950909 }
951910 // syntax error, pass
952 - if (!array_key_exists($v,$this->mVariantNames))
953 - return;
 911+ if (!array_key_exists($v,$this->mConverter->mVariantNames)){
 912+ $bidtable = array();
 913+ $unidtable = array();
 914+ break;
 915+ }
954916 }
955 - $this->bidtable = $bidtable;
956 - $this->unidtable = $unidtable;
 917+ $this->mBidtable = $bidtable;
 918+ $this->mUnidtable = $unidtable;
957919 }
958920
959921 /**
960922 * @private
961923 */
962924 function getRulesDesc(){
 925+ $codesep = $this->mConverter->mDescCodeSep;
 926+ $varsep = $this->mConverter->mDescVarSep;
963927 $text='';
964 - foreach($this->bidtable as $k => $v)
965 - $text .= $this->mVariantNames[$k].':'.$v.';';
966 - foreach($this->unidtable as $k => $a)
 928+ foreach($this->mBidtable as $k => $v)
 929+ $text .= $this->mConverter->mVariantNames[$k]."$codesep$v$varsep";
 930+ foreach($this->mUnidtable as $k => $a)
967931 foreach($a as $from=>$to)
968 - $text.=$from.'⇒'.$this->mVariantNames[$k].':'.$to.';';
 932+ $text.=$from.'⇒'.$this->mConverter->mVariantNames[$k]."$codesep$to$varsep";
969933 return $text;
970934 }
971935
@@ -972,26 +936,26 @@
973937 * Parse rules conversion
974938 * @private
975939 */
976 - function getRuleConvertedStr($variant,$variantFallbacks,
977 - $doConvert,$isMCDisable=false){
978 - $bidtable = $this->bidtable;
979 - $unidtable = $this->unidtable;
 940+ function getRuleConvertedStr($variant,$doConvert){
 941+ $bidtable = $this->mBidtable;
 942+ $unidtable = $this->mUnidtable;
980943
981944 if( count($bidtable) + count($unidtable) == 0 ){
982 - return $this->rules;
 945+ return $this->mRules;
983946 } elseif ($doConvert){// the text converted
984947 // display current variant in bidirectional array
985948 $disp = $this->getTextInBidtable($variant);
986949 // or display current variant in fallbacks
987950 if(!$disp)
988 - $disp = $this->getTextInBidtable($variantFallbacks);
 951+ $disp = $this->getTextInBidtable(
 952+ $this->mConverter->getVariantFallbacks($variant));
989953 // or display current variant in unidirectional array
990954 if(!$disp && array_key_exists($variant,$unidtable)){
991955 $disp = array_values($unidtable[$variant]);
992956 $disp = $disp[0];
993957 }
994958 // or display frist text under disable manual convert
995 - if(!$disp && $isMCDisable) {
 959+ if(!$disp && $this->mConverter->mManualLevel[$variant]=='disable') {
996960 if(count($bidtable)>0){
997961 $disp = array_values($bidtable);
998962 $disp = $disp[0];
@@ -1003,61 +967,126 @@
1004968 }
1005969 return $disp;
1006970 } else {// no convert
1007 - return $this->rules;
 971+ return $this->mRules;
1008972 }
1009973 }
1010974
1011975 /**
 976+ * generate conversion table for all text
 977+ * @private
 978+ */
 979+ function generateConvTable(){
 980+ //$rules = $this->mRules;
 981+ $flags = $this->mFlags;
 982+ $bidtable = $this->mBidtable;
 983+ $unidtable = $this->mUnidtable;
 984+ $manLevel = $this->mConverter->mManualLevel;
 985+
 986+ $vmarked=array();
 987+ foreach($this->mConverter->mVariants as $v) {
 988+ /* for bidirectional array
 989+ fill in the missing variants, if any,
 990+ with fallbacks */
 991+ if(!array_key_exists($v, $bidtable)) {
 992+ $variantFallbacks = $this->mConverter->getVariantFallbacks($v);
 993+ $vf = $this->getTextInBidtable($variantFallbacks);
 994+ if($vf) $bidtable[$v] = $vf;
 995+ }
 996+
 997+ if(array_key_exists($v,$bidtable)){
 998+ foreach($vmarked as $vo){
 999+ // use syntax: -{A|zh:WordZh;zh-tw:WordTw}-
 1000+ // or -{H|zh:WordZh;zh-tw:WordTw}- or -{-|zh:WordZh;zh-tw:WordTw}-
 1001+ // to introduce a custom mapping between
 1002+ // words WordZh and WordTw in the whole text
 1003+ if($manLevel[$v]=='bidirectional'){
 1004+ $this->mConvTable[$v][$bidtable[$vo]]=$bidtable[$v];
 1005+ }
 1006+ if($manLevel[$vo]=='bidirectional'){
 1007+ $this->mConvTable[$vo][$bidtable[$v]]=$bidtable[$vo];
 1008+ }
 1009+ }
 1010+ $vmarked[]=$v;
 1011+ }
 1012+ /*for unidirectional array
 1013+ fill to convert tables */
 1014+ $allow_unid = $manLevel[$v]=='bidirectional'
 1015+ || $manLevel[$v]=='unidirectional';
 1016+ if($allow_unid && array_key_exists($v,$unidtable)){
 1017+ $ct=$this->mConvTable[$v];
 1018+ $this->mConvTable[$v] = array_merge($ct,$unidtable[$v]);
 1019+ }
 1020+ }
 1021+ }
 1022+
 1023+ /**
10121024 * Parse rules and flags
10131025 * @public
10141026 */
1015 - function parse($variant,$variantFallbacks,$isMCDisable=false){
 1027+ function parse($variant){
 1028+ if(!$variant) $variant = $this->mConverter->getPreferredVariant();
 1029+
10161030 $this->parseFlags();
1017 - $this->generateConvTable();
 1031+ $this->parseRules();
10181032
1019 - $rules = $this->rules;
1020 - $flags = $this->flags;
 1033+ $rules = $this->mRules;
 1034+ $flags = $this->mFlags;
10211035
1022 - if(count($this->bidtable)==0 && count($this->unidtable)==0
1023 - && !in_array('N',$flags) && !in_array('T',$flags) )
1024 - {
1025 - $this->flags = $flags = array('R');
 1036+ if(count($this->mBidtable)==0 && count($this->mUnidtable)==0){
 1037+ if(in_array('+',$flags) || in_array('-',$flags))
 1038+ // fill all variants if text in -{A/H/-|text} without rules
 1039+ foreach($this->mConverter->mVariants as $v)
 1040+ $this->mBidtable[$v] = $rules;
 1041+ elseif (!in_array('N',$flags) && !in_array('T',$flags) )
 1042+ $this->mFlags = $flags = array('R');
10261043 }
10271044
10281045 if( in_array('R',$flags) ) {
10291046 // if we don't do content convert, still strip the -{}- tags
1030 - $this->ruleDisplay = $rules;
 1047+ $this->mRuleDisplay = $rules;
10311048 } elseif ( in_array('N',$flags) ){
10321049 // proces N flag: output current variant name
1033 - $this->ruleDisplay = $this->mVariantNames[trim($rules)];
 1050+ $this->mRuleDisplay = $this->mConverter->mVariantNames[trim($rules)];
10341051 } elseif ( in_array('D',$flags) ){
10351052 // proces D flag: output rules description
1036 - $this->ruleDisplay = $this->getRulesDesc();
 1053+ $this->mRuleDisplay = $this->getRulesDesc();
10371054 } elseif ( in_array('H',$flags) || in_array('-',$flags) ) {
10381055 // proces H,- flag or T only: output nothing
1039 - $this->ruleDisplay = '';
 1056+ $this->mRuleDisplay = '';
10401057 } elseif ( in_array('S',$flags) ){
1041 - $this->ruleDisplay = $this->getRuleConvertedStr(
1042 - $variant,$variantFallbacks,
1043 - $this->mDoContentConvert,$isMCDisable);
 1058+ $this->mRuleDisplay = $this->getRuleConvertedStr($variant,
 1059+ $this->mConverter->mDoContentConvert);
10441060 } else {
1045 - $this->ruleDisplay= $this->mManualCodeError;
 1061+ $this->mRuleDisplay= $this->mManualCodeError;
10461062 }
10471063 // proces T flag : output nothing
10481064 if ( in_array('T',$flags) ) {
1049 - $this->ruleTitle = $this->getRuleConvertedStr(
1050 - $variant,$variantFallbacks,
1051 - $this->mDoTitleConvert,$isMCDisable);
 1065+ $this->mRuleTitle = $this->getRuleConvertedStr($variant,
 1066+ $this->mConverter->mDoTitleConvert);
10521067 }
 1068+
 1069+ if (in_array('-', $flags))
 1070+ $this->mRulesAction='remove';
 1071+ if (in_array('+', $flags))
 1072+ $this->mRulesAction='add';
 1073+
 1074+ $this->generateConvTable();
10531075 }
10541076
10551077 /**
 1078+ * @public
 1079+ */
 1080+ function hasRules(){
 1081+ // TODO:
 1082+ }
 1083+
 1084+ /**
10561085 * get display text on markup -{...}-
10571086 * @param string $variant the current variant
10581087 * @public
10591088 */
10601089 function getDisplay(){
1061 - return $this->ruleDisplay;
 1090+ return $this->mRuleDisplay;
10621091 }
10631092 /**
10641093 * get converted title
@@ -1065,15 +1094,23 @@
10661095 * @public
10671096 */
10681097 function getTitle(){
1069 - return $this->ruleTitle;
 1098+ return $this->mRuleTitle;
10701099 }
10711100
10721101 /**
 1102+ * return how deal with conversion rules
 1103+ * @public
 1104+ */
 1105+ function getRulesAction(){
 1106+ return $this->mRulesAction;
 1107+ }
 1108+
 1109+ /**
10731110 * get conversion table ( bidirectional and unidirectional conversion table )
10741111 * @public
10751112 */
10761113 function getConvTable(){
1077 - return array($this->bidtable, $this->unidtable);
 1114+ return $this->mConvTable;
10781115 }
10791116
10801117 /**
@@ -1081,7 +1118,7 @@
10821119 * @public
10831120 */
10841121 function getRules(){
1085 - return $this->rules;
 1122+ return $this->mRules;
10861123 }
10871124
10881125 /**
@@ -1089,6 +1126,6 @@
10901127 * @public
10911128 */
10921129 function getFlags(){
1093 - return $this->flags;
 1130+ return $this->mFlags;
10941131 }
10951132 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r36664* (bug 14604) Introduced the following features for the LanguageConverter: Mu...shinjiman03:00, 26 June 2008
r37058* (bug 14604) Update LanguageConverter for T (Title) conversion...shinjiman15:01, 4 July 2008
r37186(bug 14604#c6): Fix regression in variant conversion when semicolon is within...rainman17:23, 6 July 2008

Status & tagging log