feat(ui): 为多个窗口启用自动翻译拦截器

为 MapLabelSearchWindow、ArtifactOcrDialog、PromptDialog 等 14 个窗口添加了 AutoTranslateInterceptor.EnableAutoTranslate 属性,以启用自动翻译拦截功能。
This commit is contained in:
辉鸭蛋
2026-01-27 04:21:49 +08:00
parent ba930ef41b
commit e4aedd9497
15 changed files with 46 additions and 16 deletions

View File

@@ -1,4 +1,4 @@
<ui:FluentWindow x:Class="BetterGenshinImpact.View.Pages.View.PathingConfigView"
<ui:FluentWindow x:Class="BetterGenshinImpact.View.Pages.View.PathingConfigView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
@@ -8,6 +8,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:sdl="http://schemas.sdl.com/xaml"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:behavior="clr-namespace:BetterGenshinImpact.View.Behavior"
xmlns:view="clr-namespace:BetterGenshinImpact.ViewModel.Pages.View"
Width="1000"
Height="500"
@@ -17,6 +18,7 @@
d:DesignHeight="1000"
d:DesignWidth="500"
ExtendsContentIntoTitleBar="True"
behavior:AutoTranslateInterceptor.EnableAutoTranslate="True"
WindowBackdropType="Auto"
mc:Ignorable="d">
@@ -302,4 +304,4 @@
</Grid>
</ui:FluentWindow>
</ui:FluentWindow>

View File

@@ -4,11 +4,13 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:behavior="clr-namespace:BetterGenshinImpact.View.Behavior"
Title="关于"
Width="400"
Height="300"
Background="#202020"
ExtendsContentIntoTitleBar="True"
behavior:AutoTranslateInterceptor.EnableAutoTranslate="True"
FontFamily="{DynamicResource TextThemeFontFamily}"
WindowBackdropType="Auto"
WindowStartupLocation="CenterOwner"
@@ -62,4 +64,4 @@
</ui:TitleBar.Icon>
</ui:TitleBar>
</Grid>
</ui:FluentWindow>
</ui:FluentWindow>

View File

@@ -4,10 +4,12 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:behavior="clr-namespace:BetterGenshinImpact.View.Behavior"
SizeToContent="WidthAndHeight"
ui:Design.Background="{DynamicResource ApplicationBackgroundBrush}"
ui:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}"
ExtendsContentIntoTitleBar="True"
behavior:AutoTranslateInterceptor.EnableAutoTranslate="True"
FontFamily="{DynamicResource TextThemeFontFamily}"
ResizeMode="CanMinimize"
WindowBackdropType="Mica"

View File

@@ -1,4 +1,4 @@
<ui:FluentWindow x:Class="BetterGenshinImpact.View.Windows.CheckUpdateWindow"
<ui:FluentWindow x:Class="BetterGenshinImpact.View.Windows.CheckUpdateWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
@@ -8,6 +8,7 @@
xmlns:vio="http://schemas.lepo.co/wpfui/2022/xaml/violeta"
xmlns:emoji="clr-namespace:Emoji.Wpf;assembly=Emoji.Wpf"
xmlns:webview="clr-namespace:BetterGenshinImpact.View.Controls.Webview"
xmlns:behavior="clr-namespace:BetterGenshinImpact.View.Behavior"
x:Name="app"
Title="发现新版本"
Width="680"
@@ -15,6 +16,7 @@
SizeToContent="Height"
Background="#202020"
ExtendsContentIntoTitleBar="True"
behavior:AutoTranslateInterceptor.EnableAutoTranslate="True"
FontFamily="{DynamicResource TextThemeFontFamily}"
WindowBackdropType="Auto"
WindowStartupLocation="CenterOwner"
@@ -249,4 +251,4 @@
</ui:TitleBar.Icon>
</ui:TitleBar>
</Grid>
</ui:FluentWindow>
</ui:FluentWindow>

View File

