Skip to content

Commit 230e4fb

Browse files
Fix translation of action keywords
1 parent b30ace9 commit 230e4fb

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

Flow.Launcher/SettingWindow.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
xmlns:converters="clr-namespace:Flow.Launcher.Converters"
66
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
77
xmlns:flowlauncher="clr-namespace:Flow.Launcher"
8+
xmlns:core="clr-namespace:Flow.Launcher.Core.Resource;assembly=Flow.Launcher.Core"
89
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
910
xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase"
1011
xmlns:sys="clr-namespace:System;assembly=mscorlib"
@@ -42,7 +43,7 @@
4243
<converters:BorderClipConverter x:Key="BorderClipConverter" />
4344
<converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter" />
4445
<converters:TextConverter x:Key="TextConverter" />
45-
<converters:TranlationConverter x:Key="TranslationConverter" />
46+
<core:TranslationConverter x:Key="TranslationConverter" />
4647
<CollectionViewSource x:Key="SortedFonts" Source="{Binding Source={x:Static Fonts.SystemFontFamilies}}">
4748
<CollectionViewSource.SortDescriptions>
4849
<scm:SortDescription PropertyName="Source" />

Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,15 @@ private void InitializeActionKeywordModels()
112112
ActionKeywordsModels = new List<ActionKeywordModel>
113113
{
114114
new(Settings.ActionKeyword.SearchActionKeyword,
115-
Context.API.GetTranslation("plugin_explorer_actionkeywordview_search")),
115+
"plugin_explorer_actionkeywordview_search"),
116116
new(Settings.ActionKeyword.FileContentSearchActionKeyword,
117-
Context.API.GetTranslation("plugin_explorer_actionkeywordview_filecontentsearch")),
117+
"plugin_explorer_actionkeywordview_filecontentsearch"),
118118
new(Settings.ActionKeyword.PathSearchActionKeyword,
119-
Context.API.GetTranslation("plugin_explorer_actionkeywordview_pathsearch")),
119+
"plugin_explorer_actionkeywordview_pathsearch"),
120120
new(Settings.ActionKeyword.IndexSearchActionKeyword,
121-
Context.API.GetTranslation("plugin_explorer_actionkeywordview_indexsearch")),
121+
"plugin_explorer_actionkeywordview_indexsearch"),
122122
new(Settings.ActionKeyword.QuickAccessActionKeyword,
123-
Context.API.GetTranslation("plugin_explorer_actionkeywordview_quickaccess"))
123+
"plugin_explorer_actionkeywordview_quickaccess")
124124
};
125125
}
126126

Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
55
xmlns:converters="clr-namespace:Flow.Launcher.Plugin.Explorer.Views.Converters"
6+
xmlns:core="clr-namespace:Flow.Launcher.Core.Resource;assembly=Flow.Launcher.Core"
67
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
78
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
89
xmlns:qa="clr-namespace:Flow.Launcher.Plugin.Explorer.Search.QuickAccessLinks"
@@ -106,12 +107,13 @@
106107
<DataTemplate x:Key="ListViewTemplateAccessLinks" DataType="qa:AccessLink">
107108
<TextBlock Margin="0,5,0,5" Text="{Binding Path, Mode=OneTime}" />
108109
</DataTemplate>
110+
<core:TranslationConverter x:Key="TranslationConverter" />
109111
<DataTemplate x:Key="ListViewActionKeywords" DataType="{x:Type views:ActionKeywordModel}">
110112
<Grid>
111113
<TextBlock
112114
Margin="0,5,0,0"
113115
IsEnabled="{Binding Enabled}"
114-
Text="{Binding Description, Mode=OneTime}">
116+
Text="{Binding Description, Mode=OneTime, Converter={StaticResource TranslationConverter}}">
115117
<TextBlock.Style>
116118
<Style TargetType="{x:Type TextBlock}">
117119
<Style.Triggers>

0 commit comments

Comments
 (0)