Unify error strings

This commit is contained in:
Jack251970 2025-07-10 21:14:10 +08:00
parent c326901812
commit e8707addd0
2 changed files with 2 additions and 4 deletions

View file

@ -485,7 +485,7 @@ internal static class HotKeyMapper
catch (Exception e)
{
App.API.LogError(ClassName, $"Error registering window hotkey {hotkey}: {e.Message} \nStackTrace:{e.StackTrace}");
var errorMsg = string.Format(App.API.GetTranslation("registerWindowHotkeyFailed"), hotkey);
var errorMsg = string.Format(App.API.GetTranslation("registerHotkeyFailed"), hotkey);
var errorMsgTitle = App.API.GetTranslation("MessageBoxTitle");
App.API.ShowMsgBox(errorMsg, errorMsgTitle);
}
@ -560,7 +560,7 @@ internal static class HotKeyMapper
catch (Exception e)
{
App.API.LogError(ClassName, $"Error removing window hotkey: {e.Message} \nStackTrace:{e.StackTrace}");
var errorMsg = string.Format(App.API.GetTranslation("unregisterWindowHotkeyFailed"), hotkey);
var errorMsg = string.Format(App.API.GetTranslation("unregisterHotkeyFailed"), hotkey);
var errorMsgTitle = App.API.GetTranslation("MessageBoxTitle");
App.API.ShowMsgBox(errorMsg, errorMsgTitle);
}

View file

@ -21,8 +21,6 @@
<!-- MainWindow -->
<system:String x:Key="registerHotkeyFailed">Failed to register hotkey "{0}". The hotkey may be in use by another program. Change to a different hotkey, or exit another program.</system:String>
<system:String x:Key="unregisterHotkeyFailed">Failed to unregister hotkey "{0}". Please try again or see log for details</system:String>
<system:String x:Key="registerWindowHotkeyFailed">Failed to register window hotkey "{0}". The hotkey may be in use by another program. Change to a different hotkey, or exit another program.</system:String>
<system:String x:Key="unregisterWindowHotkeyFailed">Failed to unregister window hotkey "{0}". Please try again or see log for details</system:String>
<system:String x:Key="MessageBoxTitle">Flow Launcher</system:String>
<system:String x:Key="couldnotStartCmd">Could not start {0}</system:String>
<system:String x:Key="invalidFlowLauncherPluginFileFormat">Invalid Flow Launcher plugin file format</system:String>