Index: trunk/extensions/cldr/cldr.php |
— | — | @@ -1,7 +1,7 @@ |
2 | 2 | <?php |
3 | 3 | if (!defined('MEDIAWIKI')) die(); |
4 | 4 | /** |
5 | | - * An extension which provised localised language names for other extensions. |
| 5 | + * An extension which provides localised language names for other extensions. |
6 | 6 | * |
7 | 7 | * @file |
8 | 8 | * @ingroup Extensions |
— | — | @@ -22,4 +22,4 @@ |
23 | 23 | $dir = dirname(__FILE__) . '/'; |
24 | 24 | $wgExtensionMessagesFiles['cldr'] = $dir . 'cldr.i18n.php'; |
25 | 25 | $wgAutoloadClasses['LanguageNames'] = $dir . 'LanguageNames.body.php'; |
26 | | -$wgHooks['LanguageGetTranslatedLanguageNames'][] = 'LanguageNames::coreHook'; |
\ No newline at end of file |
| 26 | +$wgHooks['LanguageGetTranslatedLanguageNames'][] = 'LanguageNames::coreHook'; |
Index: trunk/extensions/cldr/LanguageNames.body.php |
— | — | @@ -12,8 +12,8 @@ |
13 | 13 | private static $cache = array(); |
14 | 14 | |
15 | 15 | const FALLBACK_NATIVE = 0; // Missing entries fallback to native name |
16 | | - const FALLBACK_NORMAL = 1; // Missing entries fallback trough fallback chain |
17 | | - const LIST_MW_SUPPORTED = 0; // Only names that has localisation in MediaWiki |
| 16 | + const FALLBACK_NORMAL = 1; // Missing entries fallback through the fallback chain |
| 17 | + const LIST_MW_SUPPORTED = 0; // Only names that have localisation in MediaWiki |
18 | 18 | const LIST_MW = 1; // All names that are in Names.php |
19 | 19 | const LIST_MW_AND_CLDR = 2; // Combination of Names.php and what is in cldr |
20 | 20 | |
— | — | @@ -59,6 +59,7 @@ |
60 | 60 | |
61 | 61 | private static function loadLanguage( $code ) { |
62 | 62 | if ( !isset(self::$cache[$code]) ) { |
| 63 | + wfProfileIn( __METHOD__.'-recache' ); |
63 | 64 | |
64 | 65 | /* Load override for wrong or missing entries in cldr */ |
65 | 66 | $override = dirname(__FILE__) . '/' . self::getOverrideFileName( $code ); |
— | — | @@ -84,6 +85,7 @@ |
85 | 86 | } else { |
86 | 87 | wfDebug( __METHOD__ . ": Unable to load language names for $filename\n" ); |
87 | 88 | } |
| 89 | + wfProfileOut( __METHOD__.'-recache' ); |
88 | 90 | } |
89 | 91 | |
90 | 92 | return isset( self::$cache[$code] ) ? self::$cache[$code] : array(); |