Index: branches/wmf/1.18wmf1/skins/common/images/closewindow19x19.png |
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
Property changes on: branches/wmf/1.18wmf1/skins/common/images/closewindow19x19.png |
___________________________________________________________________ |
Added: svn:mime-type |
1 | 1 | + image/png |
Property changes on: branches/wmf/1.18wmf1/skins/common/images |
___________________________________________________________________ |
Added: svn:mergeinfo |
2 | 2 | Merged /branches/new-installer/phase3/skins/common/images:r43664-66004 |
3 | 3 | Merged /branches/REL1_15/phase3/skins/common/images:r51646 |
4 | 4 | Merged /branches/REL1_17/phase3/skins/common/images:r81445,81448 |
5 | 5 | Merged /branches/REL1_18/phase3/skins/common/images:r102560,103033,103041,103054,104753 |
6 | 6 | Merged /branches/sqlite/skins/common/images:r58211-58321 |
7 | 7 | Merged /trunk/phase3/skins/common/images:r92580,92634,92713,92762,92765,92791,92846,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93516-93518,93520,93818-93822,93847,93858,93891,93935-93936,93977,94058,94062,94068,94107,94155,94235,94277,94346,94372,94422,94425,94444,94448,94456,94498,94517,94601,94630,94728,94738,94825,94862,94995-94997,95023,95042,95072-95073,95155,95327,95332,95410,95422,95426,95442,95468,95601,95812,96178,96182,96307,96310,96616,96648,97175,97810,97889,98578,98598,98656,98764,98990,99304,99308,99349,99477,99653,99694,100219,100221,100223,100226,100239,100242,100575,101291,101306,101314,101417,101420,101445,101464,101540,101591,101666,101802,101860,101990,102297,102334-102335,102440,102948,102951,102954,103138,104318,104322,104350,104434,104441,104445,104470,104475,106903 |
Index: branches/wmf/1.18wmf1/includes/Xml.php |
— | — | @@ -208,21 +208,39 @@ |
209 | 209 | } |
210 | 210 | |
211 | 211 | /** |
212 | | - * |
213 | | - * @param $selected string The language code of the selected language |
214 | | - * @param $customisedOnly bool If true only languages which have some content are listed |
215 | | - * @return array of label and select |
| 212 | + * Construct a language selector appropriate for use in a form or preferences |
| 213 | + * |
| 214 | + * @param string $selected The language code of the selected language |
| 215 | + * @param boolean $customisedOnly If true only languages which have some content are listed |
| 216 | + * @param string $language The ISO code of the language to display the select list in (optional) |
| 217 | + * @return array containing 2 items: label HTML and select list HTML |
216 | 218 | */ |
217 | | - public static function languageSelector( $selected, $customisedOnly = true ) { |
| 219 | + public static function languageSelector( $selected, $customisedOnly = true, $language = NULL ) { |
218 | 220 | global $wgLanguageCode; |
219 | | - /** |
220 | | - * Make sure the site language is in the list; a custom language code |
221 | | - * might not have a defined name... |
222 | | - */ |
223 | | - $languages = Language::getLanguageNames( $customisedOnly ); |
| 221 | + |
| 222 | + // If a specific language was requested and CLDR is installed, use it |
| 223 | + if ( $language && is_callable( array( 'LanguageNames', 'getNames' ) ) ) { |
| 224 | + if ( $customisedOnly ) { |
| 225 | + $listType = LanguageNames::LIST_MW_SUPPORTED; // Only pull names that have localisation in MediaWiki |
| 226 | + } else { |
| 227 | + $listType = LanguageNames::LIST_MW; // Pull all languages that are in Names.php |
| 228 | + } |
| 229 | + // Retrieve the list of languages in the requested language (via CLDR) |
| 230 | + $languages = LanguageNames::getNames( |
| 231 | + $language, // Code of the requested language |
| 232 | + LanguageNames::FALLBACK_NORMAL, // Use fallback chain |
| 233 | + $listType |
| 234 | + ); |
| 235 | + } else { |
| 236 | + $languages = Language::getLanguageNames( $customisedOnly ); |
| 237 | + } |
| 238 | + |
| 239 | + // Make sure the site language is in the list; a custom language code might not have a |
| 240 | + // defined name... |
224 | 241 | if( !array_key_exists( $wgLanguageCode, $languages ) ) { |
225 | 242 | $languages[$wgLanguageCode] = $wgLanguageCode; |
226 | 243 | } |
| 244 | + |
227 | 245 | ksort( $languages ); |
228 | 246 | |
229 | 247 | /** |
Property changes on: branches/wmf/1.18wmf1/includes/Xml.php |
___________________________________________________________________ |
Added: svn:mergeinfo |
230 | 248 | Merged /branches/sqlite/includes/Xml.php:r58211-58321 |
231 | 249 | Merged /trunk/phase3/includes/Xml.php:r92580,92634,92713,92762,92765,92791,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93516-93518,93818-93822,93847,93858,93891,93935-93936,93977,94058,94062,94068,94107,94155,94235,94277,94346,94372,94422,94425,94444,94448,94456,94498,94517,94601,94630,94728,94738,94825,94862,94995-94997,95023,95042,95072-95073,95155,95327,95332,95410,95422,95426,95442,95468,95601,95812,96178,96182,97175,97810,98578,98598,98656,98764,98990,99304,99308,99349,99477,99694,100219,100221,100223,100226,100239,100242,100575,101291,101306,101314,101445,101464,101591,101666,101802,101860,101990,102297,102334-102335,102440,102951,102954,104318,104322,104350,104434,104441,104445,104470,104475,107002 |
232 | 250 | Merged /branches/new-installer/phase3/includes/Xml.php:r43664-66004 |
233 | 251 | Merged /branches/wmf-deployment/includes/Xml.php:r53381 |
234 | 252 | Merged /branches/REL1_15/phase3/includes/Xml.php:r51646 |
235 | 253 | Merged /branches/REL1_18/phase3/includes/Xml.php:r102560,103033,103041,103054 |