http://www.mediawiki.org/wiki/Special:Code/MediaWiki/84664

Revision: 84664
Author:   tstarling
Date:     2011-03-24 04:08:05 +0000 (Thu, 24 Mar 2011)
Log Message:
-----------
* Fixed a few comments.
* Added a profiling section to loadLanguage().

Modified Paths:
--------------
    trunk/extensions/cldr/LanguageNames.body.php
    trunk/extensions/cldr/cldr.php

Modified: trunk/extensions/cldr/LanguageNames.body.php
===================================================================
--- trunk/extensions/cldr/LanguageNames.body.php        2011-03-24 03:43:27 UTC 
(rev 84663)
+++ trunk/extensions/cldr/LanguageNames.body.php        2011-03-24 04:08:05 UTC 
(rev 84664)
@@ -12,8 +12,8 @@
        private static $cache = array();
 
        const FALLBACK_NATIVE   = 0; // Missing entries fallback to native name
-       const FALLBACK_NORMAL   = 1; // Missing entries fallback trough 
fallback chain
-       const LIST_MW_SUPPORTED = 0; // Only names that has localisation in 
MediaWiki
+       const FALLBACK_NORMAL   = 1; // Missing entries fallback through the 
fallback chain
+       const LIST_MW_SUPPORTED = 0; // Only names that have localisation in 
MediaWiki
        const LIST_MW           = 1; // All names that are in Names.php
        const LIST_MW_AND_CLDR  = 2; // Combination of Names.php and what is in 
cldr
 
@@ -59,6 +59,7 @@
 
        private static function loadLanguage( $code ) {
                if ( !isset(self::$cache[$code]) ) {
+                       wfProfileIn( __METHOD__.'-recache' );
 
                        /* Load override for wrong or missing entries in cldr */
                        $override = dirname(__FILE__) . '/' . 
self::getOverrideFileName( $code );
@@ -84,6 +85,7 @@
                        } else {
                                wfDebug( __METHOD__ . ": Unable to load 
language names for $filename\n" );
                        }
+                       wfProfileOut( __METHOD__.'-recache' );
                }
 
                return isset( self::$cache[$code] ) ? self::$cache[$code] : 
array();

Modified: trunk/extensions/cldr/cldr.php
===================================================================
--- trunk/extensions/cldr/cldr.php      2011-03-24 03:43:27 UTC (rev 84663)
+++ trunk/extensions/cldr/cldr.php      2011-03-24 04:08:05 UTC (rev 84664)
@@ -1,7 +1,7 @@
 <?php
 if (!defined('MEDIAWIKI')) die();
 /**
- * An extension which provised localised language names for other extensions.
+ * An extension which provides localised language names for other extensions.
  *
  * @file
  * @ingroup Extensions
@@ -22,4 +22,4 @@
 $dir = dirname(__FILE__) . '/';
 $wgExtensionMessagesFiles['cldr'] = $dir . 'cldr.i18n.php';
 $wgAutoloadClasses['LanguageNames'] = $dir . 'LanguageNames.body.php';
-$wgHooks['LanguageGetTranslatedLanguageNames'][] = 'LanguageNames::coreHook';
\ No newline at end of file
+$wgHooks['LanguageGetTranslatedLanguageNames'][] = 'LanguageNames::coreHook';


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to