Remove useless localization

This commit is contained in:
Jack251970 2025-02-26 18:30:33 +08:00
parent 44aa17d7c9
commit 3fa88064bd
2 changed files with 5 additions and 31 deletions

View file

@ -386,9 +386,6 @@
<system:String x:Key="reportWindow_please_open_issue">Please open new issue in</system:String>
<system:String x:Key="reportWindow_upload_log">1. Upload log file: {0}</system:String>
<system:String x:Key="reportWindow_copy_below">2. Copy below exception message</system:String>
<system:String x:Key="reportWindow_date">Date: {0}</system:String>
<system:String x:Key="reportWindow_exception">Exception:</system:String>
<system:String x:Key="reportWindow_length">Length</system:String>
<!-- General Notice -->
<system:String x:Key="pleaseWait">Please wait...</system:String>

View file

@ -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;
}
}
}