Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -2164,6 +2164,16 @@ |
2165 | 2165 | 'numauthors', |
2166 | 2166 | 'numtalkauthors', |
2167 | 2167 | ), |
| 2168 | + 'skin' => array( |
| 2169 | + 'skinname-standard', |
| 2170 | + 'skinname-nostalgia', |
| 2171 | + 'skinname-cologneblue', |
| 2172 | + 'skinname-monobook', |
| 2173 | + 'skinname-myskin', |
| 2174 | + 'skinname-chick', |
| 2175 | + 'skinname-simple', |
| 2176 | + 'skinname-modern', |
| 2177 | + ), |
2168 | 2178 | 'math' => array( |
2169 | 2179 | 'mw_math_png', |
2170 | 2180 | 'mw_math_simple', |
— | — | @@ -2972,6 +2982,7 @@ |
2973 | 2983 | 'attribution' => 'Attribution', |
2974 | 2984 | 'spamprotection' => 'Spam protection', |
2975 | 2985 | 'info' => 'Info page', |
| 2986 | + 'skin' => 'Skins names', |
2976 | 2987 | 'math' => 'Math options', |
2977 | 2988 | 'patrolling' => 'Patrolling', |
2978 | 2989 | 'patrol-log' => 'Patrol log', |
Index: trunk/phase3/maintenance/language/checkLanguage.inc |
— | — | @@ -74,7 +74,7 @@ |
75 | 75 | return array( |
76 | 76 | 'untranslated', 'duplicate', 'obsolete', 'variables', 'empty', 'plural', |
77 | 77 | 'whitespace', 'xhtml', 'chars', 'links', 'unbalanced', 'namespace', |
78 | | - 'projecttalk', 'skin', 'magic', 'magic-old', 'magic-over', 'magic-case', |
| 78 | + 'projecttalk', 'magic', 'magic-old', 'magic-over', 'magic-case', |
79 | 79 | 'special', 'special-old', |
80 | 80 | ); |
81 | 81 | } |
— | — | @@ -85,7 +85,7 @@ |
86 | 86 | */ |
87 | 87 | protected function nonMessageChecks() { |
88 | 88 | return array( |
89 | | - 'namespace', 'projecttalk', 'skin', 'magic', 'magic-old', 'magic-over', |
| 89 | + 'namespace', 'projecttalk', 'magic', 'magic-old', 'magic-over', |
90 | 90 | 'magic-case', 'special', 'special-old', |
91 | 91 | ); |
92 | 92 | } |
— | — | @@ -120,7 +120,6 @@ |
121 | 121 | 'unbalanced' => 'getMessagesWithUnbalanced', |
122 | 122 | 'namespace' => 'getUntranslatedNamespaces', |
123 | 123 | 'projecttalk' => 'getProblematicProjectTalks', |
124 | | - 'skin' => 'getUntranslatedSkins', |
125 | 124 | 'magic' => 'getUntranslatedMagicWords', |
126 | 125 | 'magic-old' => 'getObsoleteMagicWords', |
127 | 126 | 'magic-over' => 'getOverridingMagicWords', |
— | — | @@ -140,7 +139,6 @@ |
141 | 140 | return array( |
142 | 141 | 'namespace' => array( 'getNamespaceNames', 'en' ), |
143 | 142 | 'projecttalk' => null, |
144 | | - 'skin' => array( 'getSkinNames', 'en' ), |
145 | 143 | 'magic' => array( 'getMagicWords', 'en' ), |
146 | 144 | 'magic-old' => array( 'getMagicWords', null ), |
147 | 145 | 'magic-over' => array( 'getMagicWords', null ), |
— | — | @@ -169,7 +167,6 @@ |
170 | 168 | 'unbalanced' => '$1 message(s) of $2 in $3 have unbalanced {[]}:', |
171 | 169 | 'namespace' => '$1 namespace name(s) of $2 are not translated to $3, but exist in en:', |
172 | 170 | 'projecttalk' => '$1 namespace name(s) and alias(es) in $3 are project talk namespaces without the parameter:', |
173 | | - 'skin' => '$1 skin name(s) of $2 are not translated to $3, but exist in en:', |
174 | 171 | 'magic' => '$1 magic word(s) of $2 are not translated to $3, but exist in en:', |
175 | 172 | 'magic-old' => '$1 magic word(s) of $2 do not exist in en, but exist in $3:', |
176 | 173 | 'magic-over' => '$1 magic word(s) of $2 in $3 do not contain the original en word(s):', |
— | — | @@ -211,7 +208,6 @@ |
212 | 209 | * unbalanced: Messages which contains unequal numbers of opening {[ and closing ]}. |
213 | 210 | * namespace: Namespace names that were not translated. |
214 | 211 | * projecttalk: Namespace names and aliases where the project talk does not contain $1. |
215 | | - * skin: Skin names that were not translated. |
216 | 212 | * magic: Magic words that were not translated. |
217 | 213 | * magic-old: Magic words which do not exist. |
218 | 214 | * magic-over: Magic words that override the original English word. |
Index: trunk/phase3/maintenance/language/languages.inc |
— | — | @@ -20,7 +20,6 @@ |
21 | 21 | |
22 | 22 | protected $mNamespaceNames; # Namespace names |
23 | 23 | protected $mNamespaceAliases; # Namespace aliases |
24 | | - protected $mSkinNames; # Skin names |
25 | 24 | protected $mMagicWords; # Magic words |
26 | 25 | protected $mSpecialPageAliases; # Special page aliases |
27 | 26 | |
— | — | @@ -79,7 +78,6 @@ |
80 | 79 | if ( isset( $this->mRawMessages[$code] ) && |
81 | 80 | isset( $this->mNamespaceNames[$code] ) && |
82 | 81 | isset( $this->mNamespaceAliases[$code] ) && |
83 | | - isset( $this->mSkinNames[$code] ) && |
84 | 82 | isset( $this->mMagicWords[$code] ) && |
85 | 83 | isset( $this->mSpecialPageAliases[$code] ) ) { |
86 | 84 | return; |
— | — | @@ -87,7 +85,6 @@ |
88 | 86 | $this->mRawMessages[$code] = array(); |
89 | 87 | $this->mNamespaceNames[$code] = array(); |
90 | 88 | $this->mNamespaceAliases[$code] = array(); |
91 | | - $this->mSkinNames[$code] = array(); |
92 | 89 | $this->mMagicWords[$code] = array(); |
93 | 90 | $this->mSpecialPageAliases[$code] = array(); |
94 | 91 | $filename = Language::getMessagesFileName( $code ); |
— | — | @@ -102,9 +99,6 @@ |
103 | 100 | if ( isset( $namespaceAliases ) ) { |
104 | 101 | $this->mNamespaceAliases[$code] = $namespaceAliases; |
105 | 102 | } |
106 | | - if ( isset( $skinNames ) ) { |
107 | | - $this->mSkinNames[$code] = $skinNames; |
108 | | - } |
109 | 103 | if ( isset( $magicWords ) ) { |
110 | 104 | $this->mMagicWords[$code] = $magicWords; |
111 | 105 | } |
— | — | @@ -237,18 +231,6 @@ |
238 | 232 | } |
239 | 233 | |
240 | 234 | /** |
241 | | - * Get skin names for a specific language. |
242 | | - * |
243 | | - * @param $code The language code. |
244 | | - * |
245 | | - * @return Skin names. |
246 | | - */ |
247 | | - public function getSkinNames( $code ) { |
248 | | - $this->loadFile( $code ); |
249 | | - return $this->mSkinNames[$code]; |
250 | | - } |
251 | | - |
252 | | - /** |
253 | 235 | * Get magic words for a specific language. |
254 | 236 | * |
255 | 237 | * @param $code The language code. |
— | — | @@ -576,19 +558,6 @@ |
577 | 559 | } |
578 | 560 | |
579 | 561 | /** |
580 | | - * Get the untranslated skin names. |
581 | | - * |
582 | | - * @param $code The language code. |
583 | | - * |
584 | | - * @return The untranslated skin names in this language. |
585 | | - */ |
586 | | - public function getUntranslatedSkins( $code ) { |
587 | | - $this->loadFile( 'en' ); |
588 | | - $this->loadFile( $code ); |
589 | | - return array_diff_key( $this->mSkinNames['en'], $this->mSkinNames[$code] ); |
590 | | - } |
591 | | - |
592 | | - /** |
593 | 562 | * Get the untranslated magic words. |
594 | 563 | * |
595 | 564 | * @param $code The language code. |
Index: trunk/phase3/includes/specials/SpecialPreferences.php |
— | — | @@ -552,7 +552,6 @@ |
553 | 553 | } |
554 | 554 | |
555 | 555 | $qbs = $wgLang->getQuickbarSettings(); |
556 | | - $skinNames = $wgLang->getSkinNames(); |
557 | 556 | $mathopts = $wgLang->getMathNames(); |
558 | 557 | $dateopts = $wgLang->getDatePreferences(); |
559 | 558 | $togs = User::getToggles(); |
— | — | @@ -834,23 +833,25 @@ |
835 | 834 | # |
836 | 835 | global $wgAllowUserSkin; |
837 | 836 | if( $wgAllowUserSkin ) { |
838 | | - $wgOut->addHTML( "<fieldset>\n<legend>\n" . wfMsg('skin') . "</legend>\n" ); |
| 837 | + $wgOut->addHTML( "<fieldset>\n<legend>\n" . wfMsg( 'skin' ) . "</legend>\n" ); |
839 | 838 | $mptitle = Title::newMainPage(); |
840 | | - $previewtext = wfMsg('skin-preview'); |
| 839 | + $previewtext = wfMsg( 'skin-preview' ); |
841 | 840 | # Only show members of Skin::getSkinNames() rather than |
842 | 841 | # $skinNames (skins is all skin names from Language.php) |
843 | 842 | $validSkinNames = Skin::getUsableSkins(); |
844 | 843 | # Sort by UI skin name. First though need to update validSkinNames as sometimes |
845 | 844 | # the skinkey & UI skinname differ (e.g. "standard" skinkey is "Classic" in the UI). |
846 | | - foreach ($validSkinNames as $skinkey => & $skinname ) { |
847 | | - if ( isset( $skinNames[$skinkey] ) ) { |
848 | | - $skinname = $skinNames[$skinkey]; |
| 845 | + foreach ( $validSkinNames as $skinkey => &$skinname ) { |
| 846 | + $msgName = "skinname-{$skinkey}"; |
| 847 | + $localisedSkinName = wfMsg( $msgName ); |
| 848 | + if ( !wfEmptyMsg( $msgName, $localisedSkinName ) ) { |
| 849 | + $skinname = $localisedSkinName; |
849 | 850 | } |
850 | 851 | } |
851 | 852 | asort($validSkinNames); |
852 | 853 | foreach ($validSkinNames as $skinkey => $sn ) { |
853 | 854 | $checked = $skinkey == $this->mSkin ? ' checked="checked"' : ''; |
854 | | - $mplink = htmlspecialchars($mptitle->getLocalURL("useskin=$skinkey")); |
| 855 | + $mplink = htmlspecialchars( $mptitle->getLocalURL( "useskin=$skinkey" ) ); |
855 | 856 | $previewlink = "(<a target='_blank' href=\"$mplink\">$previewtext</a>)"; |
856 | 857 | if( $skinkey == $wgDefaultSkin ) |
857 | 858 | $sn .= ' (' . wfMsg( 'default' ) . ')'; |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -104,20 +104,6 @@ |
105 | 105 | $namespaceAliases = array(); |
106 | 106 | |
107 | 107 | /** |
108 | | - * Skin names. If any key is not specified, the English one will be used. |
109 | | - */ |
110 | | -$skinNames = array( |
111 | | - 'standard' => 'Classic', |
112 | | - 'nostalgia' => 'Nostalgia', |
113 | | - 'cologneblue' => 'Cologne Blue', |
114 | | - 'monobook' => 'MonoBook', |
115 | | - 'myskin' => 'MySkin', |
116 | | - 'chick' => 'Chick', |
117 | | - 'simple' => 'Simple', |
118 | | - 'modern' => 'Modern', |
119 | | -); |
120 | | - |
121 | | -/** |
122 | 108 | * Deprecated, use the message array |
123 | 109 | */ |
124 | 110 | $mathNames = array( |
— | — | @@ -3019,6 +3005,16 @@ |
3020 | 3006 | 'numauthors' => 'Number of distinct authors (page): $1', |
3021 | 3007 | 'numtalkauthors' => 'Number of distinct authors (discussion page): $1', |
3022 | 3008 | |
| 3009 | +# Skins names |
| 3010 | +'skinname-standard' => 'Classic', |
| 3011 | +'skinname-nostalgia' => 'Nostalgia', |
| 3012 | +'skinname-cologneblue' => 'Cologne Blue', |
| 3013 | +'skinname-monobook' => 'MonoBook', |
| 3014 | +'skinname-myskin' => 'MySkin', |
| 3015 | +'skinname-chick' => 'Chick', |
| 3016 | +'skinname-simple' => 'Simple', |
| 3017 | +'skinname-modern' => 'Modern', |
| 3018 | + |
3023 | 3019 | # Math options |
3024 | 3020 | 'mw_math_png' => 'Always render PNG', |
3025 | 3021 | 'mw_math_simple' => 'HTML if very simple or else PNG', |
Index: trunk/phase3/languages/Language.php |
— | — | @@ -56,9 +56,9 @@ |
57 | 57 | var $mConverter, $mVariants, $mCode, $mLoaded = false; |
58 | 58 | var $mMagicExtensions = array(), $mMagicHookDone = false; |
59 | 59 | |
60 | | - static public $mLocalisationKeys = array( 'fallback', 'namespaceNames', |
61 | | - 'skinNames', 'mathNames', |
62 | | - 'bookstoreList', 'magicWords', 'messages', 'rtl', 'digitTransformTable', |
| 60 | + static public $mLocalisationKeys = array( |
| 61 | + 'fallback', 'namespaceNames', 'mathNames', 'bookstoreList', |
| 62 | + 'magicWords', 'messages', 'rtl', 'digitTransformTable', |
63 | 63 | 'separatorTransformTable', 'fallback8bitEncoding', 'linkPrefixExtension', |
64 | 64 | 'defaultUserOptionOverrides', 'linkTrail', 'namespaceAliases', |
65 | 65 | 'dateFormats', 'datePreferences', 'datePreferenceMigrationMap', |
— | — | @@ -320,7 +320,7 @@ |
321 | 321 | if ( isset( $aliases[$name][0] ) ) { |
322 | 322 | $name = $aliases[$name][0]; |
323 | 323 | } |
324 | | - return $this->getNsText(NS_SPECIAL) . ':' . $name; |
| 324 | + return $this->getNsText( NS_SPECIAL ) . ':' . $name; |
325 | 325 | } |
326 | 326 | |
327 | 327 | function getQuickbarSettings() { |
— | — | @@ -333,11 +333,6 @@ |
334 | 334 | ); |
335 | 335 | } |
336 | 336 | |
337 | | - function getSkinNames() { |
338 | | - $this->load(); |
339 | | - return $this->skinNames; |
340 | | - } |
341 | | - |
342 | 337 | function getMathNames() { |
343 | 338 | $this->load(); |
344 | 339 | return $this->mathNames; |