fix(avalonia): fix localization keys in settings pages

- Rename Avalonia-specific keys to match existing WPF keys in en.xaml:
  - proxyEnabled -> enableProxy, proxyServer -> server, etc.
  - toggleFlowLauncher -> flowlauncherHotkey
  - install -> installLocalPluginTooltip
  - plugin_open_plugin_directory -> pluginDirectory
- Add missing Avalonia-specific keys to en.xaml:
  - hotkeyFormatTip, sourceCode, loading
  - plugin_settings_open_in_wpf_window, openSettings
- Fix Explorer plugin settings to not expand general section by default
This commit is contained in:
Shengkai Lin 2026-02-01 12:05:01 +08:00
parent 0681332238
commit 8ee32dfab7
6 changed files with 17 additions and 10 deletions

View file

@ -13,8 +13,8 @@
<StackPanel Spacing="20">
<TextBlock Text="{i18n:Localize hotkey}" FontSize="28" FontWeight="SemiBold" />
<ui:SettingsExpander Header="{i18n:Localize toggleFlowLauncher}"
Description="{i18n:Localize toggleFlowLauncherTip}"
<ui:SettingsExpander Header="{i18n:Localize flowlauncherHotkey}"
Description="{i18n:Localize flowlauncherHotkeyToolTip}"
IconSource="Keyboard">
<ui:SettingsExpander.Footer>
<controls:HotkeyControl Hotkey="{Binding ToggleHotkey, Mode=TwoWay}" MinWidth="150" />

View file

@ -24,7 +24,7 @@
<ui:SymbolIcon Symbol="Sync" FontSize="16"/>
</Button>
<Button Command="{Binding InstallPluginCommand}" ToolTip.Tip="{i18n:Localize install}">
<Button Command="{Binding InstallPluginCommand}" ToolTip.Tip="{i18n:Localize installLocalPluginTooltip}">
<ui:SymbolIcon Symbol="Add" FontSize="16"/>
</Button>
</StackPanel>

View file

@ -153,7 +153,7 @@
<Button Command="{Binding OpenSourceCodeLinkCommand}" ToolTip.Tip="{i18n:Localize website}">
<ui:SymbolIcon Symbol="Globe"/>
</Button>
<Button Command="{Binding OpenPluginDirectoryCommand}" ToolTip.Tip="{i18n:Localize plugin_open_plugin_directory}">
<Button Command="{Binding OpenPluginDirectoryCommand}" ToolTip.Tip="{i18n:Localize pluginDirectory}">
<ui:SymbolIcon Symbol="Folder"/>
</Button>
<Button Command="{Binding OpenDeletePluginWindowCommand}" ToolTip.Tip="{i18n:Localize plugin_uninstall}">

View file

@ -12,32 +12,32 @@
<StackPanel Spacing="20">
<TextBlock Text="{i18n:Localize proxy}" FontSize="28" FontWeight="SemiBold" />
<ui:SettingsExpander Header="{i18n:Localize proxyEnabled}"
<ui:SettingsExpander Header="{i18n:Localize enableProxy}"
IconSource="Globe">
<ui:SettingsExpander.Footer>
<ToggleSwitch IsChecked="{Binding ProxyEnabled}" />
</ui:SettingsExpander.Footer>
</ui:SettingsExpander>
<ui:SettingsExpander Header="{i18n:Localize proxyServer}">
<ui:SettingsExpander Header="{i18n:Localize server}">
<ui:SettingsExpander.Footer>
<TextBox Text="{Binding ProxyServer}" MinWidth="200" IsEnabled="{Binding ProxyEnabled}" />
</ui:SettingsExpander.Footer>
</ui:SettingsExpander>
<ui:SettingsExpander Header="{i18n:Localize proxyPort}">
<ui:SettingsExpander Header="{i18n:Localize port}">
<ui:SettingsExpander.Footer>
<NumericUpDown Value="{Binding ProxyPort}" Minimum="0" Maximum="65535" IsEnabled="{Binding ProxyEnabled}" />
</ui:SettingsExpander.Footer>
</ui:SettingsExpander>
<ui:SettingsExpander Header="{i18n:Localize proxyUserName}">
<ui:SettingsExpander Header="{i18n:Localize userName}">
<ui:SettingsExpander.Footer>
<TextBox Text="{Binding ProxyUserName}" MinWidth="200" IsEnabled="{Binding ProxyEnabled}" />
</ui:SettingsExpander.Footer>
</ui:SettingsExpander>
<ui:SettingsExpander Header="{i18n:Localize proxyPassword}">
<ui:SettingsExpander Header="{i18n:Localize password}">
<ui:SettingsExpander.Footer>
<TextBox Text="{Binding ProxyPassword}" PasswordChar="*" MinWidth="200" IsEnabled="{Binding ProxyEnabled}" />
</ui:SettingsExpander.Footer>

View file

@ -665,4 +665,11 @@
<system:String x:Key="FileSize">File Size</system:String>
<system:String x:Key="Created">Created</system:String>
<system:String x:Key="LastModified">Last Modified</system:String>
<!-- Avalonia-specific keys -->
<system:String x:Key="hotkeyFormatTip">Format: Modifier+Key (e.g., Alt+Space, Ctrl+Shift+P)</system:String>
<system:String x:Key="sourceCode">Source Code</system:String>
<system:String x:Key="loading">Loading...</system:String>
<system:String x:Key="plugin_settings_open_in_wpf_window">Open plugin settings in WPF window</system:String>
<system:String x:Key="openSettings">Open Settings</system:String>
</ResourceDictionary>

View file

@ -15,7 +15,7 @@
<!-- General Settings -->
<ui:SettingsExpander Header="{DynamicResource plugin_explorer_generalsetting_header}"
IconSource="Settings"
IsExpanded="True">
IsExpanded="False">
<ui:SettingsExpander.Items>
<ui:SettingsExpanderItem Content="{DynamicResource plugin_explorer_use_location_as_working_dir}">
<ui:SettingsExpanderItem.Footer>