mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Fix hard-coded text
This commit is contained in:
parent
d394d86201
commit
cde272ae4d
4 changed files with 23 additions and 24 deletions
|
|
@ -37,16 +37,16 @@ namespace Flow.Launcher
|
|||
|
||||
private void BtnAdd_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (String.IsNullOrEmpty(Key) || String.IsNullOrEmpty(Value))
|
||||
{
|
||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("emptyShortcut"));
|
||||
return;
|
||||
}
|
||||
if (!update && (_settings.CustomShortcuts.Contains(new CustomShortcutModel(Key, Value)) || _settings.BuiltinShortcuts.Contains(new CustomShortcutModel(Key, Value))))
|
||||
{
|
||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("dulplicateShortcut"));
|
||||
return;
|
||||
}
|
||||
if (String.IsNullOrEmpty(Key) || String.IsNullOrEmpty(Value))
|
||||
{
|
||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("invalidShortcut"));
|
||||
return;
|
||||
}
|
||||
DialogResult = true;
|
||||
Close();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -214,9 +214,10 @@
|
|||
|
||||
<!-- Custom Query Shortcut Dialog -->
|
||||
<system:String x:Key="customeQueryShortcutTitle">Custom Query Shortcut</system:String>
|
||||
<system:String x:Key="customeQueryShortcutTips">Enter a shortcut to automatically expand to the specified query.</system:String>
|
||||
<system:String x:Key="customeQueryShortcutTips">Enter a shortcut that automatically expands to the specified query.</system:String>
|
||||
<system:String x:Key="dulplicateShortcut">Shortcut is dulplicate, please enter a new Shortcut or edit the existing one.</system:String>
|
||||
<system:String x:Key="invalidShortcut">Invalid Shortcut</system:String>
|
||||
<system:String x:Key="emptyShortcut">Shortcut and/or its expansion is empty.</system:String>
|
||||
<system:String x:Key="uneditableShortcut">This shortcut cannot be deleted or edited.</system:String>
|
||||
|
||||
<!-- Hotkey Control -->
|
||||
<system:String x:Key="hotkeyUnavailable">Hotkey Unavailable</system:String>
|
||||
|
|
|
|||
|
|
@ -2131,8 +2131,7 @@
|
|||
<GridView>
|
||||
<GridViewColumn Width="180" Header="{DynamicResource hotkey}">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate
|
||||
="userSettings:CustomPluginHotkey">
|
||||
<DataTemplate DataType="userSettings:CustomPluginHotkey">
|
||||
<TextBlock Text="{Binding Hotkey}" />
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
|
|
|
|||
|
|
@ -383,7 +383,7 @@ namespace Flow.Launcher
|
|||
}
|
||||
else if (!item.CanBeEdited)
|
||||
{
|
||||
MessageBox.Show("This shortcut cannot be deleted or edited."); // TODO
|
||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("uneditableShortcut"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -401,22 +401,21 @@ namespace Flow.Launcher
|
|||
private void OnEditCustomShortCutClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var item = viewModel.SelectedCustomShortcut;
|
||||
if (item != null)
|
||||
{
|
||||
if (!item.CanBeEdited)
|
||||
{
|
||||
MessageBox.Show("This shortcut cannot be deleted or edited.");
|
||||
return;
|
||||
}
|
||||
var shortcutSettingWindow = new CustomShortcutSetting(item, settings);
|
||||
if (shortcutSettingWindow.ShowDialog() == true)
|
||||
{
|
||||
viewModel.EditShortcut(item, shortcutSettingWindow.ShortCut);
|
||||
}
|
||||
}
|
||||
else
|
||||
if (item == null)
|
||||
{
|
||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("pleaseSelectAnItem"));
|
||||
return;
|
||||
}
|
||||
else if (!item.CanBeEdited)
|
||||
{
|
||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("uneditableShortcut"));
|
||||
return;
|
||||
}
|
||||
|
||||
var shortcutSettingWindow = new CustomShortcutSetting(item, settings);
|
||||
if (shortcutSettingWindow.ShowDialog() == true)
|
||||
{
|
||||
viewModel.EditShortcut(item, shortcutSettingWindow.ShortCut);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue