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.
This commit is contained in:
Aleksandr Miheichev 2025-08-17 13:03:34 +03:00
parent d5c50ef27c
commit 8a0d1857a6
11 changed files with 252 additions and 180 deletions

@ -1 +1 @@
Subproject commit ef73fa22c46cfc7d1ec192ffe8497f6e61b4f0db Subproject commit cb891d44cb6fd214211a3e0a4e27c165e141ed07

View file

@ -1059,6 +1059,18 @@
<data name="LvPrevProfileTip" xml:space="preserve"> <data name="LvPrevProfileTip" xml:space="preserve">
<value>لطفاً مطمئن شوید که ملاحظات وجود دارند و منحصر به فرد هستند</value> <value>لطفاً مطمئن شوید که ملاحظات وجود دارند و منحصر به فرد هستند</value>
</data> </data>
<data name="TbSettingsTunAutoRoute" xml:space="preserve">
<value>مسیریابی خودکار</value>
</data>
<data name="TbSettingsTunStrictRoute" xml:space="preserve">
<value>مسیریابی سخت‌گیرانه</value>
</data>
<data name="TbSettingsTunStack" xml:space="preserve">
<value>پشته شبکه</value>
</data>
<data name="TbSettingsTunMtu" xml:space="preserve">
<value>MTU</value>
</data>
<data name="TbSettingsEnableExInbound" xml:space="preserve"> <data name="TbSettingsEnableExInbound" xml:space="preserve">
<value>فعال سازی additional Inbound</value> <value>فعال سازی additional Inbound</value>
</data> </data>

View file

@ -1059,6 +1059,18 @@
<data name="LvPrevProfileTip" xml:space="preserve"> <data name="LvPrevProfileTip" xml:space="preserve">
<value>Kérjük, győződjön meg arról, hogy a konfigurációs megjegyzések léteznek és egyediek</value> <value>Kérjük, győződjön meg arról, hogy a konfigurációs megjegyzések léteznek és egyediek</value>
</data> </data>
<data name="TbSettingsTunAutoRoute" xml:space="preserve">
<value>Automatikus útválasztás</value>
</data>
<data name="TbSettingsTunStrictRoute" xml:space="preserve">
<value>Szigorú útválasztás</value>
</data>
<data name="TbSettingsTunStack" xml:space="preserve">
<value>Hálózati verem</value>
</data>
<data name="TbSettingsTunMtu" xml:space="preserve">
<value>MTU</value>
</data>
<data name="TbSettingsEnableExInbound" xml:space="preserve"> <data name="TbSettingsEnableExInbound" xml:space="preserve">
<value>További bejövő engedélyezése</value> <value>További bejövő engedélyezése</value>
</data> </data>

View file

@ -1059,6 +1059,18 @@
<data name="LvPrevProfileTip" xml:space="preserve"> <data name="LvPrevProfileTip" xml:space="preserve">
<value>Please make sure the Configuration remarks exist and are unique</value> <value>Please make sure the Configuration remarks exist and are unique</value>
</data> </data>
<data name="TbSettingsTunAutoRoute" xml:space="preserve">
<value>Auto Route</value>
</data>
<data name="TbSettingsTunStrictRoute" xml:space="preserve">
<value>Strict Route</value>
</data>
<data name="TbSettingsTunStack" xml:space="preserve">
<value>Stack</value>
</data>
<data name="TbSettingsTunMtu" xml:space="preserve">
<value>MTU</value>
</data>
<data name="TbSettingsEnableExInbound" xml:space="preserve"> <data name="TbSettingsEnableExInbound" xml:space="preserve">
<value>Enable additional Inbound</value> <value>Enable additional Inbound</value>
</data> </data>

View file