@@ -4,6 +4,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:behavior="clr-namespace:BetterGenshinImpact.View.Behavior"
Width="400"
Height="700"
MinWidth="400"
@@ -11,6 +12,7 @@
ui:Design.Background="{DynamicResource ApplicationBackgroundBrush}"
ui:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}"
ExtendsContentIntoTitleBar="True"
behavior:AutoTranslateInterceptor.EnableAutoTranslate="True"
FontFamily="{DynamicResource TextThemeFontFamily}"
WindowBackdropType="Mica"
WindowStartupLocation="CenterScreen"
@@ -263,4 +265,4 @@
<Window.Resources>
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
</Window.Resources>
</ui:FluentWindow>
</ui:FluentWindow>

View File

@@ -1,15 +1,17 @@
<ui:FluentWindow x:Class="BetterGenshinImpact.View.Windows.JsonMonoDialog"
<ui:FluentWindow x:Class="BetterGenshinImpact.View.Windows.JsonMonoDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:codeEditor="clr-namespace:BetterGenshinImpact.View.Controls.CodeEditor"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:behavior="clr-namespace:BetterGenshinImpact.View.Behavior"
Title="JSON 编辑器"
Width="600"
Height="600"
d:Background="#D2D2D2"
ExtendsContentIntoTitleBar="True"
behavior:AutoTranslateInterceptor.EnableAutoTranslate="True"
FontFamily="{DynamicResource TextThemeFontFamily}"
Tag="JsonMonoDialog"
WindowBackdropType="Mica"
@@ -55,4 +57,4 @@
</ui:TitleBar.Icon>
</ui:TitleBar>
</Grid>
</ui:FluentWindow>
</ui:FluentWindow>

View File

@@ -4,6 +4,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:behavior="clr-namespace:BetterGenshinImpact.View.Behavior"
xmlns:pages="clr-namespace:BetterGenshinImpact.View.Pages"
Title="按键绑定设置"
Width="800"
@@ -11,6 +12,7 @@
d:DesignHeight="600"
d:DesignWidth="800"
ExtendsContentIntoTitleBar="True"
behavior:AutoTranslateInterceptor.EnableAutoTranslate="True"
WindowBackdropType="Mica"
WindowCornerPreference="Round"
WindowStartupLocation="CenterOwner"
@@ -24,4 +26,4 @@
Title="按键绑定设置"
Icon="pack://application:,,,/Assets/logo.ico" />
</Grid>
</ui:FluentWindow>
</ui:FluentWindow>

View File

@@ -4,6 +4,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:behavior="clr-namespace:BetterGenshinImpact.View.Behavior"
Width="280"
Height="64"
MinWidth="120"
@@ -13,6 +14,7 @@
Topmost="True"
WindowStyle="None"
Background="Transparent"
behavior:AutoTranslateInterceptor.EnableAutoTranslate="True"
mc:Ignorable="d">
<Grid Margin="0">
<Border Margin="0"

View File

@@ -1,9 +1,10 @@
<ui:FluentWindow x:Class="BetterGenshinImpact.View.Windows.MapPathingDevWindow"
<ui:FluentWindow x:Class="BetterGenshinImpact.View.Windows.MapPathingDevWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:behavior="clr-namespace:BetterGenshinImpact.View.Behavior"
xmlns:windows="clr-namespace:BetterGenshinImpact.ViewModel.Windows"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
d:DataContext="{d:DesignInstance Type=windows:MapPathingDevViewModel}"
@@ -13,6 +14,7 @@
Height="260"
ExtendsContentIntoTitleBar="True"
WindowBackdropType="Auto"
behavior:AutoTranslateInterceptor.EnableAutoTranslate="True"
mc:Ignorable="d">
<StackPanel>
<ui:TitleBar Title="地图追踪开发者工具">
@@ -45,4 +47,4 @@
Content="录制编辑器" />
</StackPanel>
</StackPanel>
</ui:FluentWindow>
</ui:FluentWindow>

View File

