diff --git a/CHANGELOG.md b/CHANGELOG.md index f3d7f58f..c85a429f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ All Sniffnet releases with the relative changes are documented in this file. ## [UNRELEASED] +- Added Vietnamese translation 🇻🇳 ([#577](https://github.com/GyulyVGC/sniffnet/pull/577)) - Updated Chinese translation to v1.3 ([#575](https://github.com/GyulyVGC/sniffnet/pull/575)) ## [1.3.1] - 2024-07-22 diff --git a/README.md b/README.md index 58715dd0..58308df2 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Application to comfortably monitor your Internet traffic
Cross-platform, Intuitive, Reliable Translated in:
-🇨🇳 🇩🇪 🇫🇷 🇷🇺 🇵🇹 🇪🇦 🇮🇹 🇵🇱 [+ 11 more languages](https://github.com/GyulyVGC/sniffnet/issues/60) +🇨🇳 🇩🇪 🇫🇷 🇷🇺 🇵🇹 🇪🇦 🇮🇹 🇵🇱 [+ 12 more languages](https://github.com/GyulyVGC/sniffnet/issues/60)

diff --git a/resources/fonts/full/subset_characters.txt b/resources/fonts/full/subset_characters.txt index 48876802..18e59cf7 100644 --- a/resources/fonts/full/subset_characters.txt +++ b/resources/fonts/full/subset_characters.txt @@ -94,6 +94,8 @@ z } ¡ ¿ +Á +Â Ä Ê Î @@ -125,6 +127,8 @@ z ă ą ć +Đ +đ ę ğ İ @@ -134,9 +138,12 @@ z ś Ş ş +ũ Ź ź ż +ơ +ư Ș ș Ț @@ -291,6 +298,41 @@ z ی ۰ ۳ +ạ +ả +ấ +ầ +Ẩ +ẫ +ậ +ắ +ẵ +ặ +ẻ +ẽ +ế +ề +ể +ệ +ỉ +ị +ọ +ỏ +ố +ồ +ổ +ỗ +ộ +ớ +ở +ỡ +ợ +ụ +ủ +ứ +ừ +ử +ữ • … ⏎ diff --git a/resources/fonts/subset/sarasa-mono-sc-bold.subset.ttf b/resources/fonts/subset/sarasa-mono-sc-bold.subset.ttf index 0df2b834..d43cbdc8 100644 Binary files a/resources/fonts/subset/sarasa-mono-sc-bold.subset.ttf and b/resources/fonts/subset/sarasa-mono-sc-bold.subset.ttf differ diff --git a/resources/fonts/subset/sarasa-mono-sc-regular.subset.ttf b/resources/fonts/subset/sarasa-mono-sc-regular.subset.ttf index a379bf41..693dafa0 100644 Binary files a/resources/fonts/subset/sarasa-mono-sc-regular.subset.ttf and b/resources/fonts/subset/sarasa-mono-sc-regular.subset.ttf differ diff --git a/src/gui/pages/inspect_page.rs b/src/gui/pages/inspect_page.rs index 7de1399a..d45d7ce5 100644 --- a/src/gui/pages/inspect_page.rs +++ b/src/gui/pages/inspect_page.rs @@ -530,7 +530,7 @@ mod tests { #[test] fn test_table_titles_display_and_tooltip_values_for_each_language() { // check glyph len when adding new language... - assert_eq!(Language::ALL.len(), 18); + assert_eq!(Language::ALL.len(), 19); for report_col in ReportCol::ALL { for language in Language::ALL { let (title, title_small, tooltip_val) = diff --git a/src/translations/translations.rs b/src/translations/translations.rs index 756a6a23..a61f3e84 100644 --- a/src/translations/translations.rs +++ b/src/translations/translations.rs @@ -26,6 +26,7 @@ pub fn choose_adapters_translation(language: Language) -> Text<'static, StyleTyp Language::FI => "Valitse tarkasteltava verkkosovitin", Language::JA => "使用するネットワーク アダプターを選択してください", Language::UZ => "Tekshirish uchun tarmoq adapterini tanlang", + Language::VI => "Hãy chọn network adapter để quan sát", }) } @@ -74,6 +75,7 @@ pub fn select_filters_translation(language: Language) -> Text<'static, StyleType Language::FI => "Valitse suodattimet verkkoliikenteelle", Language::JA => "トラフィックに適用するフィルターを選択してください", Language::UZ => "Tarmoq trafigiga qo'llaniladigan filtrlarni tanlang", + Language::VI => "Hãy chọn bộ lọc cho lưu lượng mạng", }) } @@ -95,6 +97,7 @@ pub fn start_translation(language: Language) -> &'static str { Language::FI => "Aloita!", Language::JA => "開始!", Language::UZ => "Boshlash!", + Language::VI => "Bắt đầu!", } } @@ -117,6 +120,7 @@ pub fn address_translation(language: Language) -> &'static str { Language::FI => "Osoite", Language::JA => "アドレス", Language::UZ => "Manzil", + Language::VI => "Địa chỉ", } } @@ -141,6 +145,7 @@ pub fn addresses_translation(language: Language) -> &'static str { Language::FI => "Osoitteet", Language::JA => "アドレス", Language::UZ => "Manzillar", + Language::VI => "Danh sách địa chỉ", } } @@ -165,6 +170,7 @@ pub fn ip_version_translation(language: Language) -> &'static str { Language::FI => "IP-versio", Language::JA => "IP バージョン", Language::UZ => "IP versiyasi", + Language::VI => "Phiên bản IP", } } @@ -208,6 +214,7 @@ pub fn protocol_translation(language: Language) -> &'static str { Language::FI => "Protokolla", Language::JA => "プロトコル", Language::UZ => "Protokoli", + Language::VI => "Phương thức", } } @@ -232,6 +239,7 @@ pub fn traffic_rate_translation(language: Language) -> Text<'static, StyleType> Language::FI => "Liikennemäärä", Language::JA => "トラフィック レート", Language::UZ => "Trafik tezligi", + Language::VI => "Lưu lượng truy cập", }) } @@ -278,6 +286,7 @@ pub fn settings_translation(language: Language) -> &'static str { Language::FI => "Asetukset", Language::JA => "設定", Language::UZ => "Sozlamalar", + Language::VI => "Cài đặt", } } @@ -301,6 +310,7 @@ pub fn yes_translation(language: Language) -> Text<'static, StyleType> { Language::FI => "Kyllä", Language::JA => "はい", Language::UZ => "Ha", + Language::VI => "Chấp nhận", }) } @@ -325,6 +335,7 @@ pub fn ask_quit_translation(language: Language) -> Text<'static, StyleType> { Language::FI => "Haluatko varmasti lopettaa analyysin?", Language::JA => "分析を終了しますか?", Language::UZ => "Tahlildan chiqishga ishonchingiz komilmi?", + Language::VI => "Bạn có chắc là muốn thoát phiên phân tích này?", }) } @@ -349,6 +360,7 @@ pub fn quit_analysis_translation(language: Language) -> &'static str { Language::FI => "Lopeta analyysi", Language::JA => "分析の終了", Language::UZ => "Tahlildan chiqish", + Language::VI => "Thoát phiên phân tích", } } @@ -373,6 +385,7 @@ pub fn ask_clear_all_translation(language: Language) -> Text<'static, StyleType> Language::FI => "Haluatko varmasti tyhjentää ilmoitukset?", Language::JA => "すべての通知を削除します。よろしいですか?", Language::UZ => "Haqiqatan ham bildirishnomalarni tozalamoqchimisiz?", + Language::VI => "Bạn có chắc là muốn xóa các thông báo?", }) } @@ -397,6 +410,7 @@ pub fn clear_all_translation(language: Language) -> &'static str { Language::FI => "Tyhjennä kaikki", Language::JA => "すべて削除", Language::UZ => "Barchasini tozalash", + Language::VI => "Xóa tất cả", } } @@ -421,12 +435,13 @@ pub fn hide_translation(language: Language) -> &'static str { Language::FI => "Piilota", Language::JA => "隠す", Language::UZ => "Yashirish", + Language::VI => "Ẩn", } } pub fn network_adapter_translation(language: Language) -> &'static str { match language { - Language::EN => "Network adapter", + Language::EN | Language::VI => "Network adapter", Language::IT => "Adattatore di rete", Language::FR => "Carte réseau", Language::ES => "Adaptador de red", @@ -508,6 +523,9 @@ pub fn no_addresses_translation(language: Language, adapter: &str) -> Text<'stat Language::UZ => format!("Trafik kuzatilmaydi, chunki siz tanlagan adapterda faol manzillar yo'q...\n\n\ {network_adapter_translation}: {adapter}\n\n\ Internetga ulanganingizga ishonchingiz komil bo'lsa, boshqa adapterni tanlashga harakat qiling"), + Language::VI => format!("Không thể quan sát lưu lượng nào vì adapter mà bạn chọn không địa chỉ hoạt động...\n\n\ + {network_adapter_translation}: {adapter}\n\n\ + Nếu bạn đã chắc chắn kết nối với internet, hãy thử chọn network adapter khác."), }) } @@ -572,6 +590,9 @@ pub fn waiting_translation(language: Language, adapter: &str) -> Text<'static, S "Hali hech qanday trafik aniqlanmadi. Tarmoq paketlari kutilmoqda...\n\n\ {network_adapter_translation}: {adapter}\n\n\ Internetga ulanganingizga va to'g'ri adapterni tanlaganingizga ishonchingiz komilmi?"), + Language::VI => format!("Chưa có lưu lượng để quan sát. Đang đợi các gói tin...\n\n\ + {network_adapter_translation}: {adapter}\n\n\ + Bạn có chắc là đã kết nối với internet và đã chọn đúng network adapter?"), }) } @@ -635,6 +656,9 @@ pub fn some_observed_translation(language: Language, observed: u128) -> Text<'st "Jami ushlangan paketlar: {observed}\n\n\ Filtrlangan paketlar: 0\n\n\ Tarmoq paketlari ushlandi, lekin ularning hech biri belgilangan filtrlarga mos kelmadi..."), + Language::VI => format!("Tổng số gói tin bị chặn: {observed}\n\n\ + Các gói tin đã lọc: 0\n\n\ + Một số gói đã bị chặn, nhưng vẫn chưa có gói tin nào được bắt theo bộ lọc bạn đã chọn..."), }) } @@ -659,6 +683,7 @@ pub fn filtered_packets_translation(language: Language) -> &'static str { Language::FI => "Suodatettuja paketteja", Language::JA => "フィルタリングされたパケット", Language::UZ => "Filtrlangan paketlar", + Language::VI => "Các gói tin đã được lọc", } } @@ -682,6 +707,7 @@ pub fn filtered_bytes_translation(language: Language) -> &'static str { Language::FI => "Suodatettuja tavuja", Language::JA => "フィルタリングされたバイト", Language::UZ => "Filtrlangan baytlar", + Language::VI => "Các bytes đã được lọc", } } @@ -720,6 +746,7 @@ pub fn of_total_translation(language: Language, percentage: &str) -> String { Language::FI => format!("({percentage} kokonaismäärästä)"), Language::JA => format!("(トータル: {percentage} )"), Language::UZ => format!("(Jami: {percentage} )"), + Language::VI => format!("({percentage} trên tổng cộng)"), } } @@ -862,6 +889,10 @@ pub fn error_translation(language: Language, error: &str) -> Text<'static, Style "Xatolik yuz berdi!\n\n\ {error}" ), + Language::VI => format!( + "Đã có lỗi xảy ra! \n\n\ + {error}" + ), }) } @@ -946,6 +977,7 @@ pub fn packets_translation(language: Language) -> &'static str { Language::FI => "paketit", Language::JA => "パケット", Language::UZ => "paketlar", + Language::VI => "các gói tin", } } @@ -970,12 +1002,15 @@ pub fn packets_chart_translation(language: Language) -> &'static str { Language::FI => "pakettia sekunnissa", Language::JA => "1 秒あたりのパケット数", Language::UZ => "paket soniyasiga", + Language::VI => "gói tin trên giây", } } pub fn bytes_translation(language: Language) -> &'static str { match language { - Language::EN | Language::ES | Language::PT | Language::EL | Language::SV => "bytes", + Language::EN | Language::ES | Language::PT | Language::EL | Language::SV | Language::VI => { + "bytes" + } Language::DE => "Bytes", Language::IT => "byte", Language::FR => "octets", @@ -1012,6 +1047,7 @@ pub fn bytes_chart_translation(language: Language) -> &'static str { Language::FI => "tavua sekunnissa", Language::JA => "1 秒あたりのバイト量", Language::UZ => "bayt soniyasiga", + Language::VI => "byte trên giây", } } @@ -1129,6 +1165,7 @@ pub fn notifications_title_translation(language: Language) -> Text<'static, Styl Language::FI => "Muokkaa ilmoituksiasi", Language::JA => "通知のカスタマイズ", Language::UZ => "Bildirishnomalaringizni sozlang", + Language::VI => "Tùy chỉnh thông báo của bạn", }) } @@ -1153,6 +1190,7 @@ pub fn appearance_title_translation(language: Language) -> Text<'static, StyleTy Language::FI => "Valitse suosikkiteemasi", Language::JA => "テーマを選択してください", Language::UZ => "Sevimli mavzuingizni tanlang", + Language::VI => "Chọn chủ đề bạn muốn", }) } @@ -1177,6 +1215,7 @@ pub fn active_filters_translation(language: Language) -> &'static str { Language::FI => "Aktiiviset suodattimet", Language::JA => "適用されているフィルター", Language::UZ => "Faol filtrlar", + Language::VI => "Bộ lọc đang hoạt động", } } @@ -1201,6 +1240,7 @@ pub fn none_translation(language: Language) -> &'static str { Language::FI => "ei mitään", Language::JA => "なし", Language::UZ => "hech biri", + Language::VI => "không có", } } @@ -1225,6 +1265,7 @@ pub fn yeti_night_translation(language: Language) -> &'static str { Language::FI => "Sniffnetin alkuperäinen tumma teema", Language::JA => "Sniffnet のオリジナル テーマ", Language::UZ => "Sniffnet-ning asl qora mavzusi", + Language::VI => "Chủ đề tối của Sniffnet", } } @@ -1248,6 +1289,7 @@ pub fn yeti_day_translation(language: Language) -> &'static str { Language::FI => "Sniffnetin alkuperäinen vaalea teema", Language::JA => "Sniffnet のオリジナル ライト テーマ", Language::UZ => "Sniffnet-ning asl oq mavzusi", + Language::VI => "Chủ đề sáng của Sniffnet", } } @@ -1272,6 +1314,7 @@ pub fn deep_sea_translation(language: Language) -> &'static str { Language::FI => "Sukeltaaksesi verkkoliikenteeseen", Language::JA => "ネットワーク トラフィックにダイブ", Language::UZ => "Tarmoq trafigiga qo'shilish uchun", + Language::VI => "Đắm chìm vào lưu lượng mạng", } } @@ -1296,6 +1339,7 @@ pub fn mon_amour_translation(language: Language) -> &'static str { Language::FI => "Ihana teema unelmoijille", Language::JA => "ドリーマーのためのテーマ", Language::UZ => "Xayolparastlar uchun chiroyli mavzu", + Language::VI => "Chủ đề mộng mơ cho những kẻ mơ mộng", } } @@ -1320,6 +1364,7 @@ pub fn incoming_translation(language: Language) -> &'static str { Language::FI => "Saapuva", Language::JA => "受信", Language::UZ => "Kiruvchi", + Language::VI => "Đang tới", } } @@ -1344,6 +1389,7 @@ pub fn outgoing_translation(language: Language) -> &'static str { Language::FI => "Lähtevä", Language::JA => "送信", Language::UZ => "Chiquvchi", + Language::VI => "Đang hướng ra ngoài", } } @@ -1366,6 +1412,7 @@ pub fn notifications_translation(language: Language) -> &'static str { Language::SV => "Notifikationer", Language::FI => "Ilmoitukset", Language::UZ => "Bildirishnomalar", + Language::VI => "Thông báo", } } @@ -1385,6 +1432,7 @@ pub fn style_translation(language: Language) -> &'static str { Language::FI => "Tyyli", Language::JA => "スタイル", Language::UZ => "Uslub", + Language::VI => "Chủ đề", } } @@ -1409,6 +1457,7 @@ pub fn language_translation(language: Language) -> &'static str { Language::FI => "Kieli", Language::JA => "表示言語", Language::UZ => "Til", + Language::VI => "Ngôn ngữ", } } @@ -1433,6 +1482,7 @@ pub fn overview_translation(language: Language) -> &'static str { Language::FI => "Yleiskatsaus", Language::JA => "概要", Language::UZ => "Ko'rib chiqish", + Language::VI => "Tổng quan", } } @@ -1457,6 +1507,7 @@ 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", + Language::VI => "Báo cho tôi biết khi vượt quá ngưỡng gói tin", } } @@ -1481,6 +1532,7 @@ pub fn bytes_threshold_translation(language: Language) -> &'static str { Language::FI => "Ilmoita minulle, kun tavuraja on ylittynyt", Language::JA => "バイト量の閾値を超過した場合に通知する", Language::UZ => "Bayt chegarasi oshib ketganda menga xabar bering", + Language::VI => "Báo cho tôi biết khi vượt quá ngưỡng bytes", } } @@ -1503,6 +1555,7 @@ pub fn per_second_translation(language: Language) -> &'static str { Language::SV => "(per sekund)", Language::FI => "(sekunnissa)", Language::UZ => "(soniyasiga)", + Language::VI => "(trên giây)", } } @@ -1527,6 +1580,7 @@ pub fn specify_multiples_translation(language: Language) -> &'static str { 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", + Language::VI => "bạn cũng có thể chọn 'K', 'M' and 'G'", } } @@ -1553,6 +1607,7 @@ pub fn favorite_notification_translation(language: Language) -> &'static str { Language::FI => "Ilmoita minulle, kun suosikkini vaihtavat uusia tietoja", Language::JA => "お気に入りに指定したホストに関してデータ送受信があった場合に通知する", Language::UZ => "Sevimlilar ro'yhatidan yangi ma'lumotlar almashganda xabar bering", + Language::VI => "Báo cho tôi biết khi dữ liệu mới được trao đổi từ mục yêu thích của tôi", } } @@ -1577,6 +1632,7 @@ pub fn threshold_translation(language: Language) -> &'static str { Language::FI => "Raja", Language::JA => "閾値", Language::UZ => "Eshik", + Language::VI => "Ngưỡng", } } @@ -1597,6 +1653,7 @@ pub fn volume_translation(language: Language) -> &'static str { Language::SV => "Volym", Language::FI => "Äänenvoimakkuus", Language::UZ => "Ovoz balandligi", + Language::VI => "Âm lượng", } } @@ -1619,6 +1676,7 @@ pub fn sound_translation(language: Language) -> &'static str { Language::SV => "Ljud", Language::FI => "Ääni", Language::UZ => "Ovoz", + Language::VI => "Âm thanh", } } @@ -1643,6 +1701,7 @@ pub fn bytes_exceeded_translation(language: Language) -> &'static str { Language::FI => "Tavuraja ylitetty!", Language::JA => "バイト量の閾値を調査しました!", Language::UZ => "Bayt chegarasidan oshib ketdi!", + Language::VI => "Bytes đã vượt ngưỡng!", } } @@ -1667,6 +1726,7 @@ pub fn bytes_exceeded_value_translation(language: Language, value: &str) -> Stri Language::FI => format!("{value} on vaihdettu"), Language::JA => format!("{value} の送受信が発生しました"), Language::UZ => format!("{value} ma'lumot almashinuvi"), + Language::VI => format!("{value} đã được trao đổi"), } } @@ -1691,6 +1751,7 @@ pub fn packets_exceeded_translation(language: Language) -> &'static str { Language::FI => "Pakettiraja ylitetty!", Language::JA => "パケット数のしきい値を超過しました!", Language::UZ => "Paket chegarasidan oshib ketdi!", + Language::VI => "Gói tin đã vượt ngưỡng!", } } @@ -1739,6 +1800,7 @@ pub fn packets_exceeded_value_translation(language: Language, value: u32) -> Str }, Language::JA => format!("{value} パケットの送受信が発生しました"), Language::UZ => format!("{value} paket uzatildi"), + Language::VI => format!("{value} gói tin đã được trao đổi"), } } @@ -1763,6 +1825,7 @@ pub fn favorite_transmitted_translation(language: Language) -> &'static str { Language::FI => "Uusia tietoja vaihdettu suosikeista!", Language::JA => "お気に入りのホストで新しいデータ送受信が発生しました!", Language::UZ => "Sevimli ulanishlar ro'yhatida yangi ma'lumotlar almashinuvi!", + Language::VI => "Mục ưa thích vừa có trao đổi!", } } @@ -1825,6 +1888,9 @@ pub fn no_notifications_set_translation(language: Language) -> Text<'static, Sty Language::UZ => "Siz hali bildirishnomalarni yoqmagansiz!\n\n\ Ularni faollashtirgandan so'ng, bu sahifada bildirishnomalaringiz jurnali ko'rsatiladi\n\n\ Sozlamalardan bildirishnomalarni yoqishingiz mumkin:", + Language::VI => "Bạn chưa bật tính năng thông báo!\n\n\ + au khi bật, trang này sẽ hiển thị thông báo\n\n\ + Hãy bật thông báo trong phần cài đặt:", }) } @@ -1906,6 +1972,10 @@ pub fn no_notifications_received_translation(language: Language) -> Text<'static "Ayni paytda ko'rsatiladigan hech narsa yo'q...\n\n\ Bildirishnomalar kelganda, ular shu yerda ko'rsatiladi" } + Language::VI => { + "Hiện tại không có gì để quan sát...\n\n\ + Khi có thông báo, chúng sẽ hiển thị ở đây" + } }) } @@ -1930,5 +2000,6 @@ pub fn only_last_30_translation(language: Language) -> &'static str { Language::FI => "Vain viimeiset 30 ilmoitusta näytetään", Language::JA => "最新の通知 30 件のみ表示されます", Language::UZ => "Faqat oxirgi 30 ta bildirishnoma ko'rsatiladi", + Language::VI => "Chỉ có 30 thông báo gần nhất được hiển thị", } } diff --git a/src/translations/translations_2.rs b/src/translations/translations_2.rs index 2f40a478..535b017d 100644 --- a/src/translations/translations_2.rs +++ b/src/translations/translations_2.rs @@ -23,6 +23,7 @@ pub fn new_version_available_translation(language: Language) -> &'static str { Language::JA => "新しいバージョンが利用可能になりました!", Language::UZ => "Yangi versiya mavjud!", Language::PT => "Uma nova versão está disponível!", + Language::VI => "Phiên bản mới đã sẵn sàng!", } } @@ -46,6 +47,7 @@ pub fn inspect_translation(language: Language) -> &'static str { Language::JA => "検査", Language::UZ => "Tekshirish", Language::PT => "Inspecionar", + Language::VI => "Quan sát", _ => "Inspect", } } @@ -70,6 +72,7 @@ pub fn connection_details_translation(language: Language) -> &'static str { Language::JA => "接続の詳細", Language::UZ => "Ulanish tafsilotlari", Language::PT => "Detalhes da conexão", + Language::VI => "Thông tin kết nối", _ => "Connection details", } } @@ -94,6 +97,7 @@ pub fn dropped_packets_translation(language: Language) -> &'static str { Language::JA => "ドロップしたパケット", Language::UZ => "Yig'ilgan paketlar", Language::PT => "Pacotes perdidos", + Language::VI => "Gói tin đã bị mất", _ => "Dropped packets", } } @@ -118,6 +122,7 @@ pub fn data_representation_translation(language: Language) -> &'static str { Language::JA => "データ表示", Language::UZ => "Ma'lumotlarni taqdim etish", Language::PT => "Representação dos dados", + Language::VI => "Miêu tả dữ liệu", _ => "Data representation", } } @@ -142,6 +147,7 @@ pub fn host_translation(language: Language) -> &'static str { Language::JA => "ネットワーク ホスト", Language::UZ => "Tarmoq serveri", Language::PT => "Host da rede", + Language::VI => "Máy chủ", _ => "Network host", } } @@ -166,6 +172,7 @@ pub fn only_top_30_items_translation(language: Language) -> &'static str { Language::JA => "上位 30 件のアイテムのみが表示されます", Language::UZ => "Bu erda faqat dastlabki 30 ta buyumlar ko'rsatiladi", Language::PT => "Apenas os 30 melhores unid são expostos aqui", + Language::VI => "Chỉ có 30 mục gần nhất được hiển thị ở đây", _ => "Only the top 30 items are displayed here", } } @@ -213,6 +220,7 @@ pub fn local_translation(language: Language) -> &'static str { Language::JA => "ローカル ネットワーク", Language::UZ => "Mahalliy tarmoq", Language::PT => "Rede local", + Language::VI => "Mạng nội bộ", _ => "Local network", } } @@ -237,6 +245,7 @@ pub fn unknown_translation(language: Language) -> &'static str { Language::JA => "不明なロケーション", Language::UZ => "Noma'lum joylashuv", Language::PT => "Localização desconhecida", + Language::VI => "Không rõ địa điểm", _ => "Unknown location", } } @@ -261,6 +270,7 @@ pub fn your_network_adapter_translation(language: Language) -> &'static str { Language::JA => "自身のネットワーク アダプター", Language::UZ => "Sizning tarmoq adapteringiz", Language::PT => "Seu adaptador de rede", + Language::VI => "Network adapter của bạn", _ => "Your network adapter", } } @@ -285,6 +295,7 @@ pub fn socket_address_translation(language: Language) -> &'static str { Language::JA => "ソケット アドレス", Language::UZ => "Soket manzili", Language::PT => "Endereço da socket", + Language::VI => "Địa chỉ socket", _ => "Socket address", } } @@ -309,6 +320,7 @@ pub fn mac_address_translation(language: Language) -> &'static str { Language::JA => "MAC アドレス", Language::UZ => "MAC manzili", Language::PT => "Endereço MAC", + Language::VI => "Địa chỉ MAC", _ => "MAC address", } } @@ -333,6 +345,7 @@ pub fn source_translation(language: Language) -> &'static str { Language::JA => "送信元", Language::UZ => "Manba", Language::PT => "Fonte", + Language::VI => "Nguồn", _ => "Source", } } @@ -355,6 +368,7 @@ pub fn destination_translation(language: Language) -> &'static str { Language::FR => "Destination", Language::JA => "送信先", Language::UZ => "Qabul qiluvchi", + Language::VI => "Đích", _ => "Destination", } } @@ -378,6 +392,7 @@ pub fn fqdn_translation(language: Language) -> &'static str { Language::FR => "Nom de domaine complètement qualifié", Language::UZ => "To'liq domen nomi", Language::PT => "Nome de domínio completo", + Language::VI => "Tên miền đầy đủ", _ => "Fully qualified domain name", } } @@ -402,6 +417,7 @@ pub fn administrative_entity_translation(language: Language) -> &'static str { Language::JA => "AS 名", Language::UZ => "Avtonom tizim nomi", Language::PT => "Entidade administrativa", + Language::VI => "Tên Autonomous System", _ => "Autonomous System name", } } @@ -426,6 +442,7 @@ pub fn transmitted_data_translation(language: Language) -> &'static str { Language::JA => "転送データ", Language::UZ => "Uzatilgan ma'lumotlar", Language::PT => "Dados transmitidos", + Language::VI => "Dữ liệu được truyền", _ => "Transmitted data", } } @@ -449,6 +466,7 @@ pub fn country_translation(language: Language) -> &'static str { Language::FR => "Pays", Language::JA => "国", Language::UZ => "Davlat", + Language::VI => "Quốc gia", _ => "Country", } } @@ -473,6 +491,7 @@ pub fn domain_name_translation(language: Language) -> &'static str { Language::JA => "ドメイン名", Language::UZ => "Domen nomi", Language::PT => "Nome do domínio", + Language::VI => "Tên miền", _ => "Domain name", } } @@ -497,6 +516,7 @@ pub fn only_show_favorites_translation(language: Language) -> &'static str { Language::JA => "お気に入りのみを表示する", Language::UZ => "Faqat sevimlilarni ko'rsatish", Language::PT => "Apenas mostrar os favoritos", + Language::VI => "Chỉ hiển thị mục ưa thích", _ => "Only show favorites", } } @@ -545,6 +565,7 @@ pub fn no_search_results_translation(language: Language) -> &'static str { Language::JA => "指定されたフィルター条件で表示できる結果はありません", Language::UZ => "Belgilangan qidiruv filtrlari bo'yicha hech qanday natija mavjud emas", Language::PT => "Nenhum resultado disponível de acordo com os filtros selecionados", + Language::VI => "Không có kết quả nào theo các bộ lọc được chỉ định", _ => "No result available according to the specified search filters", } } @@ -574,6 +595,7 @@ pub fn showing_results_translation( Language::JA => format!("{total} 件中の {start}-{end} 件を表示"), Language::UZ => format!("Jami {total} natijadan {start}-{end} ko'rsatilyapti"), Language::PT => format!("Mostrando {start}-{end} de {total} resultados totais"), + Language::VI => format!("Đang hiển thị {start}-{end} của {total} tổng số kết quả"), _ => format!("Showing {start}-{end} of {total} total results"), } } @@ -599,6 +621,7 @@ pub fn color_gradients_translation(language: Language) -> &'static str { Language::JA => "グラデーションを適用する", Language::UZ => "Rang gradientlarini qo'llang", Language::PT => "Aplicar gradientes de cor", + Language::VI => "Áp dụng color gradients", _ => "Apply color gradients", } } diff --git a/src/translations/translations_3.rs b/src/translations/translations_3.rs index 06a67d33..d04c3f1e 100644 --- a/src/translations/translations_3.rs +++ b/src/translations/translations_3.rs @@ -19,6 +19,7 @@ pub fn general_translation(language: Language) -> &'static str { Language::JA => "一般", Language::UZ => "Asosiy", Language::SV => "Allmänt", + Language::VI => "Tổng quan", Language::ZH => "通用", _ => "General", } @@ -38,6 +39,7 @@ pub fn zoom_translation(language: Language) -> &'static str { Language::RU => "Масштаб интерфейса", Language::JA => "ズーム", Language::UZ => "Kattalashtirish", + Language::VI => "Phóng to", Language::ZH => "缩放", _ => "Zoom", } @@ -57,6 +59,7 @@ pub fn mmdb_files_translation(language: Language) -> &'static str { Language::JA => "データベース ファイル", Language::UZ => "Ma'lumotlar bazasi fayllari", Language::SV => "Databasfiler", + Language::VI => "Tập tin cơ sở dữ liệu", Language::ZH => "数据库文件", _ => "Database files", } @@ -76,6 +79,7 @@ pub fn params_not_editable_translation(language: Language) -> &'static str { Language::JA => "以下のパラメーターは分析中は変更できません", Language::UZ => "Tahlil vaqtida quydagi parametrlarni o'zgartirib bo'lmaydi", Language::SV => "Följande parametrar kan inte ändras under analysen", + Language::VI => "Các tham số sau không thể bị thay đổi khi đang phân tích", Language::ZH => "以下参数在分析过程中不能修改", _ => "The following parameters can't be modified during the analysis", } @@ -95,6 +99,7 @@ pub fn custom_style_translation(language: Language) -> &'static str { Language::JA => "カスタム スタイル", Language::UZ => "Moslashtirilgan uslub", Language::SV => "Anpassad stil", + Language::VI => "Tùy chỉnh chủ đề", Language::ZH => "自定义样式", _ => "Custom style", } @@ -112,6 +117,7 @@ pub fn copy_translation(language: Language) -> &'static str { Language::JA => "コピー", Language::UZ => "Nusxalash", Language::SV => "Kopia", + Language::VI => "Sao chép", Language::ZH => "复制", _ => "Copy", } @@ -131,6 +137,7 @@ pub fn port_translation(language: Language) -> &'static str { Language::IT => "Porta", Language::RU => "Порт", Language::JA => "ポート", + Language::VI => "Cổng", Language::ZH => "端口", _ => "Port", } @@ -150,6 +157,7 @@ pub fn invalid_filters_translation(language: Language) -> &'static str { Language::JA => "無効なフィルター", Language::UZ => "Noto'g'ri filterlar", Language::SV => "Ogiltiga filter", + Language::VI => "Bộ lọc không khả dụng", Language::ZH => "无效的过滤器", _ => "Invalid filters", } @@ -168,6 +176,7 @@ pub fn messages_translation(language: Language) -> &'static str { Language::JA => "メッセージ", Language::UZ => "Xabarlar", Language::SV => "Meddelanden", + Language::VI => "Tin nhắn", Language::ZH => "信息", _ => "Messages", } @@ -187,6 +196,7 @@ pub fn link_type_translation(language: Language) -> &'static str { Language::JA => "リンク タイプ", Language::UZ => "Havola turi", Language::SV => "Länktyp", + Language::VI => "Loại liên kết", Language::ZH => "链接类型", _ => "Link type", } @@ -209,6 +219,7 @@ pub fn unsupported_link_type_translation( 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::VI => "Loại liên kết được gắn với adapter này chưa được Sniffnet hỗ trợ...", Language::ZH => "Sniffnet 尚不支持与此适配器关联的链接类型...", _ => "The link type associated with this adapter is not supported by Sniffnet yet...", }; @@ -233,6 +244,7 @@ pub fn style_from_file_translation(language: Language) -> &'static str { Language::JA => "ファイルからスタイルを選択してください", Language::UZ => "Fayldan uslubni tanlang", Language::SV => "Välj stil från en fil", + Language::VI => "Chọn chủ đề từ file của bạn", Language::ZH => "从文件中选择样式", _ => "Select style from a file", } @@ -252,6 +264,7 @@ pub fn database_from_file_translation(language: Language) -> &'static str { Language::JA => "データベース ファイルを選択してください", Language::UZ => "Ma'lumotlar bazasi faylini tanlang", Language::SV => "Välj databasfil", + Language::VI => "Chọn tập tin cơ sở dữ liệu", Language::ZH => "选择数据库文件", _ => "Select database file", } @@ -271,6 +284,7 @@ pub fn filter_by_host_translation(language: Language) -> &'static str { Language::JA => "ネットワーク ホストでフィルター", Language::UZ => "Tarmoq host bo'yicha filterlash", Language::SV => "Filtrera efter nätverksvärd", + Language::VI => "Lọc bởi máy chủ mạng", Language::ZH => "按网络主机筛选", _ => "Filter by network host", } @@ -287,6 +301,7 @@ pub fn service_translation(language: Language) -> &'static str { Language::RO => "Serviciu", Language::JA => "サービス", Language::UZ => "Xizmat", + Language::VI => "Dịch vụ", Language::ZH => "服务", _ => "Service", } @@ -305,6 +320,7 @@ pub fn export_capture_translation(language: Language) -> &'static str { Language::JA => "キャプチャ ファイルをエクスポート", Language::UZ => "Cap faylni export qilish", Language::SV => "Exportera inspelningsfil", + Language::VI => "Xuất tập tin đã bắt", Language::ZH => "导出捕获文件", _ => "Export capture file", } @@ -322,6 +338,7 @@ pub fn directory_translation(language: Language) -> &'static str { Language::RU => "Директория", Language::RO => "Director", Language::JA => "ディレクトリー", + Language::VI => "Thư mục", Language::ZH => "目录", _ => "Directory", } @@ -340,6 +357,7 @@ pub fn select_directory_translation(language: Language) -> &'static str { Language::JA => "宛先のディレクトリーを選択する", Language::UZ => "Manzil katalogni tanlang", Language::SV => "Välj målkatalog", + Language::VI => "Chọn thư mục đích đến", Language::ZH => "选择目标目录", _ => "Select destination directory", } @@ -358,6 +376,7 @@ pub fn file_name_translation(language: Language) -> &'static str { Language::JA => "ファイル ネーム", Language::UZ => "Fayl nomi", Language::SV => "Filnamn", + Language::VI => "Tên file", Language::ZH => "文件名", _ => "File name", } @@ -376,6 +395,7 @@ pub fn thumbnail_mode_translation(language: Language) -> &'static str { Language::JA => "サムネイル モード", Language::UZ => "Eskiz rejim", Language::SV => "Miniatyrläge", + Language::VI => "Chế độ thu nhỏ", Language::ZH => "缩略图模式", _ => "Thumbnail mode", } @@ -394,6 +414,7 @@ pub fn learn_more_translation(language: Language) -> &'static str { Language::JA => "もっと知りたいですか?", Language::UZ => "Ko'proq bilishni hohlaysizmi?", Language::SV => "Vill du veta mer?", + Language::VI => "Bạn có muốn tìm hiểu thêm?", Language::ZH => "想知道更多吗?", _ => "Do you want to learn more?", } diff --git a/src/translations/types/language.rs b/src/translations/types/language.rs index 3a5fc638..1ee00a55 100644 --- a/src/translations/types/language.rs +++ b/src/translations/types/language.rs @@ -5,7 +5,7 @@ use iced::widget::Svg; use serde::{Deserialize, Serialize}; use crate::countries::flags_pictures::{ - CN, DE, ES, FI, FLAGS_WIDTH_BIG, FR, GB, GR, IT, JP, KR, PL, PT, RO, RU, SE, TR, UA, UZ, + CN, DE, ES, FI, FLAGS_WIDTH_BIG, FR, GB, GR, IT, JP, KR, PL, PT, RO, RU, SE, TR, UA, UZ, VN, }; use crate::StyleType; @@ -50,6 +50,8 @@ pub enum Language { JA, /// Uzbek UZ, + /// Vietnamese + VI, } impl Default for Language { @@ -59,7 +61,7 @@ impl Default for Language { } impl Language { - pub const ALL: [Language; 18] = [ + pub const ALL: [Language; 19] = [ Language::EN, Language::DE, Language::EL, @@ -77,6 +79,7 @@ impl Language { Language::TR, Language::UK, Language::UZ, + Language::VI, Language::ZH, ]; @@ -101,6 +104,7 @@ impl Language { Language::FI => FI, Language::JA => JP, Language::UZ => UZ, + Language::VI => VN, }))) .width(FLAGS_WIDTH_BIG) } @@ -118,6 +122,7 @@ impl Language { | Language::JA | Language::UZ | Language::SV + | Language::VI | Language::ZH ) } @@ -145,6 +150,7 @@ impl fmt::Display for Language { Language::FI => "Suomi", Language::JA => "日本語", Language::UZ => "O'zbekcha", + Language::VI => "Tiếng Việt", }; write!(f, "{self:?} - {lang_str}") }