Localization update for he.
[lhc/web/wiklou.git] / languages / Language.php
index 9828383..8853ace 100644 (file)
@@ -63,7 +63,7 @@ class Language {
                'defaultUserOptionOverrides', 'linkTrail', 'namespaceAliases',
                'dateFormats', 'datePreferences', 'datePreferenceMigrationMap',
                'defaultDateFormat', 'extraUserToggles', 'specialPageAliases',
-               'imageFiles', 'genderAliases'
+               'imageFiles'
        );
 
        static public $mMergeableMapKeys = array( 'messages', 'namespaceNames', 'mathNames',
@@ -265,18 +265,6 @@ class Language {
                return isset( $ns[$index] ) ? $ns[$index] : false;
        }
 
-       /**
-        * Like getNsText, but looks first if there is custom alias for given gender
-        */
-       function getGenderNsText( $index, $gender ) {
-               $this->load();
-               if ( isset( $this->genderAliases[$index][$gender] ) ) {
-                       return $this->genderAliases[$index][$gender];
-               } else {
-                       return $this->getNsText( $index );
-               }
-       }
-
        /**
         * A convenience function that returns the same thing as
         * getNsText() except with '_' changed to ' ', useful for
@@ -2001,7 +1989,19 @@ class Language {
                        $list,
                        wfMsgExt( 'comma-separator', array( 'escapenoentities', 'language' => $this ) ) );
        }
-       
+
+       /**
+        * Take a list of strings and build a locale-friendly semicolon-separated
+        * list, using the local semicolon-separator message.
+        * @param $list array of strings to put in a semicolon list
+        * @return string
+        */
+       function semicolonList( $list ) {
+               return implode(
+                       $list,
+                       wfMsgExt( 'semicolon-separator', array( 'escapenoentities', 'language' => $this ) ) );
+       }
+
        /**
         * Same as commaList, but separate it with the pipe instead.
         * @param $list array of strings to put in a pipe list
@@ -2028,7 +2028,12 @@ class Language {
         * @param $ellipsis String to append to the truncated text
         * @return string
         */
-       function truncate( $string, $length, $ellipsis = "" ) {
+       function truncate( $string, $length, $ellipsis = '...' ) {
+               # Use the localized ellipsis character
+               if( $ellipsis == '...' ) {
+                       $ellipsis = wfMsgExt( 'ellipsis', array( 'escapenoentities', 'language' => $this ) );
+               }
+
                if( $length == 0 ) {
                        return $ellipsis;
                }
@@ -2045,7 +2050,7 @@ class Language {
                        } elseif( $char >= 0x80 &&
                                  preg_match( '/^(.*)(?:[\xe0-\xef][\x80-\xbf]|' .
                                              '[\xf0-\xf7][\x80-\xbf]{1,2})$/', $string, $m ) ) {
-                           # We chopped in the middle of a character; remove it
+                               # We chopped in the middle of a character; remove it
                                $string = $m[1];
                        }
                        return $string . $ellipsis;
@@ -2336,7 +2341,7 @@ class Language {
         *
         * @return array Dependencies, map of filenames to mtimes
         */
-       static function loadLocalisation( $code, $disableCache = true ) {
+       static function loadLocalisation( $code, $disableCache = false ) {
                static $recursionGuard = array();
                global $wgMemc, $wgEnableSerializedMessages, $wgCheckSerialized;
 
@@ -2604,12 +2609,6 @@ class Language {
                foreach ( $this->namespaceNames as $index => $name ) {
                        $this->mNamespaceIds[$this->lc($name)] = $index;
                }
-               # Add gender aliases to the normal aliases table automatically
-               foreach ( $this->genderAliases as $index => $aliases ) {
-                       foreach ( $aliases as $alias ) {
-                               $this->namespaceAliases[$alias] = $index;
-                       }
-               }
                if ( $this->namespaceAliases ) {
                        foreach ( $this->namespaceAliases as $name => $index ) {
                                if ( $index === NS_PROJECT_TALK ) {