@@ -1,9 +1,10 @@
<ui:FluentWindow x:Class="BetterGenshinImpact.View.Windows.MapViewer"
<ui:FluentWindow x:Class="BetterGenshinImpact.View.Windows.MapViewer"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:behavior="clr-namespace:BetterGenshinImpact.View.Behavior"
xmlns:windows="clr-namespace:BetterGenshinImpact.ViewModel.Windows"
Title="地图"
Width="512"
@@ -12,6 +13,7 @@
ui:Design.Background="{DynamicResource ApplicationBackgroundBrush}"
ui:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}"
ExtendsContentIntoTitleBar="True"
behavior:AutoTranslateInterceptor.EnableAutoTranslate="True"
FontFamily="{DynamicResource TextThemeFontFamily}"
ResizeMode="CanMinimize"
Topmost="True"
@@ -37,4 +39,4 @@
</ui:TitleBar>
</Grid>
</ui:FluentWindow>
</ui:FluentWindow>

View File

@@ -4,6 +4,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:behavior="clr-namespace:BetterGenshinImpact.View.Behavior"
Width="500"
Height="225"
MinWidth="400"
@@ -11,6 +12,7 @@
ui:Design.Background="{DynamicResource ApplicationBackgroundBrush}"
ui:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}"
ExtendsContentIntoTitleBar="True"
behavior:AutoTranslateInterceptor.EnableAutoTranslate="True"
FontFamily="{DynamicResource TextThemeFontFamily}"
SizeToContent="Width"
WindowBackdropType="Auto"

View File

@@ -4,6 +4,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:behavior="clr-namespace:BetterGenshinImpact.View.Behavior"
Width="520"
Height="280"
MinWidth="400"
@@ -11,6 +12,7 @@
ui:Design.Background="{DynamicResource ApplicationBackgroundBrush}"
ui:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}"
ExtendsContentIntoTitleBar="True"
behavior:AutoTranslateInterceptor.EnableAutoTranslate="True"
FontFamily="{DynamicResource TextThemeFontFamily}"
ResizeMode="NoResize"
WindowBackdropType="Auto"

View File

@@ -6,6 +6,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:vio="http://schemas.lepo.co/wpfui/2022/xaml/violeta"
xmlns:behavior="clr-namespace:BetterGenshinImpact.View.Behavior"
Title="脚本仓库"
Width="410"
MinWidth="360"
@@ -13,6 +14,7 @@
ResizeMode="NoResize"
Background="#202020"
ExtendsContentIntoTitleBar="True"
behavior:AutoTranslateInterceptor.EnableAutoTranslate="True"
FontFamily="{DynamicResource TextThemeFontFamily}"
SizeToContent="Height"
WindowBackdropType="Auto"
@@ -320,4 +322,4 @@
</Grid>
</Grid>
</Grid>
</ui:FluentWindow>
</ui:FluentWindow>

View File

@@ -4,6 +4,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:behavior="clr-namespace:BetterGenshinImpact.View.Behavior"
Width="480"
Height="240"
MinWidth="400"
@@ -11,6 +12,7 @@
ui:Design.Background="{DynamicResource ApplicationBackgroundBrush}"
ui:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}"
ExtendsContentIntoTitleBar="True"
behavior:AutoTranslateInterceptor.EnableAutoTranslate="True"
FontFamily="{DynamicResource TextThemeFontFamily}"
ResizeMode="NoResize"
WindowStartupLocation="CenterOwner"

View File

@@ -1,9 +1,10 @@
<ui:FluentWindow x:Class="BetterGenshinImpact.View.Windows.WelcomeDialog"
<ui:FluentWindow x:Class="BetterGenshinImpact.View.Windows.WelcomeDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:behavior="clr-namespace:BetterGenshinImpact.View.Behavior"
Width="500"
Height="210"
MinWidth="400"
@@ -11,6 +12,7 @@
ui:Design.Background="{DynamicResource ApplicationBackgroundBrush}"
ui:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}"
ExtendsContentIntoTitleBar="True"
behavior:AutoTranslateInterceptor.EnableAutoTranslate="True"
FontFamily="{DynamicResource TextThemeFontFamily}"
ResizeMode="CanMinimize"
WindowBackdropType="Mica"
@@ -71,4 +73,4 @@
</ui:TitleBar>
</Grid>
</ui:FluentWindow>
</ui:FluentWindow>