From 5d63309bf0efafbae63b481a28a1248fa3a14b68 Mon Sep 17 00:00:00 2001 From: luca3s <41015240+luca3s@users.noreply.github.com> Date: Thu, 18 May 2023 20:49:38 +0200 Subject: [PATCH 1/3] Additional German translations added --- src/translations/translations_2.rs | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/translations/translations_2.rs b/src/translations/translations_2.rs index 76cf89d8..a2fdc0b3 100644 --- a/src/translations/translations_2.rs +++ b/src/translations/translations_2.rs @@ -9,6 +9,7 @@ pub fn new_version_available_translation(language: Language) -> &'static str { Language::RU => "Новая версия доступна на GitHub", Language::EL => "Μια νεότερη έκδοση είναι διαθέσιμη στο GitHub", Language::FA => "یک نسخه جدیدتر روی GitHub موجود است", + Language::DE => "Eine neue Version ist auf GitHub verfügbar", _ => "A newer version is available on GitHub", } } @@ -20,7 +21,7 @@ pub fn inspect_translation(language: Language) -> &'static str { Language::FR => "Inspecter", Language::ES => "Inspeccionar", Language::PL => "Sprawdź", - Language::DE => "Überprüfen", + Language::DE => "Inspizieren", Language::RU => "Инспектировать", _ => "Inspect", } @@ -30,6 +31,7 @@ pub fn connection_details_translation(language: Language) -> &'static str { match language { Language::EN => "Connection details", Language::IT => "Dettagli della connessione", + Language::DE => "Verbindungsdetails", _ => "Connection details", } } @@ -38,6 +40,7 @@ pub fn dropped_packets_translation(language: Language) -> &'static str { match language { Language::EN => "Dropped packets", Language::IT => "Pacchetti mancati", + Language::DE => "Verlorene Pakete", _ => "Dropped packets", } } @@ -46,6 +49,7 @@ pub fn data_representation_translation(language: Language) -> &'static str { match language { Language::EN => "Data representation", Language::IT => "Rappresentazione dei dati", + Language::DE => "Daten Darstellung", _ => "Data representation", } } @@ -54,6 +58,7 @@ pub fn host_translation(language: Language) -> &'static str { match language { Language::EN => "Network host", Language::IT => "Host di rete", + Language::DE => "Netzwerk-Host", _ => "Network host", } } @@ -62,6 +67,7 @@ pub fn only_top_30_hosts_translation(language: Language) -> &'static str { match language { Language::EN => "Only the top 30 hosts are displayed here", Language::IT => "Solo i maggiori 30 host sono mostrati qui", + Language::DE => "Nur die obersten 30 Hosts werden hier angezeigt", _ => "Only the top 30 hosts are displayed here", } } @@ -70,6 +76,7 @@ pub fn sort_by_translation(language: Language) -> &'static str { match language { Language::EN => "Sort by", Language::IT => "Ordina per", + Language::DE => "Sortieren nach", _ => "Sort by", } } @@ -78,6 +85,7 @@ pub fn local_translation(language: Language) -> String { match language { Language::EN => "Local network", Language::IT => "Rete locale", + Language::DE => "Lokales Netzwerk", _ => "Local network", } .to_string() @@ -87,6 +95,7 @@ pub fn unknown_translation(language: Language) -> String { match language { Language::EN => "Unknown location", Language::IT => "Localizzazione sconosciuta", + Language::DE => "Ort unbekannt", _ => "Unknown location", } .to_string() @@ -96,6 +105,7 @@ pub fn your_network_adapter_translation(language: Language) -> String { match language { Language::EN => "Your network adapter", Language::IT => "La tua scheda di rete", + Language::DE => "Dein Netzwerk-Adapter", _ => "Your network adapter", } .to_string() @@ -105,6 +115,7 @@ pub fn socket_address_translation(language: Language) -> &'static str { match language { Language::EN => "Socket address", Language::IT => "Indirizzo del socket", + Language::DE => "Socket Adresse", _ => "Socket address", } } @@ -113,6 +124,7 @@ pub fn mac_address_translation(language: Language) -> &'static str { match language { Language::EN => "MAC address", Language::IT => "Indirizzo MAC", + Language::DE => "MAC Adresse", _ => "MAC address", } } @@ -121,6 +133,7 @@ pub fn source_translation(language: Language) -> &'static str { match language { Language::EN => "Source", Language::IT => "Sorgente", + Language::DE => "Quelle", _ => "Source", } } @@ -129,6 +142,7 @@ pub fn destination_translation(language: Language) -> &'static str { match language { Language::EN => "Destination", Language::IT => "Destinazione", + Language::DE => "Ziel", _ => "Destination", } } @@ -137,6 +151,7 @@ pub fn fqdn_translation(language: Language) -> &'static str { match language { Language::EN => "Fully qualified domain name", Language::IT => "Nome di dominio completo", + Language::DE => "Vollständig qualifizierter Domain Name", _ => "Fully qualified domain name", } } @@ -145,6 +160,7 @@ pub fn administrative_entity_translation(language: Language) -> &'static str { match language { Language::EN => "Administrative entity", Language::IT => "Entità amministrativa", + Language::DE => "Verwaltungseinheit", _ => "Administrative entity", } } @@ -153,6 +169,7 @@ pub fn transmitted_data_translation(language: Language) -> &'static str { match language { Language::EN => "Transmitted data", Language::IT => "Dati trasmessi", + Language::DE => "Übermittelte Daten", _ => "Transmitted data", } } @@ -161,6 +178,7 @@ pub fn country_translation(language: Language) -> &'static str { match language { Language::EN => "Country", Language::IT => "Paese", + Language::DE => "Land", _ => "Country", } } @@ -169,6 +187,7 @@ pub fn domain_name_translation(language: Language) -> &'static str { match language { Language::EN => "Domain name", Language::IT => "Nome di dominio", + Language::DE => "Domain Name", _ => "Domain name", } } @@ -177,6 +196,7 @@ pub fn only_show_favorites_translation(language: Language) -> &'static str { match language { Language::EN => "Only show favorites", Language::IT => "Mostra solo i preferiti", + Language::DE => "Zeige nur die Favoriten", _ => "Only show favorites", } } @@ -185,6 +205,7 @@ pub fn search_filters_translation(language: Language) -> &'static str { match language { Language::EN => "Search filters", Language::IT => "Filtri di ricerca", + Language::DE => "Filter suchen", _ => "Search filters", } } @@ -193,6 +214,7 @@ pub fn no_search_results_translation(language: Language) -> &'static str { match language { Language::EN => "No result available according to the specified search filters", Language::IT => "Nessun risultato disponibile secondo i filtri di ricerca specificati", + Language::DE => "Keine Resultate für die spezifizierten Such-Filter verfügbar", _ => "No result available according to the specified search filters", } } @@ -206,6 +228,7 @@ pub fn showing_results_translation( match language { Language::EN => format!("Showing {start}-{end} of {total} total results"), Language::IT => format!("Sono mostrati {start}-{end} di {total} risultati totali"), + Language::DE => format!("{start}-{end} von insgesamt {total} Resultaten werden angezeigt"), _ => format!("Showing {start}-{end} of {total} total results"), } } @@ -215,6 +238,7 @@ pub fn color_gradients_translation(language: Language) -> &'static str { match language { Language::EN => "Apply color gradients", Language::IT => "Applica sfumature di colore", + Language::DE => "Farb-Gradienten anwenden", _ => "Apply color gradients", } } From df93aaa4dbebe4db8ada4490fd9aa7e241ae8ed8 Mon Sep 17 00:00:00 2001 From: luca3s <41015240+luca3s@users.noreply.github.com> Date: Thu, 18 May 2023 20:57:45 +0200 Subject: [PATCH 2/3] "administrative entity" changed to "Autonomous System" in the german translation --- src/translations/translations_2.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/translations/translations_2.rs b/src/translations/translations_2.rs index a2fdc0b3..6f8cfb34 100644 --- a/src/translations/translations_2.rs +++ b/src/translations/translations_2.rs @@ -160,7 +160,7 @@ pub fn administrative_entity_translation(language: Language) -> &'static str { match language { Language::EN => "Administrative entity", Language::IT => "Entità amministrativa", - Language::DE => "Verwaltungseinheit", + Language::DE => "Name des autonomen Systems", _ => "Administrative entity", } } From 94d08e929c2fc6830e16ee5ebde2b26f2065c09e Mon Sep 17 00:00:00 2001 From: Giuliano Bellini s294739 Date: Sat, 27 May 2023 12:17:20 +0200 Subject: [PATCH 3/3] fix: update AS name translation and added DE in the set of full translations --- src/gui/pages/settings_language_page.rs | 10 +++++++++- src/gui/types/sniffer.rs | 4 ++-- src/translations/translations_2.rs | 6 +++--- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/gui/pages/settings_language_page.rs b/src/gui/pages/settings_language_page.rs index 9685ad9d..25ef5df4 100644 --- a/src/gui/pages/settings_language_page.rs +++ b/src/gui/pages/settings_language_page.rs @@ -61,7 +61,15 @@ pub fn settings_language_page(sniffer: &Sniffer) -> Container { ) .push(vertical_space(Fixed(20.0))); - if ![Language::EN, Language::IT, Language::SV, Language::RU].contains(&sniffer.language) { + if ![ + Language::EN, + Language::IT, + Language::SV, + Language::RU, + Language::DE, + ] + .contains(&sniffer.language) + { content = content .push( Container::new( diff --git a/src/gui/types/sniffer.rs b/src/gui/types/sniffer.rs index 540d82db..6b3da1fc 100644 --- a/src/gui/types/sniffer.rs +++ b/src/gui/types/sniffer.rs @@ -134,7 +134,7 @@ impl Sniffer { self.report_sort_type = what_to_display; } Message::OpenReport => self.open_report_file(), - Message::OpenWebPage(web_page) => Self::open_web(web_page), + Message::OpenWebPage(web_page) => Self::open_web(&web_page), Message::Start => self.start(), Message::Reset => return self.reset(), Message::Style(style) => { @@ -289,7 +289,7 @@ impl Sniffer { } } - fn open_web(web_page: WebPage) { + fn open_web(web_page: &WebPage) { let url = web_page.get_url(); #[cfg(target_os = "windows")] std::process::Command::new("explorer") diff --git a/src/translations/translations_2.rs b/src/translations/translations_2.rs index 8f1e3f15..2e105969 100644 --- a/src/translations/translations_2.rs +++ b/src/translations/translations_2.rs @@ -187,12 +187,12 @@ pub fn fqdn_translation(language: Language) -> &'static str { pub fn administrative_entity_translation(language: Language) -> &'static str { match language { - Language::EN => "Administrative entity", - Language::IT => "Entità amministrativa", + Language::EN => "Autonomous System name", + Language::IT => "Nome del sistema autonomo", Language::RU => "Имя автономной системы", Language::SV => "Administrativ enhet", Language::DE => "Name des autonomen Systems", - _ => "Administrative entity", + _ => "Autonomous System name", } }