From 3fa88064bd572741c8590ce7a1064fb65324b65a Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 26 Feb 2025 18:30:33 +0800
Subject: [PATCH] Remove useless localization
---
Flow.Launcher/Languages/en.xaml | 3 ---
Flow.Launcher/ReportWindow.xaml.cs | 33 +++++-------------------------
2 files changed, 5 insertions(+), 31 deletions(-)
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index 493528a89..5d2cb2d9e 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -386,9 +386,6 @@
Please open new issue in
1. Upload log file: {0}
2. Copy below exception message
- Date: {0}
- Exception:
- Length
Please wait...
diff --git a/Flow.Launcher/ReportWindow.xaml.cs b/Flow.Launcher/ReportWindow.xaml.cs
index 12ffe3ffc..6fe90783e 100644
--- a/Flow.Launcher/ReportWindow.xaml.cs
+++ b/Flow.Launcher/ReportWindow.xaml.cs
@@ -6,10 +6,10 @@ using System.Text;
using System.Linq;
using System.Windows;
using System.Windows.Documents;
+using Flow.Launcher.Helper;
using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Plugin.SharedCommands;
-using Flow.Launcher.Infrastructure.Exception;
namespace Flow.Launcher
{
@@ -55,12 +55,11 @@ namespace Flow.Launcher
ErrorTextbox.Document.Blocks.Add(paragraph);
StringBuilder content = new StringBuilder();
- content.AppendLine(RuntimeInfo());
+ content.AppendLine(ErrorReporting.RuntimeInfo());
+ content.AppendLine(ErrorReporting.DependenciesInfo());
content.AppendLine();
- content.AppendLine(DependenciesInfo());
- content.AppendLine();
- content.AppendLine(string.Format(App.API.GetTranslation("reportWindow_date"), DateTime.Now.ToString(CultureInfo.InvariantCulture)));
- content.AppendLine(App.API.GetTranslation("reportWindow_exception"));
+ content.AppendLine($"Date: {DateTime.Now.ToString(CultureInfo.InvariantCulture)}");
+ content.AppendLine("Exception:");
content.AppendLine(exception.ToString());
paragraph = new Paragraph();
paragraph.Inlines.Add(content.ToString());
@@ -94,27 +93,5 @@ namespace Flow.Launcher
{
Close();
}
-
- private static string RuntimeInfo()
- {
- var info =
- $"""
- Flow Launcher {App.API.GetTranslation("reportWindow_version")}: {Constant.Version}
- OS {App.API.GetTranslation("reportWindow_version")}: {ExceptionFormatter.GetWindowsFullVersionFromRegistry()}
- IntPtr {App.API.GetTranslation("reportWindow_length")}: {IntPtr.Size}
- x64: {Environment.Is64BitOperatingSystem}
- """;
- return info;
- }
-
- private static string DependenciesInfo()
- {
- var info =
- $"""
- {App.API.GetTranslation("pythonFilePath")}: {Constant.PythonPath}
- {App.API.GetTranslation("nodeFilePath")}: {Constant.NodePath}
- """;
- return info;
- }
}
}