From 91e6a607af248d5624676ccfa6b0caa7572d000d Mon Sep 17 00:00:00 2001 From: Vili Tiinanen Date: Sat, 15 Jul 2023 14:25:42 +0300 Subject: [PATCH 1/3] add finnish translation --- README.md | 2 +- src/gui/pages/settings_language_page.rs | 5 +- src/translations/translations.rs | 82 +++++++++++++++++++++++++ src/translations/translations_2.rs | 25 ++++++++ src/translations/types/language.rs | 7 ++- 5 files changed, 118 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8c6917108..e49850f0d 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Multithreaded, cross-platform, reliable
Graphical interface translated in:
-🇬🇧  🇩🇪  🇬🇷  🇪🇦  🇮🇷  🇫🇷  🇮🇹  🇰🇷  🇵🇱  🇵🇹  🇷🇴  🇷🇺  🇸🇪  🇹🇷  🇺🇦  🇨🇳
+🇬🇧  🇩🇪  🇬🇷  🇪🇦  🇮🇷  🇫🇷  🇮🇹  🇰🇷  🇵🇱  🇵🇹  🇷🇴  🇷🇺  🇸🇪  🇹🇷  🇺🇦  🇨🇳  🇫🇮
diff --git a/src/gui/pages/settings_language_page.rs b/src/gui/pages/settings_language_page.rs index d0f66b45b..32fcc03aa 100644 --- a/src/gui/pages/settings_language_page.rs +++ b/src/gui/pages/settings_language_page.rs @@ -26,12 +26,15 @@ pub fn settings_language_page(sniffer: &Sniffer) -> Container { language_radios(language_active, &Language::ROW3, font, sniffer.style); let row_language_radio_4 = language_radios(language_active, &Language::ROW4, font, sniffer.style); + let row_language_radio_5 = + language_radios(language_active, &Language::ROW5, font, sniffer.style); let col_language_radio_all = Column::new() .spacing(10) .push(row_language_radio_1) .push(row_language_radio_2) .push(row_language_radio_3) - .push(row_language_radio_4); + .push(row_language_radio_4) + .push(row_language_radio_5); let mut content = Column::new() .align_items(Alignment::Center) diff --git a/src/translations/translations.rs b/src/translations/translations.rs index cece8d1ef..0cd51f967 100644 --- a/src/translations/translations.rs +++ b/src/translations/translations.rs @@ -20,6 +20,7 @@ pub fn choose_adapters_translation(language: Language) -> Text<'static> { Language::EL => "Επίλεξε τον προσαρμογέα δικτύου για επιθεώρηση", Language::FA => "مبدل شبکه را برای بازرسی انتخاب کنید", Language::SV => "Välj nätverksadapter att inspektera", + Language::FI => "Valitse tarkasteltava verkkosovitin", }) } @@ -41,6 +42,7 @@ pub fn application_protocol_translation(language: Language) -> &'static str { Language::EL => "Πρωτόκολλο εφαρμογής", Language::FA => "پیوندنامهٔ درخواست", Language::SV => "Applikationsprotokoll", + Language::FI => "Sovellusprotokolla", } } @@ -62,6 +64,7 @@ pub fn select_filters_translation(language: Language) -> Text<'static> { Language::EL => "Επίλεξε τα φίλτρα για εφαρμογή στην κίνηση του δικτύου", Language::FA => "صافی ها را جهت اعمال بر آمد و شد شبکه انتخاب کنید", Language::SV => "Välj filtren som ska appliceras på nätverkstrafiken", + Language::FI => "Valitse suodattimet verkkoliikenteelle", }) } @@ -80,6 +83,7 @@ pub fn start_translation(language: Language) -> &'static str { Language::EL => "Ξεκίνα!", Language::FA => "شروع!", Language::SV => "Starta!", + Language::FI => "Aloita!", } } @@ -99,6 +103,7 @@ pub fn address_translation(language: Language) -> &'static str { Language::EL => "Διεύθυνση", Language::FA => "نشانی", Language::SV => "Adress", + Language::FI => "Osoite", } } @@ -120,6 +125,7 @@ pub fn addresses_translation(language: Language) -> &'static str { Language::EL => "Διευθύνσεις", Language::FA => "نشانی ها", Language::SV => "Adresser", + Language::FI => "Osoitteet", } } @@ -141,6 +147,7 @@ pub fn ip_version_translation(language: Language) -> Text<'static> { Language::EL => "Έκδοση IP", Language::FA => "نسخهٔ IP", Language::SV => "IP-version", + Language::FI => "IP-versio", }) } @@ -161,6 +168,7 @@ pub fn transport_protocol_translation(language: Language) -> &'static str { Language::EL => "Πρωτόκολλο μεταφοράς", Language::FA => "پیوندنامهٔ ترابرد", Language::SV => "Transportprotokoll", + Language::FI => "Kuljetusprotokolla", } } @@ -182,6 +190,7 @@ pub fn traffic_rate_translation(language: Language) -> Text<'static> { Language::EL => "Ρυθμός κίνησης", Language::FA => "نرخ آمد و شد", Language::SV => "Datafrekvens", + Language::FI => "Liikennemäärä", }) } @@ -224,6 +233,7 @@ pub fn settings_translation(language: Language) -> &'static str { Language::EL => "Ρυθμίσεις", Language::FA => "پیکربندی", Language::SV => "Inställningar", + Language::FI => "Asetukset", } } @@ -244,6 +254,7 @@ pub fn yes_translation(language: Language) -> Text<'static> { Language::PT => "Sim", Language::EL => "Ναι", Language::FA => "بله", + Language::FI => "Kyllä", }) } @@ -265,6 +276,7 @@ pub fn ask_quit_translation(language: Language) -> Text<'static> { Language::EL => "Είσαι σίγουρος ότι θες να κλείσεις την ανάλυση;", Language::FA => "آیا مطمئن هستید می خواهید از این تحلیل خارج شوید؟", Language::SV => "Är du säker på att du vill avsluta analysen?", + Language::FI => "Haluatko varmasti lopettaa analyysin?", }) } @@ -286,6 +298,7 @@ pub fn quit_analysis_translation(language: Language) -> String { Language::EL => "Έξοδος ανάλυσης".to_string(), Language::FA => "خروج از تحلیل".to_string(), Language::SV => "Avsluta analys".to_string(), + Language::FI => "Lopeta analyysi".to_string(), } } @@ -307,6 +320,7 @@ pub fn ask_clear_all_translation(language: Language) -> Text<'static> { Language::EL => "Είσαι σίγουρος ότι θες να κάνεις εκκαθάριση των ειδοποιήσεων;", Language::FA => "آیا مطمئن هستید می خواهید اعلان ها را پاک کنید؟", Language::SV => "Är du säker på att du vill radera notifikationerna?", + Language::FI => "Haluatko varmasti tyhjentää ilmoitukset?", }) } @@ -328,6 +342,7 @@ pub fn clear_all_translation(language: Language) -> String { Language::EL => "Εκκαθάριση όλων".to_string(), Language::FA => "پاک کردن همه".to_string(), Language::SV => "Radera alla".to_string(), + Language::FI => "Tyhjennä kaikki".to_string(), } } @@ -349,6 +364,7 @@ pub fn hide_translation(language: Language) -> &'static str { Language::EL => "Κλείσιμο", Language::FA => "پنهان کردن", Language::SV => "Göm", + Language::FI => "Piilota", } } @@ -370,6 +386,7 @@ pub fn network_adapter_translation(language: Language) -> &'static str { Language::EL => "Προσαρμογέας δικτύου", Language::FA => "مبدل شبکه", Language::SV => "Nätverksadapter", + Language::FI => "Verkkosovitin", } } @@ -423,6 +440,9 @@ pub fn no_addresses_translation(language: Language, adapter: &str) -> Text<'stat Language::SV => format!("Det går inte att observa någon trafik eftersom den valda adaptern inte har några aktiva adresser ...\n\n\ Nätverksadapter: {adapter}\n\n\ Om du är säker att du är ansluten till internet, testa att välja en annan adapter."), + Language::FI => format!("Liikennettä ei voitu havainnoida, koska valitulla sovittimella ei ole aktiivista osoitetta...\n\n\ + Verkkosovitin: {adapter}\n\n\ + Jos olet varma että sinulla on internet-yhteys, kokeile valita toinen verkkosovitin."), }) } @@ -476,6 +496,9 @@ pub fn waiting_translation(language: Language, adapter: &str) -> Text<'static> { Language::SV => format!("Ingen trafik har observerats ännu. Väntar på paket ...\n\n\ Nätverksadapter: {adapter}\n\n\ Är du säker på att du är ansluten till internet och att du har valt rätt adapter?"), + Language::FI => format!("Ei vielä havaittua liikennettä. Odotetaan verkkopaketteja...\n\n\ + Verkkosovitin: {adapter}\n\n\ + Onhan sinulla varmasti internet-yhteys ja olet valinnut oikean verkkosovittimen."), }) } @@ -533,6 +556,9 @@ pub fn some_observed_translation( Language::SV => format!("Antal fångade paket: {observed}\n\n\ Filtrerade paket: 0\n\n\ Några paket har fångats, men än har inget valts enligt de angivna filtren ...\n\n{filters}"), + Language::FI => format!("Siepattuja paketteja yhteensä: {observed}\n\n\ + Suodatettuja paketteja: 0\n\n\ + Joitakin paketteja on siepattu, mutta yhtäkään ei ole valittu määrittämiesi suodattimien mukaan...\n\n{filters}"), }) } @@ -554,6 +580,7 @@ pub fn filtered_packets_translation(language: Language) -> &'static str { Language::EL => "Φιλτραρισμένα πακέτα", Language::FA => "بسته های صاف شده", Language::SV => "Filtrerade paket", + Language::FI => "Suodatettuja paketteja", } } @@ -574,6 +601,7 @@ pub fn filtered_bytes_translation(language: Language) -> &'static str { Language::EL => "Φιλτραρισμένα bytes", Language::FA => "بایت های صاف شده", Language::SV => "Filtrerade bytes", + Language::FI => "Suodatettuja tavuja", } } @@ -609,6 +637,7 @@ pub fn of_total_translation(language: Language, percentage: &str) -> String { } Language::FA => format!("({percentage} از مجموع)"), Language::SV => format!("({percentage} av totalen)"), + Language::FI => format!("({percentage} kokonaismäärästä)"), } } @@ -736,6 +765,10 @@ pub fn error_translation(language: Language, error: &str) -> Text<'static> { "Ett fel inträffade! \n\n\ {error}" ), + Language::FI => format!( + "Tapahtui virhe! \n\n\ + {error}" + ), }) } @@ -756,6 +789,7 @@ pub fn both_translation(language: Language) -> &'static str { Language::EL => "αμφότερα", Language::FA => "هر دو", Language::SV => "båda", + Language::FI => "molemmat", } } @@ -790,6 +824,7 @@ pub fn all_translation(language: Language) -> &'static str { Language::EL => "Όλα", Language::FA => "همه", Language::SV => "Alla", + Language::FI => "Kaikki", } } @@ -810,6 +845,7 @@ pub fn packets_translation(language: Language) -> &'static str { Language::PT => "pacotes", Language::EL => "πακέτα", Language::FA => "بسته ها", + Language::FI => "paketit", } } @@ -831,6 +867,7 @@ pub fn packets_chart_translation(language: Language) -> &'static str { Language::EL => "πακέτα ανά δευτερόλεπτο", Language::FA => "بسته در ثانیه", Language::SV => "paket per sekund", + Language::FI => "pakettia sekunnissa", } } @@ -849,6 +886,7 @@ pub fn bytes_translation(language: Language) -> &'static str { Language::TR => "bayt", Language::RU => "байтов", Language::FA => "بایت ها", + Language::FI => "tavua", } } @@ -869,6 +907,7 @@ pub fn bytes_chart_translation(language: Language) -> &'static str { Language::EL => "bytes ανά δευτερόλεπτο", Language::FA => "بایت در ثانیه", Language::SV => "bytes per sekund", + Language::FI => "tavua sekunnissa", } } @@ -890,6 +929,7 @@ pub fn recent_report_translation(language: Language) -> &'static str { Language::EL => "πιο πρόσφατα", Language::FA => "آخرین", Language::SV => "senaste", + Language::FI => "viimeisin", } } @@ -911,6 +951,7 @@ pub fn packets_report_translation(language: Language) -> &'static str { Language::EL => "περισσότερα πακέτα", Language::FA => "بیشترین بسته ها", Language::SV => "flest paket", + Language::FI => "eniten paketteja", } } @@ -932,6 +973,7 @@ pub fn bytes_report_translation(language: Language) -> &'static str { Language::EL => "περισσότερα bytes", Language::FA => "بیشترین بایت ها", Language::SV => "flest bytes", + Language::FI => "eniten tavuja", } } @@ -973,6 +1015,7 @@ pub fn notifications_title_translation(language: Language) -> Text<'static> { Language::EL => "Εξατομίκευση ειδοποιήσεων", Language::FA => "اعلان های خود را سفارشی کنید", Language::SV => "Anpassa dina notifikationer", + Language::FI => "Muokkaa ilmoituksiasi", }) } @@ -994,6 +1037,7 @@ pub fn appearance_title_translation(language: Language) -> Text<'static> { Language::EL => "Επίλεξε το αγαπημένο σου θέμα", Language::FA => "زمینه دلخواه خود را انتخاب کنید", Language::SV => "Välj ditt favorittema", + Language::FI => "Valitse suosikkiteemasi", }) } @@ -1015,6 +1059,7 @@ pub fn languages_title_translation(language: Language) -> Text<'static> { Language::EL => "Επίλεξε τη γλώσσα σου", Language::FA => "زبان خود را انتخاب کنید", Language::SV => "Välj ditt språk", + Language::FI => "Valitse kielesi", }) } @@ -1036,6 +1081,7 @@ pub fn active_filters_translation(language: Language) -> &'static str { Language::EL => "Ενεργά φίλτρα", Language::FA => "صافی های فعال", Language::SV => "Aktiva filter", + Language::FI => "Aktiiviset suodattimet", } } @@ -1057,6 +1103,7 @@ pub fn none_translation(language: Language) -> String { Language::EL => "κανένα", Language::FA => "هیچ کدام", Language::SV => "inga", + Language::FI => "ei mitään", } .to_string() } @@ -1079,6 +1126,7 @@ pub fn yeti_night_translation(language: Language) -> &'static str { Language::EL => "Το αυθεντικό σκούρο θέμα του Sniffnet", Language::FA => "زمینه تاریک اصلی Sniffnet", Language::SV => "Sniffnets ursprungliga mörka tema", + Language::FI => "Sniffnetin alkuperäinen tumma teema", } } @@ -1099,6 +1147,7 @@ pub fn yeti_day_translation(language: Language) -> &'static str { Language::EL => "Το αυθεντικό ανοιχτόχρωμο θέμα του Sniffnet", Language::FA => "زمینه روشن اصلی Sniffnet", Language::SV => "Sniffnets ursprungliga ljusa tema", + Language::FI => "Sniffnetin alkuperäinen vaalea teema", } } @@ -1120,6 +1169,7 @@ pub fn deep_sea_translation(language: Language) -> &'static str { Language::EL => "Βουτιά μέσα στην κίνηση του δικτύου", Language::FA => "شیرجه رفتن در آمد و شد شبکه", Language::SV => "För att dyka ned i nätverkstrafiken", + Language::FI => "Sukeltaaksesi verkkoliikenteeseen", } } @@ -1141,6 +1191,7 @@ pub fn mon_amour_translation(language: Language) -> &'static str { Language::EL => "Φτιαγμένο για ονειροπόλους", Language::FA => "زمینه دلپذیر ساخته شده برای رویا پردازان", Language::SV => "Ljuvligt tema gjort för drömmare", + Language::FI => "Ihana teema unelmoijille", } } @@ -1162,6 +1213,7 @@ pub fn incoming_translation(language: Language) -> &'static str { Language::EL => "Εισερχόμενα", Language::FA => "ورودی", Language::SV => "Inkommande", + Language::FI => "Saapuva", } } @@ -1183,6 +1235,7 @@ pub fn outgoing_translation(language: Language) -> &'static str { Language::EL => "Εξερχόμενα", Language::FA => "خروجی", Language::SV => "Utgående", + Language::FI => "Lähtevä", } } @@ -1203,6 +1256,7 @@ pub fn notifications_translation(language: Language) -> &'static str { Language::EL => "Ειδοποιήσεις", Language::FA => "اعلان ها", Language::SV => "Notifikationer", + Language::FI => "Ilmoitukset", } } @@ -1218,6 +1272,7 @@ pub fn style_translation(language: Language) -> &'static str { Language::KO => "스타일", Language::EL => "Στυλ", Language::FA => "شیوه", + Language::FI => "Tyyli", } } @@ -1239,6 +1294,7 @@ pub fn language_translation(language: Language) -> &'static str { Language::EL => "Γλώσσα", Language::FA => "زبان", Language::SV => "Språk", + Language::FI => "Kieli", } } @@ -1260,6 +1316,7 @@ pub fn overview_translation(language: Language) -> &'static str { Language::EL => "επισκόπηση", Language::FA => "نمای کلی", Language::SV => "Översikt", + Language::FI => "Yleiskatsaus", } } @@ -1281,6 +1338,7 @@ pub fn packets_threshold_translation(language: Language) -> &'static str { Language::EL => "Ειδοποίησέ με όταν το όριο τον πακέτων ξεπεραστεί", Language::FA => "به من اطلاع بده وقتی آستانه یک بسته فراتر رفت", Language::SV => "Notifiera mig när en paketgräns har överstigits", + Language::FI => "Ilmoita minulle, kun pakettiraja on ylittynyt", } } @@ -1302,6 +1360,7 @@ pub fn bytes_threshold_translation(language: Language) -> &'static str { Language::EL => "Ειδοποίησέ με όταν το όριο των bytes ξεπεραστεί", Language::FA => "به من اطلاع بده وقتی آستانه یک بایت فراتر رفت", Language::SV => "Notifiera mig när en gräns för bytes har överstigits", + Language::FI => "Ilmoita minulle, kun tavuraja on ylittynyt", } } @@ -1322,6 +1381,7 @@ pub fn per_second_translation(language: Language) -> &'static str { Language::EL => "(ανά δευτερόλεπτο)", Language::FA => "(در ثانیه)", Language::SV => "(per sekund)", + Language::FI => "(sekunnissa)", } } @@ -1343,6 +1403,7 @@ pub fn specify_multiples_translation(language: Language) -> &'static str { Language::EL => "• μπορείς επίσης να καθορίσεις τα 'K', 'M' και 'G'", Language::FA => "؛ شما همچنین می توانید 'M'، 'K' و 'G' را تعیین کنید", Language::SV => "; du kan också ange 'K', 'M' och 'G'", + Language::FI => "; voit myös määrittää 'K', 'M' tai 'G'", } } @@ -1366,6 +1427,7 @@ pub fn favorite_notification_translation(language: Language) -> &'static str { Language::EL => "Ειδοποίησέ με όταν νέα δεδομένα έχουν ανταλλαγεί από τα αγαπημένα μου", Language::FA => "به من اطلاع بده وقتی داده جدید از پسندیده های من مبادله شد", Language::SV => "Notifiera mig när ny data utbyts av mina favoriter", + Language::FI => "Ilmoita minulle, kun suosikkini vaihtavat uusia tietoja", } } @@ -1387,6 +1449,7 @@ pub fn threshold_translation(language: Language) -> String { Language::EL => "όριο".to_string(), Language::FA => "آستانه".to_string(), Language::SV => "Gräns".to_string(), + Language::FI => "Raja".to_string(), } } @@ -1405,6 +1468,7 @@ pub fn volume_translation(language: Language) -> &'static str { Language::EL => "Ένταση", Language::FA => "حجم", Language::SV => "Volym", + Language::FI => "Äänenvoimakkuus", } } @@ -1425,6 +1489,7 @@ pub fn sound_translation(language: Language) -> &'static str { Language::EL => "Ήχος", Language::FA => "صدا", Language::SV => "Ljud", + Language::FI => "Ääni", } } @@ -1446,6 +1511,7 @@ pub fn open_report_translation(language: Language) -> &'static str { Language::EL => "Άνοιγμα της πλήρους αναφοράς", Language::FA => "گزارش کامل را باز کن", Language::SV => "Öppna fullständig rapport", + Language::FI => "Avaa koko raportti", } } @@ -1467,6 +1533,7 @@ pub fn bytes_exceeded_translation(language: Language) -> &'static str { Language::EL => "Το όριο των bytes ξεπεράστηκε!", Language::FA => "آستانه بایت فراتر رفت!", Language::SV => "Gräns för bytes överskriden!", + Language::FI => "Tavuraja ylitetty!", } } @@ -1488,6 +1555,7 @@ pub fn bytes_exceeded_value_translation(language: Language, value: &str) -> Stri Language::EL => format!("{value} έχουν ανταλλαγεί"), Language::FA => format!("{value} بایت مبادله شده است"), Language::SV => format!("{value} har utbytts"), + Language::FI => format!("{value} on vaihdettu"), } } @@ -1509,6 +1577,7 @@ pub fn packets_exceeded_translation(language: Language) -> &'static str { Language::EL => "Το όριο των πακέτων ξεπεράστηκε!", Language::FA => "آستانه بسته فراتر رفت!", Language::SV => "Paketgräns överskriden!", + Language::FI => "Pakettiraja ylitetty!", } } @@ -1548,6 +1617,10 @@ pub fn packets_exceeded_value_translation(language: Language, value: u32) -> Str 1 => "1 paket har utbytts".to_owned(), npackets => format!("{npackets} paket har utbytts"), }, + Language::FI => match value { + 1 => "1 paketti vaihdettu".to_owned(), + npackets => format!("{npackets} pakettia vaihdettu"), + }, } } @@ -1569,6 +1642,7 @@ pub fn favorite_transmitted_translation(language: Language) -> &'static str { Language::EL => "Καινούρια δεδομένα έχουν ανταλλαγεί στα αγαπημένα!", Language::FA => "مبادله داده جدید از پسندیده ها!", Language::SV => "Ny data utbytt av favoriter!", + Language::FI => "Uusia tietoja vaihdettu suosikeista!", } } @@ -1622,6 +1696,9 @@ pub fn no_notifications_set_translation(language: Language) -> Text<'static> { Language::SV => "Du har inte aktiverat notifikationer än!\n\n\ Efter att du aktiverat dem så kommer denna sida att visa en logg av dina notifikationer\n\n\ Du kan aktivera notifikationer i inställingarna", + Language::FI => "Et ole vielä ottanut ilmoituksia käyttöön!\n\n\ + Kun olet ottanut ne käyttöön, tällä sivulla näkyy loki ilmoituksistasi\n\n\ + Voit ottaa ilmoitukset käyttöön asetuksista:",, }) } @@ -1691,6 +1768,10 @@ pub fn no_notifications_received_translation(language: Language) -> Text<'static "Inget att se för tillfället ...\n\n\ När du tar emot en notifikation så kommer den att visas här" } + Language::FI => { + "Ei mitään nähtävää tällä hetkellä...\n\n\ + Kun saat ilmoituksen, se näkyy tässä" + } }) } @@ -1712,5 +1793,6 @@ pub fn only_last_30_translation(language: Language) -> &'static str { Language::EL => "Μόνο οι τελευταίες 30 ειδοποιήσεις απεικονίζονται", Language::FA => "تنها ۳۰ اعلان آخر نمایش داده شده اند", Language::SV => "Endast de senaste 30 notifikationerna visas", + Language::FI => "Vain viimeiset 30 ilmoitusta näytetään", } } diff --git a/src/translations/translations_2.rs b/src/translations/translations_2.rs index 48dbbc0d8..093cd4d35 100644 --- a/src/translations/translations_2.rs +++ b/src/translations/translations_2.rs @@ -10,6 +10,7 @@ pub fn new_version_available_translation(language: Language) -> &'static str { Language::EL => "Μια νεότερη έκδοση είναι διαθέσιμη!", Language::FA => "یک نسخه جدیدتر روی GitHub موجود است", Language::SV => "En nyare version finns tillgänglig!", + Language::FI => "Uudempi versio saatavilla!", Language::DE => "Eine neue Version ist verfügbar!", Language::TR => "Daha yeni bir versiyon mevcut!", Language::ES => "Hay una nueva versión disponible!", @@ -33,6 +34,7 @@ pub fn inspect_translation(language: Language) -> &'static str { Language::DE => "Inspizieren", Language::RU => "Инспектировать", Language::SV => "Inspektera", + Language::FI => "Tarkastele", Language::TR => "İncele", Language::FA => "بازرسی", Language::KO => "검사", @@ -49,6 +51,7 @@ pub fn connection_details_translation(language: Language) -> &'static str { Language::IT => "Dettagli della connessione", Language::RU => "Подробнее о соединении", Language::SV => "Anslutningsdetaljer", + Language::FI => "Yhteyden tiedot", Language::DE => "Verbindungsdetails", Language::TR => "Bağlantı detayları", Language::FA => "مشخصات اتصال", @@ -69,6 +72,7 @@ pub fn dropped_packets_translation(language: Language) -> &'static str { Language::IT => "Pacchetti mancati", Language::RU => "Потеряно пакетов", Language::SV => "Tappade paket", + Language::FI => "Pudotetut paketit", Language::DE => "Verlorene Pakete", Language::TR => "Düşen paketler", Language::FA => "بسته های رها شده", @@ -89,6 +93,7 @@ pub fn data_representation_translation(language: Language) -> &'static str { Language::IT => "Rappresentazione dei dati", Language::RU => "Показывать в виде", // there is selector below: "байтов" or "пакетов" Language::SV => "Datarepresentation", + Language::FI => "Tietojen esitys", Language::DE => "Daten Darstellung", Language::TR => "Veri gösterimi", Language::FA => "بازنمایی داده ها", // TODO: or نمایندگی داده ها depending on context @@ -109,6 +114,7 @@ pub fn host_translation(language: Language) -> &'static str { Language::IT => "Host di rete", Language::RU => "Сетевой хост", Language::SV => "Nätverksvärd", + Language::FI => "Verkkoisäntä", Language::DE => "Netzwerk-Host", Language::TR => "Ağ sunucusu", Language::FA => "میزبان شبکه", @@ -129,6 +135,7 @@ pub fn only_top_30_hosts_translation(language: Language) -> &'static str { Language::IT => "Solo i maggiori 30 host sono mostrati qui", Language::RU => "Тут показываются только первые 30 хостов", Language::SV => "Endast de 30 främsta värdarna visas här", + Language::FI => "Vain 30 parasta isäntää näytetään tässä", Language::DE => "Nur die obersten 30 Hosts werden hier angezeigt", Language::TR => "Sadece ilk 30 sunucu burda gösterilmektedir", Language::FA => "تنها ۳۰ میزبان برتر در اینجا نمایش داده شده اند", @@ -149,6 +156,7 @@ pub fn sort_by_translation(language: Language) -> &'static str { Language::IT => "Ordina per", Language::RU => "Сортировка", Language::SV => "Sortera efter", + Language::FI => "Järjestä", Language::DE => "Sortieren nach", Language::TR => "Şuna göre sırala", Language::FA => "مرتب سازی بر اساس", @@ -169,6 +177,7 @@ pub fn local_translation(language: Language) -> String { Language::IT => "Rete locale", Language::RU => "Локальная сеть", Language::SV => "Lokalt nätverk", + Language::FI => "Paikallinen verkko", Language::DE => "Lokales Netzwerk", Language::TR => "Yerel ağ", Language::FA => "شبکه محلی", @@ -190,6 +199,7 @@ pub fn unknown_translation(language: Language) -> String { Language::IT => "Localizzazione sconosciuta", Language::RU => "Неизвестный регион", Language::SV => "Okänd plats", + Language::FI => "Tuntematon sijanti", Language::DE => "Ort unbekannt", Language::TR => "Bilinmeyen yer", Language::FA => "محل نامعلوم", @@ -211,6 +221,7 @@ pub fn your_network_adapter_translation(language: Language) -> String { Language::IT => "La tua scheda di rete", Language::RU => "Ваш сетевой адаптер", Language::SV => "Din nätverksadapter", + Language::FI => "Sinun verkkosovitin", Language::DE => "Dein Netzwerk-Adapter", Language::TR => "Ağ adaptörün", Language::FA => "مبدل شبکه شما", @@ -232,6 +243,7 @@ pub fn socket_address_translation(language: Language) -> &'static str { Language::IT => "Indirizzo del socket", Language::RU => "Адрес сокекта", Language::SV => "Socketadress", + Language::FI => "Socket osoite", Language::DE => "Socket Adresse", Language::TR => "Soket adresi", Language::FA => "پریز شبکه", @@ -252,6 +264,7 @@ pub fn mac_address_translation(language: Language) -> &'static str { Language::IT => "Indirizzo MAC", Language::RU => "MAC адрес", Language::SV => "MAC-adress", + Language::FI => "MAC-osoite", Language::DE => "MAC Adresse", Language::TR => "MAC adresi", Language::FA => "آدرس MAC", @@ -272,6 +285,7 @@ pub fn source_translation(language: Language) -> &'static str { Language::IT => "Sorgente", Language::RU => "Источник", Language::SV => "Källa", + Language::FI => "Lähde", Language::DE => "Quelle", Language::TR => "Kaynak", Language::FA => "منبع", @@ -291,6 +305,7 @@ pub fn destination_translation(language: Language) -> &'static str { Language::EN | Language::SV => "Destination", Language::IT => "Destinazione", Language::RU => "Получатель", + Language::FI => "Määränpää", Language::DE => "Ziel", Language::TR => "Hedef", Language::FA => "مقصد", @@ -311,6 +326,7 @@ pub fn fqdn_translation(language: Language) -> &'static str { Language::IT => "Nome di dominio completo", Language::RU => "Полное доменное имя", Language::SV => "Fullständigt domännamn", + Language::FI => "Täysin määritelty verkkotunnus", Language::DE => "Vollständig qualifizierter Domain Name", Language::TR => "Tam nitelikli alan adı", Language::FA => "نام دامنه جامع الشرایط", @@ -331,6 +347,7 @@ pub fn administrative_entity_translation(language: Language) -> &'static str { Language::IT => "Nome del sistema autonomo", Language::RU => "Имя автономной системы", Language::SV => "Administrativ enhet", + Language::FI => "Autonomisen järjestelmän nimi", Language::DE => "Name des autonomen Systems", Language::TR => "Yönetim varlığı", Language::FA => "واحد اجرایی", // TODO: or واحد اداری depending on context @@ -351,6 +368,7 @@ pub fn transmitted_data_translation(language: Language) -> &'static str { Language::IT => "Dati trasmessi", Language::RU => "Передано данных", Language::SV => "Överförd data", + Language::FI => "Lähetetty data", Language::DE => "Übermittelte Daten", Language::TR => "Aktarılan veri", Language::FA => "دادهٔ منتقل شده", @@ -371,6 +389,7 @@ pub fn country_translation(language: Language) -> &'static str { Language::IT => "Paese", Language::RU => "Страна", Language::SV => "Land", + Language::FI => "Maa", Language::DE => "Land", Language::TR => "Ülke", Language::FA => "کشور", @@ -391,6 +410,7 @@ pub fn domain_name_translation(language: Language) -> &'static str { Language::IT => "Nome di dominio", Language::RU => "Доменное имя", Language::SV => "Domännamn", + Language::FI => "Verkkotunnus", Language::DE => "Domain Name", Language::TR => "Alan adı", Language::FA => "نام دامنه", @@ -411,6 +431,7 @@ pub fn only_show_favorites_translation(language: Language) -> &'static str { Language::IT => "Mostra solo i preferiti", Language::RU => "Показывать только избранные", Language::SV => "Visa endast favoriter", + Language::FI => "Näytä vain suosikit", Language::DE => "Zeige nur die Favoriten", Language::TR => "Sadece favorileri göster", Language::FA => "فقط پسندیده ها را نمایش بده", @@ -431,6 +452,7 @@ pub fn search_filters_translation(language: Language) -> &'static str { Language::IT => "Filtri di ricerca", Language::RU => "Фильтры для поиска", Language::SV => "Sökfilter", + Language::FI => "Hakusuodattimet", Language::DE => "Filter suchen", Language::TR => "Arama filtresi", Language::FA => "صافی های جستجو", @@ -451,6 +473,7 @@ pub fn no_search_results_translation(language: Language) -> &'static str { Language::IT => "Nessun risultato disponibile secondo i filtri di ricerca specificati", Language::RU => "После применения выбранных фильтров результат поиска пустой", Language::SV => "Inga resultat tillgängliga utifrån de angivna sökfilterna", + Language::FI => "Ei tuloksia saatavilla määritellyille hakusuodattimille", Language::DE => "Keine Resultate für die spezifizierten Such-Filter verfügbar", Language::TR => "Belirtilen arama filtrelerine göre herhangi bir sonuç bulunmamaktadır", Language::FA => "هیچ نتیجه ای بر اساس صافی های جستجوی تعیین شده وجود ندارد", @@ -476,6 +499,7 @@ pub fn showing_results_translation( Language::IT => format!("Sono mostrati {start}-{end} di {total} risultati totali"), Language::RU => format!("Показываются {start}-{end} из {total} общего числа результатов"), Language::SV => format!("Visar {start}-{end} av {total} totala resultat"), + Language::FI => format!("Näytetään {start}-{end} tulosta, kaikista tuloksista {total}"), Language::DE => format!("{start}-{end} von insgesamt {total} Resultaten werden angezeigt"), Language::TR => format!("{total} sonuç içinde {start}-{end}"), Language::FA => format!("نمایش {start}-{end} از تمامی {total} نتیجه"), @@ -497,6 +521,7 @@ pub fn color_gradients_translation(language: Language) -> &'static str { Language::IT => "Applica sfumature di colore", Language::RU => "Применить цветовой градиент", // recheck Language::SV => "Applicera färggradient", + Language::FI => "Käytä värigradientteja", Language::DE => "Farb-Gradienten anwenden", Language::TR => "Renk grandyanı uygula", Language::FA => "اعمال گرادیان های رنگ", diff --git a/src/translations/types/language.rs b/src/translations/types/language.rs index 4e3554bcc..bda97227a 100644 --- a/src/translations/types/language.rs +++ b/src/translations/types/language.rs @@ -4,7 +4,7 @@ use iced_native::widget::Svg; use serde::{Deserialize, Serialize}; use crate::countries::flags_pictures::{ - CN, DE, ES, FLAGS_WIDTH_SMALL, FR, GB, GR, IR, IT, KR, PL, PT, RO, RU, SE, TR, UA, + CN, DE, ES, FI, FLAGS_WIDTH_SMALL, FR, GB, GR, IR, IT, KR, PL, PT, RO, RU, SE, TR, UA, }; /// This enum defines the available languages. @@ -42,6 +42,8 @@ pub enum Language { FA, /// Swedish SV, + /// Finnish + FI, } impl Default for Language { @@ -55,6 +57,7 @@ impl Language { pub(crate) const ROW2: [Language; 4] = [Language::FA, Language::FR, Language::IT, Language::KO]; pub(crate) const ROW3: [Language; 4] = [Language::PL, Language::PT, Language::RO, Language::RU]; pub(crate) const ROW4: [Language; 4] = [Language::SV, Language::TR, Language::UK, Language::ZH]; + pub(crate) const ROW5: [Language; 1] = [Language::FI]; pub fn get_radio_label(&self) -> &str { match self { @@ -74,6 +77,7 @@ impl Language { Language::EL => "Ελληνικά", Language::FA => "فارسی", Language::SV => "Svenska", + Language::FI => "Suomi", } } @@ -95,6 +99,7 @@ impl Language { Language::EL => GR, Language::FA => IR, Language::SV => SE, + Language::FI => FI, }))) .width(Length::Fixed(FLAGS_WIDTH_SMALL)) } From b13c6f8da66c0253a2d678ea75271d5bc1a96e73 Mon Sep 17 00:00:00 2001 From: Giuliano Bellini s294739 Date: Sat, 15 Jul 2023 17:22:19 +0200 Subject: [PATCH 2/3] minor fixes --- README.md | 2 +- src/gui/components/radio.rs | 3 ++- src/translations/translations.rs | 2 +- src/translations/types/language.rs | 8 ++++---- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index e49850f0d..8c6917108 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Multithreaded, cross-platform, reliable
Graphical interface translated in:
-🇬🇧  🇩🇪  🇬🇷  🇪🇦  🇮🇷  🇫🇷  🇮🇹  🇰🇷  🇵🇱  🇵🇹  🇷🇴  🇷🇺  🇸🇪  🇹🇷  🇺🇦  🇨🇳  🇫🇮
+🇬🇧  🇩🇪  🇬🇷  🇪🇦  🇮🇷  🇫🇷  🇮🇹  🇰🇷  🇵🇱  🇵🇹  🇷🇴  🇷🇺  🇸🇪  🇹🇷  🇺🇦  🇨🇳
diff --git a/src/gui/components/radio.rs b/src/gui/components/radio.rs index c79080af4..a64055b24 100644 --- a/src/gui/components/radio.rs +++ b/src/gui/components/radio.rs @@ -83,11 +83,12 @@ pub fn language_radios( font: Font, style: StyleType, ) -> Row<'static, Message> { - let mut ret_val = Row::new().spacing(10); + let mut ret_val = Row::new().spacing(10).align_items(Alignment::Center); for option in collection { ret_val = ret_val.push( Row::new().align_items(Alignment::Center).push( Row::new() + .align_items(Alignment::Center) .width(Length::Fixed(180.0)) .push( Radio::new( diff --git a/src/translations/translations.rs b/src/translations/translations.rs index 0cd51f967..da7104afa 100644 --- a/src/translations/translations.rs +++ b/src/translations/translations.rs @@ -1698,7 +1698,7 @@ pub fn no_notifications_set_translation(language: Language) -> Text<'static> { Du kan aktivera notifikationer i inställingarna", Language::FI => "Et ole vielä ottanut ilmoituksia käyttöön!\n\n\ Kun olet ottanut ne käyttöön, tällä sivulla näkyy loki ilmoituksistasi\n\n\ - Voit ottaa ilmoitukset käyttöön asetuksista:",, + Voit ottaa ilmoitukset käyttöön asetuksista:", }) } diff --git a/src/translations/types/language.rs b/src/translations/types/language.rs index bda97227a..2d3e8b03b 100644 --- a/src/translations/types/language.rs +++ b/src/translations/types/language.rs @@ -54,10 +54,10 @@ impl Default for Language { impl Language { pub(crate) const ROW1: [Language; 4] = [Language::EN, Language::DE, Language::EL, Language::ES]; - pub(crate) const ROW2: [Language; 4] = [Language::FA, Language::FR, Language::IT, Language::KO]; - pub(crate) const ROW3: [Language; 4] = [Language::PL, Language::PT, Language::RO, Language::RU]; - pub(crate) const ROW4: [Language; 4] = [Language::SV, Language::TR, Language::UK, Language::ZH]; - pub(crate) const ROW5: [Language; 1] = [Language::FI]; + pub(crate) const ROW2: [Language; 4] = [Language::FA, Language::FI, Language::FR, Language::IT]; + pub(crate) const ROW3: [Language; 4] = [Language::KO, Language::PL, Language::PT, Language::RO]; + pub(crate) const ROW4: [Language; 4] = [Language::RU, Language::SV, Language::TR, Language::UK]; + pub(crate) const ROW5: [Language; 1] = [Language::ZH]; pub fn get_radio_label(&self) -> &str { match self { From d38447a9bfbd4a2e8688a0e0f35b68e68cab34d8 Mon Sep 17 00:00:00 2001 From: Giuliano Bellini s294739 Date: Sat, 15 Jul 2023 17:50:47 +0200 Subject: [PATCH 3/3] fix: new clippy lints from rust 1.71 --- src/chart/manage_chart_data.rs | 2 +- src/main.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/chart/manage_chart_data.rs b/src/chart/manage_chart_data.rs index 9d6fd64dc..e8daf53a8 100644 --- a/src/chart/manage_chart_data.rs +++ b/src/chart/manage_chart_data.rs @@ -5,7 +5,7 @@ use crate::{RunTimeData, TrafficChart}; /// This function is invoked every second by the application subscription /// /// It updates data (packets and bytes per second) to be displayed in the chart of gui run page -pub fn update_charts_data(mut runtime_data: &mut RunTimeData, traffic_chart: &mut TrafficChart) { +pub fn update_charts_data(runtime_data: &mut RunTimeData, traffic_chart: &mut TrafficChart) { let tot_seconds = traffic_chart.ticks; traffic_chart.ticks += 1; diff --git a/src/main.rs b/src/main.rs index 5611866a8..27df33794 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,7 +5,7 @@ use std::sync::{Arc, Condvar, Mutex}; use std::{panic, process, thread}; -use iced::window::{PlatformSpecific, Position}; +use iced::window::Position; use iced::{window, Application, Settings}; use chart::types::chart_type::ChartType; @@ -115,7 +115,7 @@ pub fn main() -> iced::Result { transparent: false, always_on_top: false, icon: None, - platform_specific: PlatformSpecific::default(), + ..Default::default() }, flags: Sniffer::new( current_capture_id1,