@@ -94,35 +94,36 @@ private string GetDynamicTitle(Query query, Result result)
94
94
return "Title Not Found" ;
95
95
}
96
96
97
+ var translatedTitle = context . API . GetTranslation ( pair . Value ) ;
97
98
var englishTitleMatch = StringMatcher . FuzzySearch ( query . Search , pair . Key ) ;
98
- var translatedTitleMatch = StringMatcher . FuzzySearch ( query . Search , pair . Value ) ;
99
+ var translatedTitleMatch = StringMatcher . FuzzySearch ( query . Search , translatedTitle ) ;
99
100
100
- return englishTitleMatch . Score >= translatedTitleMatch . Score ? pair . Key : pair . Value ;
101
+ return englishTitleMatch . Score >= translatedTitleMatch . Score ? pair . Key : translatedTitle ;
101
102
}
102
103
103
104
public void Init ( PluginInitContext context )
104
105
{
105
106
this . context = context ;
106
107
KeywordTitleMappings = new Dictionary < string , string > {
107
- { "Shutdown" , context . API . GetTranslation ( "flowlauncher_plugin_sys_shutdown_computer_cmd" ) } ,
108
- { "Restart" , context . API . GetTranslation ( "flowlauncher_plugin_sys_restart_computer_cmd" ) } ,
109
- { "Restart With Advanced Boot Options" , context . API . GetTranslation ( "flowlauncher_plugin_sys_restart_advanced_cmd" ) } ,
110
- { "Log Off/Sign Out" , context . API . GetTranslation ( "flowlauncher_plugin_sys_log_off_cmd" ) } ,
111
- { "Lock" , context . API . GetTranslation ( "flowlauncher_plugin_sys_lock_cmd" ) } ,
112
- { "Sleep" , context . API . GetTranslation ( "flowlauncher_plugin_sys_sleep_cmd" ) } ,
113
- { "Hibernate" , context . API . GetTranslation ( "flowlauncher_plugin_sys_hibernate_cmd" ) } ,
114
- { "Index Option" , context . API . GetTranslation ( "flowlauncher_plugin_sys_indexoption_cmd" ) } ,
115
- { "Empty Recycle Bin" , context . API . GetTranslation ( "flowlauncher_plugin_sys_emptyrecyclebin_cmd" ) } ,
116
- { "Open Recycle Bin" , context . API . GetTranslation ( "flowlauncher_plugin_sys_openrecyclebin_cmd" ) } ,
117
- { "Exit" , context . API . GetTranslation ( "flowlauncher_plugin_sys_exit_cmd" ) } ,
118
- { "Save Settings" , context . API . GetTranslation ( "flowlauncher_plugin_sys_save_all_settings_cmd" ) } ,
119
- { "Restart Flow Launcher" , context . API . GetTranslation ( "flowlauncher_plugin_sys_restart_cmd" ) } ,
120
- { "Settings" , context . API . GetTranslation ( "flowlauncher_plugin_sys_setting_cmd" ) } ,
121
- { "Reload Plugin Data" , context . API . GetTranslation ( "flowlauncher_plugin_sys_reload_plugin_data_cmd" ) } ,
122
- { "Check For Update" , context . API . GetTranslation ( "flowlauncher_plugin_sys_check_for_update_cmd" ) } ,
123
- { "Open Log Location" , context . API . GetTranslation ( "flowlauncher_plugin_sys_open_log_location_cmd" ) } ,
124
- { "Flow Launcher Tips" , context . API . GetTranslation ( "flowlauncher_plugin_sys_open_docs_tips_cmd" ) } ,
125
- { "Flow Launcher UserData Folder" , context . API . GetTranslation ( "flowlauncher_plugin_sys_open_userdata_location_cmd" ) }
108
+ { "Shutdown" , "flowlauncher_plugin_sys_shutdown_computer_cmd" } ,
109
+ { "Restart" , "flowlauncher_plugin_sys_restart_computer_cmd" } ,
110
+ { "Restart With Advanced Boot Options" , "flowlauncher_plugin_sys_restart_advanced_cmd" } ,
111
+ { "Log Off/Sign Out" , "flowlauncher_plugin_sys_log_off_cmd" } ,
112
+ { "Lock" , "flowlauncher_plugin_sys_lock_cmd" } ,
113
+ { "Sleep" , "flowlauncher_plugin_sys_sleep_cmd" } ,
114
+ { "Hibernate" , "flowlauncher_plugin_sys_hibernate_cmd" } ,
115
+ { "Index Option" , "flowlauncher_plugin_sys_indexoption_cmd" } ,
116
+ { "Empty Recycle Bin" , "flowlauncher_plugin_sys_emptyrecyclebin_cmd" } ,
117
+ { "Open Recycle Bin" , "flowlauncher_plugin_sys_openrecyclebin_cmd" } ,
118
+ { "Exit" , "flowlauncher_plugin_sys_exit_cmd" } ,
119
+ { "Save Settings" , "flowlauncher_plugin_sys_save_all_settings_cmd" } ,
120
+ { "Restart Flow Launcher" , "flowlauncher_plugin_sys_restart_cmd" } ,
121
+ { "Settings" , "flowlauncher_plugin_sys_setting_cmd" } ,
122
+ { "Reload Plugin Data" , "flowlauncher_plugin_sys_reload_plugin_data_cmd" } ,
123
+ { "Check For Update" , "flowlauncher_plugin_sys_check_for_update_cmd" } ,
124
+ { "Open Log Location" , "flowlauncher_plugin_sys_open_log_location_cmd" } ,
125
+ { "Flow Launcher Tips" , "flowlauncher_plugin_sys_open_docs_tips_cmd" } ,
126
+ { "Flow Launcher UserData Folder" , "flowlauncher_plugin_sys_open_userdata_location_cmd" }
126
127
} ;
127
128
}
128
129
0 commit comments