From 2bd13e8568230ed7c60d9b3eb13fa1df78e85482 Mon Sep 17 00:00:00 2001 From: KevinT3Hu Date: Sun, 24 Sep 2023 15:23:50 +0800 Subject: [PATCH] perf: optimize time diff format in sanity report --- src/MaaWpfGui/Main/AsstProxy.cs | 2 +- src/MaaWpfGui/Res/Localizations/en-us.xaml | 2 +- src/MaaWpfGui/Res/Localizations/ja-jp.xaml | 2 +- src/MaaWpfGui/Res/Localizations/ko-kr.xaml | 2 +- src/MaaWpfGui/Res/Localizations/zh-cn.xaml | 2 +- src/MaaWpfGui/Res/Localizations/zh-tw.xaml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/MaaWpfGui/Main/AsstProxy.cs b/src/MaaWpfGui/Main/AsstProxy.cs index 895a62d768..c0010ec98b 100644 --- a/src/MaaWpfGui/Main/AsstProxy.cs +++ b/src/MaaWpfGui/Main/AsstProxy.cs @@ -646,7 +646,7 @@ namespace MaaWpfGui.Main .Replace("{Preset}", configurationPreset); if (isSanityForecastSucc) { - sanityReport = sanityReport.Replace("{DateTime}", reportTime.ToString("T")).Replace("{TimeDiff}", timeDiff.ToString(@"hh\:mm")); + sanityReport = sanityReport.Replace("{DateTime}", reportTime.ToString("T")).Replace("{TimeDiffH}", timeDiff.Hours.ToString()).Replace("{TimeDiffM}", timeDiff.Minutes.ToString()); Instances.TaskQueueViewModel.AddLog(LocalizationHelper.GetString("AllTasksComplete") + Environment.NewLine + sanityReport); ExternalNotificationService.Send(allTaskCompleteTitle, allTaskCompleteMessage + Environment.NewLine + sanityReport); diff --git a/src/MaaWpfGui/Res/Localizations/en-us.xaml b/src/MaaWpfGui/Res/Localizations/en-us.xaml index 53f9c6dc60..57faa53b5b 100644 --- a/src/MaaWpfGui/Res/Localizations/en-us.xaml +++ b/src/MaaWpfGui/Res/Localizations/en-us.xaml @@ -544,7 +544,7 @@ The video aspect ratio needs to be 16:9 without interference factors such as bla Start combat: Complete combat All task(s) completed! - Sanity will be full on {DateTime} ({TimeDiff} later). + Sanity will be full on {DateTime} ({TimeDiffH} hours {TimeDiffM} minutes later). MAA has completed all tasks under the {Preset} configuration in {DateTime}. Tasks started Tasks stopped diff --git a/src/MaaWpfGui/Res/Localizations/ja-jp.xaml b/src/MaaWpfGui/Res/Localizations/ja-jp.xaml index cfe3c07fb7..22efe119f4 100644 --- a/src/MaaWpfGui/Res/Localizations/ja-jp.xaml +++ b/src/MaaWpfGui/Res/Localizations/ja-jp.xaml @@ -544,7 +544,7 @@ Bilibili: ログイン インターフェイスに表示されるアカウント 戦闘開始: 戦闘完了 すべてのタスクが完了しました! - 理性は {DateTime} に満杯になります ({TimeDiff} 後)。 + 理性は {DateTime} に満杯になります ({TimeDiffH}時間{TimeDiffM}分後)。 MAA は、{DateTime} の {Preset} 構成の下にあるすべてのプリセット タスクを完了しました。 Tasks started Tasks stopped diff --git a/src/MaaWpfGui/Res/Localizations/ko-kr.xaml b/src/MaaWpfGui/Res/Localizations/ko-kr.xaml index 88e7984f9e..a9bb3578bc 100644 --- a/src/MaaWpfGui/Res/Localizations/ko-kr.xaml +++ b/src/MaaWpfGui/Res/Localizations/ko-kr.xaml @@ -544,7 +544,7 @@ Bilibili: 로그인 인터페이스에 표시되는 계정 이름(예: Zhang San 작전 시작: 작전 완료 모든 작업이 완료되었습니다! - {DateTime}({TimeDiff} 이후)에 정신 상태가 가득 차게 됩니다. + {DateTime}({TimeDiffH}시간 {TimeDiffM}분 후이후)에 정신 상태가 가득 차게 됩니다. MAA는 {DateTime}의 {Preset} 구성에서 모든 사전 설정 작업을 완료했습니다. 작업 시작됨 작업 중지됨 diff --git a/src/MaaWpfGui/Res/Localizations/zh-cn.xaml b/src/MaaWpfGui/Res/Localizations/zh-cn.xaml index e2117f6a33..bf1b61afec 100644 --- a/src/MaaWpfGui/Res/Localizations/zh-cn.xaml +++ b/src/MaaWpfGui/Res/Localizations/zh-cn.xaml @@ -544,7 +544,7 @@ 开始战斗: 完成战斗 任务已全部完成! - 理智将在 {DateTime} ({TimeDiff} 后) 回满。 + 理智将在 {DateTime} ({TimeDiffH}时{TimeDiffM}分后) 回满。 MAA 已在 {DateTime} 完成了 {Preset} 配置下所有预设的任务。 开始执行任务 任务终止 diff --git a/src/MaaWpfGui/Res/Localizations/zh-tw.xaml b/src/MaaWpfGui/Res/Localizations/zh-tw.xaml index 221b109017..d4b98e942f 100644 --- a/src/MaaWpfGui/Res/Localizations/zh-tw.xaml +++ b/src/MaaWpfGui/Res/Localizations/zh-tw.xaml @@ -544,7 +544,7 @@ 開始戰鬥: 完成戰鬥 任務已全部完成! - 理智會在 {DateTime} ({TimeDiff} 後) 回滿。 + 理智會在 {DateTime} ({TimeDiffH}时{TimeDiffM}分後) 回滿。 MAA 已在 {DateTime} 完成了 {Preset} 配置下所有預設的任務。 開始執行任務 任務終止