MediaWiki
REL1_24
|
Workaround for incorrect collation of Estonian language ('et') in ICU (bug 54168). More...
Public Member Functions | |
__construct () | |
getFirstLetter ($string) | |
Given a string, return the logical "first letter" to be used for grouping on category pages and so on. | |
getSortKey ($string) | |
Given a string, convert it to a (hopefully short) key that can be used for efficient sorting. | |
Static Private Member Functions | |
static | mangle ($string) |
static | unmangle ($string) |
Workaround for incorrect collation of Estonian language ('et') in ICU (bug 54168).
'W' and 'V' should not be considered the same letter for the purposes of collation in modern Estonian. We work around this by replacing 'W' and 'w' with 'ᴡ' U+1D21 'LATIN LETTER SMALL CAPITAL W' for sortkey generation, which is collated like 'W' and is not tailored to have the same primary weight as 'V' in Estonian.
Definition at line 611 of file Collation.php.
Definition at line 612 of file Collation.php.
Referenced by mangle().
CollationEt::getFirstLetter | ( | $ | string | ) |
Given a string, return the logical "first letter" to be used for grouping on category pages and so on.
This has to be coordinated carefully with convertToSortkey(), or else the sorted list might jump back and forth between the same "initial letters" or other pathological behavior. For instance, if you just return the first character, but "a" sorts the same as "A" based on getSortKey(), then you might get a list like
== A == * [[Aardvark]]
== a == * [[antelope]]
== A == * [[Ape]]
etc., assuming for the sake of argument that $wgCapitalLinks is false.
string | $string | UTF-8 string |
Reimplemented from IcuCollation.
Definition at line 637 of file Collation.php.
References getSortKey().
CollationEt::getSortKey | ( | $ | string | ) |
Given a string, convert it to a (hopefully short) key that can be used for efficient sorting.
A binary sort according to the sortkeys corresponds to a logical sort of the corresponding strings. Current code expects that a line feed character should sort before all others, but has no other particular expectations (and that one can be changed if necessary).
string | $string | UTF-8 string |
Reimplemented from IcuCollation.
Definition at line 633 of file Collation.php.
Referenced by getFirstLetter().
static CollationEt::mangle | ( | $ | string | ) | [static, private] |
Definition at line 616 of file Collation.php.
References __construct(), and array().
static CollationEt::unmangle | ( | $ | string | ) | [static, private] |
Definition at line 624 of file Collation.php.