LanguageNameIndexer/Search: use unicode aware lowercasing
With this MEÄNKELI with typos=1 finds results. Updated test case for lowercased result. Renamed variables in test file for clarity. Updated the default value for MW_INSTALL_PATH to work with the default layout. Change-Id: Id93c84d308705f55b4d2378fc8c7b7f243e1b53f
This commit is contained in:
@@ -37,7 +37,7 @@ class LanguageNameIndexer extends Maintenance {
|
||||
foreach ( $languages as $sourceLanguage => $autonym ) {
|
||||
$translations = LanguageNames::getNames( $sourceLanguage, 0, 2 );
|
||||
foreach ( $translations as $targetLanguage => $translation ) {
|
||||
$translation = strtolower( $translation );
|
||||
$translation = mb_strtolower( $translation );
|
||||
$bucket = LanguageNameSearch::getIndex( $translation );
|
||||
$buckets[$bucket][$translation] = $targetLanguage;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user