From 3bddf7fcb8cce1b3b1c77d3a62335fab682c385d Mon Sep 17 00:00:00 2001 From: xjm Date: Thu, 18 Mar 2021 07:45:00 -0500 Subject: [PATCH] =?UTF-8?q?Issue=20#3169212=20by=20int=5Fua,=20Matroskeen,?= =?UTF-8?q?=20anmolgoyal74,=20Krzysztof=20Doma=C5=84ski,=20alexpott,=20bib?= =?UTF-8?q?los,=20init90,=20xjm:=20Improve=20transliteration=20of=20Ukrain?= =?UTF-8?q?ian=20letters?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Component/Transliteration/data/uk.php | 26 +++++++++++++++++++ .../PhpTransliterationTest.php | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 core/lib/Drupal/Component/Transliteration/data/uk.php diff --git a/core/lib/Drupal/Component/Transliteration/data/uk.php b/core/lib/Drupal/Component/Transliteration/data/uk.php new file mode 100644 index 00000000000..5533854704f --- /dev/null +++ b/core/lib/Drupal/Component/Transliteration/data/uk.php @@ -0,0 +1,26 @@ + '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 => '', +]; diff --git a/core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php b/core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php index db9f4ee159d..b5248091043 100644 --- a/core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php +++ b/core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php @@ -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.