Index: trunk/phase3/languages/LanguageConverter.php |
— | — | @@ -505,11 +505,10 @@ |
506 | 506 | * |
507 | 507 | * @param string $text text to be converted |
508 | 508 | * @param bool $isTitle whether this conversion is for the article title |
509 | | - * @param string $variant the variant we convert to |
510 | 509 | * @return string converted text |
511 | 510 | * @public |
512 | 511 | */ |
513 | | - function convert( $text, $isTitle = false, $variant = null ) { |
| 512 | + function convert( $text, $isTitle = false ) { |
514 | 513 | |
515 | 514 | $mw =& MagicWord::get( 'notitleconvert' ); |
516 | 515 | if( $mw->matchAndRemove( $text ) ) |
— | — | @@ -524,10 +523,7 @@ |
525 | 524 | if( $mw->matchStart( $text ) ) |
526 | 525 | return $text; |
527 | 526 | |
528 | | - if( $variant && in_array( $variant, $this->mVariants ) ) |
529 | | - $plang = $variant; |
530 | | - else |
531 | | - $plang = $this->getPreferredVariant(); |
| 527 | + $plang = $this->getPreferredVariant(); |
532 | 528 | |
533 | 529 | // for title convertion |
534 | 530 | if ( $isTitle ) return $this->convertTitle( $text, $plang ); |
Index: trunk/phase3/languages/Language.php |
— | — | @@ -35,7 +35,7 @@ |
36 | 36 | class FakeConverter { |
37 | 37 | var $mLang; |
38 | 38 | function FakeConverter($langobj) {$this->mLang = $langobj;} |
39 | | - function convert($t, $i, $v) {return $t;} |
| 39 | + function convert($t, $i) {return $t;} |
40 | 40 | function parserConvert($t, $p) {return $t;} |
41 | 41 | function getVariants() { return array( $this->mLang->getCode() ); } |
42 | 42 | function getPreferredVariant() {return $this->mLang->getCode(); } |
— | — | @@ -2244,8 +2244,8 @@ |
2245 | 2245 | } |
2246 | 2246 | |
2247 | 2247 | # convert text to different variants of a language. |
2248 | | - function convert( $text, $isTitle = false, $variant = null ) { |
2249 | | - return $this->mConverter->convert($text, $isTitle, $variant); |
| 2248 | + function convert( $text, $isTitle = false) { |
| 2249 | + return $this->mConverter->convert($text, $isTitle); |
2250 | 2250 | } |
2251 | 2251 | |
2252 | 2252 | # Convert text from within Parser |
Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -1968,9 +1968,7 @@ |
1969 | 1969 | } |
1970 | 1970 | |
1971 | 1971 | wfProfileOut( $fname ); |
1972 | | - // Use $wgContLang to get a converted string by language. |
1973 | | - global $wgContLang; |
1974 | | - return $wgContLang->convert( $notice ); |
| 1972 | + return $notice; |
1975 | 1973 | } |
1976 | 1974 | |
1977 | 1975 | function wfGetNamespaceNotice() { |
Index: trunk/phase3/includes/CategoryPage.php |
— | — | @@ -189,7 +189,7 @@ |
190 | 190 | */ |
191 | 191 | function addPage( $title, $sortkey, $pageLength, $isRedirect = false ) { |
192 | 192 | global $wgContLang; |
193 | | - $titletext = $wgContLang->convertHtml( $title->getPrefixedText(), true ); |
| 193 | + $titletext = $wgContLang->convertHtml( $title->getPrefixedText() ); |
194 | 194 | $this->articles[] = $isRedirect |
195 | 195 | ? '<span class="redirect-in-category">' . $this->getSkin()->makeKnownLinkObj( $title, $titletext ) . '</span>' |
196 | 196 | : $this->getSkin()->makeSizeLinkObj( $pageLength, $title, $titletext ); |
Index: trunk/extensions/CategoryTree/CategoryTreeFunctions.php |
— | — | @@ -588,7 +588,6 @@ |
589 | 589 | * $info must be an associative array, containing at least a Title object under the 'title' key. |
590 | 590 | */ |
591 | 591 | function renderNodeInfo( $title, $cat, $children = 0, $loadchildren = false ) { |
592 | | - global $wgContLang; |
593 | 592 | static $uniq = 0; |
594 | 593 | |
595 | 594 | $this->init(); # initialize messages |
Index: trunk/extensions/AbuseFilter/AbuseFilter.parser.php |
— | — | @@ -365,7 +365,6 @@ |
366 | 366 | 'bool' => 'castBool', |
367 | 367 | 'norm' => 'funcNorm', |
368 | 368 | 'ccnorm' => 'funcCCNorm', |
369 | | - 'convert' => 'funcConvert', |
370 | 369 | 'specialratio' => 'funcSpecialRatio', |
371 | 370 | 'rmspecials' => 'funcRMSpecials', |
372 | 371 | 'rmdoubles' => 'funcRMDoubles', |
— | — | @@ -1257,16 +1256,6 @@ |
1258 | 1257 | return new AFPData( AFPData::DString, $wgContLang->lc( $s ) ); |
1259 | 1258 | } |
1260 | 1259 | |
1261 | | - protected function funcConvert( $args ) { |
1262 | | - global $wgContLang; |
1263 | | - if( count( $args ) < 2 ) |
1264 | | - throw new AFPUserVisibleException( 'notenoughargs', $this->mCur->pos, |
1265 | | - array( 'lang_convert', 2, count($args) ) ); |
1266 | | - $v = $args[0]->toString(); |
1267 | | - $s = $args[1]->toString(); |
1268 | | - return new AFPData( AFPData::DString, $wgContLang->convert( $s, false, $v ) ); |
1269 | | - } |
1270 | | - |
1271 | 1260 | protected function funcLen( $args ) { |
1272 | 1261 | if( count( $args ) < 1 ) |
1273 | 1262 | throw new AFPUserVisibleException( 'notenoughargs', $this->mCur->pos, |
Index: trunk/extensions/AbuseFilter/AbuseFilter.class.php |
— | — | @@ -57,7 +57,6 @@ |
58 | 58 | 'length(string)' => 'length', |
59 | 59 | 'lcase(string)' => 'lcase', |
60 | 60 | 'ccnorm(string)' => 'ccnorm', |
61 | | - 'convert("vairant", string)' => 'convert', |
62 | 61 | 'rmdoubles(string)' => 'rmdoubles', |
63 | 62 | 'specialratio(string)' => 'specialratio', |
64 | 63 | 'norm(string)' => 'norm', |
Index: trunk/extensions/AbuseFilter/AbuseFilter.i18n.php |
— | — | @@ -246,7 +246,6 @@ |
247 | 247 | 'abusefilter-edit-builder-funcs-length' => 'String length (length)', |
248 | 248 | 'abusefilter-edit-builder-funcs-lcase' => 'To lower case (lcase)', |
249 | 249 | 'abusefilter-edit-builder-funcs-ccnorm' => 'Normalise confusable characters (ccnorm)', |
250 | | - 'abusefilter-edit-builder-funcs-convert' => 'Convert string to specified variant (convert)', |
251 | 250 | 'abusefilter-edit-builder-funcs-rmdoubles' => 'Remove double-characters (rmdoubles)', |
252 | 251 | 'abusefilter-edit-builder-funcs-specialratio' => 'Special characters / total characters (specialratio)', |
253 | 252 | 'abusefilter-edit-builder-funcs-norm' => 'Normalise (norm)', |
— | — | @@ -17712,7 +17711,6 @@ |
17713 | 17712 | 'abusefilter-edit-builder-funcs-length' => '字符串长度(length)', |
17714 | 17713 | 'abusefilter-edit-builder-funcs-lcase' => '字母小写化(lcase)', |
17715 | 17714 | 'abusefilter-edit-builder-funcs-ccnorm' => '规范化易混淆字符(ccnorm)', |
17716 | | - 'abusefilter-edit-builder-funcs-convert' => '转换字符串到指定语言(convert)', |
17717 | 17715 | 'abusefilter-edit-builder-funcs-rmdoubles' => '去除双字节字符(rmdoubles)', |
17718 | 17716 | 'abusefilter-edit-builder-funcs-specialratio' => '特殊字符比(specialratio)', |
17719 | 17717 | 'abusefilter-edit-builder-funcs-norm' => '规范化(norm)', |
— | — | @@ -18073,14 +18071,13 @@ |
18074 | 18072 | 'abusefilter-edit-builder-misc-cond' => '條件式(if X then Y else Z)', |
18075 | 18073 | 'abusefilter-edit-builder-group-funcs' => '函數', |
18076 | 18074 | 'abusefilter-edit-builder-funcs-length' => '字串長度(length)', |
18077 | | - 'abusefilter-edit-builder-funcs-lcase' => '改為小寫(lcase)', |
18078 | | - 'abusefilter-edit-builder-funcs-ccnorm' => '修正混淆字符(ccnorm)', |
18079 | | - 'abusefilter-edit-builder-funcs-convert' => '轉換字串到指定語言(convert)', |
18080 | | - 'abusefilter-edit-builder-funcs-rmdoubles' => '去除雙字元(rmdoubles)', |
18081 | | - 'abusefilter-edit-builder-funcs-specialratio' => '特殊字元數與整體字元數比(specialratio)', |
| 18075 | + 'abusefilter-edit-builder-funcs-lcase' => '改為小寫(lcase)', |
| 18076 | + 'abusefilter-edit-builder-funcs-ccnorm' => '修正混淆字符(ccnorm)', |
| 18077 | + 'abusefilter-edit-builder-funcs-rmdoubles' => '去除雙字元(rmdoubles)', |
| 18078 | + 'abusefilter-edit-builder-funcs-specialratio' => '特殊字元數與整體字元數比(specialratio)', |
18082 | 18079 | 'abusefilter-edit-builder-funcs-norm' => '正常化(norm)', |
18083 | | - 'abusefilter-edit-builder-funcs-count' => '字串 X 在字串 Y 裡出現的次數(count)', |
18084 | | - 'abusefilter-edit-builder-funcs-rcount' => '正則表示式 X 出現在字串 Y 的次數(rcount)', |
| 18080 | + 'abusefilter-edit-builder-funcs-count' => '字串 X 在字串 Y 裡出現的次數(count)', |
| 18081 | + 'abusefilter-edit-builder-funcs-rcount' => '正則表示式 X 出現在字串 Y 的次數(rcount)', |
18085 | 18082 | 'abusefilter-edit-builder-funcs-rmwhitespace' => '去除空白字元(rmwhitespace)', |
18086 | 18083 | 'abusefilter-edit-builder-funcs-rmspecials' => '去除特殊字元(rmspecials)', |
18087 | 18084 | 'abusefilter-edit-builder-funcs-ip_in_range' => 'IP是否在範圍內?(ip_in_range)', |