From 8e4bd84c164a39fec4b2f326fa7f936d23023ae3 Mon Sep 17 00:00:00 2001 From: Ugur Ozkan <6731054+uguurozkan@users.noreply.github.com> Date: Sun, 27 Nov 2022 14:12:25 +0300 Subject: [PATCH] Use both TRL and TRY currency codes (#146) --- src/Language/Albanian/AlbanianDictionary.php | 1 + src/Language/Arabic/ArabicDictionary.php | 1 + src/Language/Azerbaijani/AzerbaijaniDictionary.php | 1 + src/Language/English/EnglishDictionary.php | 1 + src/Language/German/GermanDictionary.php | 2 ++ src/Language/Kurdish/KurdishDictionary.php | 1 + src/Language/Polish/PolishDictionary.php | 1 + src/Language/Romanian/Dictionary.php | 4 ++++ src/Language/Slovak/SlovakDictionary.php | 1 + src/Legacy/Numbers/Words/Locale/Es.php | 1 + src/Legacy/Numbers/Words/Locale/Hu.php | 1 + src/Legacy/Numbers/Words/Locale/Id.php | 1 + src/Legacy/Numbers/Words/Locale/Ka.php | 1 + src/Legacy/Numbers/Words/Locale/Ms.php | 1 + src/Legacy/Numbers/Words/Locale/Nl.php | 1 + src/Legacy/Numbers/Words/Locale/Tr.php | 1 + src/Legacy/Numbers/Words/Locale/Ua.php | 4 ++++ src/Legacy/Numbers/Words/Locale/Yo.php | 1 + tests/CurrencyTransformer/TurkishCurrencyTransformerTest.php | 1 + 19 files changed, 26 insertions(+) diff --git a/src/Language/Albanian/AlbanianDictionary.php b/src/Language/Albanian/AlbanianDictionary.php index 26beb300..56de577d 100644 --- a/src/Language/Albanian/AlbanianDictionary.php +++ b/src/Language/Albanian/AlbanianDictionary.php @@ -81,6 +81,7 @@ class AlbanianDictionary implements Dictionary 'TMT' => [['manat'], ['tenge']], 'TND' => [['dinar'], ['milimetra']], 'TRL' => [['lira'], ['kuruş']], + 'TRY' => [['lira'], ['kuruş']], 'UAH' => [['hryvna'], ['cent']], 'USD' => [['dollar'], ['cent']], 'XAF' => [['CFA franc'], ['cent']], diff --git a/src/Language/Arabic/ArabicDictionary.php b/src/Language/Arabic/ArabicDictionary.php index b455dd1d..0a303362 100644 --- a/src/Language/Arabic/ArabicDictionary.php +++ b/src/Language/Arabic/ArabicDictionary.php @@ -104,6 +104,7 @@ class ArabicDictionary implements Dictionary 'TMT' => [['manat'], ['tenge']], 'TND' => [['دينار'], ['ملم']], 'TRL' => [['lira'], ['kuruş']], + 'TRY' => [['lira'], ['kuruş']], 'UAH' => [['هريفنا'], ['سنت']], 'USD' => [['دولار'], ['سنت']], 'XAF' => [['CFA فرنك'], ['سنت']], diff --git a/src/Language/Azerbaijani/AzerbaijaniDictionary.php b/src/Language/Azerbaijani/AzerbaijaniDictionary.php index e4c1ee7d..6b6e8c29 100644 --- a/src/Language/Azerbaijani/AzerbaijaniDictionary.php +++ b/src/Language/Azerbaijani/AzerbaijaniDictionary.php @@ -83,6 +83,7 @@ class AzerbaijaniDictionary implements Dictionary 'TMT' => [['manat'], ['tenge']], 'TND' => [['dinar'], ['millime']], 'TRL' => [['lira'], ['kuruş']], + 'TRY' => [['lira'], ['kuruş']], 'UAH' => [['hryvna'], ['cent']], 'USD' => [['dollar'], ['cent']], 'XAF' => [['CFA franc'], ['cent']], diff --git a/src/Language/English/EnglishDictionary.php b/src/Language/English/EnglishDictionary.php index 3b8ead1d..4ab80423 100644 --- a/src/Language/English/EnglishDictionary.php +++ b/src/Language/English/EnglishDictionary.php @@ -82,6 +82,7 @@ class EnglishDictionary implements Dictionary 'TMT' => [['manat'], ['tenge']], 'TND' => [['dinar'], ['millime']], 'TRL' => [['lira'], ['kuruş']], + 'TRY' => [['lira'], ['kuruş']], 'UAH' => [['hryvna'], ['cent']], 'USD' => [['dollar'], ['cent']], 'XAF' => [['CFA franc'], ['cent']], diff --git a/src/Language/German/GermanDictionary.php b/src/Language/German/GermanDictionary.php index 82d6cacc..c0049d33 100644 --- a/src/Language/German/GermanDictionary.php +++ b/src/Language/German/GermanDictionary.php @@ -112,6 +112,8 @@ class GermanDictionary implements Dictionary 'RUB' => [['Russischer Rubel'], ['Kopeke','Kopeken']], 'SEK' => [['Schwedische Krone','Schwedische Kronen'], ['Öre']], 'TMT' => [['Manat'], ['tenge']], + 'TRL' => [['türkische Lira'], ['Kuruş']], + 'TRY' => [['türkische Lira'], ['Kuruş']], 'UAH' => [['Hrywna'], ['Kopeke','Kopeken']], 'USD' => [['US Dollar'], ['cent']], 'ZAR' => [['Rand'], ['cent']] diff --git a/src/Language/Kurdish/KurdishDictionary.php b/src/Language/Kurdish/KurdishDictionary.php index 41620d0a..026307f8 100644 --- a/src/Language/Kurdish/KurdishDictionary.php +++ b/src/Language/Kurdish/KurdishDictionary.php @@ -82,6 +82,7 @@ class KurdishDictionary implements Dictionary 'TMT' => [['مانات'], ['تێنج']], 'TND' => [['دینار'], ['سەنت']], 'TRL' => [['لیرە'], ['کوروش']], + 'TRY' => [['لیرە'], ['کوروش']], 'UAH' => [['هیریڤنا'], ['سەنت']], 'USD' => [['دۆلار'], ['سەنت']], 'XAF' => [['CFA فرانک'], ['سەنت']], diff --git a/src/Language/Polish/PolishDictionary.php b/src/Language/Polish/PolishDictionary.php index b7707ee4..f65a512e 100644 --- a/src/Language/Polish/PolishDictionary.php +++ b/src/Language/Polish/PolishDictionary.php @@ -98,6 +98,7 @@ class PolishDictionary implements Dictionary 'SIT' => [['tolar', 'tolary', 'tolarów'], ['stotinia', 'stotinie', 'stotini']], 'SKK' => [['korona słowacka', 'korony słowackie', 'koron słowackich'], ['halerz', 'halerze', 'halerzy']], 'TRL' => [['lira turecka', 'liry tureckie', 'lir tureckich'], ['kurusza', 'kurysze', 'kuruszy']], + 'TRY' => [['lira turecka', 'liry tureckie', 'lir tureckich'], ['kurusza', 'kurysze', 'kuruszy']], 'UAH' => [['hrywna', 'hrywna', 'hrywna'], ['cent', 'centy', 'centów']], 'USD' => [['dolar', 'dolary', 'dolarów'], ['cent', 'centy', 'centów']], 'YUM' => [['dinar', 'dinary', 'dinarów'], ['para', 'para', 'para']], diff --git a/src/Language/Romanian/Dictionary.php b/src/Language/Romanian/Dictionary.php index d93354b8..77bd382e 100644 --- a/src/Language/Romanian/Dictionary.php +++ b/src/Language/Romanian/Dictionary.php @@ -125,6 +125,10 @@ class Dictionary ['liră turcească', 'lire turcești', Gender::GENDER_FEMININE], ['kuruș', 'kuruși', Gender::GENDER_MASCULINE], ], + 'TRY' => [ + ['liră turcească', 'lire turcești', Gender::GENDER_FEMININE], + ['kuruș', 'kuruși', Gender::GENDER_MASCULINE], + ], 'USD' => [ ['dolar american', 'dolari americani', Gender::GENDER_MASCULINE], ['cent', 'cenți', Gender::GENDER_MASCULINE], diff --git a/src/Language/Slovak/SlovakDictionary.php b/src/Language/Slovak/SlovakDictionary.php index 8f631cdf..350a84db 100644 --- a/src/Language/Slovak/SlovakDictionary.php +++ b/src/Language/Slovak/SlovakDictionary.php @@ -111,6 +111,7 @@ class SlovakDictionary implements Dictionary 'SIT' => [['tolar', 'tolary', 'tolarov'], ['stotinia', 'stotinie', 'stotini']], 'SKK' => [['korona słowacka', 'korony słowackie', 'koron słowackich'], ['halerz', 'halerze', 'halerzy']], 'TRL' => [['lira turecka', 'liry tureckie', 'lir tureckich'], ['kurusza', 'kurysze', 'kuruszy']], + 'TRY' => [['lira turecka', 'liry tureckie', 'lir tureckich'], ['kurusza', 'kurysze', 'kuruszy']], 'UAH' => [['hrivny', 'hrivny', 'hrivien'], ['cent', 'centy', 'centov']], 'USD' => [['dolár', 'doláre', 'dolárov'], ['cent', 'centy', 'centov']], 'YUM' => [['dinar', 'dinary', 'dinarov'], ['para', 'para', 'para']], diff --git a/src/Legacy/Numbers/Words/Locale/Es.php b/src/Legacy/Numbers/Words/Locale/Es.php index ecb80279..92194af9 100644 --- a/src/Legacy/Numbers/Words/Locale/Es.php +++ b/src/Legacy/Numbers/Words/Locale/Es.php @@ -86,6 +86,7 @@ class Es extends Words 'SKK' => [['slovak koruna'], []], 'TND' => [['dinar', 'dinares'], ['milímetrs']], 'TRL' => [['lira'], ['kuruþ']], + 'TRY' => [['lira'], ['kuruþ']], 'UAH' => [['hryvna'], ['cent']], 'USD' => [['dólar', 'dólares'], ['centavo']], 'UYU' => [['peso uruguayo', 'pesos uruguayos'], ['centavo']], diff --git a/src/Legacy/Numbers/Words/Locale/Hu.php b/src/Legacy/Numbers/Words/Locale/Hu.php index 1771ee3f..d711bc1a 100644 --- a/src/Legacy/Numbers/Words/Locale/Hu.php +++ b/src/Legacy/Numbers/Words/Locale/Hu.php @@ -88,6 +88,7 @@ class Hu extends Words 'SEK' => [['svéd korona'], ['őre']], 'SIT' => [['tolár'], ['sztotin']], 'TRL' => [['lira'], ['kuruþ']], + 'TRY' => [['lira'], ['kuruþ']], 'UAH' => [['hrivnya'], ['kopejka']], 'USD' => [['dollár'], ['cent']], 'ZAR' => [['rand'], ['cent']] diff --git a/src/Legacy/Numbers/Words/Locale/Id.php b/src/Legacy/Numbers/Words/Locale/Id.php index c621380f..bd5dedaf 100644 --- a/src/Legacy/Numbers/Words/Locale/Id.php +++ b/src/Legacy/Numbers/Words/Locale/Id.php @@ -85,6 +85,7 @@ class Id extends Words 'TMT' => [['manat'], ['tenge']], 'TND' => [['dinar'], ['milim']], 'TRL' => [['lira'], ['kuruş']], + 'TRY' => [['lira'], ['kuruş']], 'UAH' => [['hryvna'], ['sen']], 'USD' => [['dolar'], ['sen']], 'XAF' => [['franc CFA'], ['sen']], diff --git a/src/Legacy/Numbers/Words/Locale/Ka.php b/src/Legacy/Numbers/Words/Locale/Ka.php index 6e8084a8..fe87c9f3 100644 --- a/src/Legacy/Numbers/Words/Locale/Ka.php +++ b/src/Legacy/Numbers/Words/Locale/Ka.php @@ -64,6 +64,7 @@ class Ka extends Words 'MXN' => [['მექსიკური პესო'], ['სენტავო']], 'TND' => [['დინარი'], ['მილიმი']], 'USD' => [['დოლარი'], ['ცენტი']], + 'TRL' => [['ლირა'], ['ყურუში']], 'TRY' => [['ლირა'], ['ყურუში']], 'AMD' => [['დრამი'], ['ლუმა']], 'PLN' => [['ზლოტი'], ['გროში']], diff --git a/src/Legacy/Numbers/Words/Locale/Ms.php b/src/Legacy/Numbers/Words/Locale/Ms.php index fbc30069..20885e1a 100755 --- a/src/Legacy/Numbers/Words/Locale/Ms.php +++ b/src/Legacy/Numbers/Words/Locale/Ms.php @@ -86,6 +86,7 @@ class Ms extends Words 'TMT' => [['manat'], ['tenge']], 'TND' => [['dinar'], ['millim']], 'TRL' => [['lira'], ['kuruş']], + 'TRY' => [['lira'], ['kuruş']], 'UAH' => [['hryvna'], ['sen']], 'USD' => [['dolar'], ['sen']], 'XAF' => [['franc CFA'], ['sen']], diff --git a/src/Legacy/Numbers/Words/Locale/Nl.php b/src/Legacy/Numbers/Words/Locale/Nl.php index 17187f7a..63b80b3c 100644 --- a/src/Legacy/Numbers/Words/Locale/Nl.php +++ b/src/Legacy/Numbers/Words/Locale/Nl.php @@ -97,6 +97,7 @@ class Nl extends Words 'SIT' => [['Tolar'], ['stotinia']], 'SKK' => [['Slovak koruna'], []], 'TRL' => [['lira'], ['kuru\FE']], + 'TRY' => [['lira'], ['kuru\FE']], 'UAH' => [['hryvna'], ['cent']], 'USD' => [['dollar'], ['cent']], 'YUM' => [['dinars'], ['para']], diff --git a/src/Legacy/Numbers/Words/Locale/Tr.php b/src/Legacy/Numbers/Words/Locale/Tr.php index 7369fc7b..de20c418 100644 --- a/src/Legacy/Numbers/Words/Locale/Tr.php +++ b/src/Legacy/Numbers/Words/Locale/Tr.php @@ -101,6 +101,7 @@ class Tr extends Words 'SEK' => [['İsveç kronu'], ['oere']], 'SIT' => [['Slovenya toları'], ['stotinia']], 'SKK' => [['Slovakya kronu'], ['']], + 'TRL' => [['Türk lirası'], ['kuruş']], 'TRY' => [['Türk lirası'], ['kuruş']], 'UAH' => [['Ukrayna hryvnyası'], ['kopiyka']], 'USD' => [['ABD doları'], ['sent']], diff --git a/src/Legacy/Numbers/Words/Locale/Ua.php b/src/Legacy/Numbers/Words/Locale/Ua.php index 447a59a4..6bdfc915 100644 --- a/src/Legacy/Numbers/Words/Locale/Ua.php +++ b/src/Legacy/Numbers/Words/Locale/Ua.php @@ -190,6 +190,10 @@ class Ua extends Ru [2, 'турецкая лира', 'турецких лиры', 'турецких лир'], [1, 'пиастр', 'пиастра', 'пиастров'], ], + 'TRY' => [ + [2, 'турецкая лира', 'турецких лиры', 'турецких лир'], + [1, 'пиастр', 'пиастра', 'пиастров'], + ], 'UAH' => [ [2, 'гривня', 'гривні', 'гривень'], [2, 'копійка', 'копійки', 'копійок'], diff --git a/src/Legacy/Numbers/Words/Locale/Yo.php b/src/Legacy/Numbers/Words/Locale/Yo.php index a6a5f025..046e7aee 100644 --- a/src/Legacy/Numbers/Words/Locale/Yo.php +++ b/src/Legacy/Numbers/Words/Locale/Yo.php @@ -122,6 +122,7 @@ class Yo extends Words 'TMT' => [['manat'], ['tenge']], 'TND' => [['dinar'], ['millim']], 'TRL' => [['lira'], ['kuruş']], + 'TRY' => [['lira'], ['kuruş']], 'UAH' => [['hryvna'], ['cent']], 'USD' => [['dollar'], ['cent']], 'XAF' => [['CFA franc'], ['cent']], diff --git a/tests/CurrencyTransformer/TurkishCurrencyTransformerTest.php b/tests/CurrencyTransformer/TurkishCurrencyTransformerTest.php index ae14a901..61bcbb81 100644 --- a/tests/CurrencyTransformer/TurkishCurrencyTransformerTest.php +++ b/tests/CurrencyTransformer/TurkishCurrencyTransformerTest.php @@ -22,6 +22,7 @@ public function providerItConvertsMoneyAmountToWords(): array [124380, 'EUR', 'bin iki yüz kırk üç avro seksen sent'], [238500, 'USD', 'iki bin üç yüz seksen beş ABD doları'], [376600, 'USD', 'üç bin yedi yüz altmış altı ABD doları'], + [419645, 'TRL', 'dört bin yüz doksan altı Türk lirası kırk beş kuruş'], [419645, 'TRY', 'dört bin yüz doksan altı Türk lirası kırk beş kuruş'], [584600, 'USD', 'beş bin sekiz yüz kırk altı ABD doları'], [645900, 'USD', 'altı bin dört yüz elli dokuz ABD doları'],