From 4ef2a70ebd890b14a5ff8c127be1769cd6fbeb53 Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 11 Jan 2022 20:35:17 +0800 Subject: [PATCH] optimize: use localized text for weekdays --- src/Resources/Locales/en_US.xaml | 8 ++++++++ src/Resources/Locales/zh_CN.xaml | 8 ++++++++ src/Views/Statistics.xaml.cs | 3 +-- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/Resources/Locales/en_US.xaml b/src/Resources/Locales/en_US.xaml index 53f73427..09a0e93a 100644 --- a/src/Resources/Locales/en_US.xaml +++ b/src/Resources/Locales/en_US.xaml @@ -496,6 +496,14 @@ COMMITTER COMMITS + SUN + MON + TUE + WED + THU + FRI + SAT + Git has NOT been configured. Please to go [Preference] and configure it first. Path[{0}] not exists! Can NOT locate bash.exe. Make sure bash.exe exists under the same folder with git.exe diff --git a/src/Resources/Locales/zh_CN.xaml b/src/Resources/Locales/zh_CN.xaml index 7aefa601..0fd48163 100644 --- a/src/Resources/Locales/zh_CN.xaml +++ b/src/Resources/Locales/zh_CN.xaml @@ -495,6 +495,14 @@ 提交者 提交次数 + 星期日 + 星期一 + 星期二 + 星期三 + 星期四 + 星期五 + 星期六 + GIT尚未配置。请打开【偏好设置】配置GIT路径。 路径({0})不存在或不可读取! 无法找到bash.exe,请确保其在git.exe同目录中! diff --git a/src/Views/Statistics.xaml.cs b/src/Views/Statistics.xaml.cs index 25bf0062..8bdf02d1 100644 --- a/src/Views/Statistics.xaml.cs +++ b/src/Views/Statistics.xaml.cs @@ -8,7 +8,6 @@ namespace SourceGit.Views { /// 提交统计 /// public partial class Statistics : Controls.Window { - private static readonly string[] WEEK_DAYS = new string[] { "一", "二", "三", "四", "五", "六", "日" }; private string repo = null; public Statistics(string repo) { @@ -25,7 +24,7 @@ namespace SourceGit.Views { var mapsWeek = new Dictionary(); for (int i = 0; i < 7; i++) { mapsWeek.Add(i, new Models.StatisticSample { - Name = $"星期{WEEK_DAYS[i]}", + Name = App.Text($"Weekday.{i}"), Count = 0, }); }