Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -911,6 +911,7 @@ |
912 | 912 | 'qbsettings-fixedright', |
913 | 913 | 'qbsettings-floatingleft', |
914 | 914 | 'qbsettings-floatingright', |
| 915 | + 'qbsettings-directionality', |
915 | 916 | ), |
916 | 917 | 'preferences' => array( |
917 | 918 | 'preferences', |
Index: trunk/phase3/skins/CologneBlue.php |
— | — | @@ -26,7 +26,6 @@ |
27 | 27 | parent::setupSkinUserCss( $out ); |
28 | 28 | $out->addModuleStyles( 'skins.cologneblue' ); |
29 | 29 | |
30 | | - global $wgContLang; |
31 | 30 | $qb = $this->qbSetting(); |
32 | 31 | $rules = array(); |
33 | 32 | |
— | — | @@ -48,9 +47,6 @@ |
49 | 48 | $rules[] = "body>#quickbar { position: fixed; right: 4px; top: 4px; overflow: auto ;bottom:4px;}"; # Hides from IE |
50 | 49 | } |
51 | 50 | $style = implode( "\n", $rules ); |
52 | | - if ( $wgContLang->getDir() === 'rtl' ) { |
53 | | - $style = CSSJanus::transform( $style, true, false ); |
54 | | - } |
55 | 51 | $out->addInlineStyle( $style ); |
56 | 52 | } |
57 | 53 | |
Index: trunk/phase3/skins/Standard.php |
— | — | @@ -25,7 +25,6 @@ |
26 | 26 | parent::setupSkinUserCss( $out ); |
27 | 27 | $out->AddModuleStyles( 'skins.standard' ); |
28 | 28 | |
29 | | - global $wgContLang; |
30 | 29 | $qb = $this->qbSetting(); |
31 | 30 | $rules = array(); |
32 | 31 | |
— | — | @@ -44,9 +43,6 @@ |
45 | 44 | $rules[] = "#article, #mw-data-after-content { margin-right: 152px; margin-left: 4px; }"; |
46 | 45 | } |
47 | 46 | $style = implode( "\n", $rules ); |
48 | | - if ( $wgContLang->getDir() === 'rtl' ) { |
49 | | - $style = CSSJanus::transform( $style, true, false ); |
50 | | - } |
51 | 47 | $out->addInlineStyle( $style ); |
52 | 48 | } |
53 | 49 | |
Index: trunk/phase3/skins/common/shared.css |
— | — | @@ -4,6 +4,12 @@ |
5 | 5 | * another, but don't ignore the poor pre-Monobook users either. |
6 | 6 | */ |
7 | 7 | |
| 8 | +/* The scripts of these languages are very hard to read with underlines */ |
| 9 | +[lang="ar"] a, [lang="ckb"] a, [lang="fa"] a, [lang="kk-arab"] a, |
| 10 | +[lang="mzn"] a, [lang="ps"] a, [lang="ur"] a { |
| 11 | + text-decoration: none; |
| 12 | +} |
| 13 | + |
8 | 14 | /* Default style for semantic tags */ |
9 | 15 | abbr, acronym, .explain { |
10 | 16 | border-bottom: 1px dotted black; |
Index: trunk/phase3/includes/User.php |
— | — | @@ -1184,16 +1184,10 @@ |
1185 | 1185 | * @return Array of String options |
1186 | 1186 | */ |
1187 | 1187 | static function getDefaultOptions() { |
1188 | | - global $wgNamespacesToBeSearchedDefault; |
1189 | | - /** |
1190 | | - * Site defaults will override the global/language defaults |
1191 | | - */ |
1192 | | - global $wgDefaultUserOptions, $wgContLang, $wgDefaultSkin; |
1193 | | - $defOpt = $wgDefaultUserOptions + $wgContLang->getDefaultUserOptionOverrides(); |
| 1188 | + global $wgNamespacesToBeSearchedDefault, $wgDefaultUserOptions, $wgContLang, $wgDefaultSkin; |
1194 | 1189 | |
1195 | | - /** |
1196 | | - * default language setting |
1197 | | - */ |
| 1190 | + $defOpt = $wgDefaultUserOptions; |
| 1191 | + # default language setting |
1198 | 1192 | $variant = $wgContLang->getDefaultVariant(); |
1199 | 1193 | $defOpt['variant'] = $variant; |
1200 | 1194 | $defOpt['language'] = $variant; |
Index: trunk/phase3/includes/LocalisationCache.php |
— | — | @@ -84,7 +84,7 @@ |
85 | 85 | 'fallback', 'namespaceNames', 'bookstoreList', |
86 | 86 | 'magicWords', 'messages', 'rtl', 'capitalizeAllNouns', 'digitTransformTable', |
87 | 87 | 'separatorTransformTable', 'fallback8bitEncoding', 'linkPrefixExtension', |
88 | | - 'defaultUserOptionOverrides', 'linkTrail', 'namespaceAliases', |
| 88 | + 'linkTrail', 'namespaceAliases', |
89 | 89 | 'dateFormats', 'datePreferences', 'datePreferenceMigrationMap', |
90 | 90 | 'defaultDateFormat', 'extraUserToggles', 'specialPageAliases', |
91 | 91 | 'imageFiles', 'preloadedMessages', 'namespaceGenderAliases', |
— | — | @@ -95,8 +95,7 @@ |
96 | 96 | * by a fallback sequence. |
97 | 97 | */ |
98 | 98 | static public $mergeableMapKeys = array( 'messages', 'namespaceNames', |
99 | | - 'dateFormats', 'defaultUserOptionOverrides', 'imageFiles', |
100 | | - 'preloadedMessages', |
| 99 | + 'dateFormats', 'imageFiles', 'preloadedMessages', |
101 | 100 | ); |
102 | 101 | |
103 | 102 | /** |
— | — | @@ -130,8 +129,7 @@ |
131 | 130 | /** |
132 | 131 | * Keys which are loaded automatically by initLanguage() |
133 | 132 | */ |
134 | | - static public $preloadedKeys = array( 'dateFormats', 'namespaceNames', |
135 | | - 'defaultUserOptionOverrides' ); |
| 133 | + static public $preloadedKeys = array( 'dateFormats', 'namespaceNames' ); |
136 | 134 | |
137 | 135 | /** |
138 | 136 | * Constructor. |
— | — | @@ -602,11 +600,6 @@ |
603 | 601 | # Decouple the reference to prevent accidental damage |
604 | 602 | unset($page); |
605 | 603 | |
606 | | - # Fix broken defaultUserOptionOverrides |
607 | | - if ( !is_array( $allData['defaultUserOptionOverrides'] ) ) { |
608 | | - $allData['defaultUserOptionOverrides'] = array(); |
609 | | - } |
610 | | - |
611 | 604 | # Set the list keys |
612 | 605 | $allData['list'] = array(); |
613 | 606 | foreach ( self::$splitKeys as $key ) { |
— | — | @@ -616,11 +609,6 @@ |
617 | 610 | # Run hooks |
618 | 611 | wfRunHooks( 'LocalisationCacheRecache', array( $this, $code, &$allData ) ); |
619 | 612 | |
620 | | - if ( is_null( $allData['defaultUserOptionOverrides'] ) ) { |
621 | | - throw new MWException( __METHOD__.': Localisation data failed sanity check! ' . |
622 | | - 'Check that your languages/messages/MessagesEn.php file is intact.' ); |
623 | | - } |
624 | | - |
625 | 613 | # Set the preload key |
626 | 614 | $allData['preload'] = $this->buildPreload( $allData ); |
627 | 615 | |
Index: trunk/phase3/includes/SkinLegacy.php |
— | — | @@ -54,6 +54,12 @@ |
55 | 55 | return 0; |
56 | 56 | } |
57 | 57 | $q = $wgUser->getOption( 'quickbar', 0 ); |
| 58 | + if( $q == 5 ) { |
| 59 | + # 5 is the default, which chooses the setting |
| 60 | + # depending on the directionality of your interface language |
| 61 | + global $wgLang; |
| 62 | + return $wgLang->isRTL() ? 2 : 1; |
| 63 | + } |
58 | 64 | return $q; |
59 | 65 | } |
60 | 66 | |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -3079,7 +3079,7 @@ |
3080 | 3080 | 'numberheadings' => 0, |
3081 | 3081 | 'previewonfirst' => 0, |
3082 | 3082 | 'previewontop' => 1, |
3083 | | - 'quickbar' => 1, |
| 3083 | + 'quickbar' => 5, |
3084 | 3084 | 'rcdays' => 7, |
3085 | 3085 | 'rclimit' => 50, |
3086 | 3086 | 'rememberpassword' => 0, |
Index: trunk/phase3/languages/messages/MessagesPnb.php |
— | — | @@ -16,12 +16,6 @@ |
17 | 17 | $fallback8bitEncoding = 'windows-1256'; |
18 | 18 | |
19 | 19 | $rtl = true; |
20 | | -$defaultUserOptionOverrides = array( |
21 | | - # Swap sidebar to right side by default |
22 | | - 'quickbar' => 2, |
23 | | - # Underlines seriously harm legibility. Force off: |
24 | | - 'underline' => 0, |
25 | | -); |
26 | 20 | |
27 | 21 | $messages = array( |
28 | 22 | # User preference toggles |
Index: trunk/phase3/languages/messages/MessagesHe.php |
— | — | @@ -20,10 +20,6 @@ |
21 | 21 | */ |
22 | 22 | |
23 | 23 | $rtl = true; |
24 | | -$defaultUserOptionOverrides = array( |
25 | | - # Swap sidebar to right side by default |
26 | | - 'quickbar' => 2, |
27 | | -); |
28 | 24 | |
29 | 25 | $linkTrail = '/^([a-zא-ת]+)(.*)$/sDu'; |
30 | 26 | $fallback8bitEncoding = 'windows-1255'; |
Index: trunk/phase3/languages/messages/MessagesCkb.php |
— | — | @@ -20,12 +20,6 @@ |
21 | 21 | $fallback8bitEncoding = 'windows-1256'; |
22 | 22 | |
23 | 23 | $rtl = true; |
24 | | -$defaultUserOptionOverrides = array( |
25 | | - # Swap sidebar to right side by default |
26 | | - 'quickbar' => 2, |
27 | | - # Underlines seriously harm legibility. Force off: |
28 | | - 'underline' => 0, |
29 | | -); |
30 | 24 | |
31 | 25 | $digitTransformTable = array( |
32 | 26 | '0' => '٠', # ٠ |
Index: trunk/phase3/languages/messages/MessagesPs.php |
— | — | @@ -154,12 +154,6 @@ |
155 | 155 | ); |
156 | 156 | |
157 | 157 | $rtl = true; |
158 | | -$defaultUserOptionOverrides = array( |
159 | | - # Swap sidebar to right side by default |
160 | | - 'quickbar' => 2, |
161 | | - # Underlines seriously harm legibility. Force off: |
162 | | - 'underline' => 0, |
163 | | -); |
164 | 158 | |
165 | 159 | $messages = array( |
166 | 160 | # User preference toggles |
Index: trunk/phase3/languages/messages/MessagesAr.php |
— | — | @@ -54,12 +54,6 @@ |
55 | 55 | $fallback8bitEncoding = 'windows-1256'; |
56 | 56 | |
57 | 57 | $rtl = true; |
58 | | -$defaultUserOptionOverrides = array( |
59 | | - # Swap sidebar to right side by default |
60 | | - 'quickbar' => 2, |
61 | | - # Underlines seriously harm legibility. Force off: |
62 | | - 'underline' => 0, |
63 | | -); |
64 | 58 | |
65 | 59 | /** |
66 | 60 | * A list of date format preference keys which can be selected in user |
Index: trunk/phase3/languages/messages/MessagesKk_arab.php |
— | — | @@ -45,13 +45,6 @@ |
46 | 46 | ',' => '٬', # ٬ |
47 | 47 | ); |
48 | 48 | |
49 | | -$defaultUserOptionOverrides = array( |
50 | | - # Swap sidebar to right side by default |
51 | | - 'quickbar' => 2, |
52 | | - # Underlines seriously harm legibility. Force off: |
53 | | - 'underline' => 0, |
54 | | -); |
55 | | - |
56 | 49 | $extraUserToggles = array( |
57 | 50 | 'nolangconversion' |
58 | 51 | ); |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -23,8 +23,6 @@ |
24 | 24 | |
25 | 25 | /** |
26 | 26 | * Is the language written right-to-left? |
27 | | - * Note that right-to-left languages generally also specify |
28 | | - * $defaultUserOptionOverrides = array( 'quickbar' => 2 ); |
29 | 27 | */ |
30 | 28 | $rtl = false; |
31 | 29 | |
— | — | @@ -45,11 +43,6 @@ |
46 | 44 | $separatorTransformTable = null; |
47 | 45 | |
48 | 46 | /** |
49 | | - * Overrides for the default user options. This is mainly used by RTL languages. |
50 | | - */ |
51 | | -$defaultUserOptionOverrides = array(); |
52 | | - |
53 | | -/** |
54 | 47 | * Extra user preferences which will be shown in Special:Preferences as |
55 | 48 | * checkboxes. Extra settings in derived languages will automatically be |
56 | 49 | * appended to the array of the fallback languages. |
— | — | @@ -1739,12 +1732,13 @@ |
1740 | 1733 | 'opensearch-desc' => '{{SITENAME}} ({{CONTENTLANGUAGE}})', # do not translate or duplicate this message to other languages |
1741 | 1734 | |
1742 | 1735 | # Quickbar |
1743 | | -'qbsettings' => 'Quickbar', |
1744 | | -'qbsettings-none' => 'None', |
1745 | | -'qbsettings-fixedleft' => 'Fixed left', |
1746 | | -'qbsettings-fixedright' => 'Fixed right', |
1747 | | -'qbsettings-floatingleft' => 'Floating left', |
1748 | | -'qbsettings-floatingright' => 'Floating right', |
| 1736 | +'qbsettings' => 'Quickbar', |
| 1737 | +'qbsettings-none' => 'None', |
| 1738 | +'qbsettings-fixedleft' => 'Fixed left', |
| 1739 | +'qbsettings-fixedright' => 'Fixed right', |
| 1740 | +'qbsettings-floatingleft' => 'Floating left', |
| 1741 | +'qbsettings-floatingright' => 'Floating right', |
| 1742 | +'qbsettings-directionality' => 'Fixed, depending on the directionality of your language', |
1749 | 1743 | |
1750 | 1744 | # Preferences page |
1751 | 1745 | 'preferences' => 'Preferences', |
Index: trunk/phase3/languages/messages/MessagesYi.php |
— | — | @@ -135,11 +135,6 @@ |
136 | 136 | 'Withoutinterwiki' => array( 'בלעטער_אָן_אינטערוויקי' ), |
137 | 137 | ); |
138 | 138 | |
139 | | -$defaultUserOptionOverrides = array( |
140 | | - # Swap sidebar to right side by default |
141 | | - 'quickbar' => 2, |
142 | | -); |
143 | | - |
144 | 139 | $magicWords = array( |
145 | 140 | 'redirect' => array( '0', '#ווייטערפירן', '#הפניה', '#REDIRECT' ), |
146 | 141 | 'notoc' => array( '0', '__קיין_אינהאלט_טאבעלע__', '__ללא_תוכן_עניינים__', '__ללא_תוכן__', '__NOTOC__' ), |
Index: trunk/phase3/languages/messages/MessagesUr.php |
— | — | @@ -19,12 +19,6 @@ |
20 | 20 | |
21 | 21 | $fallback8bitEncoding = 'windows-1256'; |
22 | 22 | $rtl = true; |
23 | | -$defaultUserOptionOverrides = array( |
24 | | - # Swap sidebar to right side by default |
25 | | - 'quickbar' => 2, |
26 | | - # Underlines seriously harm legibility. Force off: |
27 | | - 'underline' => 0, |
28 | | -); |
29 | 23 | |
30 | 24 | $namespaceNames = array( |
31 | 25 | NS_MEDIA => 'زریعہ', |
Index: trunk/phase3/languages/messages/MessagesFa.php |
— | — | @@ -174,12 +174,6 @@ |
175 | 175 | $fallback8bitEncoding = 'windows-1256'; |
176 | 176 | |
177 | 177 | $rtl = true; |
178 | | -$defaultUserOptionOverrides = array( |
179 | | - # Swap sidebar to right side by default |
180 | | - 'quickbar' => 2, |
181 | | - # Underlines seriously harm legibility. Force off: |
182 | | - 'underline' => 0, |
183 | | -); |
184 | 178 | |
185 | 179 | |
186 | 180 | /** |
Index: trunk/phase3/languages/messages/MessagesMzn.php |
— | — | @@ -19,12 +19,6 @@ |
20 | 20 | $fallback8bitEncoding = 'windows-1256'; |
21 | 21 | |
22 | 22 | $rtl = true; |
23 | | -$defaultUserOptionOverrides = array( |
24 | | - # Swap sidebar to right side by default |
25 | | - 'quickbar' => 2, |
26 | | - # Underlines seriously harm legibility. Force off: |
27 | | - 'underline' => 0, |
28 | | -); |
29 | 23 | |
30 | 24 | $namespaceNames = array( |
31 | 25 | NS_MEDIA => 'مهدیا', |
Index: trunk/phase3/languages/messages/MessagesLn.php |
— | — | @@ -13,10 +13,6 @@ |
14 | 14 | |
15 | 15 | $fallback = 'fr'; |
16 | 16 | |
17 | | -$defaultUserOptionOverrides = array( |
18 | | - 'editfont' => 'sans-serif', # poor font support |
19 | | -); |
20 | | - |
21 | 17 | $linkPrefixExtension = true; |
22 | 18 | |
23 | 19 | # Same as the French (bug 8485) |
Index: trunk/phase3/languages/messages/MessagesArc.php |
— | — | @@ -94,11 +94,6 @@ |
95 | 95 | |
96 | 96 | $rtl = true; |
97 | 97 | |
98 | | -$defaultUserOptionOverrides = array( |
99 | | - # Swap sidebar to right side by default |
100 | | - 'quickbar' => 2, |
101 | | -); |
102 | | - |
103 | 98 | $messages = array( |
104 | 99 | # User preference toggles |
105 | 100 | 'tog-underline' => 'ܪܫܘܡ ܣܪܛܐ ܬܚܝܬ ܐܣܘܪܐ:', |
Index: trunk/phase3/languages/Language.php |
— | — | @@ -504,7 +504,8 @@ |
505 | 505 | $this->getMessage( 'qbsettings-fixedleft' ), |
506 | 506 | $this->getMessage( 'qbsettings-fixedright' ), |
507 | 507 | $this->getMessage( 'qbsettings-floatingleft' ), |
508 | | - $this->getMessage( 'qbsettings-floatingright' ) |
| 508 | + $this->getMessage( 'qbsettings-floatingright' ), |
| 509 | + $this->getMessage( 'qbsettings-directionality' ) |
509 | 510 | ); |
510 | 511 | } |
511 | 512 | |
— | — | @@ -553,13 +554,6 @@ |
554 | 555 | /** |
555 | 556 | * @return array |
556 | 557 | */ |
557 | | - function getDefaultUserOptionOverrides() { |
558 | | - return self::$dataCache->getItem( $this->mCode, 'defaultUserOptionOverrides' ); |
559 | | - } |
560 | | - |
561 | | - /** |
562 | | - * @return array |
563 | | - */ |
564 | 558 | function getExtraUserToggles() { |
565 | 559 | return self::$dataCache->getItem( $this->mCode, 'extraUserToggles' ); |
566 | 560 | } |