Issue #3169212 by int_ua, Matroskeen, anmolgoyal74, Krzysztof Domański, alexpott, biblos, init90, xjm: Improve transliteration of Ukrainian letters

merge-requests/478/head
xjm 2021-03-18 07:45:00 -05:00
parent 6f70ae46a0
commit 3bddf7fcb8
2 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,26 @@
<?php
/**
* @file
* Ukrainian transliteration data for the PhpTransliteration class.
* @see https://zakon.rada.gov.ua/laws/show/55-2010-п#Text
*/
$overrides['uk'] = [
0x413 => 'H',
0x433 => 'h',
0x404 => 'Ye',
0x454 => 'ye',
0x418 => 'Y',
0x438 => 'y',
0x407 => 'Yi',
0x457 => 'yi',
0x426 => 'Ts',
0x446 => 'ts',
0x429 => 'Shch',
0x449 => 'shch',
// Hide several variations of apostrophe character.
0x2bc => '',
0x27 => '',
0x2019 => '',
];

View File

@ -141,6 +141,8 @@ class PhpTransliterationTest extends TestCase {
['da', $random, $random],
['kg', $three_byte, 'ts'],
// Test strings in some other languages.
// Ukrainian pangram.
['uk', 'На подушечці форми любої є й ґудзик щоб пірʼя геть жовте сховати.', 'Na podushechtsi formy lyuboyi ye y gudzyk shchob pirya het zhovte skhovaty.'],
// Turkish, provided by drupal.org user Kartagis.
['tr', 'Abayı serdiler bize. Söyleyeceğim yüzlerine. Sanırım hepimiz aynı şeyi düşünüyoruz.', 'Abayi serdiler bize. Soyleyecegim yuzlerine. Sanirim hepimiz ayni seyi dusunuyoruz.'],
// Max length.