Index: trunk/phase3/languages/messages/MessagesGan_hans.php |
— | — | @@ -64,7 +64,7 @@ |
65 | 65 | 'tog-watchlisthideown' => '监视列表弆到偶𠮶编辑', |
66 | 66 | 'tog-watchlisthidebots' => '监视列表弆到机器人𠮶编辑', |
67 | 67 | 'tog-watchlisthideminor' => '监视列表弆到细修改', |
68 | | -'tog-nolangconversion' => '嫑字转换', |
| 68 | +'tog-variantconversion' => '要字转换', |
69 | 69 | 'tog-ccmeonemails' => '偶发email到人家时也发封副本到偶', |
70 | 70 | 'tog-diffonly' => '比较两只版本差异𠮶时间伓显示文章𠮶内容', |
71 | 71 | 'tog-showhiddencats' => '显示弆到𠮶分类', |
Index: trunk/phase3/languages/messages/MessagesZh_hans.php |
— | — | @@ -73,7 +73,7 @@ |
74 | 74 | '分类讨论'=> NS_CATEGORY_TALK, |
75 | 75 | ); |
76 | 76 | |
77 | | -$specialPageAliases = array( |
| 77 | +/*$specialPageAliases = array( |
78 | 78 | 'DoubleRedirects' => array( '双重重定向页面' ), |
79 | 79 | 'BrokenRedirects' => array( '损坏的重定向页' ), |
80 | 80 | 'Disambiguations' => array( '消歧义页' ), |
— | — | @@ -162,11 +162,8 @@ |
163 | 163 | 'DeletedContributions' => array( '已删除的用户贡献' ), |
164 | 164 | 'Tags' => array( '标签' ), |
165 | 165 | 'Createpage' => array( '创建页面' ), |
166 | | -); |
| 166 | +);*/ |
167 | 167 | |
168 | | -$extraUserToggles = array( |
169 | | - 'nolangconversion', |
170 | | -); |
171 | 168 | $datePreferences = array( |
172 | 169 | 'default', |
173 | 170 | 'ISO 8601', |
— | — | @@ -232,7 +229,7 @@ |
233 | 230 | 'tog-watchlisthideliu' => '在监视列表中隐藏登录用户', |
234 | 231 | 'tog-watchlisthideanons' => '在监视列表中隐藏匿名用户', |
235 | 232 | 'tog-watchlisthidepatrolled' => '在监视列表中隐藏已巡查的编辑', |
236 | | -'tog-nolangconversion' => '不进行字词转换', |
| 233 | +'tog-variantconversion' => '进行字词转换', |
237 | 234 | 'tog-ccmeonemails' => '把我发送给其他用户的邮件同时发送副本给我自己', |
238 | 235 | 'tog-diffonly' => '在比较两个修订版本差异时不显示页面内容', |
239 | 236 | 'tog-showhiddencats' => '显示隐藏分类', |
Index: trunk/phase3/languages/messages/MessagesSr_ec.php |
— | — | @@ -60,11 +60,6 @@ |
61 | 61 | 'Razgovor_o_kategoriji' => NS_CATEGORY_TALK, |
62 | 62 | ); |
63 | 63 | |
64 | | - |
65 | | -$extraUserToggles = array( |
66 | | - 'nolangconversion', |
67 | | -); |
68 | | - |
69 | 64 | $datePreferenceMigrationMap = array( |
70 | 65 | 'default', |
71 | 66 | 'hh:mm d. month y.', |
Index: trunk/phase3/languages/messages/MessagesYue.php |
— | — | @@ -182,7 +182,7 @@ |
183 | 183 | 'tog-watchlisthideliu' => '響監視清單度隱藏登入用戶', |
184 | 184 | 'tog-watchlisthideanons' => '響監視清單度隱藏匿名用戶', |
185 | 185 | 'tog-watchlisthidepatrolled' => '響監視清單度隱藏巡查過嘅編輯', |
186 | | -'tog-nolangconversion' => '唔要用字轉換', |
| 186 | +'tog-variantconversion' => '要用字轉換', |
187 | 187 | 'tog-ccmeonemails' => '當我寄電郵畀其他人嗰陣寄返封副本畀我', |
188 | 188 | 'tog-diffonly' => '響差異下面唔顯示頁面內容', |
189 | 189 | 'tog-showhiddencats' => '顯示隱藏類', |
Index: trunk/phase3/languages/messages/MessagesGan_hant.php |
— | — | @@ -89,7 +89,7 @@ |
90 | 90 | 'tog-watchlisthideown' => '監視列表弆到偶嗰編輯', |
91 | 91 | 'tog-watchlisthidebots' => '監視列表弆到機器人嗰編輯', |
92 | 92 | 'tog-watchlisthideminor' => '監視列表弆到細修改', |
93 | | -'tog-nolangconversion' => '嫑字轉換', |
| 93 | +'tog-variantconversion' => '要字轉換', |
94 | 94 | 'tog-ccmeonemails' => '偶發email到人家時也發封副本到偶', |
95 | 95 | 'tog-diffonly' => '比較兩隻版本差異嗰時間伓顯示文章嗰內容', |
96 | 96 | 'tog-showhiddencats' => '顯示弆到嗰分類', |
Index: trunk/phase3/languages/messages/MessagesKk_arab.php |
— | — | @@ -51,10 +51,6 @@ |
52 | 52 | 'underline' => 0, |
53 | 53 | ); |
54 | 54 | |
55 | | -$extraUserToggles = array( |
56 | | - 'nolangconversion' |
57 | | -); |
58 | | - |
59 | 55 | $fallback8bitEncoding = 'windows-1256'; |
60 | 56 | |
61 | 57 | $namespaceNames = array( |
Index: trunk/phase3/languages/messages/MessagesZh_hant.php |
— | — | @@ -78,7 +78,7 @@ |
79 | 79 | "分類討論" => NS_CATEGORY_TALK, |
80 | 80 | ); |
81 | 81 | |
82 | | -$specialPageAliases = array( |
| 82 | +/*$specialPageAliases = array( |
83 | 83 | 'DoubleRedirects' => array( '雙重重定向頁面' ), |
84 | 84 | 'BrokenRedirects' => array( '損壞的重定向頁' ), |
85 | 85 | 'Userlogin' => array( '用戶登入' ), |
— | — | @@ -155,7 +155,7 @@ |
156 | 156 | 'DeletedContributions' => array( '已刪除的用戶貢獻' ), |
157 | 157 | 'Tags' => array( '標籤' ), |
158 | 158 | 'Createpage' => array( '創建頁面' ), |
159 | | -); |
| 159 | +);*/ |
160 | 160 | |
161 | 161 | $bookstoreList = array( |
162 | 162 | '博客來書店' => 'http://www.books.com.tw/exep/prod/booksfile.php?item=$1', |
— | — | @@ -207,7 +207,7 @@ |
208 | 208 | 'tog-watchlisthideliu' => '監視列表中隱藏登入用戶', |
209 | 209 | 'tog-watchlisthideanons' => '監視列表中隱藏匿名用戶', |
210 | 210 | 'tog-watchlisthidepatrolled' => '監視清單中隱藏已巡查的編輯', |
211 | | -'tog-nolangconversion' => '不進行用字轉換', |
| 211 | +'tog-variantconversion' => '進行用字轉換', |
212 | 212 | 'tog-ccmeonemails' => '當我寄電子郵件給其他用戶時,也寄一份複本到我的信箱。', |
213 | 213 | 'tog-diffonly' => '在比較兩個修訂版本差異時不顯示頁面內容', |
214 | 214 | 'tog-showhiddencats' => '顯示隱藏分類', |
Index: trunk/phase3/languages/messages/MessagesSr_el.php |
— | — | @@ -54,11 +54,6 @@ |
55 | 55 | 'Разговор_о_категорији' => NS_CATEGORY_TALK, |
56 | 56 | ); |
57 | 57 | |
58 | | - |
59 | | -$extraUserToggles = array( |
60 | | - 'nolangconversion', |
61 | | -); |
62 | | - |
63 | 58 | $datePreferenceMigrationMap = array( |
64 | 59 | 'default', |
65 | 60 | 'hh:mm d. month y.', |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -538,7 +538,7 @@ |
539 | 539 | 'tog-watchlisthideliu' => 'Hide edits by logged in users from the watchlist', |
540 | 540 | 'tog-watchlisthideanons' => 'Hide edits by anonymous users from the watchlist', |
541 | 541 | 'tog-watchlisthidepatrolled' => 'Hide patrolled edits from the watchlist', |
542 | | -'tog-nolangconversion' => 'Disable variants conversion', # only translate this message to other languages if you have to change it |
| 542 | +'tog-variantconversion' => 'Enable variants conversion', # only translate this message to other languages if you have to change it |
543 | 543 | 'tog-ccmeonemails' => 'Send me copies of e-mails I send to other users', |
544 | 544 | 'tog-diffonly' => 'Do not show page content below diffs', |
545 | 545 | 'tog-showhiddencats' => 'Show hidden categories', |
Index: trunk/phase3/languages/messages/MessagesLzh.php |
— | — | @@ -106,7 +106,7 @@ |
107 | 107 | 'tog-watchlisthideliu' => '不哨有簿', |
108 | 108 | 'tog-watchlisthideanons' => '不哨無簿', |
109 | 109 | 'tog-watchlisthidepatrolled' => '不哨已巡', |
110 | | -'tog-nolangconversion' => '非轉', |
| 110 | +'tog-variantconversion' => '轉', |
111 | 111 | 'tog-ccmeonemails' => '凡所遺書,請存副本。', |
112 | 112 | 'tog-diffonly' => '異下無示頁', |
113 | 113 | 'tog-showhiddencats' => '示隱類', |
Index: trunk/phase3/languages/messages/MessagesZh.php |
— | — | @@ -172,6 +172,10 @@ |
173 | 173 | 'DeletedContributions' => array( '已删除的用户贡献', '已刪除的用戶貢獻' ), |
174 | 174 | ); |
175 | 175 | |
| 176 | +$extraUserToggles = array( |
| 177 | + 'variantconversion', |
| 178 | +); |
| 179 | + |
176 | 180 | $messages = array( |
177 | 181 | # User preference toggles |
178 | 182 | 'tog-norollbackdiff' => '進行回退後略過差異比較', |
Index: trunk/phase3/languages/messages/MessagesKk_cyrl.php |
— | — | @@ -27,10 +27,6 @@ |
28 | 28 | '.' => ',', |
29 | 29 | ); |
30 | 30 | |
31 | | -$extraUserToggles = array( |
32 | | - 'nolangconversion' |
33 | | -); |
34 | | - |
35 | 31 | $fallback8bitEncoding = 'windows-1251'; |
36 | 32 | |
37 | 33 | $namespaceNames = array( |
Index: trunk/phase3/languages/messages/MessagesKk.php |
— | — | @@ -13,6 +13,10 @@ |
14 | 14 | |
15 | 15 | $fallback = 'kk-cyrl'; |
16 | 16 | |
| 17 | +$extraUserToggles = array( |
| 18 | + 'variantconversion' |
| 19 | +); |
| 20 | + |
17 | 21 | $messages = array( |
18 | 22 | # Edit pages |
19 | 23 | 'edittools' => '<!-- Мындағы мәтін өңдеу және қотару пішіндердің астында көрсетіледі. -->', |
Index: trunk/phase3/languages/messages/MessagesKk_latn.php |
— | — | @@ -31,10 +31,6 @@ |
32 | 32 | '.' => ',', |
33 | 33 | ); |
34 | 34 | |
35 | | -$extraUserToggles = array( |
36 | | - 'nolangconversion' |
37 | | -); |
38 | | - |
39 | 35 | $fallback8bitEncoding = 'windows-1254'; |
40 | 36 | |
41 | 37 | $namespaceNames = array( |
Index: trunk/phase3/languages/messages/MessagesJa.php |
— | — | @@ -318,7 +318,7 @@ |
319 | 319 | 'tog-watchlisthideliu' => 'ウォッチリストにログイン利用者の編集を表示しない', |
320 | 320 | 'tog-watchlisthideanons' => 'ウォッチリストに匿名利用者の編集を表示しない', |
321 | 321 | 'tog-watchlisthidepatrolled' => 'ウォッチリストにパトロール済みの編集を表示しない', |
322 | | -'tog-nolangconversion' => '言語変種変換を無効にする', |
| 322 | +'tog-variantconversion' => '言語変種変換を有効にする', |
323 | 323 | 'tog-ccmeonemails' => '他の利用者に送信したメールの控えを自分にも送る', |
324 | 324 | 'tog-diffonly' => '差分表示の下に記事本文を表示しない', |
325 | 325 | 'tog-showhiddencats' => '隠しカテゴリを表示する', |
Index: trunk/phase3/languages/messages/MessagesQqq.php |
— | — | @@ -127,7 +127,7 @@ |
128 | 128 | 'tog-watchlisthideliu' => "Option in tab 'Watchlist' of [[Special:Preferences]]", |
129 | 129 | 'tog-watchlisthideanons' => "Option in tab 'Watchlist' of [[Special:Preferences]]", |
130 | 130 | 'tog-watchlisthidepatrolled' => 'Option in Watchlist tab of [[Special:Preferences]]', |
131 | | -'tog-nolangconversion' => 'In user preferences.', |
| 131 | +'tog-variantconversion' => 'In user preferences.', |
132 | 132 | 'tog-ccmeonemails' => 'In user preferences', |
133 | 133 | 'tog-diffonly' => 'Toggle option used in [[Special:Preferences]].', |
134 | 134 | 'tog-showhiddencats' => 'Toggle option used in [[Special:Preferences]].', |
Index: trunk/phase3/languages/messages/MessagesSr.php |
— | — | @@ -14,6 +14,10 @@ |
15 | 15 | $fallback = 'sr-ec'; |
16 | 16 | $linkTrail = '/^([abvgdđežzijklljmnnjoprstćufhcčdžšабвгдђежзијклљмнњопрстћуфхцчџш]+)(.*)$/usD'; |
17 | 17 | |
| 18 | +$extraUserToggles = array( |
| 19 | + 'variantconversion', |
| 20 | +); |
| 21 | + |
18 | 22 | $messages = array( |
19 | 23 | # Special:LinkSearch |
20 | 24 | 'linksearch' => 'Претрага интернет веза', |
Index: trunk/phase3/languages/LanguageConverter.php |
— | — | @@ -426,7 +426,14 @@ |
427 | 427 | * @public |
428 | 428 | */ |
429 | 429 | function parserConvert( $text, &$parser ) { |
430 | | - global $wgDisableLangConversion; |
| 430 | + global $wgUser, $wgEnableVariants; |
| 431 | + |
| 432 | + /* disable entire conversion engine if the user had been disabled it */ |
| 433 | + $variantConv = $wgUser->getOption( 'variantconversion' ); |
| 434 | + if ( ( $wgEnableVariants == true ) && ( $variantConv == 0 ) ) { |
| 435 | + $wgEnableVariants = false; |
| 436 | + } |
| 437 | + |
431 | 438 | /* don't do anything if this is the conversion table */ |
432 | 439 | if ( $parser->getTitle()->getNamespace() == NS_MEDIAWIKI && |
433 | 440 | strpos($parser->mTitle->getText(), 'onversiontable') !== false ) |
— | — | @@ -434,7 +441,7 @@ |
435 | 442 | return $text; |
436 | 443 | } |
437 | 444 | |
438 | | - if ( $wgDisableLangConversion ) |
| 445 | + if ( !$wgEnableVariants ) |
439 | 446 | return $text; |
440 | 447 | |
441 | 448 | $text = $this->convert( $text ); |
— | — | @@ -573,11 +580,11 @@ |
574 | 581 | * @public |
575 | 582 | */ |
576 | 583 | function findVariantLink( &$link, &$nt, $ignoreOtherCond = false ) { |
577 | | - global $wgDisableLangConversion, $wgDisableTitleConversion, $wgRequest, $wgUser; |
| 584 | + global $wgEnableVariants, $wgDisableTitleConversion, $wgRequest, $wgUser; |
578 | 585 | $isredir = $wgRequest->getText( 'redirect', 'yes' ); |
579 | 586 | $action = $wgRequest->getText( 'action' ); |
580 | 587 | $linkconvert = $wgRequest->getText( 'linkconvert', 'yes' ); |
581 | | - $disableLinkConversion = $wgDisableLangConversion || $wgDisableTitleConversion; |
| 588 | + $disableLinkConversion = !$wgEnableVariants || $wgDisableTitleConversion; |
582 | 589 | $linkBatch = new LinkBatch(); |
583 | 590 | |
584 | 591 | $ns=NS_MAIN; |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -74,6 +74,8 @@ |
75 | 75 | * (bug 18860) Blocks of IPs affecting registered users can now block email |
76 | 76 | * (bug 17093) Date and time are separate parameters in Special:BlockList |
77 | 77 | * (bug 11484) Added ISO speed rating to default collapsed EXIF metadata view |
| 78 | +* (bug 18958) Added ability to disable entire variant conversion engine |
| 79 | + per user preferences |
78 | 80 | |
79 | 81 | === Bug fixes in 1.16 === |
80 | 82 | |
Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -53,7 +53,7 @@ |
54 | 54 | 'tog-watchlisthideliu', |
55 | 55 | 'tog-watchlisthideanons', |
56 | 56 | 'tog-watchlisthidepatrolled', |
57 | | - 'tog-nolangconversion', |
| 57 | + 'tog-variantconversion', |
58 | 58 | 'tog-ccmeonemails', |
59 | 59 | 'tog-diffonly', |
60 | 60 | 'tog-showhiddencats', |
Index: trunk/phase3/maintenance/language/messageTypes.inc |
— | — | @@ -165,7 +165,7 @@ |
166 | 166 | 'sectionlink', |
167 | 167 | 'unit-pixel', |
168 | 168 | 'userrights-irreversible-marker', |
169 | | - 'tog-nolangconversion', |
| 169 | + 'tog-variantconversion', |
170 | 170 | 'tog-noconvertlink', |
171 | 171 | 'yourvariant', |
172 | 172 | 'variantname-zh-hans', |
Index: trunk/phase3/skins/Vector.php |
— | — | @@ -50,7 +50,7 @@ |
51 | 51 | */ |
52 | 52 | function buildNavigationUrls() { |
53 | 53 | global $wgContLang, $wgLang, $wgOut, $wgUser, $wgRequest; |
54 | | - global $wgDisableLangConversion; |
| 54 | + global $wgEnableVariants; |
55 | 55 | |
56 | 56 | wfProfileIn( __METHOD__ ); |
57 | 57 | |
— | — | @@ -293,7 +293,7 @@ |
294 | 294 | // Gets list of language variants |
295 | 295 | $variants = $wgContLang->getVariants(); |
296 | 296 | // Checks that language conversion is enabled and variants exist |
297 | | - if( !$wgDisableLangConversion && count( $variants ) > 1 ) { |
| 297 | + if( $wgEnableVariants && count( $variants ) > 1 ) { |
298 | 298 | // Gets preferred variant |
299 | 299 | $preferred = $wgContLang->getPreferredVariant(); |
300 | 300 | // Loops over each variant |
Index: trunk/phase3/includes/Preferences.php |
— | — | @@ -213,10 +213,10 @@ |
214 | 214 | 'label-message' => 'yourlanguage', |
215 | 215 | ); |
216 | 216 | |
217 | | - global $wgContLang, $wgDisableLangConversion; |
| 217 | + global $wgContLang, $wgEnableVariants; |
218 | 218 | /* see if there are multiple language variants to choose from*/ |
219 | 219 | $variantArray = array(); |
220 | | - if(!$wgDisableLangConversion) { |
| 220 | + if($wgEnableVariants) { |
221 | 221 | $variants = $wgContLang->getVariants(); |
222 | 222 | |
223 | 223 | $languages = Language::getLanguageNames( true ); |
— | — | @@ -245,7 +245,7 @@ |
246 | 246 | } |
247 | 247 | } |
248 | 248 | |
249 | | - if( count($variantArray) > 1 && !$wgDisableLangConversion && !$wgDisableTitleConversion ) { |
| 249 | + if( count($variantArray) > 1 && $wgEnableVariants && !$wgDisableTitleConversion ) { |
250 | 250 | $defaultPreferences['noconvertlink'] = |
251 | 251 | array( |
252 | 252 | 'type' => 'toggle', |
Index: trunk/phase3/includes/SkinTemplate.php |
— | — | @@ -818,9 +818,9 @@ |
819 | 819 | } |
820 | 820 | |
821 | 821 | /* show links to different language variants */ |
822 | | - global $wgDisableLangConversion; |
| 822 | + global $wgEnableVariants; |
823 | 823 | $variants = $wgContLang->getVariants(); |
824 | | - if( !$wgDisableLangConversion && sizeof( $variants ) > 1 ) { |
| 824 | + if( $wgEnableVariants && sizeof( $variants ) > 1 ) { |
825 | 825 | $preferred = $wgContLang->getPreferredVariant(); |
826 | 826 | $vcount=0; |
827 | 827 | foreach( $variants as $code ) { |
— | — | @@ -1106,4 +1106,4 @@ |
1107 | 1107 | $msg = $this->translator->translate( $str ); |
1108 | 1108 | return ( $msg != '-' ) && ( $msg != '' ); # ???? |
1109 | 1109 | } |
1110 | | -} |
\ No newline at end of file |
| 1110 | +} |
Index: trunk/phase3/includes/Skin.php |
— | — | @@ -1268,9 +1268,9 @@ |
1269 | 1269 | function variantLinks() { |
1270 | 1270 | $s = ''; |
1271 | 1271 | /* show links to different language variants */ |
1272 | | - global $wgDisableLangConversion, $wgLang, $wgContLang; |
| 1272 | + global $wgEnableVariants, $wgLang, $wgContLang; |
1273 | 1273 | $variants = $wgContLang->getVariants(); |
1274 | | - if( !$wgDisableLangConversion && sizeof( $variants ) > 1 ) { |
| 1274 | + if( $wgEnableVariants && sizeof( $variants ) > 1 ) { |
1275 | 1275 | foreach( $variants as $code ) { |
1276 | 1276 | $varname = $wgContLang->getVariantname( $code ); |
1277 | 1277 | if( $varname == 'disable' ) |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -887,7 +887,7 @@ |
888 | 888 | $wgCheckSerialized = true; |
889 | 889 | |
890 | 890 | /** Whether to enable language variant conversion. */ |
891 | | -$wgDisableLangConversion = false; |
| 891 | +$wgEnableVariants = true; |
892 | 892 | |
893 | 893 | /** Whether to enable language variant conversion for links. */ |
894 | 894 | $wgDisableTitleConversion = false; |