Skip to content

Commit

Permalink
Merge pull request #191 from luca3s/main
Browse files Browse the repository at this point in the history
Additional German translations added
  • Loading branch information
GyulyVGC authored May 27, 2023
2 parents 0836ddd + 94d08e9 commit 47c1bba
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 7 deletions.
10 changes: 9 additions & 1 deletion src/gui/pages/settings_language_page.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,15 @@ pub fn settings_language_page(sniffer: &Sniffer) -> Container<Message> {
)
.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(
Expand Down
4 changes: 2 additions & 2 deletions src/gui/types/sniffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down Expand Up @@ -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")
Expand Down
32 changes: 28 additions & 4 deletions src/translations/translations_2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ pub fn new_version_available_translation(language: Language) -> &'static str {
Language::EL => "Μια νεότερη έκδοση είναι διαθέσιμη στο GitHub",
Language::FA => "یک نسخه جدیدتر روی GitHub موجود است",
Language::SV => "En nyare version finns tillgänglig på GitHub",
Language::DE => "Eine neue Version ist auf GitHub verfügbar",
_ => "A newer version is available on GitHub",
}
}
Expand All @@ -21,7 +22,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 => "Инспектировать",
Language::SV => "Inspektera",
_ => "Inspect",
Expand All @@ -34,6 +35,7 @@ pub fn connection_details_translation(language: Language) -> &'static str {
Language::IT => "Dettagli della connessione",
Language::RU => "Подробнее о соединении",
Language::SV => "Anslutningsdetaljer",
Language::DE => "Verbindungsdetails",
_ => "Connection details",
}
}
Expand All @@ -44,6 +46,7 @@ pub fn dropped_packets_translation(language: Language) -> &'static str {
Language::IT => "Pacchetti mancati",
Language::RU => "Потеряно пакетов",
Language::SV => "Tappade paket",
Language::DE => "Verlorene Pakete",
_ => "Dropped packets",
}
}
Expand All @@ -54,6 +57,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::DE => "Daten Darstellung",
_ => "Data representation",
}
}
Expand All @@ -64,6 +68,7 @@ pub fn host_translation(language: Language) -> &'static str {
Language::IT => "Host di rete",
Language::RU => "Сетевой хост",
Language::SV => "Nätverksvärd",
Language::DE => "Netzwerk-Host",
_ => "Network host",
}
}
Expand All @@ -74,6 +79,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::DE => "Nur die obersten 30 Hosts werden hier angezeigt",
_ => "Only the top 30 hosts are displayed here",
}
}
Expand All @@ -84,6 +90,7 @@ pub fn sort_by_translation(language: Language) -> &'static str {
Language::IT => "Ordina per",
Language::RU => "Сортировка",
Language::SV => "Sortera efter",
Language::DE => "Sortieren nach",
_ => "Sort by",
}
}
Expand All @@ -94,6 +101,7 @@ pub fn local_translation(language: Language) -> String {
Language::IT => "Rete locale",
Language::RU => "Локальная сеть",
Language::SV => "Lokalt nätverk",
Language::DE => "Lokales Netzwerk",
_ => "Local network",
}
.to_string()
Expand All @@ -105,6 +113,7 @@ pub fn unknown_translation(language: Language) -> String {
Language::IT => "Localizzazione sconosciuta",
Language::RU => "Неизвестный регион",
Language::SV => "Okänd plats",
Language::DE => "Ort unbekannt",
_ => "Unknown location",
}
.to_string()
Expand All @@ -116,6 +125,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::DE => "Dein Netzwerk-Adapter",
_ => "Your network adapter",
}
.to_string()
Expand All @@ -127,6 +137,7 @@ pub fn socket_address_translation(language: Language) -> &'static str {
Language::IT => "Indirizzo del socket",
Language::RU => "Адрес сокекта",
Language::SV => "Socketadress",
Language::DE => "Socket Adresse",
_ => "Socket address",
}
}
Expand All @@ -137,6 +148,7 @@ pub fn mac_address_translation(language: Language) -> &'static str {
Language::IT => "Indirizzo MAC",
Language::RU => "MAC адрес",
Language::SV => "MAC-adress",
Language::DE => "MAC Adresse",
_ => "MAC address",
}
}
Expand All @@ -147,6 +159,7 @@ pub fn source_translation(language: Language) -> &'static str {
Language::IT => "Sorgente",
Language::RU => "Источник",
Language::SV => "Källa",
Language::DE => "Quelle",
_ => "Source",
}
}
Expand All @@ -156,6 +169,7 @@ pub fn destination_translation(language: Language) -> &'static str {
Language::EN | Language::SV => "Destination",
Language::IT => "Destinazione",
Language::RU => "Получатель",
Language::DE => "Ziel",
_ => "Destination",
}
}
Expand All @@ -166,17 +180,19 @@ pub fn fqdn_translation(language: Language) -> &'static str {
Language::IT => "Nome di dominio completo",
Language::RU => "Полное доменное имя",
Language::SV => "Fullständigt domännamn",
Language::DE => "Vollständig qualifizierter Domain Name",
_ => "Fully qualified domain name",
}
}

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",
_ => "Administrative entity",
Language::DE => "Name des autonomen Systems",
_ => "Autonomous System name",
}
}

Expand All @@ -186,6 +202,7 @@ pub fn transmitted_data_translation(language: Language) -> &'static str {
Language::IT => "Dati trasmessi",
Language::RU => "Передано данных",
Language::SV => "Överförd data",
Language::DE => "Übermittelte Daten",
_ => "Transmitted data",
}
}
Expand All @@ -196,6 +213,7 @@ pub fn country_translation(language: Language) -> &'static str {
Language::IT => "Paese",
Language::RU => "Страна",
Language::SV => "Land",
Language::DE => "Land",
_ => "Country",
}
}
Expand All @@ -206,6 +224,7 @@ pub fn domain_name_translation(language: Language) -> &'static str {
Language::IT => "Nome di dominio",
Language::RU => "Доменное имя",
Language::SV => "Domännamn",
Language::DE => "Domain Name",
_ => "Domain name",
}
}
Expand All @@ -216,6 +235,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::DE => "Zeige nur die Favoriten",
_ => "Only show favorites",
}
}
Expand All @@ -226,6 +246,7 @@ pub fn search_filters_translation(language: Language) -> &'static str {
Language::IT => "Filtri di ricerca",
Language::RU => "Фильтры для поиска",
Language::SV => "Sökfilter",
Language::DE => "Filter suchen",
_ => "Search filters",
}
}
Expand All @@ -236,6 +257,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::DE => "Keine Resultate für die spezifizierten Such-Filter verfügbar",
_ => "No result available according to the specified search filters",
}
}
Expand All @@ -251,6 +273,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::DE => format!("{start}-{end} von insgesamt {total} Resultaten werden angezeigt"),
_ => format!("Showing {start}-{end} of {total} total results"),
}
}
Expand All @@ -262,6 +285,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::DE => "Farb-Gradienten anwenden",
_ => "Apply color gradients",
}
}

0 comments on commit 47c1bba

Please sign in to comment.