diff --git a/resources/fonts/full/subset_characters.txt b/resources/fonts/full/subset_characters.txt index f5f9d9e5..1ab39be1 100644 --- a/resources/fonts/full/subset_characters.txt +++ b/resources/fonts/full/subset_characters.txt @@ -96,6 +96,7 @@ z ¿ Ê Î +Ö Ü à á @@ -120,9 +121,14 @@ z ą ć ę +ğ +İ +ı ł ń ś +Ş +ş ź ż Ș diff --git a/resources/fonts/subset/sarasa-mono-sc-bold.subset.ttf b/resources/fonts/subset/sarasa-mono-sc-bold.subset.ttf index 8639d77f..e6a27ac3 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 41ffdf80..b3c8f8bf 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/settings_language_page.rs b/src/gui/pages/settings_language_page.rs index e81ccdd3..8f9ab7fa 100644 --- a/src/gui/pages/settings_language_page.rs +++ b/src/gui/pages/settings_language_page.rs @@ -23,10 +23,13 @@ pub fn settings_language_page(sniffer: &Sniffer) -> Container { language_radios(language_active, &Language::COL1, font, sniffer.style); let col_language_radio_2 = language_radios(language_active, &Language::COL2, font, sniffer.style); + let col_language_radio_3 = + language_radios(language_active, &Language::COL3, font, sniffer.style); let row_language_radio = Row::new() .spacing(50) .push(col_language_radio_1) - .push(col_language_radio_2); + .push(col_language_radio_2) + .push(col_language_radio_3); let content = Column::new() .align_items(Alignment::Center) diff --git a/src/translations/translations.rs b/src/translations/translations.rs index e48218cb..d624a926 100644 --- a/src/translations/translations.rs +++ b/src/translations/translations.rs @@ -14,6 +14,7 @@ pub fn choose_adapters_translation(language: Language) -> Text<'static> { Language::ZH => "选择需要监控的网络适配器", Language::RO => "Selectați adaptor de rețea pentru a inspecta", Language::KO => "검사할 네트워크 어댑터 선택", + Language::TR => "İncelemek için bir ağ adaptörü seçiniz", }) } @@ -29,6 +30,7 @@ pub fn application_protocol_translation(language: Language) -> &'static str { Language::ZH => "目标应用层协议", Language::RO => "Protocol aplicație", Language::KO => "어플리케이션 프로토콜", + Language::TR => "Uygulama protokolü", } } @@ -44,6 +46,7 @@ pub fn select_filters_translation(language: Language) -> Text<'static> { Language::ZH => "选择需要监控的目标", Language::RO => "Selectați filtre pentru traficul de rețea", Language::KO => "네트워크 트레픽에 적용할 필터 선택", + Language::TR => "Ağ trafiğine uygulanacak filtreleri seçiniz", }) } @@ -56,6 +59,7 @@ pub fn start_translation(language: Language) -> &'static str { Language::PL => "Rozpocznij!", Language::UK => "Почати!", Language::ZH => "开始!", + Language::TR => "Başla!", } } @@ -65,7 +69,7 @@ pub fn address_translation(language: Language) -> &'static str { Language::IT => "\nIndirizzo:", Language::FR | Language::DE => "\nAdresse:", Language::ES => "\nDirección:", - Language::PL => "\nAdres:", + Language::PL | Language::TR => "\nAdres:", Language::UK => "\nАдреса:", Language::ZH => "\n网络地址:", Language::RO => "\nAdresă:", @@ -85,6 +89,7 @@ pub fn addresses_translation(language: Language) -> &'static str { Language::ZH => "\n网络地址:", Language::RO => "\nAdrese:", Language::KO => "\n주소:", + Language::TR => "\nAdresler:", } } @@ -100,6 +105,7 @@ pub fn ip_version_translation(language: Language) -> Text<'static> { Language::ZH => "目标IP协议版本", Language::RO => "Versiune IP", Language::KO => "IP 버전", + Language::TR => "IP versiyonu", }) } @@ -115,6 +121,7 @@ pub fn transport_protocol_translation(language: Language) -> &'static str { Language::ZH => "目标传输协议", Language::RO => "Protocol de transport", Language::KO => "전송 프로토콜", + Language::TR => "İletişim protokolü", } } @@ -130,6 +137,7 @@ pub fn traffic_rate_translation(language: Language) -> Text<'static> { Language::ZH => "网络速率图:", Language::RO => "Rata de trafic:", Language::KO => "트레픽 속도:", + Language::TR => "Trafik oranı:", }) } @@ -145,6 +153,7 @@ pub fn relevant_connections_translation(language: Language) -> Text<'static> { Language::ZH => "连接详情:", Language::RO => "Conexiuni relevante:", Language::KO => "관련 연결:", + Language::TR => "İlgili bağlantılar:", }) } @@ -160,6 +169,7 @@ pub fn settings_translation(language: Language) -> &'static str { Language::ZH => "设置", Language::RO => "Setări", Language::KO => "설정", + Language::TR => "Ayarlar", } } @@ -175,6 +185,7 @@ pub fn yes_translation(language: Language) -> Text<'static> { Language::ZH => "是", Language::RO => "Da", Language::KO => "네", + Language::TR => "Evet", }) } @@ -190,6 +201,7 @@ pub fn ask_quit_translation(language: Language) -> Text<'static> { Language::ZH => "您确定退出当前监控吗?", Language::RO => "Sunteți sigur că doriți să renunțați la această analiză?", Language::KO => "정말로 분석을 종료하겠습니까?", + Language::TR => "Bu analizden çıkmak istediğine emin misin?", }) } @@ -205,6 +217,7 @@ pub fn quit_analysis_translation(language: Language) -> String { Language::ZH => "退出监控".to_string(), Language::RO => "Renunță la analiză".to_string(), Language::KO => "분석종료".to_string(), + Language::TR => "Analizden çık".to_string(), } } @@ -220,6 +233,7 @@ pub fn ask_clear_all_translation(language: Language) -> Text<'static> { Language::ZH => "确定清除所有通知?", Language::RO => "Sigur doriți să ștergeți notificările?", Language::KO => "알림을 삭제하시겠습니까?", + Language::TR => "Bildirimleri temizlemek istediğine emin misin?", }) } @@ -235,6 +249,7 @@ pub fn clear_all_translation(language: Language) -> String { Language::ZH => "清除所有".to_string(), Language::RO => "Ștergeți tot".to_string(), Language::KO => "모두 지우기".to_string(), + Language::TR => "Hepsini temizle".to_string(), } } @@ -250,6 +265,7 @@ pub fn hide_translation(language: Language) -> &'static str { Language::ZH => "隐藏", Language::RO => "Ascundeți", Language::KO => "숨기기", + Language::TR => "Gizle", } } @@ -285,6 +301,9 @@ pub fn no_addresses_translation(language: Language, adapter: &str) -> Text<'stat Language::KO => format!("선택한 어댑터에 유효한 주소가 없기 때문에 트래픽을 확인할 수 없습니다...\n\n\ 네트워크 어뎁터: {adapter}\n\n\ 인터넷이 연결되어있다면 다른 어댑터로 시도해보세요."), + Language::TR => format!("Seçtiğiniz adaptör aktif bir adrese sahip olmadığı için hiç bir trafik izlenemez...\n\n\ + Ağ adaptörü: {adapter}\n\n\ + Eğer gerçekten internete bağlı olduğunuza eminseniz, başka bir adaptör seçmeyi deneyiniz.") }) } @@ -320,6 +339,9 @@ pub fn waiting_translation(language: Language, adapter: &str) -> Text<'static> { Language::KO => format!("아직 트래픽이 관찰되지 않았습니다. 네트워크 패킷 대기 중...\n\n\ 네트워크 어뎁터: {adapter}\n\n\ 인터넷에 연결되어 있고 올바른 어댑터를 선택하셨습니까?"), + Language::TR => format!("Henüz bir trafik algılanamadı. Ağ paketleri için bekleniyor...\n\n\ + Ağ adaptörü: {adapter}\n\n\ + İnternete bağlı olduğunuza ve doğru adaptörü seçtiğinize emin misiniz?") }) } @@ -359,6 +381,9 @@ pub fn some_observed_translation( Language::KO => format!("감지한 총 패킷: {observed}\n\n\ 필터링된 패킷: 0\n\n\ 일부 패킷이 감지되었지만, 지정한 필터에 따라 선택되지 않았습니다...\n\n{filters}"), + Language::TR => format!("Toplam yakalanan paketler: {observed}\n\n\ + Filterelenen paketler: 0\n\n\ + Bazı paketler yakalandı, fakat belirttiğiniz filtrelere göre hiç biri seçilmedi...\n\n{filters}") }) } @@ -386,6 +411,7 @@ pub fn filtered_packets_translation( Language::KO => { format!("필터링된 패킷:\n {filtered} ({percentage} 의 일부)") } + Language::TR => format!("Filtrelenen paketler:\n {filtered} toplamın ({percentage})"), }) } @@ -413,6 +439,7 @@ pub fn filtered_bytes_translation( Language::KO => { format!("필터링된 바이트:\n {filtered} ({percentage} 의 일부)") } + Language::TR => format!("Filtrelenen bayt:\n {filtered} toplamın ({percentage})"), }) } @@ -428,6 +455,7 @@ pub fn filtered_application_translation(language: Language) -> Text<'static> { Language::ZH => "按应用层协议分类的目标数据包计数:", Language::RO => "Pachete filtrate pe protocol de aplicație:", Language::KO => "애플리케이션 프로토콜당 필터링된 패킷 수:", + Language::TR => "Uygulama protokolü bazında filtrelenen paketler:", }) } @@ -453,6 +481,8 @@ pub fn no_favorites_translation(language: Language) -> Text<'static> { Pentru a adăuga o conexiune la favorite, faceți clic pe simbolul stea din apropierea conexiunii.", Language::KO => "현재는 보여줄게 없습니다.\n\ 즐겨찾기에 연결을 추가하려면 별을 눌러주세요.", + Language::TR => "Şu an gösterecek bir şey yok.\n\ + Favorilere bağlantı eklemek için, bağlantı yanındaki yıldız sembolüne tıklayınız." }) } @@ -498,6 +528,10 @@ pub fn error_translation(language: Language, error: &str) -> Text<'static> { "오류가 발생하였습니다! \n\n\ {error}" ), + Language::TR => format!( + "Bir hata oluştu! \n\n\ + {error}" + ), }) } @@ -513,6 +547,7 @@ pub fn both_translation(language: Language) -> &'static str { Language::ZH => "皆需", Language::RO => "ambele", Language::KO => "둘다", + Language::TR => "ikiside", } } @@ -539,6 +574,7 @@ pub fn all_translation(language: Language) -> &'static str { Language::ZH => "所有", Language::RO => "Toate", Language::KO => "모두", + Language::TR => "Hepsi", } } @@ -554,6 +590,7 @@ pub fn packets_chart_translation(language: Language) -> &'static str { Language::ZH => "数据包", Language::RO => "pachete pe secundă", Language::KO => "초당 패킷", + Language::TR => "saniye başı paket", } } @@ -569,6 +606,7 @@ pub fn bytes_chart_translation(language: Language) -> &'static str { Language::ZH => "网络流量", Language::RO => "octeți pe secundă", Language::KO => "초당 바이트", + Language::TR => "saniye başı bayt", } } @@ -584,6 +622,7 @@ pub fn recent_report_translation(language: Language) -> &'static str { Language::ZH => "按时间", Language::RO => "cea mai recentă", Language::KO => "가장 최근", + Language::TR => "en son", } } @@ -599,6 +638,7 @@ pub fn packets_report_translation(language: Language) -> &'static str { Language::ZH => "按数据包", Language::RO => "cele mai multe pachete", Language::KO => "대부분의 패킷", + Language::TR => "en çok paket", } } @@ -614,6 +654,7 @@ pub fn bytes_report_translation(language: Language) -> &'static str { Language::ZH => "按流量", Language::RO => "cei mai mulți octeți", Language::KO => "대부분의 바이트", + Language::TR => "en çok bayt", } } @@ -629,6 +670,7 @@ pub fn favorite_report_translation(language: Language) -> &'static str { Language::ZH => "收藏夹", Language::RO => "favorite", Language::KO => "즐겨찾기", + Language::TR => "favoriler", } } @@ -644,6 +686,7 @@ pub fn notifications_title_translation(language: Language) -> Text<'static> { Language::ZH => "自定义通知", Language::RO => "Personalizați-vă notificările", Language::KO => "사용자 지정 알림", + Language::TR => "Bildirimlerinizi özelleştirin", }) } @@ -659,6 +702,7 @@ pub fn appearance_title_translation(language: Language) -> Text<'static> { Language::ZH => "选择您喜欢的主题", Language::RO => "Selectați tema preferată", Language::KO => "태마를 선택하세요", + Language::TR => "Favori temanızı seçin", }) } @@ -674,6 +718,7 @@ pub fn languages_title_translation(language: Language) -> Text<'static> { Language::ZH => "选择显示语言", Language::RO => "Selectați limba", Language::KO => "언어를 선택하세요", + Language::TR => "Dilinizi seçin", }) } @@ -689,6 +734,7 @@ pub fn active_filters_translation(language: Language) -> &'static str { Language::ZH => "活动的过滤器:", Language::RO => "Filtre active:", Language::KO => "활성화된 필터:", + Language::TR => "Aktif filtreler:", } } @@ -704,6 +750,7 @@ pub fn none_translation(language: Language) -> &'static str { Language::ZH => "无", Language::RO => "niciunul", Language::KO => "없음", + Language::TR => "hiç biri", } } @@ -719,6 +766,7 @@ pub fn yeti_night_translation(language: Language) -> &'static str { Language::ZH => "Sniffnet暗黑", Language::RO => "Tema întunecată originală Sniffnet", Language::KO => "Sniffnet의 기본 다크테마", + Language::TR => "Sniffnet'in orjinal koyu teması", } } @@ -734,6 +782,7 @@ pub fn yeti_day_translation(language: Language) -> &'static str { Language::ZH => "Sniffnet浅色", Language::RO => "Tema deschisă originală Sniffnet", Language::KO => "Sniffnet의 기본 라이트테마", + Language::TR => "Sniffnet'in orjinal açık teması", } } @@ -749,6 +798,7 @@ pub fn deep_sea_translation(language: Language) -> &'static str { Language::ZH => "潜入网络活动的海洋", Language::RO => "Pentru a vă scufunda în traficul de rețea", Language::KO => "네트워크 트레픽으로 바로가기", + Language::TR => "Ağ trafiğine dalmak", } } @@ -764,6 +814,7 @@ pub fn mon_amour_translation(language: Language) -> &'static str { Language::ZH => "梦想家的主题", Language::RO => "O temă minunată creată pentru visători", Language::KO => "사랑스러운 몽환가들을 위한 테마", + Language::TR => "Hayal perestler için yapılmış güzel tema", } } @@ -779,6 +830,7 @@ pub fn incoming_translation(language: Language) -> &'static str { Language::ZH => "入站", Language::RO => "de intrare", Language::KO => "수신중", + Language::TR => "Gelen", } } @@ -794,6 +846,7 @@ pub fn outgoing_translation(language: Language) -> &'static str { Language::ZH => "出站", Language::RO => "de ieșire", Language::KO => "발신중", + Language::TR => "Giden", } } @@ -808,6 +861,7 @@ pub fn notifications_translation(language: Language) -> &'static str { Language::ZH => "通知", Language::RO => "Notificări", Language::KO => "알림", + Language::TR => "Bildirimler", } } @@ -817,7 +871,7 @@ pub fn style_translation(language: Language) -> &'static str { Language::IT => "Stile", Language::ES => "Estilo", Language::PL => "Styl", - Language::DE | Language::RO => "Stil", + Language::DE | Language::RO | Language::TR => "Stil", Language::UK => "Стиль", Language::ZH => "主题", Language::KO => "스타일", @@ -836,6 +890,7 @@ pub fn language_translation(language: Language) -> &'static str { Language::ZH => "语言", Language::RO => "Limbă", Language::KO => "언어", + Language::TR => "Dil", } } @@ -851,6 +906,7 @@ pub fn overview_translation(language: Language) -> &'static str { Language::ZH => "概览", Language::RO => "Prezentare generală", Language::KO => "개요", + Language::TR => "Ön izleme", } } @@ -877,6 +933,7 @@ pub fn packets_threshold_translation(language: Language) -> &'static str { Language::ZH => "超过设定的数据包数量阈值时通知我", Language::RO => "Anunță-mă când este depășit un prag de pachete", Language::KO => "패킷 임계값을 초과하면 알림", + Language::TR => "Paket eşiği aşıldığında beni bilgilendir", } } @@ -892,6 +949,7 @@ pub fn bytes_threshold_translation(language: Language) -> &'static str { Language::ZH => "超过设定的网络流量阈值时通知我", Language::RO => "Anunță-mă când este depășit un prag de octeți", Language::KO => "바이트 임계값을 초과하면 알림", + Language::TR => "Bayt eşiği aşıldığında beni bilgilendir", } } @@ -907,6 +965,7 @@ pub fn per_second_translation(language: Language) -> &'static str { Language::ZH => "(每秒) ", Language::RO => "(pe secundă)", Language::KO => "(초당)", + Language::TR => "(her saniye)", } } @@ -922,6 +981,7 @@ pub fn specify_multiples_translation(language: Language) -> &'static str { Language::ZH => "您可指定 'K', 'M', 'G'", Language::RO => "; puteți specifica 'K', 'M', 'G'", Language::KO => "; 지정가능합니다 'K', 'M', 'G'", + Language::TR => "; şunları da kullanabilirsin 'K', 'M' ve 'G'", } } @@ -939,6 +999,7 @@ pub fn favorite_notification_translation(language: Language) -> &'static str { Language::ZH => "收藏夹内的连接有新活动时通知我", Language::RO => "Anunță-mă când sunt transferate date noi de la favoritele mele", Language::KO => "즐겨찾기에서 새 데이터가 교환될 때 알림", + Language::TR => "Favorilerimde veri akışı olduğunda beni uyar", } } @@ -954,6 +1015,7 @@ pub fn threshold_translation(language: Language) -> String { Language::ZH => "阈值: ".to_string(), Language::RO => "Prag: ".to_string(), Language::KO => "임계값: ".to_string(), + Language::TR => "Eşik: ".to_string(), } } @@ -967,6 +1029,7 @@ pub fn volume_translation(language: Language, value: u8) -> String { Language::ZH => format!("通知音量: {value:^3}%"), Language::RO => format!("Volum: {value:^3}%"), Language::KO => format!("볼륨: {value:^3}%"), + Language::TR => format!("Ses: {value:^3}%"), } } @@ -982,6 +1045,7 @@ pub fn sound_translation(language: Language) -> &'static str { Language::ZH => "通知音:", Language::RO => "Sunet:", Language::KO => "사운드:", + Language::TR => "Ses:", } } @@ -997,6 +1061,7 @@ pub fn open_report_translation(language: Language) -> &'static str { Language::ZH => "打开完整报告", Language::RO => "Deschideți raport complet", Language::KO => "전체 보고서 열기", + Language::TR => "Tam raporu aç", } } @@ -1012,6 +1077,7 @@ pub fn bytes_exceeded_translation(language: Language) -> &'static str { Language::ZH => "达到设定的网络流量阈值!", Language::RO => "Prag de octeți depășit!", Language::KO => "바이트 임계값 초과!", + Language::TR => "Bayt eşik değeri aşıldı!", } } @@ -1028,6 +1094,7 @@ pub fn bytes_exceeded_value_translation(language: Language, value: &str) -> Stri Language::ZH => format!("已交换字节 {trimmed_value}"), Language::RO => format!("au fost transferați {trimmed_value} octeți"), Language::KO => format!("바이트 {trimmed_value} 가 교환되었습니다"), + Language::TR => format!("{trimmed_value} bayt aktarıldı"), } } @@ -1043,6 +1110,7 @@ pub fn packets_exceeded_translation(language: Language) -> &'static str { Language::ZH => "达到设定的数据包数量阈值!", Language::RO => "Prag de pachete depășit!", Language::KO => "패킷 임계값 초과!", + Language::TR => "Paket eşik değeri aşıldı!", } } @@ -1061,6 +1129,7 @@ pub fn packets_exceeded_value_translation(language: Language, value: u32) -> Str Language::ZH => format!("已交换数据包 {value}"), Language::RO => format!("au fost transferate {value} pachete"), Language::KO => format!("패킷 {value} 가 교환되었습니다"), + Language::TR => format!("{value} paket aktarıldı"), } } @@ -1076,6 +1145,7 @@ pub fn favorite_transmitted_translation(language: Language) -> &'static str { Language::ZH => "收藏夹内的连接有新活动!", Language::RO => "Date noi transferate de la favorite!", Language::KO => "즐겨찾기에서 새 데이터 교환", + Language::TR => "Favorilerden yeni veri aktarıldı!", } } @@ -1111,6 +1181,9 @@ pub fn no_notifications_set_translation(language: Language) -> Text<'static> { Language::KO => "아직 알림을 활성화하지 않았습니다!\n\n\ 활성화로 설정하면 이 페이지에 알림 로그가 표시됩니다\n\n\ 설정에서 알림을 활성화할 수 있습니다:", + Language::TR => "Henüz bildirimleri etkinleştirmedin!\n\n\ + Etkinleştirdikten sonra bu sayfada bildirimlerine ait kütüğü görebilirsin\n\n\ + Bildirimleri, ayarlardan etkinleştirebilirsin:" }) } @@ -1156,6 +1229,10 @@ pub fn no_notifications_received_translation(language: Language) -> Text<'static "현재는 볼 것이 없습니다...\n\n\ 알림을 받으면 여기에 표시됩니다" } + Language::TR => { + "Şu an görecek bir şey yok...\n\n\ + Bildirim aldığınız zaman burada gözükecektir" + } }) } @@ -1171,5 +1248,6 @@ pub fn only_last_30_translation(language: Language) -> &'static str { Language::ZH => "仅显示最近 30 条通知", Language::RO => "Sunt afișate doar ultimele 30 de notificări", Language::KO => "최근 30개의 알림만 표시됩니다", + Language::TR => "Sadece son 30 bildirim gösterilmektedir", } } diff --git a/src/translations/types/language.rs b/src/translations/types/language.rs index bb80aadb..838f76a2 100644 --- a/src/translations/types/language.rs +++ b/src/translations/types/language.rs @@ -23,6 +23,8 @@ pub enum Language { RO, /// Korean KO, + /// Turkish + TR, } impl Default for Language { @@ -32,20 +34,9 @@ impl Default for Language { } impl Language { - pub(crate) const COL1: [Language; 5] = [ - Language::EN, - Language::ES, - Language::IT, - Language::PL, - Language::UK, - ]; - pub(crate) const COL2: [Language; 5] = [ - Language::DE, - Language::FR, - Language::KO, - Language::RO, - Language::ZH, - ]; + pub(crate) const COL1: [Language; 4] = [Language::EN, Language::FR, Language::PL, Language::UK]; + pub(crate) const COL2: [Language; 4] = [Language::DE, Language::IT, Language::RO, Language::ZH]; + pub(crate) const COL3: [Language; 3] = [Language::ES, Language::KO, Language::TR]; pub fn get_radio_label(&self) -> &str { match self { @@ -59,6 +50,7 @@ impl Language { Language::ZH => "简体中文", Language::RO => "Română", Language::KO => "한국인", + Language::TR => "Türkçe", } } } diff --git a/src/utils/countries.rs b/src/utils/countries.rs index 65e27c72..623c936a 100644 --- a/src/utils/countries.rs +++ b/src/utils/countries.rs @@ -516,6 +516,7 @@ pub fn get_flag_from_language_code(language: &str) -> Image { "KO" => KR, "PL" => PL, "RO" => RO, + "TR" => TR, "UK" => UA, _ => UNKNOWN, })))