Last modified: 2006-08-03 08:03:51 UTC
The option 'tog-highlightbroken' (Format broken links) is missing when the user perferences is switched to Zh series interface. (Zh, Zh_tw, Zh_hk and Zh_sg inherits to Zh_cn) ------------------------------ This is the original part of User toogles in the LanguageZh_cn.php file (obtained from the latest Subversion head [http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/languages/LanguageZh_cn.php? view=log]) /* private */ $wgUserTogglesZh_cn = array( 'nolangconversion', ) + $wgUserTogglesEn; ------------------------------ I don't know whether this option is disabled in default or this affected by this piece of the code. But if possible, can anyone fix that problem? thanks and regards Man
I think the change of the summary to identify this issue more clearly. For example, in a language wiki: Originally there are user toogles specified in Language.php: /* private */ $wgUserTogglesEn = array( 'Foo1', 'Foo2', 'Foo3', 'Foo4', ); and in LanguageZh_cn.php: /* private */ $wgUserTogglesZh_cn = array( 'Bar1', ) + $wgUserTogglesEn; and when the specific language is selected. The user toogles that defined in Language.php is overrided by the user toggles in specific language, thus the resulting user toggles are rendered as: 'Bar1', 'Foo2', 'Foo3', 'Foo4' I think that have some errors when getting the user toggles in specific language. It should be appended before the original user toggles, instead of overriding the original user toggles. That would resulting: 'Bar1', 'Foo1', 'Foo2', 'Foo3', 'Foo4' I think that maybe having some problem in the SpecialPerferences.php file to getting this error. regards Man
Created attachment 1787 [details] This is the screenshot when en language is selected in enwiki. This is the screenshot when en language is selected in enwiki. Those toggles in Misc tab shows the toggles correctly.
Created attachment 1788 [details] This is the screenshot when zh-tw language is selected in enwiki. This is the screenshot when zh-tw language is selected in enwiki. The option 'highlightbroken' toggle has been overrided by the option 'nolangconversion' toggle.
Simple array_merge() would do it, but looks like option nolangconversion is not used anywhere and can be removed, am I correct?
Created attachment 2120 [details] patch of languages/LanguageZh_cn.php I also think 'nolangconversion' can be removed. So I make this patch.
Comment on attachment 2120 [details] patch of languages/LanguageZh_cn.php Index: LanguageZh_cn.php =================================================================== --- LanguageZh_cn.php (revision 15717) +++ LanguageZh_cn.php (working copy) @@ -40,11 +40,7 @@ 'cologneblue' => "科隆香水蓝" ) + $wgSkinNamesEn; -/* private */ $wgUserTogglesZh_cn = array( - 'nolangconversion', -) + $wgUserTogglesEn; - if (!$wgCachedMessageArrays) { require_once('MessagesZh_cn.php'); } @@ -52,11 +48,6 @@ class LanguageZh_cn extends LanguageUtf8 { - function getUserToggles() { - global $wgUserTogglesZh_cn; - return $wgUserTogglesZh_cn; - } - function getNamespaces() { global $wgNamespaceNamesZh_cn; return $wgNamespaceNamesZh_cn;
Created attachment 2121 [details] patch of LanguageZh_cn.php re-upload with the correct patch.
Seems this bug has been resolved by Tim on SVN r15823. * Moved default user options and toggles from Language to User. Language objects are still able to define default preference overrides and extra user toggles, via a slightly different interface. marked this bug as FIXED.