@ -1059,6 +1059,18 @@
<data name="LvPrevProfileTip" xml:space="preserve"> <data name="LvPrevProfileTip" xml:space="preserve">
<value>Убедитесь, что примечание существует и является уникальным</value> <value>Убедитесь, что примечание существует и является уникальным</value>
</data> </data>
<data name="TbSettingsTunAutoRoute" xml:space="preserve">
<value>Автоматическая маршрутизация</value>
</data>
<data name="TbSettingsTunStrictRoute" xml:space="preserve">
<value>Строгая маршрутизация</value>
</data>
<data name="TbSettingsTunStack" xml:space="preserve">
<value>Сетевой стек</value>
</data>
<data name="TbSettingsTunMtu" xml:space="preserve">
<value>MTU</value>
</data>
<data name="TbSettingsEnableExInbound" xml:space="preserve"> <data name="TbSettingsEnableExInbound" xml:space="preserve">
<value>Включить дополнительный входящий канал</value> <value>Включить дополнительный входящий канал</value>
</data> </data>

View file

@ -1056,6 +1056,18 @@
<data name="LvPrevProfileTip" xml:space="preserve"> <data name="LvPrevProfileTip" xml:space="preserve">
<value>请确保配置文件别名存在并唯一</value> <value>请确保配置文件别名存在并唯一</value>
</data> </data>
<data name="TbSettingsTunAutoRoute" xml:space="preserve">
<value>自动路由</value>
</data>
<data name="TbSettingsTunStrictRoute" xml:space="preserve">
<value>严格路由</value>
</data>
<data name="TbSettingsTunStack" xml:space="preserve">
<value>协议栈</value>
</data>
<data name="TbSettingsTunMtu" xml:space="preserve">
<value>MTU</value>
</data>
<data name="TbSettingsEnableExInbound" xml:space="preserve"> <data name="TbSettingsEnableExInbound" xml:space="preserve">
<value>启用额外监听端口</value> <value>启用额外监听端口</value>
</data> </data>

View file

@ -1056,6 +1056,18 @@
<data name="LvPrevProfileTip" xml:space="preserve"> <data name="LvPrevProfileTip" xml:space="preserve">
<value>請確保設定檔別名存在並且唯一</value> <value>請確保設定檔別名存在並且唯一</value>
</data> </data>
<data name="TbSettingsTunAutoRoute" xml:space="preserve">
<value>自動路由</value>
</data>
<data name="TbSettingsTunStrictRoute" xml:space="preserve">
<value>嚴格路由</value>
</data>
<data name="TbSettingsTunStack" xml:space="preserve">
<value>協定堆疊</value>
</data>
<data name="TbSettingsTunMtu" xml:space="preserve">
<value>MTU</value>
</data>
<data name="TbSettingsEnableExInbound" xml:space="preserve"> <data name="TbSettingsEnableExInbound" xml:space="preserve">
<value>啟用額外偵聽連接埠</value> <value>啟用額外偵聽連接埠</value>
</data> </data>

View file

@ -523,7 +523,7 @@
Grid.Column="0" Grid.Column="0"
Margin="{StaticResource Margin4}" Margin="{StaticResource Margin4}"
VerticalAlignment="Center" VerticalAlignment="Center"
Text="Mtu" /> Text="{x:Static resx:ResUI.TbSettingsTunMtu}" />
<TextBox <TextBox
x:Name="txtShortId9" x:Name="txtShortId9"
Grid.Row="5" Grid.Row="5"

View file

