Last modified: 2006-08-03 08:03:51 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 5753 - User toggles in specific language overrided the default user toggles
User toggles in specific language overrided the default user toggles
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
User preferences (Other open bugs)
unspecified
All All
: High normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 6727
  Show dependency treegraph
 
Reported: 2006-04-29 07:08 UTC by Shinjiman
Modified: 2006-08-03 08:03 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
This is the screenshot when en language is selected in enwiki. (140.15 KB, image/png)
2006-05-19 10:29 UTC, Shinjiman
Details
This is the screenshot when zh-tw language is selected in enwiki. (125.99 KB, image/png)
2006-05-19 10:31 UTC, Shinjiman
Details
patch of languages/LanguageZh_cn.php (3.63 KB, patch)
2006-07-18 10:42 UTC, 笨笨的小B
Details
patch of LanguageZh_cn.php (764 bytes, patch)
2006-07-18 10:49 UTC, 笨笨的小B
Details

Description Shinjiman 2006-04-29 07:08:13 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
Comment 1 Shinjiman 2006-05-19 10:24:04 UTC
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
Comment 2 Shinjiman 2006-05-19 10:29:31 UTC
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.
Comment 3 Shinjiman 2006-05-19 10:31:40 UTC
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.
Comment 4 Niklas Laxström 2006-05-19 14:26:36 UTC
Simple array_merge() would do it, but looks like option nolangconversion is not
used anywhere and can be removed, am I correct?
Comment 5 笨笨的小B 2006-07-18 10:42:26 UTC
Created attachment 2120 [details]
patch of languages/LanguageZh_cn.php

I also think 'nolangconversion' can be removed. So I make this patch.
Comment 6 笨笨的小B 2006-07-18 10:46:47 UTC
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;
Comment 7 笨笨的小B 2006-07-18 10:49:42 UTC
Created attachment 2121 [details]
patch of LanguageZh_cn.php

re-upload with the correct patch.
Comment 8 Shinjiman 2006-08-03 08:03:51 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links