From 8a0d1857a67937acf73eaaf960372915a983a29c Mon Sep 17 00:00:00 2001 From: Aleksandr Miheichev Date: Sun, 17 Aug 2025 13:03:34 +0300 Subject: [PATCH] feat(i18n,ui): externalize TUN settings labels, add translations - Replace hard-coded labels "Auto Route", "Strict Route", "Stack", and "Mtu/mtu" with resource keys in both Avalonia and WPF views: - v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml - v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml - v2rayN/v2rayN/Views/AddServerWindow.xaml - v2rayN/v2rayN/Views/OptionSettingWindow.xaml - Add new resource keys in ResUI: TbSettingsTunAutoRoute, TbSettingsTunStrictRoute, TbSettingsTunStack, TbSettingsTunMtu (unified casing as "MTU"). Files: - v2rayN/ServiceLib/Resx/ResUI.resx - Provide translations in: - v2rayN/ServiceLib/Resx/ResUI.ru.resx - v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx - v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx - v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx - v2rayN/ServiceLib/Resx/ResUI.hu.resx - Normalize XML comments/whitespace in .resx files. - Update submodule v2rayN/GlobalHotKeys to 5201dd5. No breaking changes. --- v2rayN/GlobalHotKeys | 2 +- v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx | 68 +++++++++++-------- v2rayN/ServiceLib/Resx/ResUI.hu.resx | 68 +++++++++++-------- v2rayN/ServiceLib/Resx/ResUI.resx | 68 +++++++++++-------- v2rayN/ServiceLib/Resx/ResUI.ru.resx | 68 +++++++++++-------- v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx | 68 +++++++++++-------- v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx | 68 +++++++++++-------- .../Views/AddServerWindow.axaml | 2 +- .../Views/OptionSettingWindow.axaml | 8 +-- v2rayN/v2rayN/Views/AddServerWindow.xaml | 2 +- v2rayN/v2rayN/Views/OptionSettingWindow.xaml | 10 +-- 11 files changed, 252 insertions(+), 180 deletions(-) diff --git a/v2rayN/GlobalHotKeys b/v2rayN/GlobalHotKeys index ef73fa22..cb891d44 160000 --- a/v2rayN/GlobalHotKeys +++ b/v2rayN/GlobalHotKeys @@ -1 +1 @@ -Subproject commit ef73fa22c46cfc7d1ec192ffe8497f6e61b4f0db +Subproject commit cb891d44cb6fd214211a3e0a4e27c165e141ed07 diff --git a/v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx b/v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx index 6873e1c8..cd15f976 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx @@ -1,17 +1,17 @@ - @@ -1059,6 +1059,18 @@ لطفاً مطمئن شوید که ملاحظات وجود دارند و منحصر به فرد هستند + + مسیریابی خودکار + + + مسیریابی سخت‌گیرانه + + + پشته شبکه + + + MTU + فعال سازی additional Inbound @@ -1497,4 +1509,4 @@ This feature is intended for advanced users and those with special requirements. Once enabled, it will ignore the Core's basic settings, DNS settings, and routing settings. You must ensure that the system proxy port, traffic statistics, and other related configurations are set correctly — everything will be configured by you. - \ No newline at end of file + diff --git a/v2rayN/ServiceLib/Resx/ResUI.hu.resx b/v2rayN/ServiceLib/Resx/ResUI.hu.resx index d90ac86c..8f451953 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.hu.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.hu.resx @@ -1,17 +1,17 @@ - @@ -1059,6 +1059,18 @@ Kérjük, győződjön meg arról, hogy a konfigurációs megjegyzések léteznek és egyediek + + Automatikus útválasztás + + + Szigorú útválasztás + + + Hálózati verem + + + MTU + További bejövő engedélyezése @@ -1497,4 +1509,4 @@ This feature is intended for advanced users and those with special requirements. Once enabled, it will ignore the Core's basic settings, DNS settings, and routing settings. You must ensure that the system proxy port, traffic statistics, and other related configurations are set correctly — everything will be configured by you. - \ No newline at end of file + diff --git a/v2rayN/ServiceLib/Resx/ResUI.resx b/v2rayN/ServiceLib/Resx/ResUI.resx index 2b2e3abd..104a3925 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.resx @@ -1,17 +1,17 @@ - @@ -1059,6 +1059,18 @@ Please make sure the Configuration remarks exist and are unique + + Auto Route + + + Strict Route + + + Stack + + + MTU + Enable additional Inbound @@ -1497,4 +1509,4 @@ This feature is intended for advanced users and those with special requirements. Once enabled, it will ignore the Core's basic settings, DNS settings, and routing settings. You must ensure that the system proxy port, traffic statistics, and other related configurations are set correctly — everything will be configured by you. - \ No newline at end of file + diff --git a/v2rayN/ServiceLib/Resx/ResUI.ru.resx b/v2rayN/ServiceLib/Resx/ResUI.ru.resx index bb1f6184..2b02e3ed 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.ru.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.ru.resx @@ -1,17 +1,17 @@ - @@ -1059,6 +1059,18 @@ Убедитесь, что примечание существует и является уникальным + + Автоматическая маршрутизация + + + Строгая маршрутизация + + + Сетевой стек + + + MTU + Включить дополнительный входящий канал @@ -1497,4 +1509,4 @@ Эта функция предназначена для продвинутых пользователей и особых случаев. После включения игнорируются базовые настройки ядра, DNS и маршрутизации. Вы должны самостоятельно корректно задать порт системного прокси, учёт трафика и другие связанные параметры — всё настраивается вручную. - \ No newline at end of file + diff --git a/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx b/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx index b10ff641..ff9035d3 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx @@ -1,17 +1,17 @@ - @@ -1056,6 +1056,18 @@ 请确保配置文件别名存在并唯一 + + 自动路由 + + + 严格路由 + + + 协议栈 + + + MTU + 启用额外监听端口 @@ -1494,4 +1506,4 @@ 此功能供高级用户和有特殊需求的用户使用。 启用此功能后,将忽略 Core 的基础设置,DNS 设置 ,路由设置。你需要保证系统代理的端口和流量统计等功能的配置正确,一切都由你来设置。 - \ No newline at end of file + diff --git a/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx b/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx index b3738082..34a90e21 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx @@ -1,17 +1,17 @@ - @@ -1056,6 +1056,18 @@ 請確保設定檔別名存在並且唯一 + + 自動路由 + + + 嚴格路由 + + + 協定堆疊 + + + MTU + 啟用額外偵聽連接埠 @@ -1494,4 +1506,4 @@ This feature is intended for advanced users and those with special requirements. Once enabled, it will ignore the Core's basic settings, DNS settings, and routing settings. You must ensure that the system proxy port, traffic statistics, and other related configurations are set correctly — everything will be configured by you. - \ No newline at end of file + diff --git a/v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml b/v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml index 56cc82a0..9cb462d1 100644 --- a/v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml +++ b/v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml @@ -523,7 +523,7 @@ Grid.Column="0" Margin="{StaticResource Margin4}" VerticalAlignment="Center" - Text="Mtu" /> + Text="{x:Static resx:ResUI.TbSettingsTunMtu}" /> + Text="{x:Static resx:ResUI.TbSettingsTunAutoRoute}" /> + Text="{x:Static resx:ResUI.TbSettingsTunStrictRoute}" /> + Text="{x:Static resx:ResUI.TbSettingsTunStack}" /> + Text="{x:Static resx:ResUI.TbSettingsTunMtu}" /> + Text="{x:Static resx:ResUI.TbSettingsTunMtu}" /> + Text="{x:Static resx:ResUI.TbSettingsTunMtu}" /> + Text="{x:Static resx:ResUI.TbSettingsTunAutoRoute}" /> + Text="{x:Static resx:ResUI.TbSettingsTunStrictRoute}" /> + Text="{x:Static resx:ResUI.TbSettingsTunStack}" /> + Text="{x:Static resx:ResUI.TbSettingsTunMtu}" />