Skip to content

Commit 0355993

Browse files
committed
Use translation
1 parent e204daa commit 0355993

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Flow.Launcher/Languages/en.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@
219219
<system:String x:Key="failedToUninstallPluginTitle">Fail to uninstall {0}</system:String>
220220
<system:String x:Key="fileNotFoundMessage">Unable to find plugin.json from the extracted zip file, or this path {0} does not exist</system:String>
221221
<system:String x:Key="pluginExistAlreadyMessage">A plugin with the same ID and version already exists, or the version is greater than this downloaded plugin</system:String>
222+
<system:String x:Key="errorCreatingSettingPanel">Error creating setting panel for plugin {0}:{1}{2}</system:String>
222223

223224
<!-- Setting Plugin Store -->
224225
<system:String x:Key="pluginStore">Plugin Store</system:String>

Flow.Launcher/ViewModel/PluginViewModel.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Threading.Tasks;
1+
using System;
2+
using System.Threading.Tasks;
23
using System.Windows;
34
using System.Windows.Controls;
45
using System.Windows.Media;
@@ -145,9 +146,10 @@ private static Control TryCreateSettingPanel(PluginPair pair)
145146
// We can safely cast here as we already check this in HasSettingControl
146147
return ((ISettingProvider)pair.Plugin).CreateSettingPanel();
147148
}
148-
catch (System.Exception e)
149+
catch (Exception e)
149150
{
150-
var errorMsg = $"Error creating setting panel for plugin {pair.Metadata}\n{e.Message}";
151+
var errorMsg = string.Format(App.API.GetTranslation("errorCreatingSettingPanel"),
152+
pair.Metadata.Name, Environment.NewLine, e.Message);
151153
var grid = new Grid()
152154
{
153155
Margin = SettingPanelMargin

0 commit comments

Comments
 (0)