From 1ee630ae4d4e1c1a8f3c3a5a057de61d02984000 Mon Sep 17 00:00:00 2001 From: vcrn <79985743+vcrn@users.noreply.github.com> Date: Mon, 29 Apr 2024 08:39:49 +0200 Subject: [PATCH 1/3] Update Swedish translation to v1.3 --- src/translations/translations_3.rs | 28 ++++++++++++++++++++++++---- src/translations/types/language.rs | 8 +++++++- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/src/translations/translations_3.rs b/src/translations/translations_3.rs index 4a18c38e..f2ef125f 100644 --- a/src/translations/translations_3.rs +++ b/src/translations/translations_3.rs @@ -15,13 +15,16 @@ pub fn general_translation(language: Language) -> &'static str { Language::DE => "Allgemein", Language::PL => "Ogólne", Language::RU => "Общие", + Language::SV => "Allmänt", _ => "General", } } pub fn zoom_translation(language: Language) -> &'static str { match language { - Language::EN | Language::IT | Language::ES | Language::FR | Language::DE => "Zoom", + Language::EN | Language::IT | Language::ES | Language::FR | Language::DE | Language::SV => { + "Zoom" + } Language::PL => "Powiększenie", Language::RU => "Масштаб интерфейса", _ => "Zoom", @@ -37,6 +40,7 @@ pub fn mmdb_files_translation(language: Language) -> &'static str { Language::DE => "Datenbank Dateien", Language::PL => "Pliki bazy danych", Language::RU => "Файлы базы данных", + Language::SV => "Databasfiler", _ => "Database files", } } @@ -50,6 +54,7 @@ pub fn params_not_editable_translation(language: Language) -> &'static str { Language::DE => "Die folgenden Paramter können während der Analyse nicht verändert werden", Language::PL => "Następujące parametry nie mogą być modyfikowane podczas analizy", Language::RU => "Следующие параметры не могут быть изменены во время анализа трафика", + Language::SV => "Följande parametrar kan inte ändras under analysen", _ => "The following parameters can't be modified during the analysis", } } @@ -63,10 +68,12 @@ pub fn custom_style_translation(language: Language) -> &'static str { Language::DE => "Benutzerdefinierter Stil", Language::PL => "Niestandardowy styl", Language::RU => "Свой стиль", + Language::SV => "Anpassad stil", _ => "Custom style", } } +// "Copy", as the noun pub fn copy_translation(language: Language) -> &'static str { match language { Language::EN => "Copy", @@ -75,13 +82,14 @@ pub fn copy_translation(language: Language) -> &'static str { Language::DE => "Kopieren", Language::PL => "Kopiuj", Language::RU => "Скопировать", + Language::SV => "Kopia", _ => "Copy", } } pub fn port_translation(language: Language) -> &'static str { match language { - Language::EN | Language::FR | Language::DE | Language::PL => "Port", + Language::EN | Language::FR | Language::DE | Language::PL | Language::SV => "Port", Language::ES => "Puerto", Language::IT => "Porta", Language::RU => "Порт", @@ -98,6 +106,7 @@ pub fn invalid_filters_translation(language: Language) -> &'static str { Language::DE => "Ungültige Filter", Language::PL => "Nieprawidłowe filtry", Language::RU => "Неверный формат фильтров", + Language::SV => "Ogiltiga filter", _ => "Invalid filters", } } @@ -110,6 +119,7 @@ pub fn messages_translation(language: Language) -> &'static str { Language::DE => "Nachrichten", Language::PL => "Wiadomości", Language::RU => "Сообщения", + Language::SV => "Meddelanden", _ => "Messages", } } @@ -123,6 +133,7 @@ pub fn link_type_translation(language: Language) -> &'static str { Language::DE => "Verbindungsart", Language::PL => "Rodzaj połączenia", // "Typ łącza"? Language::RU => "Тип соединения", + Language::SV => "Länktyp", _ => "Link type", } } @@ -139,6 +150,7 @@ pub fn unsupported_link_type_translation( Language::DE => "Die Verbindungsart dieses Adapters wird noch nicht von Sniffnet unterstützt", Language::PL => "Rodzaj połączenia powiązany z tym adapterem nie jest jeszcze obsługiwany przez Sniffnet...", Language::RU => "Тип соединения, связанный с этим адаптером, пока не поддерживается Sniffnet...", + Language::SV => "Länktypen associerad med denna adapter stöds inte av Sniffnet än ...", _ => "The link type associated with this adapter is not supported by Sniffnet yet...", }.to_string(); @@ -156,6 +168,7 @@ pub fn style_from_file_translation(language: Language) -> &'static str { Language::DE => "Stil aus einer Datei wählen", Language::PL => "Wybierz styl z pliku", Language::RU => "Выберите тему из файла", + Language::SV => "Välj stil från en fil", _ => "Select style from a file", } } @@ -169,6 +182,7 @@ pub fn database_from_file_translation(language: Language) -> &'static str { Language::DE => "Datenbank Datei auswählen", Language::PL => "Wybierz plik bazy danych", Language::RU => "Выберите файл базы данных", + Language::SV => "Välj databasfil", _ => "Select database file", } } @@ -182,13 +196,14 @@ pub fn filter_by_host_translation(language: Language) -> &'static str { Language::DE => "Nach Netzwerk-Host filtern", Language::PL => "Filtruj według hosta sieciowego", Language::RU => "Фильтр по сетевому хосту", + Language::SV => "Filtrera efter nätverksvärd", _ => "Filter by network host", } } pub fn service_translation(language: Language) -> &'static str { match language { - Language::EN | Language::FR | Language::DE => "Service", + Language::EN | Language::FR | Language::DE | Language::SV => "Service", Language::ES => "Servicio", Language::IT => "Servizio", Language::PL => "Usługa", @@ -205,6 +220,7 @@ pub fn export_capture_translation(language: Language) -> &'static str { Language::DE => "Aufzeichnungsdatei exportieren", Language::PL => "Eksportuj plik przechwytywania", Language::RU => "Экспорт файла захвата", + Language::SV => "Exportera inspelningsfil", _ => "Export capture file", } } @@ -216,7 +232,7 @@ pub fn directory_translation(language: Language) -> &'static str { Language::IT => "Cartella", Language::FR => "Répertoire", Language::DE => "Ordner", - Language::PL => "Katalog", // Katalog usually refers to Linux based directory while "Folder" is more common between Windows users (e.g. windows explorer refers to directories as "Folders") + Language::PL | Language::SV => "Katalog", // Katalog usually refers to Linux based directory while "Folder" is more common between Windows users (e.g. windows explorer refers to directories as "Folders") Language::RU => "Директория", _ => "Directory", } @@ -230,6 +246,7 @@ pub fn select_directory_translation(language: Language) -> &'static str { Language::DE => "Zielorder wählen", Language::PL => "Wybierz katalog docelowy", // "Wybierz folder docelowy"? Language::RU => "Выберите директорию назначения", + Language::SV => "Välj målkatalog", _ => "Select destination directory", } } @@ -242,6 +259,7 @@ pub fn file_name_translation(language: Language) -> &'static str { Language::DE => "Dateiname", Language::PL => "Nazwa pliku", Language::RU => "Имя файла", + Language::SV => "Filnamn", _ => "File name", } } @@ -254,6 +272,7 @@ pub fn thumbnail_mode_translation(language: Language) -> &'static str { Language::DE => "Bild-in-Bild Modus", Language::PL => "Tryb miniatury", Language::RU => "Режим миниатюры", + Language::SV => "Miniatyrläge", _ => "Thumbnail mode", } } @@ -266,6 +285,7 @@ pub fn learn_more_translation(language: Language) -> &'static str { Language::DE => "Mehr erfahren", Language::PL => "Chcesz dowiedzieć się więcej?", Language::RU => "Хотите узнать больше?", + Language::SV => "Vill du veta mer?", _ => "Do you want to learn more?", } } diff --git a/src/translations/types/language.rs b/src/translations/types/language.rs index 53cfbef3..595d9a03 100644 --- a/src/translations/types/language.rs +++ b/src/translations/types/language.rs @@ -108,7 +108,13 @@ impl Language { pub fn is_up_to_date(self) -> bool { matches!( self, - Language::FR | Language::EN | Language::IT | Language::DE | Language::PL | Language::RU + Language::FR + | Language::EN + | Language::IT + | Language::DE + | Language::PL + | Language::RU + | Language::SV ) } } From c4c5d5eb577b13d95ec6b272f748668076c29fb3 Mon Sep 17 00:00:00 2001 From: Giuliano Bellini s294739 Date: Sat, 29 Jun 2024 10:23:11 +0200 Subject: [PATCH 2/3] update CHANGELOG --- CHANGELOG.md | 1 + src/translations/translations_3.rs | 20 ++++++++++++++------ src/translations/types/language.rs | 2 +- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc2188a4..36dc63a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ All Sniffnet releases with the relative changes are documented in this file. - Romanian - [#499](https://github.com/GyulyVGC/sniffnet/pull/499) - Japanese - [#504](https://github.com/GyulyVGC/sniffnet/pull/504) - Uzbek - [#510](https://github.com/GyulyVGC/sniffnet/pull/510) + - Swedish - [#522](https://github.com/GyulyVGC/sniffnet/pull/522) - Increased the range of selectable zoom values (fixes [#542](https://github.com/GyulyVGC/sniffnet/issues/542)) - Reduced `String` allocations in translation code ([#524](https://github.com/GyulyVGC/sniffnet/pull/524)) diff --git a/src/translations/translations_3.rs b/src/translations/translations_3.rs index 331ae3ed..648a92f7 100644 --- a/src/translations/translations_3.rs +++ b/src/translations/translations_3.rs @@ -25,9 +25,13 @@ pub fn general_translation(language: Language) -> &'static str { pub fn zoom_translation(language: Language) -> &'static str { match language { - Language::EN | Language::IT | Language::ES | Language::FR | Language::DE | Language::RO | Language::SV => { - "Zoom" - } + Language::EN + | Language::IT + | Language::ES + | Language::FR + | Language::DE + | Language::RO + | Language::SV => "Zoom", // Language::FA => "بزرگنمایی", Language::PL => "Powiększenie", Language::RU => "Масштаб интерфейса", @@ -109,9 +113,13 @@ pub fn copy_translation(language: Language) -> &'static str { pub fn port_translation(language: Language) -> &'static str { match language { - Language::EN | Language::FR | Language::DE | Language::PL | Language::RO | Language::UZ | Language::SV => { - "Port" - } + Language::EN + | Language::FR + | Language::DE + | Language::PL + | Language::RO + | Language::UZ + | Language::SV => "Port", // Language::FA => "درگاه", Language::ES => "Puerto", Language::IT => "Porta", diff --git a/src/translations/types/language.rs b/src/translations/types/language.rs index 4caa684e..0b7b165d 100644 --- a/src/translations/types/language.rs +++ b/src/translations/types/language.rs @@ -117,7 +117,7 @@ impl Language { | Language::RO | Language::JA | Language::UZ - | Language::SV + | Language::SV ) } } From 9a2e27f12e146d912c1e9194dd9a25c15ffa37ce Mon Sep 17 00:00:00 2001 From: Giuliano Bellini s294739 Date: Sat, 29 Jun 2024 10:41:45 +0200 Subject: [PATCH 3/3] minor translations improvement --- src/translations/translations_3.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/translations/translations_3.rs b/src/translations/translations_3.rs index 648a92f7..3bc0c080 100644 --- a/src/translations/translations_3.rs +++ b/src/translations/translations_3.rs @@ -192,13 +192,13 @@ pub fn unsupported_link_type_translation( Language::ES => "La conexión asociada con este adaptador aún no esta implementada en Sniffnet...", Language::IT => "Il tipo di collegamento associato a questo adattatore di rete non è ancora supportato da Sniffnet...", Language::FR => "Le type de connexion associé à cet adaptateur n'est pas encore supporté par Sniffnet...", - Language::DE => "Die Verbindungsart dieses Adapters wird noch nicht von Sniffnet unterstützt", + Language::DE => "Die Verbindungsart dieses Adapters wird noch nicht von Sniffnet unterstützt...", Language::PL => "Rodzaj połączenia powiązany z tym adapterem nie jest jeszcze obsługiwany przez Sniffnet...", Language::RU => "Тип соединения, связанный с этим адаптером, пока не поддерживается Sniffnet...", Language::RO => "Tipul conexiunii asociate acestui adaptor de rețea nu este încă suportat de Sniffnet...", Language::JA => "このアダプターのリンク タイプは Sniffnet ではまだサポートされていません...", - Language::UZ => "Ushbu adapter bilan bog'langan havola turi hozircha Sniffnet tomonidan qo'llab quvvatlanmaydi", - Language::SV => "Länktypen associerad med denna adapter stöds inte av Sniffnet än ...", + Language::UZ => "Ushbu adapter bilan bog'langan havola turi hozircha Sniffnet tomonidan qo'llab quvvatlanmaydi...", + Language::SV => "Länktypen associerad med denna adapter stöds inte av Sniffnet än...", _ => "The link type associated with this adapter is not supported by Sniffnet yet...", };