mirror of
https://github.com/2dust/v2rayN.git
synced 2025-08-23 11:26:54 +00:00
i18n(ru/zh-Hans/zh-Hant/hu/fa): translate TUN settings, unify MTU, use resx (#7787)
* 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.
* i18n: TUN labels across locales; unify MTU
* chore: ignore local IDE/venv files
* chore(resx): regenerate ResUI.Designer with TUN string accessors
- Add strongly-typed accessors in ServiceLib.Resx.ResUI:
- TbSettingsTunAutoRoute → "Auto Route"
- TbSettingsTunStrictRoute → "Strict Route"
- TbSettingsTunStack → "Stack"
- TbSettingsTunMtu → "MTU"
- Keep auto-generated structure intact; normalize minor whitespace.
Refs: v2rayN/ServiceLib/Resx/ResUI.resx
No functional changes beyond exposing new i18n keys.
* chore(gitignore): ignore JetBrains Rider artifacts (.idea/, *.sln.iml)
---------
Co-authored-by: Aleksandr Miheichev <alexandr.gmail@tuta.com>
This commit is contained in:
parent
89893c0945
commit
4f711b1bd3
12 changed files with 748 additions and 647 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -397,4 +397,5 @@ FodyWeavers.xsd
|
||||||
*.msp
|
*.msp
|
||||||
|
|
||||||
# JetBrains Rider
|
# JetBrains Rider
|
||||||
|
.idea/
|
||||||
*.sln.iml
|
*.sln.iml
|
28
v2rayN/ServiceLib/Resx/ResUI.Designer.cs
generated
28
v2rayN/ServiceLib/Resx/ResUI.Designer.cs
generated
|
@ -3732,6 +3732,34 @@ namespace ServiceLib.Resx {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 Auto Route 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
public static string TbSettingsTunAutoRoute {
|
||||||
|
get { return ResourceManager.GetString("TbSettingsTunAutoRoute", resourceCulture); }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 Strict Route 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
public static string TbSettingsTunStrictRoute {
|
||||||
|
get { return ResourceManager.GetString("TbSettingsTunStrictRoute", resourceCulture); }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 Stack 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
public static string TbSettingsTunStack {
|
||||||
|
get { return ResourceManager.GetString("TbSettingsTunStack", resourceCulture); }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 MTU 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
public static string TbSettingsTunMtu {
|
||||||
|
get { return ResourceManager.GetString("TbSettingsTunMtu", resourceCulture); }
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Tun Mode settings 的本地化字符串。
|
/// 查找类似 Tun Mode settings 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
Loading…
Reference in a new issue