diff --git a/resources/fonts/full/subset_characters.txt b/resources/fonts/full/subset_characters.txt index f3089365..1ecb3014 100644 --- a/resources/fonts/full/subset_characters.txt +++ b/resources/fonts/full/subset_characters.txt @@ -292,7 +292,90 @@ z ⏎ ✔ ❤ +、 +。 +あ +い +お +か +が +き +く +こ +さ +し +す +せ +た +だ +っ +て +で +と +な +に +の +は +べ +ま +み +め +も +よ +ら +り +る +れ +ろ +を +ん +ア +ィ +イ +エ +オ +カ +ク +グ +ケ +コ +シ +ジ +ス +ズ +ソ +タ +ダ +ッ +テ +デ +ト +ド +ナ +ネ +バ +パ +フ +ブ +プ +ペ +ホ +ポ +マ +メ +ョ +ラ +リ +ル +レ +ロ +ワ +ン +ー 一 +上 +不 +両 丢 个 中 @@ -312,28 +395,39 @@ z 会 传 但 +位 体 何 你 使 侧 信 +値 值 +元 +先 入 其 内 出 击 分 +別 +利 到 +削 前 功 动 +効 包 +化 协 占 即 发 +取 +受 变 可 右 @@ -353,7 +447,10 @@ z 地 址 域 +場 士 +変 +多 夹 套 如 @@ -377,6 +474,8 @@ z 开 当 待 +後 +得 志 总 息 @@ -387,8 +486,10 @@ z 我 所 打 +択 报 择 +持 指 按 换 @@ -402,30 +503,37 @@ z 整 文 新 +方 无 日 时 +明 星 是 显 暂 暗 +更 最 有 未 本 机 条 +析 果 查 +査 标 梦 检 +検 概 欢 正 此 每 +気 没 洋 活 @@ -435,6 +543,7 @@ z 海 清 渐 +測 源 滤 潜 @@ -443,12 +552,15 @@ z 率 生 用 +画 +発 的 皆 监 目 知 确 +確 示 秒 空 @@ -460,18 +572,31 @@ z 类 索 累 +細 +終 +結 +続 络 网 置 联 +能 自 色 节 藏 表 要 +観 览 言 +計 +設 +試 +詳 +認 +語 +調 计 议 设 @@ -482,6 +607,8 @@ z 请 贴 超 +身 +転 输 达 过 @@ -490,21 +617,30 @@ z 这 连 退 +送 适 选 通 速 +過 +適 +選 配 里 量 错 +開 +関 +閾 间 阈 除 隐 +隠 需 面 音 +順 页 题 黑 @@ -707,4 +843,6 @@ z 환 활 효 +! , +? diff --git a/resources/fonts/subset/sarasa-mono-sc-bold.subset.ttf b/resources/fonts/subset/sarasa-mono-sc-bold.subset.ttf index 212d39be..16d844f9 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 b35c1a5d..327ce6cb 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 6626807d..25606238 100644 --- a/src/gui/pages/settings_language_page.rs +++ b/src/gui/pages/settings_language_page.rs @@ -23,12 +23,16 @@ pub fn settings_language_page(sniffer: &Sniffer) -> Container Container Text<'static, Renderer // Language::FA => "مبدل شبکه را برای بازرسی انتخاب کنید", Language::SV => "Välj nätverksadapter att inspektera", Language::FI => "Valitse tarkasteltava verkkosovitin", + Language::JA => "使用するネットワーク アダプターを選択してください", }) } @@ -45,6 +46,7 @@ pub fn application_protocol_translation(language: Language) -> &'static str { // Language::FA => "پیوندنامهٔ درخواست", Language::SV => "Applikationsprotokoll", Language::FI => "Sovellusprotokolla", + Language::JA => "アプリケーション プロトコル", } } @@ -67,6 +69,7 @@ pub fn select_filters_translation(language: Language) -> Text<'static, Renderer< // Language::FA => "صافی ها را جهت اعمال بر آمد و شد شبکه انتخاب کنید", Language::SV => "Välj filtren som ska appliceras på nätverkstrafiken", Language::FI => "Valitse suodattimet verkkoliikenteelle", + Language::JA => "トラフィックに適用するフィルターを選択してください", }) } @@ -86,6 +89,7 @@ pub fn start_translation(language: Language) -> &'static str { // Language::FA => "شروع!", Language::SV => "Starta!", Language::FI => "Aloita!", + Language::JA => "開始!", } } @@ -106,6 +110,7 @@ pub fn address_translation(language: Language) -> &'static str { // Language::FA => "نشانی", Language::SV => "Adress", Language::FI => "Osoite", + Language::JA => "アドレス", } } @@ -128,6 +133,7 @@ pub fn addresses_translation(language: Language) -> &'static str { // Language::FA => "نشانی ها", Language::SV => "Adresser", Language::FI => "Osoitteet", + Language::JA => "アドレス", } } @@ -150,6 +156,7 @@ pub fn ip_version_translation(language: Language) -> Text<'static, Renderer "نسخهٔ IP", Language::SV => "IP-version", Language::FI => "IP-versio", + Language::JA => "IP バージョン", }) } @@ -171,6 +178,7 @@ pub fn transport_protocol_translation(language: Language) -> &'static str { // Language::FA => "پیوندنامهٔ ترابرد", Language::SV => "Transportprotokoll", Language::FI => "Kuljetusprotokolla", + Language::JA => "トランスポート プロトコル", } } @@ -193,6 +201,7 @@ pub fn traffic_rate_translation(language: Language) -> Text<'static, Renderer "نرخ آمد و شد", Language::SV => "Datafrekvens", Language::FI => "Liikennemäärä", + Language::JA => "トラフィック レート", }) } @@ -236,6 +245,7 @@ pub fn settings_translation(language: Language) -> &'static str { // Language::FA => "پیکربندی", Language::SV => "Inställningar", Language::FI => "Asetukset", + Language::JA => "設定", } } @@ -257,6 +267,7 @@ pub fn yes_translation(language: Language) -> Text<'static, Renderer> Language::EL => "Ναι", // Language::FA => "بله", Language::FI => "Kyllä", + Language::JA => "はい", }) } @@ -279,6 +290,7 @@ pub fn ask_quit_translation(language: Language) -> Text<'static, Renderer "آیا مطمئن هستید می خواهید از این تحلیل خارج شوید؟", Language::SV => "Är du säker på att du vill avsluta analysen?", Language::FI => "Haluatko varmasti lopettaa analyysin?", + Language::JA => "分析を終了しますか?", }) } @@ -301,6 +313,7 @@ pub fn quit_analysis_translation(language: Language) -> String { // Language::FA => "خروج از تحلیل".to_string(), Language::SV => "Avsluta analys".to_string(), Language::FI => "Lopeta analyysi".to_string(), + Language::JA => "分析の終了".to_string(), } } @@ -323,6 +336,7 @@ pub fn ask_clear_all_translation(language: Language) -> Text<'static, Renderer "آیا مطمئن هستید می خواهید اعلان ها را پاک کنید؟", Language::SV => "Är du säker på att du vill radera notifikationerna?", Language::FI => "Haluatko varmasti tyhjentää ilmoitukset?", + Language::JA => "すべての通知を削除します。よろしいですか?", }) } @@ -345,6 +359,7 @@ pub fn clear_all_translation(language: Language) -> String { // Language::FA => "پاک کردن همه".to_string(), Language::SV => "Radera alla".to_string(), Language::FI => "Tyhjennä kaikki".to_string(), + Language::JA => "すべて削除".to_string(), } } @@ -367,6 +382,7 @@ pub fn hide_translation(language: Language) -> &'static str { // Language::FA => "پنهان کردن", Language::SV => "Göm", Language::FI => "Piilota", + Language::JA => "隠す", } } @@ -389,6 +405,7 @@ pub fn network_adapter_translation(language: Language) -> &'static str { // Language::FA => "مبدل شبکه", Language::SV => "Nätverksadapter", Language::FI => "Verkkosovitin", + Language::JA => "ネットワーク アダプター", } } @@ -448,6 +465,9 @@ pub fn no_addresses_translation( Language::FI => format!("Liikennettä ei voitu havainnoida, koska valitulla sovittimella ei ole aktiivista osoitetta...\n\n\ Verkkosovitin: {adapter}\n\n\ Jos olet varma että sinulla on internet-yhteys, kokeile valita toinen verkkosovitin."), + Language::JA => format!("選択されたアダプターが有効なアドレスを持っていないため、トラフィックを観測できていません...\n\n\ + ネットワーク アダプター: {adapter}\n\n\ + インターネットに接続しているか確認し、別のネットワーク アダプターを試してください。"), }) } @@ -507,6 +527,9 @@ pub fn waiting_translation( Language::FI => format!("Ei vielä havaittua liikennettä. Odotetaan verkkopaketteja...\n\n\ Verkkosovitin: {adapter}\n\n\ Onhan sinulla varmasti internet-yhteys ja olet valinnut oikean verkkosovittimen."), + Language::JA => format!("トラフィックがまだ観測できていません。ネットワーク パケットを待っています...\n\n\ + ネットワーク アダプター: {adapter}\n\n\ + インターネットに接続していて、正しいアダプターを選択していますか?"), }) } @@ -566,6 +589,9 @@ pub fn some_observed_translation( Language::FI => format!("Siepattuja paketteja yhteensä: {observed}\n\n\ Suodatettuja paketteja: 0\n\n\ Joitakin paketteja on siepattu, mutta yhtäkään ei ole valittu määrittämiesi suodattimien mukaan..."), + Language::JA => format!("取得したパケット数: {observed}\n\n\ + フィルター後のパケット数: 0\n\n\ + パケットは取得できていますが、設定されたフィルタリングにより表示されません..."), }) } @@ -588,6 +614,7 @@ pub fn filtered_packets_translation(language: Language) -> &'static str { // Language::FA => "بسته های صاف شده", Language::SV => "Filtrerade paket", Language::FI => "Suodatettuja paketteja", + Language::JA => "フィルタリングされたパケット", } } @@ -609,6 +636,7 @@ pub fn filtered_bytes_translation(language: Language) -> &'static str { // Language::FA => "بایت های صاف شده", Language::SV => "Filtrerade bytes", Language::FI => "Suodatettuja tavuja", + Language::JA => "フィルタリングされたバイト", } } @@ -645,6 +673,7 @@ pub fn of_total_translation(language: Language, percentage: &str) -> String { // Language::FA => format!("({percentage} از مجموع)"), Language::SV => format!("({percentage} av totalen)"), Language::FI => format!("({percentage} kokonaismäärästä)"), + Language::JA => format!("(トータル: {percentage} )"), } } @@ -776,6 +805,10 @@ pub fn error_translation(language: Language, error: &str) -> Text<'static, Rende "Tapahtui virhe! \n\n\ {error}" ), + Language::JA => format!( + "エラーが発生しました! \n\n\ + {error}" + ), }) } @@ -797,6 +830,7 @@ pub fn both_translation(language: Language) -> &'static str { // Language::FA => "هر دو", Language::SV => "båda", Language::FI => "molemmat", + Language::JA => "両方", } } @@ -832,6 +866,7 @@ pub fn all_translation(language: Language) -> &'static str { // Language::FA => "همه", Language::SV => "Alla", Language::FI => "Kaikki", + Language::JA => "すべて", } } @@ -853,6 +888,7 @@ pub fn packets_translation(language: Language) -> &'static str { Language::EL => "πακέτα", // Language::FA => "بسته ها", Language::FI => "paketit", + Language::JA => "パケット", } } @@ -875,6 +911,7 @@ pub fn packets_chart_translation(language: Language) -> &'static str { // Language::FA => "بسته در ثانیه", Language::SV => "paket per sekund", Language::FI => "pakettia sekunnissa", + Language::JA => "1 秒あたりのパケット数", } } @@ -894,6 +931,7 @@ pub fn bytes_translation(language: Language) -> &'static str { Language::RU => "байтов", // Language::FA => "بایت ها", Language::FI => "tavua", + Language::JA => "バイト", } } @@ -915,6 +953,7 @@ pub fn bytes_chart_translation(language: Language) -> &'static str { // Language::FA => "بایت در ثانیه", Language::SV => "bytes per sekund", Language::FI => "tavua sekunnissa", + Language::JA => "1 秒あたりのバイト量", } } @@ -937,6 +976,7 @@ pub fn recent_report_translation(language: Language) -> &'static str { // Language::FA => "آخرین", Language::SV => "senaste", Language::FI => "viimeisin", + Language::JA => "新しい順", } } @@ -959,6 +999,7 @@ pub fn packets_report_translation(language: Language) -> &'static str { // Language::FA => "بیشترین بسته ها", Language::SV => "flest paket", Language::FI => "eniten paketteja", + Language::JA => "パケット数の多い順", } } @@ -981,6 +1022,7 @@ pub fn bytes_report_translation(language: Language) -> &'static str { // Language::FA => "بیشترین بایت ها", Language::SV => "flest bytes", Language::FI => "eniten tavuja", + Language::JA => "バイト量の多い順", } } @@ -1023,6 +1065,7 @@ pub fn notifications_title_translation(language: Language) -> Text<'static, Rend // Language::FA => "اعلان های خود را سفارشی کنید", Language::SV => "Anpassa dina notifikationer", Language::FI => "Muokkaa ilmoituksiasi", + Language::JA => "通知のカスタマイズ", }) } @@ -1045,6 +1088,7 @@ pub fn appearance_title_translation(language: Language) -> Text<'static, Rendere // Language::FA => "زمینه دلخواه خود را انتخاب کنید", Language::SV => "Välj ditt favorittema", Language::FI => "Valitse suosikkiteemasi", + Language::JA => "テーマを選択してください", }) } @@ -1067,6 +1111,7 @@ pub fn languages_title_translation(language: Language) -> Text<'static, Renderer // Language::FA => "زبان خود را انتخاب کنید", Language::SV => "Välj ditt språk", Language::FI => "Valitse kielesi", + Language::JA => "表示言語を選択してください", }) } @@ -1089,6 +1134,7 @@ pub fn active_filters_translation(language: Language) -> &'static str { // Language::FA => "صافی های فعال", Language::SV => "Aktiva filter", Language::FI => "Aktiiviset suodattimet", + Language::JA => "適用されているフィルター", } } @@ -1111,6 +1157,7 @@ pub fn none_translation(language: Language) -> String { // Language::FA => "هیچ کدام", Language::SV => "inga", Language::FI => "ei mitään", + Language::JA => "なし", } .to_string() } @@ -1134,6 +1181,7 @@ pub fn yeti_night_translation(language: Language) -> &'static str { // Language::FA => "زمینه تاریک اصلی Sniffnet", Language::SV => "Sniffnets ursprungliga mörka tema", Language::FI => "Sniffnetin alkuperäinen tumma teema", + Language::JA => "Sniffnet のオリジナル テーマ", } } @@ -1155,6 +1203,7 @@ pub fn yeti_day_translation(language: Language) -> &'static str { // Language::FA => "زمینه روشن اصلی Sniffnet", Language::SV => "Sniffnets ursprungliga ljusa tema", Language::FI => "Sniffnetin alkuperäinen vaalea teema", + Language::JA => "Sniffnet のオリジナル ライト テーマ", } } @@ -1177,6 +1226,7 @@ pub fn deep_sea_translation(language: Language) -> &'static str { // Language::FA => "شیرجه رفتن در آمد و شد شبکه", Language::SV => "För att dyka ned i nätverkstrafiken", Language::FI => "Sukeltaaksesi verkkoliikenteeseen", + Language::JA => "ネットワーク トラフィックにダイブ", } } @@ -1199,6 +1249,7 @@ pub fn mon_amour_translation(language: Language) -> &'static str { // Language::FA => "زمینه دلپذیر ساخته شده برای رویا پردازان", Language::SV => "Ljuvligt tema gjort för drömmare", Language::FI => "Ihana teema unelmoijille", + Language::JA => "ドリーマーのためのテーマ", } } @@ -1221,6 +1272,7 @@ pub fn incoming_translation(language: Language) -> &'static str { // Language::FA => "ورودی", Language::SV => "Inkommande", Language::FI => "Saapuva", + Language::JA => "受信", } } @@ -1243,6 +1295,7 @@ pub fn outgoing_translation(language: Language) -> &'static str { // Language::FA => "خروجی", Language::SV => "Utgående", Language::FI => "Lähtevä", + Language::JA => "送信", } } @@ -1254,7 +1307,7 @@ pub fn notifications_translation(language: Language) -> &'static str { Language::PL => "Powiadomienia", Language::DE => "Benachrichtigungen", Language::UK => "Повідомлення", - Language::ZH => "通知", + Language::ZH | Language::JA => "通知", Language::RO => "Notificări", Language::KO => "알림", Language::TR => "Bildirimler", @@ -1280,6 +1333,7 @@ pub fn style_translation(language: Language) -> &'static str { Language::EL => "Στυλ", // Language::FA => "شیوه", Language::FI => "Tyyli", + Language::JA => "スタイル", } } @@ -1302,6 +1356,7 @@ pub fn language_translation(language: Language) -> &'static str { // Language::FA => "زبان", Language::SV => "Språk", Language::FI => "Kieli", + Language::JA => "表示言語", } } @@ -1324,6 +1379,7 @@ pub fn overview_translation(language: Language) -> &'static str { // Language::FA => "نمای کلی", Language::SV => "Översikt", Language::FI => "Yleiskatsaus", + Language::JA => "概要", } } @@ -1346,6 +1402,7 @@ pub fn packets_threshold_translation(language: Language) -> &'static str { // Language::FA => "به من اطلاع بده وقتی آستانه یک بسته فراتر رفت", Language::SV => "Notifiera mig när en paketgräns har överstigits", Language::FI => "Ilmoita minulle, kun pakettiraja on ylittynyt", + Language::JA => "パケット数の閾値を超過した場合に通知する", } } @@ -1368,6 +1425,7 @@ pub fn bytes_threshold_translation(language: Language) -> &'static str { // Language::FA => "به من اطلاع بده وقتی آستانه یک بایت فراتر رفت", Language::SV => "Notifiera mig när en gräns för bytes har överstigits", Language::FI => "Ilmoita minulle, kun tavuraja on ylittynyt", + Language::JA => "バイト量の閾値を超過した場合に通知する", } } @@ -1380,7 +1438,7 @@ pub fn per_second_translation(language: Language) -> &'static str { Language::PL => "(na sekundę)", Language::DE => "(pro Sekunde)", Language::UK => "(на секунду)", - Language::ZH => "(每秒) ", + Language::ZH | Language::JA => "(每秒) ", Language::RO => "(pe secundă)", Language::KO => "(초당)", Language::TR => "(her saniye)", @@ -1411,6 +1469,7 @@ pub fn specify_multiples_translation(language: Language) -> &'static str { // Language::FA => "؛ شما همچنین می توانید 'M'، 'K' و 'G' را تعیین کنید", Language::SV => "; du kan också ange 'K', 'M' och 'G'", Language::FI => "; voit myös määrittää 'K', 'M' tai 'G'", + Language::JA => "; 'K', 'M', 'G' が選択可能です", } } @@ -1435,6 +1494,7 @@ pub fn favorite_notification_translation(language: Language) -> &'static str { // Language::FA => "به من اطلاع بده وقتی داده جدید از پسندیده های من مبادله شد", Language::SV => "Notifiera mig när ny data utbyts av mina favoriter", Language::FI => "Ilmoita minulle, kun suosikkini vaihtavat uusia tietoja", + Language::JA => "お気に入りに指定したホストに関してデータ送受信があった場合に通知する", } } @@ -1457,6 +1517,7 @@ pub fn threshold_translation(language: Language) -> String { // Language::FA => "آستانه".to_string(), Language::SV => "Gräns".to_string(), Language::FI => "Raja".to_string(), + Language::JA => "閾値".to_string(), } } @@ -1467,7 +1528,7 @@ pub fn volume_translation(language: Language) -> &'static str { Language::PL => "Głośność", Language::DE => "Lautstärke", Language::UK => "Гучність", - Language::ZH => "通知音量", + Language::ZH | Language::JA => "通知音量", Language::RO => "Volum", Language::KO => "볼륨", Language::TR => "Ses", @@ -1488,7 +1549,7 @@ pub fn sound_translation(language: Language) -> &'static str { Language::PL => "Dźwięk", Language::DE => "Ton", Language::UK | Language::RU => "Звук", - Language::ZH => "通知音", + Language::ZH | Language::JA => "通知音", Language::RO => "Sunet", Language::KO => "사운드", Language::TR => "Ses", @@ -1519,6 +1580,7 @@ pub fn open_report_translation(language: Language) -> &'static str { // Language::FA => "گزارش کامل را باز کن", Language::SV => "Öppna fullständig rapport", Language::FI => "Avaa koko raportti", + Language::JA => "詳細なレポートを開く", } } @@ -1541,6 +1603,7 @@ pub fn bytes_exceeded_translation(language: Language) -> &'static str { // Language::FA => "آستانه بایت فراتر رفت!", Language::SV => "Gräns för bytes överskriden!", Language::FI => "Tavuraja ylitetty!", + Language::JA => "バイト量の閾値を調査しました!", } } @@ -1563,6 +1626,7 @@ pub fn bytes_exceeded_value_translation(language: Language, value: &str) -> Stri // Language::FA => format!("{value} بایت مبادله شده است"), Language::SV => format!("{value} har utbytts"), Language::FI => format!("{value} on vaihdettu"), + Language::JA => format!("{value} の送受信が発生しました"), } } @@ -1585,6 +1649,7 @@ pub fn packets_exceeded_translation(language: Language) -> &'static str { // Language::FA => "آستانه بسته فراتر رفت!", Language::SV => "Paketgräns överskriden!", Language::FI => "Pakettiraja ylitetty!", + Language::JA => "パケット数のしきい値を超過しました!", } } @@ -1628,6 +1693,7 @@ pub fn packets_exceeded_value_translation(language: Language, value: u32) -> Str 1 => "1 paketti vaihdettu".to_owned(), npackets => format!("{npackets} pakettia vaihdettu"), }, + Language::JA => format!("{value} パケットの送受信が発生しました"), } } @@ -1650,6 +1716,7 @@ pub fn favorite_transmitted_translation(language: Language) -> &'static str { // Language::FA => "مبادله داده جدید از پسندیده ها!", Language::SV => "Ny data utbytt av favoriter!", Language::FI => "Uusia tietoja vaihdettu suosikeista!", + Language::JA => "お気に入りのホストで新しいデータ送受信が発生しました!", } } @@ -1706,6 +1773,9 @@ pub fn no_notifications_set_translation(language: Language) -> Text<'static, Ren Language::FI => "Et ole vielä ottanut ilmoituksia käyttöön!\n\n\ Kun olet ottanut ne käyttöön, tällä sivulla näkyy loki ilmoituksistasi\n\n\ Voit ottaa ilmoitukset käyttöön asetuksista:", + Language::JA => "まだ通知を有効にしていません!\n\n\ + 有効化後、このページ上で通知のログが確認できます。\n\n\ + 通知設定は設定画面から変更可能です:", }) } @@ -1781,6 +1851,10 @@ pub fn no_notifications_received_translation( "Ei mitään nähtävää tällä hetkellä...\n\n\ Kun saat ilmoituksen, se näkyy tässä" } + Language::JA => { + "通知はまだ何もありません...\n\n\ + 通知があると、ここに表示されます" + } }) } @@ -1803,5 +1877,6 @@ pub fn only_last_30_translation(language: Language) -> &'static str { // Language::FA => "تنها ۳۰ اعلان آخر نمایش داده شده اند", Language::SV => "Endast de senaste 30 notifikationerna visas", Language::FI => "Vain viimeiset 30 ilmoitusta näytetään", + Language::JA => "最新の通知 30 件のみ表示されます", } } diff --git a/src/translations/translations_2.rs b/src/translations/translations_2.rs index a1ad3ccf..217dbf3c 100644 --- a/src/translations/translations_2.rs +++ b/src/translations/translations_2.rs @@ -20,6 +20,7 @@ pub fn new_version_available_translation(language: Language) -> &'static str { Language::RO => "O versiune nouă este disponibilă!", Language::PL => "Nowsza wersja jest dostępna!", Language::FR => "Une nouvelle version est disponible!", + Language::JA => "新しいバージョンが利用可能になりました!", _ => "A newer version is available!", } } @@ -41,6 +42,7 @@ pub fn inspect_translation(language: Language) -> &'static str { Language::ZH => "检查", Language::UK => "Інспектувати", Language::RO => "Inspectați", + Language::JA => "検査", _ => "Inspect", } } @@ -62,6 +64,7 @@ pub fn connection_details_translation(language: Language) -> &'static str { Language::RO => "Detalii conexiune", Language::PL => "Szczegóły połączenia", Language::FR => "Détails de la connexion", + Language::JA => "接続の詳細", _ => "Connection details", } } @@ -83,6 +86,7 @@ pub fn dropped_packets_translation(language: Language) -> &'static str { Language::RO => "Pachete pierdute", Language::PL => "Utracone pakiety", Language::FR => "Packets perdus", + Language::JA => "ドロップしたパケット", _ => "Dropped packets", } } @@ -104,6 +108,7 @@ pub fn data_representation_translation(language: Language) -> &'static str { Language::RO => "Reprezentarea datelor", Language::PL => "Reprezentacja danych", Language::FR => "Représentation de données", + Language::JA => "データ表示", _ => "Data representation", } } @@ -125,6 +130,7 @@ pub fn host_translation(language: Language) -> &'static str { Language::RO => "Host rețea", Language::PL => "Host sieciowy", Language::FR => "Host réseaux", + Language::JA => "ネットワーク ホスト", _ => "Network host", } } @@ -146,6 +152,7 @@ pub fn only_top_30_hosts_translation(language: Language) -> &'static str { Language::RO => "Doar primele 30 de host-uri sunt afișate aici", Language::PL => "Tylko 30 pierwszych hostów jest wyświetlanych", Language::FR => "Seuls les 30 premiers hôtes sont affichés ici", + Language::JA => "上位 30 件のホストのみが表示されます", _ => "Only the top 30 hosts are displayed here", } } @@ -167,6 +174,7 @@ pub fn sort_by_translation(language: Language) -> &'static str { Language::RO => "Filtrează după", Language::PL => "Sortuj według", Language::FR => "Trier par", + Language::JA => "ソート", _ => "Sort by", } } @@ -188,6 +196,7 @@ pub fn local_translation(language: Language) -> String { Language::RO => "Rețea locală", Language::PL => "Sieć lokalna", Language::FR => "Réseau local", + Language::JA => "ローカル ネットワーク", _ => "Local network", } .to_string() @@ -210,6 +219,7 @@ pub fn unknown_translation(language: Language) -> String { Language::RO => "Locație necunoscută", Language::PL => "Nieznana lokalizacja", Language::FR => "Localisation inconnue", + Language::JA => "不明なロケーション", _ => "Unknown location", } .to_string() @@ -232,6 +242,7 @@ pub fn your_network_adapter_translation(language: Language) -> String { Language::RO => "Adaptorul dvs. de rețea", Language::PL => "Twój adapter sieciowy", Language::FR => "Votre carte réseau", + Language::JA => "自身のネットワーク アダプター", _ => "Your network adapter", } .to_string() @@ -254,6 +265,7 @@ pub fn socket_address_translation(language: Language) -> &'static str { Language::RO => "Adresa socket-ului", Language::PL => "Adres gniazda", Language::FR => "Adresse du socket", + Language::JA => "ソケット アドレス", _ => "Socket address", } } @@ -275,6 +287,7 @@ pub fn mac_address_translation(language: Language) -> &'static str { Language::RO => "Adresa MAC", Language::PL => "Adres MAC", Language::FR => "Adresse MAC", + Language::JA => "MAC アドレス", _ => "MAC address", } } @@ -296,6 +309,7 @@ pub fn source_translation(language: Language) -> &'static str { Language::RO => "Sursă", Language::PL => "Źródło", Language::FR => "Source", + Language::JA => "送信元", _ => "Source", } } @@ -316,6 +330,7 @@ pub fn destination_translation(language: Language) -> &'static str { Language::RO => "Destinație", Language::PL => "Miejsce docelowe", // Depending on context these two are also valid: "Przeznaczenie" / "Cel" Language::FR => "Destination", + Language::JA => "送信先", _ => "Destination", } } @@ -332,7 +347,7 @@ pub fn fqdn_translation(language: Language) -> &'static str { // Language::FA => "نام دامنه جامع الشرایط", Language::ES => "Nombre de dominio completo", Language::KO => "절대 도메인 네임", - Language::ZH => "FQDN", + Language::ZH | Language::JA => "FQDN", Language::UK => "Повністю визначене доменне ім'я", Language::RO => "Nume de domeniu complet calificat", Language::PL => "Pełna nazwa domeny", @@ -358,6 +373,7 @@ pub fn administrative_entity_translation(language: Language) -> &'static str { Language::RO => "Numele sistemului autonom", Language::PL => "Nazwa autonomicznego systemu", Language::FR => "Nom du système autonome", + Language::JA => "AS 名", _ => "Autonomous System name", } } @@ -379,6 +395,7 @@ pub fn transmitted_data_translation(language: Language) -> &'static str { Language::RO => "Date transmise", Language::PL => "Przesłane dane", Language::FR => "Données transmises", + Language::JA => "転送データ", _ => "Transmitted data", } } @@ -400,6 +417,7 @@ pub fn country_translation(language: Language) -> &'static str { Language::RO => "Țară", Language::PL => "Kraj", Language::FR => "Pays", + Language::JA => "国", _ => "Country", } } @@ -421,6 +439,7 @@ pub fn domain_name_translation(language: Language) -> &'static str { Language::RO => "Nume domeniu", Language::PL => "Nazwa domeny", Language::FR => "Nom de domaine", + Language::JA => "ドメイン名", _ => "Domain name", } } @@ -442,6 +461,7 @@ pub fn only_show_favorites_translation(language: Language) -> &'static str { Language::RO => "Arată doar favorite", Language::PL => "Pokaż tylko ulubione", Language::FR => "Afficher uniquement les favoris", + Language::JA => "お気に入りのみを表示する", _ => "Only show favorites", } } @@ -463,6 +483,7 @@ pub fn search_filters_translation(language: Language) -> &'static str { Language::RO => "Filtre de căutare", Language::PL => "Filtry wyszukiwania", Language::FR => "Filtres de recherche", + Language::JA => "検索フィルター", _ => "Search filters", } } @@ -484,6 +505,7 @@ pub fn no_search_results_translation(language: Language) -> &'static str { Language::RO => "Niciun rezultat disponibil conform filtrelor de căutare specificate", Language::PL => "Brak wyników zgodnych z określonymi filtrami wyszukiwania", Language::FR => "Aucun résultat disponible selon les filtres de recherche spécifiés", + Language::JA => "指定されたフィルター条件で表示できる結果はありません", _ => "No result available according to the specified search filters", } } @@ -510,6 +532,7 @@ pub fn showing_results_translation( Language::RO => format!("Se afișează {start}-{end} din {total} rezultate"), Language::PL => format!("Wyświetlanie {start}-{end} z {total} wyników"), Language::FR => format!("Affichage de {start}-{end} de {total} résultats totaux"), + Language::JA => format!("{total} 件中の {start}-{end} 件を表示"), _ => format!("Showing {start}-{end} of {total} total results"), } } @@ -532,6 +555,7 @@ pub fn color_gradients_translation(language: Language) -> &'static str { Language::RO => "Aplicați gradient de culoare", Language::PL => "Zastosuj gradient kolorów", Language::FR => "Appliquer des gradients de couleur", + Language::JA => "グラデーションを適用する", _ => "Apply color gradients", } } diff --git a/src/translations/types/language.rs b/src/translations/types/language.rs index 0db768ec..d4d0eb08 100644 --- a/src/translations/types/language.rs +++ b/src/translations/types/language.rs @@ -4,7 +4,7 @@ use iced::{Length, Renderer}; use serde::{Deserialize, Serialize}; use crate::countries::flags_pictures::{ - CN, DE, ES, FI, FLAGS_WIDTH_SMALL, FR, GB, GR, IT, KR, PL, PT, RO, RU, SE, TR, UA, + CN, DE, ES, FI, FLAGS_WIDTH_SMALL, FR, GB, GR, IT, JP, KR, PL, PT, RO, RU, SE, TR, UA, }; use crate::StyleType; @@ -45,6 +45,8 @@ pub enum Language { SV, /// Finnish FI, + /// Japanese + JA, } impl Default for Language { @@ -54,10 +56,11 @@ impl Default for Language { } impl Language { - pub(crate) const ROW1: [Language; 4] = [Language::EN, Language::DE, Language::EL, Language::ES]; - pub(crate) const ROW2: [Language; 4] = [Language::FI, Language::FR, Language::IT, Language::KO]; - pub(crate) const ROW3: [Language; 4] = [Language::PL, Language::PT, Language::RO, Language::RU]; - pub(crate) const ROW4: [Language; 4] = [Language::SV, Language::TR, Language::UK, Language::ZH]; + pub(crate) const ROW1: [Language; 1] = [Language::EN]; + pub(crate) const ROW2: [Language; 4] = [Language::DE, Language::EL, Language::ES, Language::FI]; + pub(crate) const ROW3: [Language; 4] = [Language::FR, Language::IT, Language::JA, Language::KO]; + pub(crate) const ROW4: [Language; 4] = [Language::PL, Language::PT, Language::RO, Language::RU]; + pub(crate) const ROW5: [Language; 4] = [Language::SV, Language::TR, Language::UK, Language::ZH]; pub fn get_radio_label(&self) -> &str { match self { @@ -78,6 +81,7 @@ impl Language { // Language::FA => "فارسی", Language::SV => "Svenska", Language::FI => "Suomi", + Language::JA => "日本語", } } @@ -100,6 +104,7 @@ impl Language { // Language::FA => IR, Language::SV => SE, Language::FI => FI, + Language::JA => JP, }))) .width(Length::Fixed(FLAGS_WIDTH_SMALL)) }