Bool To Translation by style in websearch plugin

This commit is contained in:
DB p 2022-12-09 10:33:23 +09:00
parent df27a21df7
commit 2dc508aa75
3 changed files with 17 additions and 7 deletions

View file

@ -163,7 +163,7 @@
<GridViewColumn Width="90" Header="{DynamicResource flowlauncher_plugin_program_enabled}">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock x:Name="ListViewEnabled" TextAlignment="Left">
<TextBlock TextAlignment="Left">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Text" Value="{DynamicResource flowlauncher_plugin_program_false}" />

View file

@ -12,6 +12,8 @@
<system:String x:Key="flowlauncher_plugin_websearch_delete">Delete</system:String>
<system:String x:Key="flowlauncher_plugin_websearch_edit">Edit</system:String>
<system:String x:Key="flowlauncher_plugin_websearch_add">Add</system:String>
<system:String x:Key="flowlauncher_plugin_websearch_true">Enabled</system:String>
<system:String x:Key="flowlauncher_plugin_websearch_false">Disabled</system:String>
<system:String x:Key="flowlauncher_plugin_websearch_confirm">Confirm</system:String>
<system:String x:Key="flowlauncher_plugin_websearch_action_keyword">Action Keyword</system:String>
<system:String x:Key="flowlauncher_plugin_websearch_url">URL</system:String>
@ -32,7 +34,7 @@
<!-- web search edit -->
<system:String x:Key="flowlauncher_plugin_websearch_title">Title</system:String>
<system:String x:Key="flowlauncher_plugin_websearch_enable">Enable</system:String>
<system:String x:Key="flowlauncher_plugin_websearch_enable">Enabled</system:String>
<system:String x:Key="flowlauncher_plugin_websearch_select_icon">Select Icon</system:String>
<system:String x:Key="flowlauncher_plugin_websearch_icon">Icon</system:String>
<system:String x:Key="flowlauncher_plugin_websearch_cancel">Cancel</system:String>

View file

@ -86,13 +86,21 @@
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn
Width="80"
DisplayMemberBinding="{Binding Enabled}"
Header="{DynamicResource flowlauncher_plugin_websearch_enable}">
<GridViewColumn Width="140" Header="{DynamicResource flowlauncher_plugin_websearch_enable}">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Enabled}" />
<TextBlock>
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Text" Value="{DynamicResource flowlauncher_plugin_websearch_false}" />
<Style.Triggers>
<DataTrigger Binding="{Binding Enabled, UpdateSourceTrigger=PropertyChanged}" Value="True">
<Setter Property="Text" Value="{DynamicResource flowlauncher_plugin_websearch_true}" />
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>