@ -736,7 +736,7 @@
Grid.Column="0" Grid.Column="0"
Margin="{StaticResource Margin4}" Margin="{StaticResource Margin4}"
VerticalAlignment="Center" VerticalAlignment="Center"
Text="Auto Route" /> Text="{x:Static resx:ResUI.TbSettingsTunAutoRoute}" />
<ToggleSwitch <ToggleSwitch
x:Name="togAutoRoute" x:Name="togAutoRoute"
Grid.Row="2" Grid.Row="2"
@ -749,7 +749,7 @@
Grid.Column="0" Grid.Column="0"
Margin="{StaticResource Margin4}" Margin="{StaticResource Margin4}"
VerticalAlignment="Center" VerticalAlignment="Center"
Text="Strict Route" /> Text="{x:Static resx:ResUI.TbSettingsTunStrictRoute}" />
<ToggleSwitch <ToggleSwitch
x:Name="togStrictRoute" x:Name="togStrictRoute"
Grid.Row="3" Grid.Row="3"
@ -762,7 +762,7 @@
Grid.Column="0" Grid.Column="0"
Margin="{StaticResource Margin4}" Margin="{StaticResource Margin4}"
VerticalAlignment="Center" VerticalAlignment="Center"
Text="Stack" /> Text="{x:Static resx:ResUI.TbSettingsTunStack}" />
<ComboBox <ComboBox
x:Name="cmbStack" x:Name="cmbStack"
Grid.Row="4" Grid.Row="4"
@ -776,7 +776,7 @@
Grid.Column="0" Grid.Column="0"
Margin="{StaticResource Margin4}" Margin="{StaticResource Margin4}"
VerticalAlignment="Center" VerticalAlignment="Center"
Text="Mtu" /> Text="{x:Static resx:ResUI.TbSettingsTunMtu}" />
<ComboBox <ComboBox
x:Name="cmbMtu" x:Name="cmbMtu"
Grid.Row="5" Grid.Row="5"

View file

@ -696,7 +696,7 @@
Margin="{StaticResource Margin4}" Margin="{StaticResource Margin4}"
VerticalAlignment="Center" VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}" Style="{StaticResource ToolbarTextBlock}"
Text="Mtu" /> Text="{x:Static resx:ResUI.TbSettingsTunMtu}" />
<TextBox <TextBox
x:Name="txtShortId9" x:Name="txtShortId9"
Grid.Row="5" Grid.Row="5"

View file

@ -430,7 +430,7 @@
Margin="{StaticResource Margin8}" Margin="{StaticResource Margin8}"
VerticalAlignment="Center" VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}" Style="{StaticResource ToolbarTextBlock}"
Text="mtu" /> Text="{x:Static resx:ResUI.TbSettingsTunMtu}" />
<TextBox Style="{StaticResource DefTextBox}" <TextBox Style="{StaticResource DefTextBox}"
x:Name="txtKcpmtu" x:Name="txtKcpmtu"
Grid.Row="1" Grid.Row="1"
@ -1037,7 +1037,7 @@
Margin="{StaticResource Margin8}" Margin="{StaticResource Margin8}"
VerticalAlignment="Center" VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}" Style="{StaticResource ToolbarTextBlock}"
Text="Auto Route" /> Text="{x:Static resx:ResUI.TbSettingsTunAutoRoute}" />
<ToggleButton <ToggleButton
x:Name="togAutoRoute" x:Name="togAutoRoute"
Grid.Row="2" Grid.Row="2"
@ -1051,7 +1051,7 @@
Margin="{StaticResource Margin8}" Margin="{StaticResource Margin8}"
VerticalAlignment="Center" VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}" Style="{StaticResource ToolbarTextBlock}"
Text="Strict Route" /> Text="{x:Static resx:ResUI.TbSettingsTunStrictRoute}" />
<ToggleButton <ToggleButton
x:Name="togStrictRoute" x:Name="togStrictRoute"
Grid.Row="3" Grid.Row="3"
@ -1065,7 +1065,7 @@
Margin="{StaticResource Margin8}" Margin="{StaticResource Margin8}"
VerticalAlignment="Center" VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}" Style="{StaticResource ToolbarTextBlock}"
Text="Stack" /> Text="{x:Static resx:ResUI.TbSettingsTunStack}" />
<ComboBox <ComboBox
x:Name="cmbStack" x:Name="cmbStack"
Grid.Row="4" Grid.Row="4"
@ -1081,7 +1081,7 @@
Margin="{StaticResource Margin8}" Margin="{StaticResource Margin8}"
VerticalAlignment="Center" VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}" Style="{StaticResource ToolbarTextBlock}"
Text="Mtu" /> Text="{x:Static resx:ResUI.TbSettingsTunMtu}" />
<ComboBox <ComboBox
x:Name="cmbMtu" x:Name="cmbMtu"
Grid.Row="5" Grid.Row="5"