LanguageNameIndexer: Remove directionality chars that cannot be typed

Change-Id: I8e5b9f300a3307a90054e4e759279f91594a2fa3
This commit is contained in:
Niklas Laxström authored and Santhosh committed 2016-08-08 10:56:39 +00:00
1 parent b3ba423354
commit 42f4f9650b
2 files changed
+26 -24

No files matched your search

+3
View File
@@ -38,6 +38,9 @@ class LanguageNameIndexer extends Maintenance {
$translations = LanguageNames::getNames( $sourceLanguage, 0, 2 );
foreach ( $translations as $targetLanguage => $translation ) {
$translation = mb_strtolower( $translation );
// Remove directionality markers used in Names.php: users are not
// going to type these.
$translation = str_replace( "\xE2\x80\x8E", '', $translation );
$bucket = LanguageNameSearch::getIndex( $translation );
$buckets[$bucket][$translation] = $targetLanguage;
}