Skip to content

Commit 3fa8806

Browse files
committed
Remove useless localization
1 parent 44aa17d commit 3fa8806

File tree

2 files changed

+5
-31
lines changed

2 files changed

+5
-31
lines changed

Flow.Launcher/Languages/en.xaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,9 +386,6 @@
386386
<system:String x:Key="reportWindow_please_open_issue">Please open new issue in</system:String>
387387
<system:String x:Key="reportWindow_upload_log">1. Upload log file: {0}</system:String>
388388
<system:String x:Key="reportWindow_copy_below">2. Copy below exception message</system:String>
389-
<system:String x:Key="reportWindow_date">Date: {0}</system:String>
390-
<system:String x:Key="reportWindow_exception">Exception:</system:String>
391-
<system:String x:Key="reportWindow_length">Length</system:String>
392389

393390
<!-- General Notice -->
394391
<system:String x:Key="pleaseWait">Please wait...</system:String>

Flow.Launcher/ReportWindow.xaml.cs

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
using System.Linq;
77
using System.Windows;
88
using System.Windows.Documents;
9+
using Flow.Launcher.Helper;
910
using Flow.Launcher.Infrastructure;
1011
using Flow.Launcher.Infrastructure.Logger;
1112
using Flow.Launcher.Plugin.SharedCommands;
12-
using Flow.Launcher.Infrastructure.Exception;
1313

1414
namespace Flow.Launcher
1515
{
@@ -55,12 +55,11 @@ private void SetException(Exception exception)
5555
ErrorTextbox.Document.Blocks.Add(paragraph);
5656

5757
StringBuilder content = new StringBuilder();
58-
content.AppendLine(RuntimeInfo());
58+
content.AppendLine(ErrorReporting.RuntimeInfo());
59+
content.AppendLine(ErrorReporting.DependenciesInfo());
5960
content.AppendLine();
60-
content.AppendLine(DependenciesInfo());
61-
content.AppendLine();
62-
content.AppendLine(string.Format(App.API.GetTranslation("reportWindow_date"), DateTime.Now.ToString(CultureInfo.InvariantCulture)));
63-
content.AppendLine(App.API.GetTranslation("reportWindow_exception"));
61+
content.AppendLine($"Date: {DateTime.Now.ToString(CultureInfo.InvariantCulture)}");
62+
content.AppendLine("Exception:");
6463
content.AppendLine(exception.ToString());
6564
paragraph = new Paragraph();
6665
paragraph.Inlines.Add(content.ToString());
@@ -94,27 +93,5 @@ private void BtnCancel_OnClick(object sender, RoutedEventArgs e)
9493
{
9594
Close();
9695
}
97-
98-
private static string RuntimeInfo()
99-
{
100-
var info =
101-
$"""
102-
Flow Launcher {App.API.GetTranslation("reportWindow_version")}: {Constant.Version}
103-
OS {App.API.GetTranslation("reportWindow_version")}: {ExceptionFormatter.GetWindowsFullVersionFromRegistry()}
104-
IntPtr {App.API.GetTranslation("reportWindow_length")}: {IntPtr.Size}
105-
x64: {Environment.Is64BitOperatingSystem}
106-
""";
107-
return info;
108-
}
109-
110-
private static string DependenciesInfo()
111-
{
112-
var info =
113-
$"""
114-
{App.API.GetTranslation("pythonFilePath")}: {Constant.PythonPath}
115-
{App.API.GetTranslation("nodeFilePath")}: {Constant.NodePath}
116-
""";
117-
return info;
118-
}
11996
}
12097
}

0 commit comments

Comments
 (0)