'defaultUserOptionOverrides', 'linkTrail', 'namespaceAliases',
'dateFormats', 'datePreferences', 'datePreferenceMigrationMap',
'defaultDateFormat', 'extraUserToggles', 'specialPageAliases',
- 'imageFiles', 'genderAliases'
+ 'imageFiles'
);
static public $mMergeableMapKeys = array( 'messages', 'namespaceNames', 'mathNames',
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
$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
* @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;
}
} 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;
*
* @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;
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 ) {