Skip to content

Commit 45b1df1

Browse files
committed
PluginSettingsWindow: Add custom Localize strings for PluginSettingsWindow Title and Context Menu Result
1 parent 5161796 commit 45b1df1

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

Flow.Launcher/Languages/en.xaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
<system:String x:Key="invalidFlowLauncherPluginFileFormat">Invalid Flow Launcher plugin file format</system:String>
4747
<system:String x:Key="setAsTopMostInThisQuery">Set as topmost in this query</system:String>
4848
<system:String x:Key="cancelTopMostInThisQuery">Cancel topmost in this query</system:String>
49+
<system:String x:Key="contextMenuPluginSettingsTitle">Plugin Settings</system:String>
4950
<system:String x:Key="executeQuery">Execute query: {0}</system:String>
5051
<system:String x:Key="lastExecuteTime">Last execution time: {0}</system:String>
5152
<system:String x:Key="iconTrayOpen">Open</system:String>
@@ -484,6 +485,9 @@
484485
<system:String x:Key="LogLevelDEBUG">Debug</system:String>
485486
<system:String x:Key="settingWindowFontTitle">Setting Window Font</system:String>
486487

488+
<!-- Plugin Settings Window -->
489+
<system:String x:Key="pluginSettingsWindowTitle">Settings: {0}</system:String>
490+
487491
<!-- Release Notes Window -->
488492
<system:String x:Key="seeMoreReleaseNotes">See more release notes on GitHub</system:String>
489493
<system:String x:Key="checkNetworkConnectionTitle">Failed to fetch release notes</system:String>

Flow.Launcher/PluginSettingsWindow.xaml.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ public PluginSettingsWindow(string pluginId)
4545
};
4646

4747
DataContext = pluginViewModel;
48-
Title = $"{pluginPair.Metadata.Name} Settings";
49-
48+
Title = Localize.pluginSettingsWindowTitle(pluginPair.Metadata.Name);
5049
InitializeComponent();
5150
}
5251

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1832,8 +1832,7 @@ private static Result ContextMenuPluginSettings(Result result)
18321832
{
18331833
var id = result.PluginID;
18341834

1835-
var settings = Localize.iconTraySettings(); // Todo: replace with dedicated translation
1836-
var title = $"{settings}";
1835+
var title = Localize.contextMenuPluginSettingsTitle();
18371836

18381837
var menu = new Result
18391838
{

0 commit comments

Comments
 (0)