From 552c5c5280dd316a37dafaba13d63afc084a396f Mon Sep 17 00:00:00 2001 From: mkadir Date: Thu, 12 Oct 2023 00:44:43 +0500 Subject: [PATCH 1/5] fix & add some Uzbek words --- README.md | 2 +- src/translations/translations.rs | 89 ++++++++++++++++++++++++++++++ src/translations/translations_2.rs | 25 +++++++++ src/translations/types/language.rs | 8 ++- 4 files changed, 121 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 171d45ab..148f1282 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Multithreaded, cross-platform, reliable
Graphical interface translated in:
-🇬🇧  🇩🇪  🇬🇷  🇪🇦  🇫🇮  🇫🇷  🇮🇹  🇰🇷  🇵🇱  🇵🇹  🇷🇴  🇷🇺  🇸🇪  🇹🇷  🇺🇦  🇨🇳
+🇬🇧  🇩🇪  🇬🇷  🇪🇦  🇫🇮  🇫🇷  🇮🇹  🇰🇷  🇵🇱  🇵🇹  🇷🇴  🇷🇺  🇸🇪  🇹🇷  🇺🇦  🇨🇳 🇺🇿
diff --git a/src/translations/translations.rs b/src/translations/translations.rs index 45cecd33..2121656c 100644 --- a/src/translations/translations.rs +++ b/src/translations/translations.rs @@ -24,6 +24,7 @@ pub fn choose_adapters_translation(language: Language) -> Text<'static, Renderer Language::SV => "Välj nätverksadapter att inspektera", Language::FI => "Valitse tarkasteltava verkkosovitin", Language::JA => "使用するネットワーク アダプターを選択してください", + Language::UZ => "Tekshirish uchun tarmoq adapterini tanlang", }) } @@ -47,6 +48,7 @@ pub fn application_protocol_translation(language: Language) -> &'static str { Language::SV => "Applikationsprotokoll", Language::FI => "Sovellusprotokolla", Language::JA => "アプリケーション プロトコル", + Language::UZ => "Ilova protokoli", } } @@ -70,6 +72,7 @@ pub fn select_filters_translation(language: Language) -> Text<'static, Renderer< Language::SV => "Välj filtren som ska appliceras på nätverkstrafiken", Language::FI => "Valitse suodattimet verkkoliikenteelle", Language::JA => "トラフィックに適用するフィルターを選択してください", + Language::UZ => "Tarmoq trafigiga qo'llaniladigan filtrlarni tanlang", }) } @@ -90,6 +93,7 @@ pub fn start_translation(language: Language) -> &'static str { Language::SV => "Starta!", Language::FI => "Aloita!", Language::JA => "開始!", + Language::UZ => "Boshlash !" } } @@ -111,6 +115,7 @@ pub fn address_translation(language: Language) -> &'static str { Language::SV => "Adress", Language::FI => "Osoite", Language::JA => "アドレス", + Language::UZ => "Manzil", } } @@ -134,6 +139,7 @@ pub fn addresses_translation(language: Language) -> &'static str { Language::SV => "Adresser", Language::FI => "Osoitteet", Language::JA => "アドレス", + Language::UZ => "Manzillar", } } @@ -157,6 +163,8 @@ pub fn ip_version_translation(language: Language) -> Text<'static, Renderer "IP-version", Language::FI => "IP-versio", Language::JA => "IP バージョン", + Language::UZ => "IP versiyasi", + }) } @@ -179,6 +187,7 @@ pub fn transport_protocol_translation(language: Language) -> &'static str { Language::SV => "Transportprotokoll", Language::FI => "Kuljetusprotokolla", Language::JA => "トランスポート プロトコル", + Language::UZ => "Transport protokoli", } } @@ -202,6 +211,7 @@ pub fn traffic_rate_translation(language: Language) -> Text<'static, Renderer "Datafrekvens", Language::FI => "Liikennemäärä", Language::JA => "トラフィック レート", + Language::UZ => "Trafik tezligi", }) } @@ -223,6 +233,7 @@ pub fn traffic_rate_translation(language: Language) -> Text<'static, Renderer "Σχετικές συνδέσεις:", // Language::FA => "پیوند های خویشاوند:", // Language::SE => "Relevanta anslutningar:", + // Language::UZ => "Tegishli ulanishlar:", // }) // } @@ -246,6 +257,7 @@ pub fn settings_translation(language: Language) -> &'static str { Language::SV => "Inställningar", Language::FI => "Asetukset", Language::JA => "設定", + Language::UZ => "Sozlamalar", } } @@ -268,6 +280,7 @@ pub fn yes_translation(language: Language) -> Text<'static, Renderer> // Language::FA => "بله", Language::FI => "Kyllä", Language::JA => "はい", + Language::UZ => "Ha", }) } @@ -291,6 +304,7 @@ pub fn ask_quit_translation(language: Language) -> Text<'static, Renderer "Är du säker på att du vill avsluta analysen?", Language::FI => "Haluatko varmasti lopettaa analyysin?", Language::JA => "分析を終了しますか?", + Language::UZ => "Tahlildan chiqishga ishonchingiz komilmi?" }) } @@ -314,6 +328,8 @@ pub fn quit_analysis_translation(language: Language) -> String { Language::SV => "Avsluta analys".to_string(), Language::FI => "Lopeta analyysi".to_string(), Language::JA => "分析の終了".to_string(), + Language::UZ => "Tahlildan chiqish".to_string(), + } } @@ -337,6 +353,7 @@ pub fn ask_clear_all_translation(language: Language) -> Text<'static, Renderer "Är du säker på att du vill radera notifikationerna?", Language::FI => "Haluatko varmasti tyhjentää ilmoitukset?", Language::JA => "すべての通知を削除します。よろしいですか?", + Language::UZ => "Haqiqatan ham bildirishnomalarni tozalamoqchimisiz?", }) } @@ -360,6 +377,7 @@ pub fn clear_all_translation(language: Language) -> String { Language::SV => "Radera alla".to_string(), Language::FI => "Tyhjennä kaikki".to_string(), Language::JA => "すべて削除".to_string(), + Language::UZ => "Barchasini tozalash".to_string(), } } @@ -383,6 +401,7 @@ pub fn hide_translation(language: Language) -> &'static str { Language::SV => "Göm", Language::FI => "Piilota", Language::JA => "隠す", + Language::UZ => "Yashirish", } } @@ -406,6 +425,7 @@ pub fn network_adapter_translation(language: Language) -> &'static str { Language::SV => "Nätverksadapter", Language::FI => "Verkkosovitin", Language::JA => "ネットワーク アダプター", + Language::UZ => "Tarmoq adapteri", } } @@ -468,6 +488,9 @@ pub fn no_addresses_translation( Language::JA => format!("選択されたアダプターが有効なアドレスを持っていないため、トラフィックを観測できていません...\n\n\ ネットワーク アダプター: {adapter}\n\n\ インターネットに接続しているか確認し、別のネットワーク アダプターを試してください。"), + Language::UZ => format!("Trafik kuzatilmaydi, chunki siz tanlagan adapterda faol manzillar yo‘q...\n\n\ + Tarmoq adapteri: {adapter}\n\n\ + Internetga ulanganingizga ishonchingiz komil bo'lsa, boshqa adapterni tanlashga harakat qiling"), }) } @@ -530,6 +553,10 @@ pub fn waiting_translation( Language::JA => format!("トラフィックがまだ観測できていません。ネットワーク パケットを待っています...\n\n\ ネットワーク アダプター: {adapter}\n\n\ インターネットに接続していて、正しいアダプターを選択していますか?"), + Language::UZ => format!( + "Hali hech qanday trafik aniqlanmadi. Tarmoq paketlari kutilmoqda...\n\n\ + Tarmoq adapteri: {adapter}\n\n\ + Internetga ulanganingizga va to'g'ri adapterni tanlaganingizga ishonchingiz komilmi?"), }) } @@ -592,6 +619,10 @@ pub fn some_observed_translation( Language::JA => format!("取得したパケット数: {observed}\n\n\ フィルター後のパケット数: 0\n\n\ パケットは取得できていますが、設定されたフィルタリングにより表示されません..."), + Language::UZ => format!( + "Jami ushlangan paketlar: {observed}\n\n\ + Filtrlangan paketlar: 0\n\n\ + Tarmoq paketlari ushlandi, lekin ularning hech biri belgilangan filtrlarga mos kelmadi..."), }) } @@ -615,6 +646,7 @@ pub fn filtered_packets_translation(language: Language) -> &'static str { Language::SV => "Filtrerade paket", Language::FI => "Suodatettuja paketteja", Language::JA => "フィルタリングされたパケット", + Language::UZ => "Filtrlangan paketlar", } } @@ -637,6 +669,7 @@ pub fn filtered_bytes_translation(language: Language) -> &'static str { Language::SV => "Filtrerade bytes", Language::FI => "Suodatettuja tavuja", Language::JA => "フィルタリングされたバイト", + Language::UZ => "Filtrlangan baytlar", } } @@ -674,6 +707,7 @@ pub fn of_total_translation(language: Language, percentage: &str) -> String { Language::SV => format!("({percentage} av totalen)"), Language::FI => format!("({percentage} kokonaismäärästä)"), Language::JA => format!("(トータル: {percentage} )"), + Language::UZ => format!("(Jami: {percentage} )"), } } @@ -695,6 +729,7 @@ pub fn of_total_translation(language: Language, percentage: &str) -> String { // Language::EL => "Φιλτραρισμένα πακέτα ανά πρωτόκολλο εφαρμογής:", // Language::FA => "بسته های صاف شده برای هر پیوندنامهٔ درخواست:", // Language::SE => "Filtrerade paket per applikationsprotokoll:", +// Language::UZ => "Har bir dastur protokoli uchun filtrlangan paketlar:", // }) // } @@ -732,6 +767,8 @@ pub fn of_total_translation(language: Language, percentage: &str) -> String { // برای افزودن یک پیوند به پسندیده های خود، روی نشان ستاره کنار پیوند کلیک کنید.", // Language::SE => "Inget att visa för tillfälet.\n\ // För att lägga till anslutningar till dina favoriter, klicka på stjärnsymbolen nära anslutningen.", +// Language::UZ => "Ayni paytda ko‘rsatiladigan hech narsa yo‘q.\n\ +// Ulanishni sevimlilar ro'yhatiga qo'shish uchun ulanish yaqinidagi yulduzcha belgisini bosing." // }) // } @@ -809,6 +846,9 @@ pub fn error_translation(language: Language, error: &str) -> Text<'static, Rende "エラーが発生しました! \n\n\ {error}" ), + Language::UZ => format!( + "Xatolik yuz berdi!\n\n + {error}"), }) } @@ -831,6 +871,7 @@ pub fn both_translation(language: Language) -> &'static str { Language::SV => "båda", Language::FI => "molemmat", Language::JA => "両方", + Language::UZ => "ikkalasi ham", } } @@ -845,6 +886,7 @@ pub fn both_translation(language: Language) -> &'static str { // Language::RU => "Все протоколы", // Language::FA => "همهٔ پیوندنامه ها", // Language::SE => "Alla protokoll", +// Language::SE => "Barcha protokollar" // } // } @@ -867,6 +909,7 @@ pub fn all_translation(language: Language) -> &'static str { Language::SV => "Alla", Language::FI => "Kaikki", Language::JA => "すべて", + Language::UZ => "Barchasi", } } @@ -889,6 +932,7 @@ pub fn packets_translation(language: Language) -> &'static str { // Language::FA => "بسته ها", Language::FI => "paketit", Language::JA => "パケット", + Language::UZ => "paketlar", } } @@ -912,6 +956,7 @@ pub fn packets_chart_translation(language: Language) -> &'static str { Language::SV => "paket per sekund", Language::FI => "pakettia sekunnissa", Language::JA => "1 秒あたりのパケット数", + Language::UZ => "paket soniyasiga", } } @@ -932,6 +977,7 @@ pub fn bytes_translation(language: Language) -> &'static str { // Language::FA => "بایت ها", Language::FI => "tavua", Language::JA => "バイト", + Language::UZ => "bayt", } } @@ -954,6 +1000,7 @@ pub fn bytes_chart_translation(language: Language) -> &'static str { Language::SV => "bytes per sekund", Language::FI => "tavua sekunnissa", Language::JA => "1 秒あたりのバイト量", + Language::UZ => "bayt soniyasiga", } } @@ -977,6 +1024,7 @@ pub fn recent_report_translation(language: Language) -> &'static str { Language::SV => "senaste", Language::FI => "viimeisin", Language::JA => "新しい順", + Language::UZ => "eng so'nggi", } } @@ -1000,6 +1048,7 @@ pub fn packets_report_translation(language: Language) -> &'static str { Language::SV => "flest paket", Language::FI => "eniten paketteja", Language::JA => "パケット数の多い順", + Language::UZ => "eng ko'p paketlar", } } @@ -1023,6 +1072,7 @@ pub fn bytes_report_translation(language: Language) -> &'static str { Language::SV => "flest bytes", Language::FI => "eniten tavuja", Language::JA => "バイト量の多い順", + Language::UZ => "eng ko'p bayt", } } @@ -1043,6 +1093,7 @@ pub fn bytes_report_translation(language: Language) -> &'static str { // Language::EL => "αγαπημένα", // Language::FA => "پسندیده ها", // Language::SE => "favoriter", +// Language::UZ => "sevimlilar", // } // } @@ -1066,6 +1117,7 @@ pub fn notifications_title_translation(language: Language) -> Text<'static, Rend Language::SV => "Anpassa dina notifikationer", Language::FI => "Muokkaa ilmoituksiasi", Language::JA => "通知のカスタマイズ", + Language::UZ => "Bildirishnomalaringizni sozlang", }) } @@ -1089,6 +1141,7 @@ pub fn appearance_title_translation(language: Language) -> Text<'static, Rendere Language::SV => "Välj ditt favorittema", Language::FI => "Valitse suosikkiteemasi", Language::JA => "テーマを選択してください", + Language::UZ => "Sevimli mavzuingizni tanlang", }) } @@ -1112,6 +1165,7 @@ pub fn languages_title_translation(language: Language) -> Text<'static, Renderer Language::SV => "Välj ditt språk", Language::FI => "Valitse kielesi", Language::JA => "表示言語を選択してください", + Language::UZ => "Tilingizni tanlang", }) } @@ -1135,6 +1189,7 @@ pub fn active_filters_translation(language: Language) -> &'static str { Language::SV => "Aktiva filter", Language::FI => "Aktiiviset suodattimet", Language::JA => "適用されているフィルター", + Language::UZ => "Faol filtrlar", } } @@ -1158,6 +1213,7 @@ pub fn none_translation(language: Language) -> String { Language::SV => "inga", Language::FI => "ei mitään", Language::JA => "なし", + Language::UZ => "hech biri", } .to_string() } @@ -1182,6 +1238,7 @@ pub fn yeti_night_translation(language: Language) -> &'static str { Language::SV => "Sniffnets ursprungliga mörka tema", Language::FI => "Sniffnetin alkuperäinen tumma teema", Language::JA => "Sniffnet のオリジナル テーマ", + Language::UZ => "Sniffnet-ning asl qora mavzusi", } } @@ -1204,6 +1261,7 @@ pub fn yeti_day_translation(language: Language) -> &'static str { Language::SV => "Sniffnets ursprungliga ljusa tema", Language::FI => "Sniffnetin alkuperäinen vaalea teema", Language::JA => "Sniffnet のオリジナル ライト テーマ", + Language::UZ => "Sniffnet-ning asl oq mavzusi" } } @@ -1227,6 +1285,7 @@ pub fn deep_sea_translation(language: Language) -> &'static str { Language::SV => "För att dyka ned i nätverkstrafiken", Language::FI => "Sukeltaaksesi verkkoliikenteeseen", Language::JA => "ネットワーク トラフィックにダイブ", + Language::UZ => "Tarmoq trafigiga qo'shilish uchun", } } @@ -1250,6 +1309,7 @@ pub fn mon_amour_translation(language: Language) -> &'static str { Language::SV => "Ljuvligt tema gjort för drömmare", Language::FI => "Ihana teema unelmoijille", Language::JA => "ドリーマーのためのテーマ", + Language::UZ => "Xayolparastlar uchun yaratilgan chiroyli mavzu", } } @@ -1273,6 +1333,7 @@ pub fn incoming_translation(language: Language) -> &'static str { Language::SV => "Inkommande", Language::FI => "Saapuva", Language::JA => "受信", + Language::UZ => "Kiruvchi", } } @@ -1296,6 +1357,7 @@ pub fn outgoing_translation(language: Language) -> &'static str { Language::SV => "Utgående", Language::FI => "Lähtevä", Language::JA => "送信", + Language::UZ => "Chiquvchi", } } @@ -1317,6 +1379,7 @@ pub fn notifications_translation(language: Language) -> &'static str { // Language::FA => "اعلان ها", Language::SV => "Notifikationer", Language::FI => "Ilmoitukset", + Language::UZ => "Bildirishnomalar", } } @@ -1334,6 +1397,7 @@ pub fn style_translation(language: Language) -> &'static str { // Language::FA => "شیوه", Language::FI => "Tyyli", Language::JA => "スタイル", + Language::UZ => "Uslub", } } @@ -1357,6 +1421,7 @@ pub fn language_translation(language: Language) -> &'static str { Language::SV => "Språk", Language::FI => "Kieli", Language::JA => "表示言語", + Language::UZ => "Til", } } @@ -1380,6 +1445,7 @@ pub fn overview_translation(language: Language) -> &'static str { Language::SV => "Översikt", Language::FI => "Yleiskatsaus", Language::JA => "概要", + Language::UZ => "Ko'rib chiqish", } } @@ -1403,6 +1469,8 @@ pub fn packets_threshold_translation(language: Language) -> &'static str { Language::SV => "Notifiera mig när en paketgräns har överstigits", Language::FI => "Ilmoita minulle, kun pakettiraja on ylittynyt", Language::JA => "パケット数の閾値を超過した場合に通知する", + Language::UZ => "Paket chegarasi oshib ketganda xabar bering", + } } @@ -1426,6 +1494,7 @@ pub fn bytes_threshold_translation(language: Language) -> &'static str { Language::SV => "Notifiera mig när en gräns för bytes har överstigits", Language::FI => "Ilmoita minulle, kun tavuraja on ylittynyt", Language::JA => "バイト量の閾値を超過した場合に通知する", + Language::UZ => "Bayt chegarasi oshib ketganda menga xabar bering" } } @@ -1447,6 +1516,7 @@ pub fn per_second_translation(language: Language) -> &'static str { // Language::FA => "(در ثانیه)", Language::SV => "(per sekund)", Language::FI => "(sekunnissa)", + Language::UZ => "(soniyasiga)", } } @@ -1470,6 +1540,7 @@ pub fn specify_multiples_translation(language: Language) -> &'static str { Language::SV => "; du kan också ange 'K', 'M' och 'G'", Language::FI => "; voit myös määrittää 'K', 'M' tai 'G'", Language::JA => "; 'K', 'M', 'G' が選択可能です", + Language::UZ => "; 'K', 'M' va 'G' ni ham belgilashingiz mumkin", } } @@ -1495,6 +1566,7 @@ pub fn favorite_notification_translation(language: Language) -> &'static str { Language::SV => "Notifiera mig när ny data utbyts av mina favoriter", Language::FI => "Ilmoita minulle, kun suosikkini vaihtavat uusia tietoja", Language::JA => "お気に入りに指定したホストに関してデータ送受信があった場合に通知する", + Language::UZ => "Sevimlilar ro'yhatidan yangi ma'lumotlar almashganda xabar bering", } } @@ -1518,6 +1590,7 @@ pub fn threshold_translation(language: Language) -> String { Language::SV => "Gräns".to_string(), Language::FI => "Raja".to_string(), Language::JA => "閾値".to_string(), + Language::UZ => "Eshik".to_string(), } } @@ -1537,6 +1610,7 @@ pub fn volume_translation(language: Language) -> &'static str { // Language::FA => "حجم", Language::SV => "Volym", Language::FI => "Äänenvoimakkuus", + Language::UZ => "Ovoz balandligi", } } @@ -1558,6 +1632,7 @@ pub fn sound_translation(language: Language) -> &'static str { // Language::FA => "صدا", Language::SV => "Ljud", Language::FI => "Ääni", + Language::UZ => "Ovoz", } } @@ -1581,6 +1656,7 @@ pub fn open_report_translation(language: Language) -> &'static str { Language::SV => "Öppna fullständig rapport", Language::FI => "Avaa koko raportti", Language::JA => "詳細なレポートを開く", + Language::UZ => "To'liq hisobotni ochish", } } @@ -1604,6 +1680,7 @@ pub fn bytes_exceeded_translation(language: Language) -> &'static str { Language::SV => "Gräns för bytes överskriden!", Language::FI => "Tavuraja ylitetty!", Language::JA => "バイト量の閾値を調査しました!", + Language::UZ => "Bayt chegarasidan oshib ketdi!", } } @@ -1627,6 +1704,7 @@ pub fn bytes_exceeded_value_translation(language: Language, value: &str) -> Stri Language::SV => format!("{value} har utbytts"), Language::FI => format!("{value} on vaihdettu"), Language::JA => format!("{value} の送受信が発生しました"), + Language::UZ => format!("{value} ma'lumot almashinuvi"), } } @@ -1650,6 +1728,7 @@ pub fn packets_exceeded_translation(language: Language) -> &'static str { Language::SV => "Paketgräns överskriden!", Language::FI => "Pakettiraja ylitetty!", Language::JA => "パケット数のしきい値を超過しました!", + Language::UZ => "Paket chegarasidan oshib ketdi!", } } @@ -1694,6 +1773,7 @@ pub fn packets_exceeded_value_translation(language: Language, value: u32) -> Str npackets => format!("{npackets} pakettia vaihdettu"), }, Language::JA => format!("{value} パケットの送受信が発生しました"), + Language::UZ => format!("{value} paket uzatildi"), } } @@ -1717,6 +1797,7 @@ pub fn favorite_transmitted_translation(language: Language) -> &'static str { Language::SV => "Ny data utbytt av favoriter!", Language::FI => "Uusia tietoja vaihdettu suosikeista!", Language::JA => "お気に入りのホストで新しいデータ送受信が発生しました!", + Language::UZ => "Sevimli ulanishlar ro'yhatida yangi ma'lumotlar almashinuvi!" } } @@ -1776,6 +1857,9 @@ pub fn no_notifications_set_translation(language: Language) -> Text<'static, Ren Language::JA => "まだ通知を有効にしていません!\n\n\ 有効化後、このページ上で通知のログが確認できます。\n\n\ 通知設定は設定画面から変更可能です:", + Language::UZ => "Siz hali bildirishnomalarni yoqmagansiz!\n\n\ + Ularni faollashtirgandan so'ng, bu sahifada bildirishnomalaringiz jurnali ko'rsatiladi\n\n\ + Sozlamalardan bildirishnomalarni yoqishingiz mumkin:", }) } @@ -1854,6 +1938,10 @@ pub fn no_notifications_received_translation( Language::JA => { "通知はまだ何もありません...\n\n\ 通知があると、ここに表示されます" + }, + Language::UZ => { + "Ayni paytda ko'rsatiladigan hech narsa yo'q...\n\n\ + Bildirishnomalar kelganda, ular shu yerda ko'rsatiladi" } }) } @@ -1878,5 +1966,6 @@ pub fn only_last_30_translation(language: Language) -> &'static str { Language::SV => "Endast de senaste 30 notifikationerna visas", Language::FI => "Vain viimeiset 30 ilmoitusta näytetään", Language::JA => "最新の通知 30 件のみ表示されます", + Language::UZ => "Faqat oxirgi 30 ta bildirishnoma ko'rsatiladi", } } diff --git a/src/translations/translations_2.rs b/src/translations/translations_2.rs index 217dbf3c..cb8b1202 100644 --- a/src/translations/translations_2.rs +++ b/src/translations/translations_2.rs @@ -21,6 +21,7 @@ pub fn new_version_available_translation(language: Language) -> &'static str { Language::PL => "Nowsza wersja jest dostępna!", Language::FR => "Une nouvelle version est disponible!", Language::JA => "新しいバージョンが利用可能になりました!", + Language::UZ => "Yangi versiya mavjud!", _ => "A newer version is available!", } } @@ -43,6 +44,7 @@ pub fn inspect_translation(language: Language) -> &'static str { Language::UK => "Інспектувати", Language::RO => "Inspectați", Language::JA => "検査", + Language::UZ => "Tekshirish", _ => "Inspect", } } @@ -65,6 +67,7 @@ pub fn connection_details_translation(language: Language) -> &'static str { Language::PL => "Szczegóły połączenia", Language::FR => "Détails de la connexion", Language::JA => "接続の詳細", + Language::UZ => "Ulanish tafsilotlari", _ => "Connection details", } } @@ -87,6 +90,7 @@ pub fn dropped_packets_translation(language: Language) -> &'static str { Language::PL => "Utracone pakiety", Language::FR => "Packets perdus", Language::JA => "ドロップしたパケット", + Language::UZ => "Yig'ilgan paketlar", _ => "Dropped packets", } } @@ -109,6 +113,7 @@ pub fn data_representation_translation(language: Language) -> &'static str { Language::PL => "Reprezentacja danych", Language::FR => "Représentation de données", Language::JA => "データ表示", + Language::UZ => "Ma'lumotlarni taqdim etish", _ => "Data representation", } } @@ -131,6 +136,7 @@ pub fn host_translation(language: Language) -> &'static str { Language::PL => "Host sieciowy", Language::FR => "Host réseaux", Language::JA => "ネットワーク ホスト", + Language::UZ => "Tarmoq serveri", _ => "Network host", } } @@ -153,6 +159,7 @@ pub fn only_top_30_hosts_translation(language: Language) -> &'static str { Language::PL => "Tylko 30 pierwszych hostów jest wyświetlanych", Language::FR => "Seuls les 30 premiers hôtes sont affichés ici", Language::JA => "上位 30 件のホストのみが表示されます", + Language::UZ => "Bu erda faqat dastlabki 30 ta server ko'rsatiladi", _ => "Only the top 30 hosts are displayed here", } } @@ -175,6 +182,7 @@ pub fn sort_by_translation(language: Language) -> &'static str { Language::PL => "Sortuj według", Language::FR => "Trier par", Language::JA => "ソート", + Language::UZ => "Saralash turi", _ => "Sort by", } } @@ -197,6 +205,7 @@ pub fn local_translation(language: Language) -> String { Language::PL => "Sieć lokalna", Language::FR => "Réseau local", Language::JA => "ローカル ネットワーク", + Language::UZ => "Mahalliy tarmoq", _ => "Local network", } .to_string() @@ -220,6 +229,7 @@ pub fn unknown_translation(language: Language) -> String { Language::PL => "Nieznana lokalizacja", Language::FR => "Localisation inconnue", Language::JA => "不明なロケーション", + Language::UZ => "Noma'lum joylashuv", _ => "Unknown location", } .to_string() @@ -243,6 +253,7 @@ pub fn your_network_adapter_translation(language: Language) -> String { Language::PL => "Twój adapter sieciowy", Language::FR => "Votre carte réseau", Language::JA => "自身のネットワーク アダプター", + Language::UZ => "Sizning tarmoq adapteringiz", _ => "Your network adapter", } .to_string() @@ -266,6 +277,7 @@ pub fn socket_address_translation(language: Language) -> &'static str { Language::PL => "Adres gniazda", Language::FR => "Adresse du socket", Language::JA => "ソケット アドレス", + Language::UZ => "Soket manzili", _ => "Socket address", } } @@ -288,6 +300,7 @@ pub fn mac_address_translation(language: Language) -> &'static str { Language::PL => "Adres MAC", Language::FR => "Adresse MAC", Language::JA => "MAC アドレス", + Language::UZ => "MAC manzili", _ => "MAC address", } } @@ -310,6 +323,7 @@ pub fn source_translation(language: Language) -> &'static str { Language::PL => "Źródło", Language::FR => "Source", Language::JA => "送信元", + Language::UZ => "Manba", _ => "Source", } } @@ -331,6 +345,7 @@ pub fn destination_translation(language: Language) -> &'static str { Language::PL => "Miejsce docelowe", // Depending on context these two are also valid: "Przeznaczenie" / "Cel" Language::FR => "Destination", Language::JA => "送信先", + Language::UZ => "Qabul qiluvchi", _ => "Destination", } } @@ -352,6 +367,7 @@ pub fn fqdn_translation(language: Language) -> &'static str { Language::RO => "Nume de domeniu complet calificat", Language::PL => "Pełna nazwa domeny", Language::FR => "Nom de domaine complètement qualifié", + Language::UZ => "To'liq domen nomi", _ => "Fully qualified domain name", } } @@ -374,6 +390,7 @@ pub fn administrative_entity_translation(language: Language) -> &'static str { Language::PL => "Nazwa autonomicznego systemu", Language::FR => "Nom du système autonome", Language::JA => "AS 名", + Language::UZ => "Avtonom tizim nomi", _ => "Autonomous System name", } } @@ -396,6 +413,7 @@ pub fn transmitted_data_translation(language: Language) -> &'static str { Language::PL => "Przesłane dane", Language::FR => "Données transmises", Language::JA => "転送データ", + Language::UZ => "Uzatilgan ma'lumotlar", _ => "Transmitted data", } } @@ -418,6 +436,7 @@ pub fn country_translation(language: Language) -> &'static str { Language::PL => "Kraj", Language::FR => "Pays", Language::JA => "国", + Language::UZ => "Davlat", _ => "Country", } } @@ -440,6 +459,7 @@ pub fn domain_name_translation(language: Language) -> &'static str { Language::PL => "Nazwa domeny", Language::FR => "Nom de domaine", Language::JA => "ドメイン名", + Language::UZ => "Domen nomi", _ => "Domain name", } } @@ -462,6 +482,7 @@ pub fn only_show_favorites_translation(language: Language) -> &'static str { Language::PL => "Pokaż tylko ulubione", Language::FR => "Afficher uniquement les favoris", Language::JA => "お気に入りのみを表示する", + Language::UZ => "Faqat sevimlilarni ko'rsatish", _ => "Only show favorites", } } @@ -484,6 +505,7 @@ pub fn search_filters_translation(language: Language) -> &'static str { Language::PL => "Filtry wyszukiwania", Language::FR => "Filtres de recherche", Language::JA => "検索フィルター", + Language::UZ => "Qidiruv filtrlari", _ => "Search filters", } } @@ -506,6 +528,7 @@ pub fn no_search_results_translation(language: Language) -> &'static str { Language::PL => "Brak wyników zgodnych z określonymi filtrami wyszukiwania", Language::FR => "Aucun résultat disponible selon les filtres de recherche spécifiés", Language::JA => "指定されたフィルター条件で表示できる結果はありません", + Language::UZ => "Belgilangan qidiruv filtrlari bo'yicha hech qanday natija mavjud emas", _ => "No result available according to the specified search filters", } } @@ -533,6 +556,7 @@ pub fn showing_results_translation( Language::PL => format!("Wyświetlanie {start}-{end} z {total} wyników"), Language::FR => format!("Affichage de {start}-{end} de {total} résultats totaux"), Language::JA => format!("{total} 件中の {start}-{end} 件を表示"), + Language::UZ => format!("Jami {total} natijadan {start}-{end} ko'rsatilyapti"), _ => format!("Showing {start}-{end} of {total} total results"), } } @@ -556,6 +580,7 @@ pub fn color_gradients_translation(language: Language) -> &'static str { Language::PL => "Zastosuj gradient kolorów", Language::FR => "Appliquer des gradients de couleur", Language::JA => "グラデーションを適用する", + Language::UZ => "Rang gradientlarini qo'llang", _ => "Apply color gradients", } } diff --git a/src/translations/types/language.rs b/src/translations/types/language.rs index d4d0eb08..a9458e5f 100644 --- a/src/translations/types/language.rs +++ b/src/translations/types/language.rs @@ -4,7 +4,7 @@ use iced::{Length, Renderer}; use serde::{Deserialize, Serialize}; use crate::countries::flags_pictures::{ - CN, DE, ES, FI, FLAGS_WIDTH_SMALL, FR, GB, GR, IT, JP, KR, PL, PT, RO, RU, SE, TR, UA, + CN, DE, ES, FI, FLAGS_WIDTH_SMALL, FR, GB, GR, IT, JP, KR, PL, PT, RO, RU, SE, TR, UA, UZ }; use crate::StyleType; @@ -47,6 +47,8 @@ pub enum Language { FI, /// Japanese JA, + /// O'zbek tili + UZ, } impl Default for Language { @@ -56,7 +58,7 @@ impl Default for Language { } impl Language { - pub(crate) const ROW1: [Language; 1] = [Language::EN]; + pub(crate) const ROW1: [Language; 2] = [Language::EN, Language::UZ]; pub(crate) const ROW2: [Language; 4] = [Language::DE, Language::EL, Language::ES, Language::FI]; pub(crate) const ROW3: [Language; 4] = [Language::FR, Language::IT, Language::JA, Language::KO]; pub(crate) const ROW4: [Language; 4] = [Language::PL, Language::PT, Language::RO, Language::RU]; @@ -82,6 +84,7 @@ impl Language { Language::SV => "Svenska", Language::FI => "Suomi", Language::JA => "日本語", + Language::UZ => "O'zbek tili" } } @@ -105,6 +108,7 @@ impl Language { Language::SV => SE, Language::FI => FI, Language::JA => JP, + Language::UZ => UZ, }))) .width(Length::Fixed(FLAGS_WIDTH_SMALL)) } From 764fa30f48ff4e3983d594baa5a6bade8328e246 Mon Sep 17 00:00:00 2001 From: Giuliano Bellini s294739 Date: Sat, 21 Oct 2023 11:25:29 +0200 Subject: [PATCH 2/5] cargo fmt & clippy --- README.md | 2 +- src/translations/translations.rs | 25 +++++++++++-------------- src/translations/types/language.rs | 4 ++-- 3 files changed, 14 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 148f1282..171d45ab 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Multithreaded, cross-platform, reliable
Graphical interface translated in:
-🇬🇧  🇩🇪  🇬🇷  🇪🇦  🇫🇮  🇫🇷  🇮🇹  🇰🇷  🇵🇱  🇵🇹  🇷🇴  🇷🇺  🇸🇪  🇹🇷  🇺🇦  🇨🇳 🇺🇿
+🇬🇧  🇩🇪  🇬🇷  🇪🇦  🇫🇮  🇫🇷  🇮🇹  🇰🇷  🇵🇱  🇵🇹  🇷🇴  🇷🇺  🇸🇪  🇹🇷  🇺🇦  🇨🇳
diff --git a/src/translations/translations.rs b/src/translations/translations.rs index 2121656c..60232aff 100644 --- a/src/translations/translations.rs +++ b/src/translations/translations.rs @@ -93,7 +93,7 @@ pub fn start_translation(language: Language) -> &'static str { Language::SV => "Starta!", Language::FI => "Aloita!", Language::JA => "開始!", - Language::UZ => "Boshlash !" + Language::UZ => "Boshlash !", } } @@ -164,7 +164,6 @@ pub fn ip_version_translation(language: Language) -> Text<'static, Renderer "IP-versio", Language::JA => "IP バージョン", Language::UZ => "IP versiyasi", - }) } @@ -233,7 +232,7 @@ pub fn traffic_rate_translation(language: Language) -> Text<'static, Renderer "Σχετικές συνδέσεις:", // Language::FA => "پیوند های خویشاوند:", // Language::SE => "Relevanta anslutningar:", - // Language::UZ => "Tegishli ulanishlar:", +// Language::UZ => "Tegishli ulanishlar:", // }) // } @@ -304,7 +303,7 @@ pub fn ask_quit_translation(language: Language) -> Text<'static, Renderer "Är du säker på att du vill avsluta analysen?", Language::FI => "Haluatko varmasti lopettaa analyysin?", Language::JA => "分析を終了しますか?", - Language::UZ => "Tahlildan chiqishga ishonchingiz komilmi?" + Language::UZ => "Tahlildan chiqishga ishonchingiz komilmi?", }) } @@ -329,7 +328,6 @@ pub fn quit_analysis_translation(language: Language) -> String { Language::FI => "Lopeta analyysi".to_string(), Language::JA => "分析の終了".to_string(), Language::UZ => "Tahlildan chiqish".to_string(), - } } @@ -848,7 +846,8 @@ pub fn error_translation(language: Language, error: &str) -> Text<'static, Rende ), Language::UZ => format!( "Xatolik yuz berdi!\n\n - {error}"), + {error}" + ), }) } @@ -886,7 +885,7 @@ pub fn both_translation(language: Language) -> &'static str { // Language::RU => "Все протоколы", // Language::FA => "همهٔ پیوندنامه ها", // Language::SE => "Alla protokoll", -// Language::SE => "Barcha protokollar" +// Language::SE => "Barcha protokollar" // } // } @@ -972,12 +971,11 @@ pub fn bytes_translation(language: Language) -> &'static str { Language::ZH => "网络流量", Language::RO => "octeți", Language::KO => "바이트", - Language::TR => "bayt", + Language::TR | Language::UZ => "bayt", Language::RU => "байтов", // Language::FA => "بایت ها", Language::FI => "tavua", Language::JA => "バイト", - Language::UZ => "bayt", } } @@ -1261,7 +1259,7 @@ pub fn yeti_day_translation(language: Language) -> &'static str { Language::SV => "Sniffnets ursprungliga ljusa tema", Language::FI => "Sniffnetin alkuperäinen vaalea teema", Language::JA => "Sniffnet のオリジナル ライト テーマ", - Language::UZ => "Sniffnet-ning asl oq mavzusi" + Language::UZ => "Sniffnet-ning asl oq mavzusi", } } @@ -1470,7 +1468,6 @@ pub fn packets_threshold_translation(language: Language) -> &'static str { Language::FI => "Ilmoita minulle, kun pakettiraja on ylittynyt", Language::JA => "パケット数の閾値を超過した場合に通知する", Language::UZ => "Paket chegarasi oshib ketganda xabar bering", - } } @@ -1494,7 +1491,7 @@ pub fn bytes_threshold_translation(language: Language) -> &'static str { Language::SV => "Notifiera mig när en gräns för bytes har överstigits", Language::FI => "Ilmoita minulle, kun tavuraja on ylittynyt", Language::JA => "バイト量の閾値を超過した場合に通知する", - Language::UZ => "Bayt chegarasi oshib ketganda menga xabar bering" + Language::UZ => "Bayt chegarasi oshib ketganda menga xabar bering", } } @@ -1797,7 +1794,7 @@ pub fn favorite_transmitted_translation(language: Language) -> &'static str { Language::SV => "Ny data utbytt av favoriter!", Language::FI => "Uusia tietoja vaihdettu suosikeista!", Language::JA => "お気に入りのホストで新しいデータ送受信が発生しました!", - Language::UZ => "Sevimli ulanishlar ro'yhatida yangi ma'lumotlar almashinuvi!" + Language::UZ => "Sevimli ulanishlar ro'yhatida yangi ma'lumotlar almashinuvi!", } } @@ -1938,7 +1935,7 @@ pub fn no_notifications_received_translation( Language::JA => { "通知はまだ何もありません...\n\n\ 通知があると、ここに表示されます" - }, + } Language::UZ => { "Ayni paytda ko'rsatiladigan hech narsa yo'q...\n\n\ Bildirishnomalar kelganda, ular shu yerda ko'rsatiladi" diff --git a/src/translations/types/language.rs b/src/translations/types/language.rs index a9458e5f..28a3b71e 100644 --- a/src/translations/types/language.rs +++ b/src/translations/types/language.rs @@ -4,7 +4,7 @@ use iced::{Length, Renderer}; use serde::{Deserialize, Serialize}; use crate::countries::flags_pictures::{ - CN, DE, ES, FI, FLAGS_WIDTH_SMALL, FR, GB, GR, IT, JP, KR, PL, PT, RO, RU, SE, TR, UA, UZ + CN, DE, ES, FI, FLAGS_WIDTH_SMALL, FR, GB, GR, IT, JP, KR, PL, PT, RO, RU, SE, TR, UA, UZ, }; use crate::StyleType; @@ -84,7 +84,7 @@ impl Language { Language::SV => "Svenska", Language::FI => "Suomi", Language::JA => "日本語", - Language::UZ => "O'zbek tili" + Language::UZ => "O'zbek tili", } } From 3a67964f806dd064cd6dc0e96a000818e99c4548 Mon Sep 17 00:00:00 2001 From: Giuliano Bellini s294739 Date: Sat, 21 Oct 2023 11:54:45 +0200 Subject: [PATCH 3/5] updated settings language page --- src/gui/components/radio.rs | 4 ++-- src/gui/pages/settings_language_page.rs | 9 +++++---- src/translations/translations.rs | 4 ++-- src/translations/types/language.rs | 15 ++++++++------- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/gui/components/radio.rs b/src/gui/components/radio.rs index 0835e261..538cdea2 100644 --- a/src/gui/components/radio.rs +++ b/src/gui/components/radio.rs @@ -79,7 +79,7 @@ pub fn language_radios( Row::new().align_items(Alignment::Center).push( Row::new() .align_items(Alignment::Center) - .width(Length::Fixed(180.0)) + .width(Length::Fixed(200.0)) .push( Radio::new( format!("{} ({:?})", option.get_radio_label(), option), @@ -91,7 +91,7 @@ pub fn language_radios( .font(font) .size(15), ) - .push(horizontal_space(Length::Fixed(8.0))) + .push(horizontal_space(Length::Fixed(15.0))) .push(option.get_flag()), ), ); diff --git a/src/gui/pages/settings_language_page.rs b/src/gui/pages/settings_language_page.rs index 25606238..72b3c0db 100644 --- a/src/gui/pages/settings_language_page.rs +++ b/src/gui/pages/settings_language_page.rs @@ -24,15 +24,16 @@ pub fn settings_language_page(sniffer: &Sniffer) -> Container Container format!("選択されたアダプターが有効なアドレスを持っていないため、トラフィックを観測できていません...\n\n\ ネットワーク アダプター: {adapter}\n\n\ インターネットに接続しているか確認し、別のネットワーク アダプターを試してください。"), - Language::UZ => format!("Trafik kuzatilmaydi, chunki siz tanlagan adapterda faol manzillar yo‘q...\n\n\ + Language::UZ => format!("Trafik kuzatilmaydi, chunki siz tanlagan adapterda faol manzillar yo'q...\n\n\ Tarmoq adapteri: {adapter}\n\n\ Internetga ulanganingizga ishonchingiz komil bo'lsa, boshqa adapterni tanlashga harakat qiling"), }) @@ -765,7 +765,7 @@ pub fn of_total_translation(language: Language, percentage: &str) -> String { // برای افزودن یک پیوند به پسندیده های خود، روی نشان ستاره کنار پیوند کلیک کنید.", // Language::SE => "Inget att visa för tillfälet.\n\ // För att lägga till anslutningar till dina favoriter, klicka på stjärnsymbolen nära anslutningen.", -// Language::UZ => "Ayni paytda ko‘rsatiladigan hech narsa yo‘q.\n\ +// Language::UZ => "Ayni paytda ko'rsatiladigan hech narsa yo'q.\n\ // Ulanishni sevimlilar ro'yhatiga qo'shish uchun ulanish yaqinidagi yulduzcha belgisini bosing." // }) // } diff --git a/src/translations/types/language.rs b/src/translations/types/language.rs index 28a3b71e..7eaf6d4f 100644 --- a/src/translations/types/language.rs +++ b/src/translations/types/language.rs @@ -47,7 +47,7 @@ pub enum Language { FI, /// Japanese JA, - /// O'zbek tili + /// Uzbek UZ, } @@ -58,11 +58,12 @@ impl Default for Language { } impl Language { - pub(crate) const ROW1: [Language; 2] = [Language::EN, Language::UZ]; - pub(crate) const ROW2: [Language; 4] = [Language::DE, Language::EL, Language::ES, Language::FI]; - pub(crate) const ROW3: [Language; 4] = [Language::FR, Language::IT, Language::JA, Language::KO]; - pub(crate) const ROW4: [Language; 4] = [Language::PL, Language::PT, Language::RO, Language::RU]; - pub(crate) const ROW5: [Language; 4] = [Language::SV, Language::TR, Language::UK, Language::ZH]; + pub(crate) const ROW1: [Language; 3] = [Language::EN, Language::DE, Language::EL]; + pub(crate) const ROW2: [Language; 3] = [Language::ES, Language::FI, Language::FR]; + pub(crate) const ROW3: [Language; 3] = [Language::IT, Language::JA, Language::KO]; + pub(crate) const ROW4: [Language; 3] = [Language::PL, Language::PT, Language::RO]; + pub(crate) const ROW5: [Language; 3] = [Language::RU, Language::SV, Language::TR]; + pub(crate) const ROW6: [Language; 3] = [Language::UK, Language::UZ, Language::ZH]; pub fn get_radio_label(&self) -> &str { match self { @@ -84,7 +85,7 @@ impl Language { Language::SV => "Svenska", Language::FI => "Suomi", Language::JA => "日本語", - Language::UZ => "O'zbek tili", + Language::UZ => "O'zbekcha", } } From e914f8a8cc792803c4df79dbd002d5d94686edcd Mon Sep 17 00:00:00 2001 From: Giuliano Bellini s294739 Date: Sat, 21 Oct 2023 12:20:20 +0200 Subject: [PATCH 4/5] minor fixes to Uzbek translation --- src/translations/translations.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/translations/translations.rs b/src/translations/translations.rs index 2e56ecff..c97d4f51 100644 --- a/src/translations/translations.rs +++ b/src/translations/translations.rs @@ -93,7 +93,7 @@ pub fn start_translation(language: Language) -> &'static str { Language::SV => "Starta!", Language::FI => "Aloita!", Language::JA => "開始!", - Language::UZ => "Boshlash !", + Language::UZ => "Boshlash!", } } @@ -845,7 +845,7 @@ pub fn error_translation(language: Language, error: &str) -> Text<'static, Rende {error}" ), Language::UZ => format!( - "Xatolik yuz berdi!\n\n + "Xatolik yuz berdi!\n\n\ {error}" ), }) @@ -1307,7 +1307,7 @@ pub fn mon_amour_translation(language: Language) -> &'static str { Language::SV => "Ljuvligt tema gjort för drömmare", Language::FI => "Ihana teema unelmoijille", Language::JA => "ドリーマーのためのテーマ", - Language::UZ => "Xayolparastlar uchun yaratilgan chiroyli mavzu", + Language::UZ => "Xayolparastlar uchun chiroyli mavzu", } } From 44b1abfd24be89023042be7814750b32030e975e Mon Sep 17 00:00:00 2001 From: Giuliano Bellini s294739 Date: Sat, 21 Oct 2023 12:24:11 +0200 Subject: [PATCH 5/5] fix typo --- src/translations/translations.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/translations/translations.rs b/src/translations/translations.rs index c97d4f51..bcbdd760 100644 --- a/src/translations/translations.rs +++ b/src/translations/translations.rs @@ -885,7 +885,7 @@ pub fn both_translation(language: Language) -> &'static str { // Language::RU => "Все протоколы", // Language::FA => "همهٔ پیوندنامه ها", // Language::SE => "Alla protokoll", -// Language::SE => "Barcha protokollar" +// Language::UZ => "Barcha protokollar" // } // }