- static private $lre = "\xE2\x80\xAA"; // U+202A LEFT-TO-RIGHT EMBEDDING
- static private $rle = "\xE2\x80\xAB"; // U+202B RIGHT-TO-LEFT EMBEDDING
- static private $pdf = "\xE2\x80\xAC"; // U+202C POP DIRECTIONAL FORMATTING
+ static private $lre = "\u{202A}"; // U+202A LEFT-TO-RIGHT EMBEDDING
+ static private $rle = "\u{202B}"; // U+202B RIGHT-TO-LEFT EMBEDDING
+ static private $pdf = "\u{202C}"; // U+202C POP DIRECTIONAL FORMATTING
// merge the language object in to get it up front in the cache
self::$mLangObjCache = array_merge( [ $code => $langObj ], self::$mLangObjCache );
// merge the language object in to get it up front in the cache
self::$mLangObjCache = array_merge( [ $code => $langObj ], self::$mLangObjCache );
* language, script or variant codes actually exist in the repositories.
*
* Based on regexes by Mark Davis of the Unicode Consortium:
* language, script or variant codes actually exist in the repositories.
*
* Based on regexes by Mark Davis of the Unicode Consortium:
$ns = $wgExtraGenderNamespaces +
(array)self::$dataCache->getItem( $this->mCode, 'namespaceGenderAliases' );
$ns = $wgExtraGenderNamespaces +
(array)self::$dataCache->getItem( $this->mCode, 'namespaceGenderAliases' );
function getLocalNsIndex( $text ) {
$lctext = $this->lc( $text );
$ids = $this->getNamespaceIds();
function getLocalNsIndex( $text ) {
$lctext = $this->lc( $text );
$ids = $this->getNamespaceIds();
* 'all' all available languages
* 'mw' only if the language is defined in MediaWiki or wgExtraLanguageNames (default)
* 'mwfile' only if the language is in 'mw' *and* has a message file
* 'all' all available languages
* 'mw' only if the language is defined in MediaWiki or wgExtraLanguageNames (default)
* 'mwfile' only if the language is in 'mw' *and* has a message file
* 'all' all available languages
* 'mw' only if the language is defined in MediaWiki or wgExtraLanguageNames (default)
* 'mwfile' only if the language is in 'mw' *and* has a message file
* 'all' all available languages
* 'mw' only if the language is defined in MediaWiki or wgExtraLanguageNames (default)
* 'mwfile' only if the language is in 'mw' *and* has a message file
*/
private static function fetchLanguageNamesUncached( $inLanguage = null, $include = 'mw' ) {
global $wgExtraLanguageNames, $wgUsePigLatinVariant;
*/
private static function fetchLanguageNamesUncached( $inLanguage = null, $include = 'mw' ) {
global $wgExtraLanguageNames, $wgUsePigLatinVariant;
* Gets directionality of the first strongly directional codepoint, for embedBidi()
*
* This is the rule the BIDI algorithm uses to determine the directionality of
* Gets directionality of the first strongly directional codepoint, for embedBidi()
*
* This is the rule the BIDI algorithm uses to determine the directionality of
- * paragraphs ( http://unicode.org/reports/tr9/#The_Paragraph_Level ) and
- * FSI isolates ( http://unicode.org/reports/tr9/#Explicit_Directional_Isolates ).
+ * paragraphs ( https://www.unicode.org/reports/tr9/#The_Paragraph_Level ) and
+ * FSI isolates ( https://www.unicode.org/reports/tr9/#Explicit_Directional_Isolates ).
*
* TODO: Does not handle BIDI control characters inside the text.
* TODO: Does not handle unallocated characters.
*
* TODO: Does not handle BIDI control characters inside the text.
* TODO: Does not handle unallocated characters.
global $wgAllUnicodeFixes;
$s = UtfNormal\Validator::cleanUp( $s );
if ( $wgAllUnicodeFixes ) {
global $wgAllUnicodeFixes;
$s = UtfNormal\Validator::cleanUp( $s );
if ( $wgAllUnicodeFixes ) {
- $s = $this->transformUsingPairFile( 'normalize-ar.ser', $s );
- $s = $this->transformUsingPairFile( 'normalize-ml.ser', $s );
+ $s = $this->transformUsingPairFile( 'normalize-ar.php', $s );
+ $s = $this->transformUsingPairFile( 'normalize-ml.php', $s );
$this->transformData[$file] = new ReplacementArray( $data );
}
return $this->transformData[$file]->replace( $string );
$this->transformData[$file] = new ReplacementArray( $data );
}
return $this->transformData[$file]->replace( $string );
- $lrm = "\xE2\x80\x8E"; # LEFT-TO-RIGHT MARK, commonly abbreviated LRM
- $rlm = "\xE2\x80\x8F"; # RIGHT-TO-LEFT MARK, commonly abbreviated RLM
+ $lrm = "\u{200E}"; # LEFT-TO-RIGHT MARK, commonly abbreviated LRM
+ $rlm = "\u{200F}"; # RIGHT-TO-LEFT MARK, commonly abbreviated RLM
$this->mExtendedSpecialPageAliases =
self::$dataCache->getItem( $this->mCode, 'specialPageAliases' );
Hooks::run( 'LanguageGetSpecialPageAliases',
$this->mExtendedSpecialPageAliases =
self::$dataCache->getItem( $this->mCode, 'specialPageAliases' );
Hooks::run( 'LanguageGetSpecialPageAliases',
- $string, $length, $ellipsis = '...', $adjustLength = true, $measureLength, $getSubstring
+ $string, $length, $ellipsis, $adjustLength, $measureLength, $getSubstring
) {
if ( !is_callable( $measureLength ) || !is_callable( $getSubstring ) ) {
throw new InvalidArgumentException( 'Invalid callback provided' );
) {
if ( !is_callable( $measureLength ) || !is_callable( $getSubstring ) ) {
throw new InvalidArgumentException( 'Invalid callback provided' );
if ( !self::isValidBuiltInCode( $code ) ) {
throw new MWException( "Invalid language code \"$code\"" );
}
if ( !self::isValidBuiltInCode( $code ) ) {
throw new MWException( "Invalid language code \"$code\"" );
}