Skip to content

Commit

Permalink
Changed sorting of active and inactive localizations
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey-helldar committed Jun 28, 2024
1 parent 9dd4dfc commit 0e061ff
Show file tree
Hide file tree
Showing 3 changed files with 159 additions and 159 deletions.
68 changes: 34 additions & 34 deletions src/Integrations/Deepl.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,43 @@ class Deepl extends Integration
* @var array<string>
*/
protected array $map = [
Locale::Arabic->value => LanguageCode::ARABIC,
Locale::Bulgarian->value => LanguageCode::BULGARIAN,
Locale::Chinese->value => LanguageCode::CHINESE,
Locale::ChineseHongKong->value => LanguageCode::CHINESE,
Locale::Czech->value => LanguageCode::CZECH,
Locale::Danish->value => LanguageCode::DANISH,
Locale::Dutch->value => LanguageCode::DUTCH,
Locale::English->value => LanguageCode::ENGLISH,
Locale::Estonian->value => LanguageCode::ESTONIAN,
Locale::Finnish->value => LanguageCode::FINNISH,
Locale::French->value => LanguageCode::FRENCH,
Locale::German->value => LanguageCode::GERMAN,
Locale::GermanSwitzerland->value => LanguageCode::GERMAN,
Locale::Greek->value => LanguageCode::GREEK,
Locale::Hungarian->value => LanguageCode::HUNGARIAN,
Locale::Indonesian->value => LanguageCode::INDONESIAN,
Locale::Italian->value => LanguageCode::ITALIAN,
Locale::Japanese->value => LanguageCode::JAPANESE,
Locale::Korean->value => LanguageCode::KOREAN,
Locale::Latvian->value => LanguageCode::LATVIAN,
Locale::Lithuanian->value => LanguageCode::LITHUANIAN,
Locale::NorwegianBokmal->value => LanguageCode::NORWEGIAN,
Locale::NorwegianNynorsk->value => LanguageCode::NORWEGIAN,
Locale::Polish->value => LanguageCode::POLISH,
Locale::Portuguese->value => LanguageCode::PORTUGUESE,
Locale::PortugueseBrazil->value => LanguageCode::PORTUGUESE_BRAZILIAN,
Locale::Romanian->value => LanguageCode::ROMANIAN,
Locale::Russian->value => LanguageCode::RUSSIAN,
Locale::Slovak->value => LanguageCode::SLOVAK,
Locale::Slovenian->value => LanguageCode::SLOVENIAN,
Locale::Spanish->value => LanguageCode::SPANISH,
Locale::Swedish->value => LanguageCode::SWEDISH,
Locale::Turkish->value => LanguageCode::TURKISH,
Locale::Ukrainian->value => LanguageCode::UKRAINIAN,
// Locale::Afrikaans->value => 'af',
// Locale::Albanian->value => 'sq',
// Locale::Amharic->value => 'am',
Locale::Arabic->value => LanguageCode::ARABIC,
// Locale::Armenian->value => 'hy',
// Locale::Assamese->value => 'as',
// Locale::Azerbaijani->value => 'az',
Expand All @@ -32,53 +65,33 @@ class Deepl extends Integration
// Locale::Bengali->value => 'bn',
// Locale::Bhojpuri->value => 'bho',
// Locale::Bosnian->value => 'bs',
Locale::Bulgarian->value => LanguageCode::BULGARIAN,
// Locale::Catalan->value => 'ca',
// Locale::Cebuano->value => 'ceb',
// Locale::CentralKhmer->value => 'km',
Locale::Chinese->value => LanguageCode::CHINESE,
Locale::ChineseHongKong->value => LanguageCode::CHINESE,
// Locale::ChineseT->value => 'zh_TW',
// Locale::Croatian->value => 'hr',
Locale::Czech->value => LanguageCode::CZECH,
Locale::Danish->value => LanguageCode::DANISH,
// Locale::Dogri->value => 'doi',
Locale::Dutch->value => LanguageCode::DUTCH,
Locale::English->value => LanguageCode::ENGLISH,
// Locale::Esperanto->value => 'eo',
Locale::Estonian->value => LanguageCode::ESTONIAN,
// Locale::Ewe->value => 'ee',
Locale::Finnish->value => LanguageCode::FINNISH,
Locale::French->value => LanguageCode::FRENCH,
// Locale::Frisian->value => 'fy',
// Locale::Galician->value => 'gl',
// Locale::Georgian->value => 'ka',
Locale::German->value => LanguageCode::GERMAN,
Locale::GermanSwitzerland->value => LanguageCode::GERMAN,
Locale::Greek->value => LanguageCode::GREEK,
// Locale::Gujarati->value => 'gu',
// Locale::Hausa->value => 'ha',
// Locale::Hawaiian->value => 'haw',
// Locale::Hebrew->value => 'he',
// Locale::Hindi->value => 'hi',
Locale::Hungarian->value => LanguageCode::HUNGARIAN,
// Locale::Icelandic->value => 'is',
// Locale::Igbo->value => 'ig',
Locale::Indonesian->value => LanguageCode::INDONESIAN,
// Locale::Irish->value => 'ga',
Locale::Italian->value => LanguageCode::ITALIAN,
Locale::Japanese->value => LanguageCode::JAPANESE,
// Locale::Kannada->value => 'kn',
// Locale::Kazakh->value => 'kk',
// Locale::Kinyarwanda->value => 'rw',
Locale::Korean->value => LanguageCode::KOREAN,
// Locale::Kurdish->value => 'ku',
// Locale::KurdishSorani->value => 'ckb',
// Locale::Kyrgyz->value => 'ky',
// Locale::Lao->value => 'lo',
Locale::Latvian->value => LanguageCode::LATVIAN,
// Locale::Lingala->value => 'ln',
Locale::Lithuanian->value => LanguageCode::LITHUANIAN,
// Locale::Luganda->value => 'lg',
// Locale::Luxembourgish->value => 'lb',
// Locale::Macedonian->value => 'mk',
Expand All @@ -93,21 +106,14 @@ class Deepl extends Integration
// Locale::Mongolian->value => 'mn',
// Locale::MyanmarBurmese->value => 'my',
// Locale::Nepali->value => 'ne',
Locale::NorwegianBokmal->value => LanguageCode::NORWEGIAN,
Locale::NorwegianNynorsk->value => LanguageCode::NORWEGIAN,
// Locale::Occitan->value => 'oc',
// Locale::OdiaOriya->value => 'or',
// Locale::Oromo->value => 'om',
// Locale::Pashto->value => 'ps',
// Locale::Persian->value => 'fa',
// Locale::Pilipino->value => 'fil',
Locale::Polish->value => LanguageCode::POLISH,
Locale::Portuguese->value => LanguageCode::PORTUGUESE,
Locale::PortugueseBrazil->value => LanguageCode::PORTUGUESE_BRAZILIAN,
// Locale::Punjabi->value => 'pa',
// Locale::Quechua->value => 'qu',
Locale::Romanian->value => LanguageCode::ROMANIAN,
Locale::Russian->value => LanguageCode::RUSSIAN,
// Locale::Sanskrit->value => 'sa',
// Locale::Sardinian->value => 'sc',
// Locale::ScotsGaelic->value => 'gd',
Expand All @@ -117,25 +123,19 @@ class Deepl extends Integration
// Locale::Shona->value => 'sn',
// Locale::Sindhi->value => 'sd',
// Locale::Sinhala->value => 'si',
Locale::Slovak->value => LanguageCode::SLOVAK,
Locale::Slovenian->value => LanguageCode::SLOVENIAN,
// Locale::Somali->value => 'so',
Locale::Spanish->value => LanguageCode::SPANISH,
// Locale::Sundanese->value => 'su',
// Locale::Swahili->value => 'sw',
Locale::Swedish->value => LanguageCode::SWEDISH,
// Locale::Tagalog->value => 'tl',
// Locale::Tajik->value => 'tg',
// Locale::Tamil->value => 'ta',
// Locale::Tatar->value => 'tt',
// Locale::Telugu->value => 'te',
// Locale::Thai->value => 'th',
// Locale::Tigrinya->value => 'ti',
Locale::Turkish->value => LanguageCode::TURKISH,
// Locale::Turkmen->value => 'tk',
// Locale::TwiAkan->value => 'ak',
// Locale::Uighur->value => 'ug',
Locale::Ukrainian->value => LanguageCode::UKRAINIAN,
// Locale::Urdu->value => 'ur',
// Locale::UzbekCyrillic->value => 'uz_Cyrl',
// Locale::UzbekLatin->value => 'uz_Latn',
Expand Down
66 changes: 33 additions & 33 deletions src/Integrations/Google.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,42 +105,42 @@ class Google extends Integration
Locale::Romanian->value => 'ro',
Locale::Russian->value => 'ru',
Locale::Sanskrit->value => 'sa',
Locale::ScotsGaelic->value => 'gd',
Locale::SerbianCyrillic->value => 'sr',
Locale::Shona->value => 'sn',
Locale::Sindhi->value => 'sd',
Locale::Sinhala->value => 'si',
Locale::Slovak->value => 'sk',
Locale::Slovenian->value => 'sl',
Locale::Somali->value => 'so',
Locale::Spanish->value => 'es',
Locale::Sundanese->value => 'su',
Locale::Swahili->value => 'sw',
Locale::Swedish->value => 'sv',
Locale::Tagalog->value => 'tl',
Locale::Tajik->value => 'tg',
Locale::Tamil->value => 'ta',
Locale::Tatar->value => 'tt',
Locale::Telugu->value => 'te',
Locale::Thai->value => 'th',
Locale::Tigrinya->value => 'ti',
Locale::Turkish->value => 'tr',
Locale::Turkmen->value => 'tk',
Locale::TwiAkan->value => 'ak',
Locale::Uighur->value => 'ug',
Locale::Ukrainian->value => 'uk',
Locale::Urdu->value => 'ur',
Locale::UzbekCyrillic->value => 'uz',
Locale::Vietnamese->value => 'vi',
Locale::Welsh->value => 'cy',
Locale::Xhosa->value => 'xh',
Locale::Yiddish->value => 'yi',
Locale::Yoruba->value => 'yo',
Locale::Zulu->value => 'zu',
// Locale::Sardinian->value => 'sc',
Locale::ScotsGaelic->value => 'gd',
Locale::SerbianCyrillic->value => 'sr',
// Locale::SerbianLatin->value => 'sr_Latn',
// Locale::SerbianMontenegrin->value => 'sr_Latn_ME',
Locale::Shona->value => 'sn',
Locale::Sindhi->value => 'sd',
Locale::Sinhala->value => 'si',
Locale::Slovak->value => 'sk',
Locale::Slovenian->value => 'sl',
Locale::Somali->value => 'so',
Locale::Spanish->value => 'es',
Locale::Sundanese->value => 'su',
Locale::Swahili->value => 'sw',
Locale::Swedish->value => 'sv',
Locale::Tagalog->value => 'tl',
Locale::Tajik->value => 'tg',
Locale::Tamil->value => 'ta',
Locale::Tatar->value => 'tt',
Locale::Telugu->value => 'te',
Locale::Thai->value => 'th',
Locale::Tigrinya->value => 'ti',
Locale::Turkish->value => 'tr',
Locale::Turkmen->value => 'tk',
Locale::TwiAkan->value => 'ak',
Locale::Uighur->value => 'ug',
Locale::Ukrainian->value => 'uk',
Locale::Urdu->value => 'ur',
Locale::UzbekCyrillic->value => 'uz',
// Locale::UzbekLatin->value => 'uz_Latn',
Locale::Vietnamese->value => 'vi',
Locale::Welsh->value => 'cy',
Locale::Xhosa->value => 'xh',
Locale::Yiddish->value => 'yi',
Locale::Yoruba->value => 'yo',
Locale::Zulu->value => 'zu',
// Locale::UzbekLatin->value => 'uz_Latn',
];

public static string $integration = GoogleTranslate::class;
Expand Down
Loading

0 comments on commit 0e061ff

Please sign in to comment.