diff --git a/.gitignore b/.gitignore
index f58b9be..7c0b77c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -362,3 +362,6 @@ MigrationBackup/
# Fody - auto-generated XML schema
FodyWeavers.xsd
.vscode/settings.json
+
+# JetBrains Rider files
+.idea/
diff --git a/Core/Librarys/Time.cs b/Core/Librarys/Time.cs
index 670cc37..349f423 100644
--- a/Core/Librarys/Time.cs
+++ b/Core/Librarys/Time.cs
@@ -21,11 +21,12 @@ public static string ToHoursString(double seconds)
return "0";
}
}
- public static string ToString(int seconds)
+
+ public static object[] ToString(int seconds)
{
if (seconds < 60)
{
- return seconds + "秒";
+ return new Object[]{"time.seconds", seconds};
}
else
{
@@ -36,10 +37,13 @@ public static string ToString(int seconds)
{
double pointNumber = minutes - (int)minutes;
int seconds_ = (int)(pointNumber * 60);
- return (int)minutes + "分钟" + (seconds_ > 0 ? seconds_ + "秒" : "");
+ if (seconds_ > 0)
+ {
+ return new Object[]{"time.minutesWithSeconds", (int) minutes, seconds_};
+ }
}
- return minutes + "分钟";
+ return new Object[]{"time.minutes", (int) minutes};
}
else
{
@@ -48,9 +52,13 @@ public static string ToString(int seconds)
{
double pointNumber = hours - (int)hours;
int minutes_ = (int)(pointNumber * 60);
- return (int)hours + "小时" + (minutes_ > 0 ? minutes_ + "分" : "");
+ if (minutes_ > 0)
+ {
+ return new Object[]{"time.hoursWithMinutes", (int) hours, minutes_};
+ }
}
- return hours + "小时";
+
+ return new Object[]{"time.hours", (int) hours};
}
}
}
diff --git a/Core/Models/Config/BehaviorModel.cs b/Core/Models/Config/BehaviorModel.cs
index ce1d524..763fd97 100644
--- a/Core/Models/Config/BehaviorModel.cs
+++ b/Core/Models/Config/BehaviorModel.cs
@@ -11,32 +11,55 @@ namespace Core.Models.Config
///
public class BehaviorModel
{
- [Config(Name = "睡眠监测", Description = "离开电脑时自动停止统计,重启软件生效。(一般情况不建议关闭)", Group = "偏好")]
///
/// 睡眠监测
///
+ [Config(
+ Name = "config.behaviorModel.isSleepWatch.name",
+ Description = "config.behaviorModel.isSleepWatch.description",
+ Group = "config.behaviorModel.group.isSleepWatch")]
public bool IsSleepWatch { get; set; } = true;
- [Config(IsCanImportExport = true, Name = "忽略应用", Description = "可以通过进程名称或者正则表达式进行匹配。当使用正则表达式时可以匹配程序路径", Group = "忽略应用", Placeholder = "进程名称,不需要输入.exe。支持正则表达式")]
+
///
/// 忽略的进程列表
///
+ [Config(
+ IsCanImportExport = true,
+ Name = "config.behaviorModel.ignoreProcessList.name",
+ Description = "config.behaviorModel.ignoreProcessList.description",
+ Group = "config.behaviorModel.group.ignoreProcess",
+ Placeholder = "config.behaviorModel.ignoreProcessList.placeholder")]
public List IgnoreProcessList { get; set; } = new List();
- [Config(IsCanImportExport = true, Name = "忽略URL", Description = "过滤不需要统计的网站或链接", Group = "忽略URL", Placeholder = "URL 支持正则表达式")]
///
- /// 忽略的进程列表
+ /// 忽略的 URL 列表
///
+ [Config(
+ IsCanImportExport = true,
+ Name = "config.behaviorModel.ignoreURLList.name",
+ Description = "config.behaviorModel.ignoreURLList.description",
+ Group = "config.behaviorModel.group.ignoreURL",
+ Placeholder = "config.behaviorModel.ignoreURLList.placeholder")]
public List IgnoreURLList { get; set; } = new List();
- [Config(Name = "应用白名单", Description = "仅统计白名单内的应用", Group = "应用白名单")]
///
/// 睡眠监测
///
+ [Config(
+ Name = "config.behaviorModel.isWhiteList.name",
+ Description = "config.behaviorModel.isWhiteList.description",
+ Group = "config.behaviorModel.group.whiteList")]
public bool IsWhiteList { get; set; } = false;
- [Config(IsCanImportExport = true, Name = "应用白名单", Description = "可以通过进程名称或者正则表达式进行匹配,当使用正则表达式时可以匹配程序路径", Group = "应用白名单", Placeholder = "进程名称,不需要输入.exe。支持正则表达式")]
+
///
/// 应用白名单
///
+ [Config(
+ IsCanImportExport = true,
+ Name = "config.behaviorModel.processWhiteList.name",
+ Description = "config.behaviorModel.processWhiteList.description",
+ Group = "config.behaviorModel.group.whiteList",
+ Placeholder = "config.behaviorModel.processWhiteList.placeholder")]
public List ProcessWhiteList { get; set; } = new List();
}
-}
+}
\ No newline at end of file
diff --git a/Core/Models/Config/GeneralModel.cs b/Core/Models/Config/GeneralModel.cs
index 32e7409..d8be5e9 100644
--- a/Core/Models/Config/GeneralModel.cs
+++ b/Core/Models/Config/GeneralModel.cs
@@ -11,31 +11,48 @@ namespace Core.Models.Config
///
public class GeneralModel
{
- [Config(Name = "开机自启动", Description = "在电脑启动时自动运行 Tai", Group = "基础")]
///
/// 是否启用开机自启动
///
+ [Config(
+ Name = "config.general.isStartAtBoot.name",
+ Description = "config.general.isStartAtBoot.description",
+ Group = "config.general.group.basic")]
public bool IsStartatboot { get; set; }
///
/// 主题模式
///
- [Config(Options = "浅色|深色", Name = "主题模式", Description = "设置以浅色或深色模式显示", Group = "外观")]
+ [Config(
+ Options = "config.general.theme.options",
+ Name = "config.general.theme.name",
+ Description = "config.general.theme.description",
+ Group = "config.general.group.appearance")]
public int Theme { get; set; } = 0;
+
///
/// 主题颜色
///
- [Config(Name = "主题颜色", Description = "", Group = "外观")]
+ [Config(
+ Name = "config.general.themeColor.name",
+ Description = "config.general.themeColor.description",
+ Group = "config.general.group.appearance")]
public string ThemeColor { get; set; } = "#2b20d9";
+
///
/// 是否保留界面大小
///
- [Config(Name = "保留窗口大小", Description = "保留当前的窗口大小,而非使用系统默认尺寸", Group = "外观")]
+ [Config(
+ Name = "config.general.isSaveWindowSize.name",
+ Description = "config.general.isSaveWindowSize.description",
+ Group = "config.general.group.appearance")]
public bool IsSaveWindowSize { get; set; } = false;
+
///
/// 窗口宽度
///
public double WindowWidth { get; set; } = 815;
+
///
/// 窗口高度
///
@@ -44,28 +61,49 @@ public class GeneralModel
///
/// 启动页选择
///
- [Config(Options = "概览|统计|详细|分类", Name = "启动页", Description = "设置打开主界面时显示的页面", Group = "基础")]
+ [Config(
+ Options = "config.general.startPage.options",
+ Name = "config.general.startPage.name",
+ Description = "config.general.startPage.description",
+ Group = "config.general.group.basic")]
public int StartPage { get; set; } = 0;
- [Config(Name = "启动软件时显示主界面", Description = "在开机自启动时此选项无效", Group = "基础")]
+
///
/// 启动软件时显示主界面
///
+ [Config(
+ Name = "config.general.isStartupShowMainWindow.name",
+ Description = "config.general.isStartupShowMainWindow.description",
+ Group = "config.general.group.basic")]
public bool IsStartupShowMainWindow { get; set; } = true;
+
///
/// 概览页最为频繁显示条数
///
- [Config(Options = "1|2|3|4|5|6|7|8|9|10", Name = "最为频繁显示条数", Description = "", Group = "概览页")]
+ [Config(
+ Options = "config.general.indexPageFrequentUseNum.options",
+ Name = "config.general.indexPageFrequentUseNum.name",
+ Description = "config.general.indexPageFrequentUseNum.description",
+ Group = "config.general.group.overview")]
public int IndexPageFrequentUseNum { get; set; } = 2;
+
///
/// 概览页最为频繁显示条数
///
- [Config(Options = "1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20", Name = "更多显示条数", Description = "", Group = "概览页")]
+ [Config(
+ Options = "config.general.indexPageMoreNum.options",
+ Name = "config.general.indexPageMoreNum.name",
+ Description = "config.general.indexPageMoreNum.description",
+ Group = "config.general.group.overview")]
public int IndexPageMoreNum { get; set; } = 11;
///
/// 是否启用网站记录功能
///
- [Config(Name = "网站浏览统计", Description = "统计浏览器的网站访问数据,支持:Google Chrome、MSEdge或任何能够安装Chrome拓展的浏览器。请点击 “关于 > 浏览器统计插件” 了解如何安装和使用此功能。", Group = "功能")]
+ [Config(
+ Name = "config.general.isWebEnabled.name",
+ Description = "config.general.isWebEnabled.description",
+ Group = "config.general.group.feature")]
public bool IsWebEnabled { get; set; } = false;
}
}
\ No newline at end of file
diff --git a/Core/Models/Config/Link/LinkModel.cs b/Core/Models/Config/Link/LinkModel.cs
index 6f1a10e..cbd2a07 100644
--- a/Core/Models/Config/Link/LinkModel.cs
+++ b/Core/Models/Config/Link/LinkModel.cs
@@ -11,12 +11,12 @@ public class LinkModel
///
/// 关联名称
///
- [Config(Name = "名称", Description = "设置一个名称用于识别该关联", IsName = true, IsCanRepeat = false)]
+ [Config(Name = "config.linkMode.name.name", Description = "config.linkMode.name.description", IsName = true, IsCanRepeat = false)]
public string Name { get; set; } = "新的关联";
///
/// 关联进程列表
///
- [Config(Name = "关联进程", Description = "将需要关联的进程名称(不带.exe)添加到此,至少两个。", IsCanRepeat = false)]
+ [Config(Name = "config.linkMode.processList.name", Description = "config.linkMode.processList.description", IsCanRepeat = false)]
public List ProcessList { get; set; } = new List();
}
}
diff --git a/UI/App.xaml.cs b/UI/App.xaml.cs
index 94cf712..c779467 100644
--- a/UI/App.xaml.cs
+++ b/UI/App.xaml.cs
@@ -108,6 +108,7 @@ private void ConfigureServices(IServiceCollection services)
services.AddSingleton();
// UI服务
+ services.AddSingleton();
services.AddSingleton();
services.AddSingleton();
services.AddSingleton();
diff --git a/UI/Controls/Charts/Charts.cs b/UI/Controls/Charts/Charts.cs
index 799c056..196202f 100644
--- a/UI/Controls/Charts/Charts.cs
+++ b/UI/Controls/Charts/Charts.cs
@@ -21,6 +21,8 @@
using UI.Controls.Charts.Model;
using UI.Controls.Input;
using UI.Extensions;
+using UI.Models;
+using UI.Servicers;
namespace UI.Controls.Charts
{
@@ -1470,7 +1472,7 @@ private string Covervalue(double value)
{
if (DataValueType == ChartDataValueType.Seconds)
{
- return Time.ToString((int)value);
+ return LocalizationServicer.Instance.Translated(Time.ToString((int)value));
}
else
{
diff --git a/UI/Controls/Charts/ChartsItemTypeRadar.cs b/UI/Controls/Charts/ChartsItemTypeRadar.cs
index 671ea3e..dbba603 100644
--- a/UI/Controls/Charts/ChartsItemTypeRadar.cs
+++ b/UI/Controls/Charts/ChartsItemTypeRadar.cs
@@ -18,6 +18,7 @@
using System.Windows.Navigation;
using System.Windows.Shapes;
using UI.Controls.Charts.Model;
+using UI.Servicers;
namespace UI.Controls.Charts
{
@@ -176,7 +177,7 @@ private void Render()
font.Text = Data[i].Name.Length > 4 ? Data[i].Name.Substring(0, 4) : Data[i].Name;
font.Foreground = UI.Base.Color.Colors.GetFromString("#7f7f7f");
font.FontSize = 12;
- font.ToolTip = $"{Data[i].Name} {Time.ToString((int)Data[i].Values.Sum())}";
+ font.ToolTip = $"{Data[i].Name} {LocalizationServicer.Instance.Translated(Time.ToString((int)Data[i].Values.Sum()))}";
var textSize = MeasureString(font);
Debug.WriteLine(font.Text + " -> " + angle * i);
diff --git a/UI/Controls/SettingPanel/SettingPanel.cs b/UI/Controls/SettingPanel/SettingPanel.cs
index 558bb29..1257c23 100644
--- a/UI/Controls/SettingPanel/SettingPanel.cs
+++ b/UI/Controls/SettingPanel/SettingPanel.cs
@@ -18,6 +18,7 @@
using UI.Controls.Input;
using UI.Controls.List;
using UI.Controls.Select;
+using UI.Servicers;
namespace UI.Controls.SettingPanel
{
@@ -299,7 +300,7 @@ private StackPanel GetCreateGroupContainer(UIElement item, string groupName = nu
if (groupName != null)
{
var groupNameControl = new TextBlock();
- groupNameControl.Text = groupName;
+ groupNameControl.Text = LocalizationServicer.Instance.Translated(groupName);
groupNameControl.FontSize = 14;
groupNameControl.Margin = new Thickness(0, 0, 0, 10);
container.Children.Add(groupNameControl);
@@ -377,7 +378,7 @@ private UIElement RenderColorConfigControl(ConfigAttribute configAttribute, Prop
private UIElement RenderOptionsConfigControl(ConfigAttribute configAttribute, PropertyInfo pi)
{
var control = new Select.Select();
- var optionsArr = configAttribute.Options.Split('|');
+ var optionsArr = LocalizationServicer.Instance.Translated(configAttribute.Options).Split('|');
var options = new List();
for (int i = 0; i < optionsArr.Length; i++)
@@ -493,7 +494,7 @@ private UIElement RenderListStringConfigControl(ConfigAttribute configAttribute,
// 添加输入框
var addInputBox = new InputBox();
- addInputBox.Placeholder = configAttribute.Placeholder;
+ addInputBox.Placeholder = LocalizationServicer.Instance.Translated(configAttribute.Placeholder);
addInputBox.Margin = new Thickness(0, 0, 10, 0);
@@ -635,7 +636,7 @@ private UIElement RenderListStringConfigControl(ConfigAttribute configAttribute,
// 标题和说明
var description = new TextBlock();
- description.Text = configAttribute.Description;
+ description.Text = LocalizationServicer.Instance.Translated(configAttribute.Description);
description.Margin = new Thickness(10, 10, 10, 0);
description.Foreground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#989CA1"));
var container = new StackPanel();
diff --git a/UI/Controls/SettingPanel/SettingPanelItem.cs b/UI/Controls/SettingPanel/SettingPanelItem.cs
index c3f640c..8dae922 100644
--- a/UI/Controls/SettingPanel/SettingPanelItem.cs
+++ b/UI/Controls/SettingPanel/SettingPanelItem.cs
@@ -9,6 +9,7 @@
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
+using UI.Servicers;
namespace UI.Controls.SettingPanel
{
@@ -29,6 +30,9 @@ public class SettingPanelItem : Control
public bool IsBeta { get { return (bool)GetValue(IsBetaProperty); } set { SetValue(IsBetaProperty, value); } }
public static readonly DependencyProperty IsBetaProperty = DependencyProperty.Register("IsBeta", typeof(bool), typeof(SettingPanelItem));
+ public string DisplayName { get { return (string)GetValue(DisplayNameProperty); } set { SetValue(DisplayNameProperty, value); } }
+ public static readonly DependencyProperty DisplayNameProperty = DependencyProperty.Register("DisplayName", typeof(string), typeof(SettingPanelItem));
+
public SettingPanelItem()
{
DefaultStyleKey = typeof(SettingPanelItem);
@@ -36,8 +40,9 @@ public SettingPanelItem()
public void Init(ConfigAttribute configAttribute_, object content_)
{
- Name = configAttribute_.Name;
- Description = configAttribute_.Description;
+ Name = configAttribute_.Name.Replace(".", "_");
+ DisplayName = LocalizationServicer.Instance.Translated(configAttribute_.Name);
+ Description = LocalizationServicer.Instance.Translated(configAttribute_.Description);
IsBeta = configAttribute_.IsBeta;
Content = content_;
}
diff --git a/UI/Controls/SettingPanel/SettingPanelMultiItem.cs b/UI/Controls/SettingPanel/SettingPanelMultiItem.cs
index 527e3ae..941cf48 100644
--- a/UI/Controls/SettingPanel/SettingPanelMultiItem.cs
+++ b/UI/Controls/SettingPanel/SettingPanelMultiItem.cs
@@ -15,6 +15,7 @@
using UI.Controls.Button;
using UI.Controls.Input;
using UI.Controls.List;
+using UI.Servicers;
namespace UI.Controls.SettingPanel
{
@@ -117,8 +118,8 @@ private void Render()
private void RenderStringList(ConfigAttribute attribute, PropertyInfo pi)
{
var title = new SettingPanelItem();
- title.Name = attribute.Name;
- title.Description = attribute.Description;
+ title.Name = LocalizationServicer.Instance.Translated(attribute.Name);
+ title.Description = LocalizationServicer.Instance.Translated(attribute.Description);
Container.Children.Add(title);
@@ -319,8 +320,8 @@ private void RenderTextBox(ConfigAttribute attribute, PropertyInfo pi)
};
var item = new SettingPanelItem();
- item.Name = attribute.Name;
- item.Description = attribute.Description;
+ item.Name = LocalizationServicer.Instance.Translated(attribute.Name);
+ item.Description = LocalizationServicer.Instance.Translated(attribute.Description);
item.Content = textBox;
pi.SetValue(configData, textBox.Text);
if (attribute.IsName)
diff --git a/UI/Controls/Tabbar/Tabbar.cs b/UI/Controls/Tabbar/Tabbar.cs
index 0e8b2c8..b6be45d 100644
--- a/UI/Controls/Tabbar/Tabbar.cs
+++ b/UI/Controls/Tabbar/Tabbar.cs
@@ -199,15 +199,11 @@ private void ScrollToActive(int oldSelectedIndex = 0)
var oldSelectedItem = ItemsDictionary[oldSelectedIndex];
// 选中项的坐标
- Point relativePoint = item.TransformToAncestor(this).Transform(new Point(0, 0));
-
- double scrollX = relativePoint.X;
-
- scrollX = scrollX < 0 ? 0 : scrollX;
- scrollAnimation.To = scrollX;
-
-
+ double leftOffset = item.TransformToAncestor(ItemsContainer).Transform(new Point(0, 0)).X;
+ scrollAnimation.To = leftOffset;
+
+ ActiveBlock.Width = item.ActualWidth;
// 文字颜色动画
diff --git a/UI/MainWindow.xaml b/UI/MainWindow.xaml
index 11a5373..9f48743 100644
--- a/UI/MainWindow.xaml
+++ b/UI/MainWindow.xaml
@@ -4,6 +4,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:UI"
+ xmlns:loc="clr-namespace:UI.Markup"
mc:Ignorable="d"
xmlns:ui="clr-namespace:UI.Controls.Window"
Title="Tai" Height="585" Width="815" MinHeight="585" MinWidth="814"
@@ -39,7 +40,7 @@
-->
-
+
diff --git a/UI/Markup/LocalizationExtension.cs b/UI/Markup/LocalizationExtension.cs
new file mode 100644
index 0000000..5943812
--- /dev/null
+++ b/UI/Markup/LocalizationExtension.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Windows.Markup;
+using UI.Servicers;
+
+namespace UI.Markup
+{
+ public class LocalizationExtension : MarkupExtension
+ {
+ public string Key { get; set; }
+ public object Arg0 { get; set; }
+ public object Arg1 { get; set; }
+
+ public override object ProvideValue(IServiceProvider serviceProvider)
+ {
+ var args = new [] { Arg0, Arg1 };
+ var filteredArgs = Array.FindAll(args, x => x != null);
+ return LocalizationServicer.Instance.Translated(Key, filteredArgs);
+ }
+ }
+}
\ No newline at end of file
diff --git a/UI/Models/CategoryAppListPageModel.cs b/UI/Models/CategoryAppListPageModel.cs
index 93873c9..a1156a4 100644
--- a/UI/Models/CategoryAppListPageModel.cs
+++ b/UI/Models/CategoryAppListPageModel.cs
@@ -6,6 +6,7 @@
using System.Threading.Tasks;
using System.Windows;
using UI.Models.CategoryAppList;
+using UI.Servicers;
namespace UI.Models
{
@@ -31,5 +32,7 @@ public class CategoryAppListPageModel : ModelBase
private string SearchInput_;
public string SearchInput { get { return SearchInput_; } set { SearchInput_ = value; OnPropertyChanged(); } }
+
+ protected CategoryAppListPageModel(ILocalizationServicer localizationServicer) : base(localizationServicer) {}
}
}
diff --git a/UI/Models/CategoryPageModel.cs b/UI/Models/CategoryPageModel.cs
index f02aa29..65a3229 100644
--- a/UI/Models/CategoryPageModel.cs
+++ b/UI/Models/CategoryPageModel.cs
@@ -7,6 +7,7 @@
using System.Threading.Tasks;
using System.Windows;
using UI.Models.Category;
+using UI.Servicers;
namespace UI.Models
{
@@ -85,5 +86,7 @@ public class WebCategoryModel
private WebCategoryModel SelectedWebCategoryItem_;
public WebCategoryModel SelectedWebCategoryItem { get { return SelectedWebCategoryItem_; } set { SelectedWebCategoryItem_ = value; OnPropertyChanged(); } }
+
+ protected CategoryPageModel(ILocalizationServicer localizationServicer) : base(localizationServicer) {}
}
}
\ No newline at end of file
diff --git a/UI/Models/CategoryWebSiteListPageModel.cs b/UI/Models/CategoryWebSiteListPageModel.cs
index 2567d9e..a123556 100644
--- a/UI/Models/CategoryWebSiteListPageModel.cs
+++ b/UI/Models/CategoryWebSiteListPageModel.cs
@@ -9,6 +9,7 @@
using System.Windows;
using UI.Controls.Select;
using UI.Models.CategoryAppList;
+using UI.Servicers;
namespace UI.Models
{
@@ -46,5 +47,7 @@ public class OptionModel
/// 站点可选列表
///
public List WebSiteOptionList { get { return WebSiteOptionList_; } set { WebSiteOptionList_ = value; OnPropertyChanged(); } }
+
+ protected CategoryWebSiteListPageModel(ILocalizationServicer localizationServicer) : base(localizationServicer) {}
}
}
diff --git a/UI/Models/ChartPageModel.cs b/UI/Models/ChartPageModel.cs
index 04d67c8..538f702 100644
--- a/UI/Models/ChartPageModel.cs
+++ b/UI/Models/ChartPageModel.cs
@@ -7,6 +7,7 @@
using System.Windows.Controls;
using UI.Controls.Charts.Model;
using UI.Controls.Select;
+using UI.Servicers;
namespace UI.Models
{
@@ -246,5 +247,7 @@ public List DayHoursData
///
public ContextMenu WebSiteContextMenu { get { return WebSiteContextMenu_; } set { WebSiteContextMenu_ = value; OnPropertyChanged(); } }
#endregion
+
+ protected ChartPageModel(ILocalizationServicer localizationServicer) : base(localizationServicer) {}
}
}
diff --git a/UI/Models/DataPageModel.cs b/UI/Models/DataPageModel.cs
index 332cdd9..63adc85 100644
--- a/UI/Models/DataPageModel.cs
+++ b/UI/Models/DataPageModel.cs
@@ -7,6 +7,7 @@
using System.Windows.Controls;
using UI.Controls.Charts.Model;
using UI.Controls.DatePickerBar;
+using UI.Servicers;
namespace UI.Models
{
@@ -98,5 +99,7 @@ public DateTime YearDate
private ContextMenu AppContextMenu_;
public ContextMenu AppContextMenu { get { return AppContextMenu_; } set { AppContextMenu_ = value; OnPropertyChanged(); } }
+
+ protected DataPageModel(ILocalizationServicer localizationServicer) : base(localizationServicer) {}
}
}
diff --git a/UI/Models/DetailPageModel.cs b/UI/Models/DetailPageModel.cs
index ea19b52..e33a9af 100644
--- a/UI/Models/DetailPageModel.cs
+++ b/UI/Models/DetailPageModel.cs
@@ -9,10 +9,11 @@
using System.Windows.Controls;
using UI.Controls.Charts.Model;
using UI.Controls.Select;
+using UI.Servicers;
namespace UI.Models
{
- public class DetailPageModel : UINotifyPropertyChanged
+ public class DetailPageModel : LocalizedView
{
private List Data_;
@@ -172,5 +173,7 @@ public int TabbarSelectedIndex
/// 应用右键菜单
///
public ContextMenu AppContextMenu { get { return AppContextMenu_; } set { AppContextMenu_ = value; OnPropertyChanged(); } }
+
+ protected DetailPageModel(ILocalizationServicer localization) : base(localization) {}
}
}
diff --git a/UI/Models/IndexPageModel.cs b/UI/Models/IndexPageModel.cs
index f4c9a00..9699cb8 100644
--- a/UI/Models/IndexPageModel.cs
+++ b/UI/Models/IndexPageModel.cs
@@ -7,6 +7,7 @@
using System.Windows.Controls;
using UI.Controls.Charts.Model;
using UI.Controls.Select;
+using UI.Servicers;
namespace UI.Models
{
@@ -102,5 +103,7 @@ public List WebMoreData
/// 网站右键菜单
///
public ContextMenu WebSiteContextMenu { get { return WebSiteContextMenu_; } set { WebSiteContextMenu_ = value; OnPropertyChanged(); } }
+
+ protected IndexPageModel(ILocalizationServicer localizationServicer) : base(localizationServicer) {}
}
}
diff --git a/UI/Models/LocalizedView.cs b/UI/Models/LocalizedView.cs
new file mode 100644
index 0000000..0a2b90d
--- /dev/null
+++ b/UI/Models/LocalizedView.cs
@@ -0,0 +1,20 @@
+using UI.Servicers;
+
+namespace UI.Models
+{
+ public abstract class LocalizedView : UINotifyPropertyChanged
+ {
+ private readonly ILocalizationServicer Localization;
+
+ protected LocalizedView(ILocalizationServicer localization)
+ {
+ Localization = localization;
+ }
+
+ protected string Translated(string key) => Localization.Translated(key);
+
+ protected string Translated(string key, params object[] args) => Localization.Translated(key, args);
+
+ protected string Translated(params object[] args) => Localization.Translated(args);
+ }
+}
\ No newline at end of file
diff --git a/UI/Models/MainWindowModel.cs b/UI/Models/MainWindowModel.cs
index 387bcc1..06b67cd 100644
--- a/UI/Models/MainWindowModel.cs
+++ b/UI/Models/MainWindowModel.cs
@@ -8,11 +8,14 @@
using UI.Controls.Base;
using UI.Controls.Navigation.Models;
using UI.Controls.Window;
+using UI.Servicers;
namespace UI.Models
{
- public class MainWindowModel : UINotifyPropertyChanged
+ public class MainWindowModel : LocalizedView
{
+ protected MainWindowModel(ILocalizationServicer localization) : base(localization) {}
+
private IServiceProvider ServiceProvider_;
public IServiceProvider ServiceProvider
{
diff --git a/UI/Models/ModelBase.cs b/UI/Models/ModelBase.cs
index 9021825..6449898 100644
--- a/UI/Models/ModelBase.cs
+++ b/UI/Models/ModelBase.cs
@@ -4,10 +4,11 @@
using System.Text;
using System.Threading.Tasks;
using UI.Controls.Select;
+using UI.Servicers;
namespace UI.Models
{
- public class ModelBase : UINotifyPropertyChanged
+ public class ModelBase : LocalizedView
{
private SelectItemModel ShowType_;
///
@@ -24,18 +25,20 @@ public class ModelBase : UINotifyPropertyChanged
new SelectItemModel()
{
Id=0,
- Name="应用"
+ Name=LocalizationServicer.Instance.Translated("page.apps")
},
new SelectItemModel()
{
Id=1,
- Name="网站"
+ Name=LocalizationServicer.Instance.Translated("page.websites")
}
};
- public ModelBase()
+
+ protected ModelBase(ILocalizationServicer localizationServicer) : base(localizationServicer)
{
ShowType = ShowTypeOptions[0];
}
+
public virtual void Dispose() { }
}
}
diff --git a/UI/Models/SettingPageModel.cs b/UI/Models/SettingPageModel.cs
index 5505a12..7f34107 100644
--- a/UI/Models/SettingPageModel.cs
+++ b/UI/Models/SettingPageModel.cs
@@ -6,10 +6,11 @@
using System.Text;
using System.Threading.Tasks;
using System.Windows;
+using UI.Servicers;
namespace UI.Models
{
- public class SettingPageModel : UINotifyPropertyChanged
+ public class SettingPageModel : LocalizedView
{
private object data;
public object Data { get { return data; } set { data = value; OnPropertyChanged(); } }
@@ -47,5 +48,7 @@ public class SettingPageModel : UINotifyPropertyChanged
private DateTime ExportDataEndMonthDate_;
public DateTime ExportDataEndMonthDate { get { return ExportDataEndMonthDate_; } set { ExportDataEndMonthDate_ = value; OnPropertyChanged(); } }
+
+ public SettingPageModel(ILocalizationServicer localization) : base(localization) {}
}
}
diff --git a/UI/Properties/AssemblyInfo.cs b/UI/Properties/AssemblyInfo.cs
index 50b49ce..90bcfa4 100644
--- a/UI/Properties/AssemblyInfo.cs
+++ b/UI/Properties/AssemblyInfo.cs
@@ -53,3 +53,6 @@
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.5.0.6")]
[assembly: AssemblyFileVersion("1.5.0.6")]
+
+// Sets english as the default app language if the other localization isn't available
+[assembly: NeutralResourcesLanguage("en-US")]
diff --git a/UI/Resources/Localization/Localization.Designer.cs b/UI/Resources/Localization/Localization.Designer.cs
new file mode 100644
index 0000000..df82887
--- /dev/null
+++ b/UI/Resources/Localization/Localization.Designer.cs
@@ -0,0 +1,980 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace UI.Resources.Localization {
+ using System;
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Localization {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Localization() {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("UI.Resources.Localization.Localization", typeof(Localization).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Ignored Apps.
+ ///
+ internal static string config_behaviorModel_group_ignoreProcess {
+ get {
+ return ResourceManager.GetString("config.behaviorModel.group.ignoreProcess", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Ignored URLs.
+ ///
+ internal static string config_behaviorModel_group_ignoreURL {
+ get {
+ return ResourceManager.GetString("config.behaviorModel.group.ignoreURL", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Preferences.
+ ///
+ internal static string config_behaviorModel_group_isSleepWatch {
+ get {
+ return ResourceManager.GetString("config.behaviorModel.group.isSleepWatch", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Application Whitelist.
+ ///
+ internal static string config_behaviorModel_group_whiteList {
+ get {
+ return ResourceManager.GetString("config.behaviorModel.group.whiteList", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Match by process name or regex. Regexes can match program paths..
+ ///
+ internal static string config_behaviorModel_ignoreProcessList_description {
+ get {
+ return ResourceManager.GetString("config.behaviorModel.ignoreProcessList.description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Ignored Apps.
+ ///
+ internal static string config_behaviorModel_ignoreProcessList_name {
+ get {
+ return ResourceManager.GetString("config.behaviorModel.ignoreProcessList.name", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Process name (no ".exe" needed). Supports regular expressions.
+ ///
+ internal static string config_behaviorModel_ignoreProcessList_placeholder {
+ get {
+ return ResourceManager.GetString("config.behaviorModel.ignoreProcessList.placeholder", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Filter websites or links that should not be tracked..
+ ///
+ internal static string config_behaviorModel_ignoreURLList_description {
+ get {
+ return ResourceManager.GetString("config.behaviorModel.ignoreURLList.description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Ignored URLs.
+ ///
+ internal static string config_behaviorModel_ignoreURLList_name {
+ get {
+ return ResourceManager.GetString("config.behaviorModel.ignoreURLList.name", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Supports regexes.
+ ///
+ internal static string config_behaviorModel_ignoreURLList_placeholder {
+ get {
+ return ResourceManager.GetString("config.behaviorModel.ignoreURLList.placeholder", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Automatically stops tracking when away from the computer. Takes effect after restarting the software. (Not recommended to disable).
+ ///
+ internal static string config_behaviorModel_isSleepWatch_description {
+ get {
+ return ResourceManager.GetString("config.behaviorModel.isSleepWatch.description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Sleep Monitoring.
+ ///
+ internal static string config_behaviorModel_isSleepWatch_name {
+ get {
+ return ResourceManager.GetString("config.behaviorModel.isSleepWatch.name", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Only track applications in the whitelist.
+ ///
+ internal static string config_behaviorModel_isWhiteList_description {
+ get {
+ return ResourceManager.GetString("config.behaviorModel.isWhiteList.description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Application Whitelist.
+ ///
+ internal static string config_behaviorModel_isWhiteList_name {
+ get {
+ return ResourceManager.GetString("config.behaviorModel.isWhiteList.name", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Match by process name or regex. Regexes can match program paths..
+ ///
+ internal static string config_behaviorModel_processWhiteList_description {
+ get {
+ return ResourceManager.GetString("config.behaviorModel.processWhiteList.description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Application Whitelist.
+ ///
+ internal static string config_behaviorModel_processWhiteList_name {
+ get {
+ return ResourceManager.GetString("config.behaviorModel.processWhiteList.name", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Process name (no ".exe" needed). Supports regular expressions.
+ ///
+ internal static string config_behaviorModel_processWhiteList_placeholder {
+ get {
+ return ResourceManager.GetString("config.behaviorModel.processWhiteList.placeholder", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Appearance.
+ ///
+ internal static string config_general_group_appearance {
+ get {
+ return ResourceManager.GetString("config.general.group.appearance", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Basic.
+ ///
+ internal static string config_general_group_basic {
+ get {
+ return ResourceManager.GetString("config.general.group.basic", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Features.
+ ///
+ internal static string config_general_group_feature {
+ get {
+ return ResourceManager.GetString("config.general.group.feature", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Overview Page.
+ ///
+ internal static string config_general_group_overview {
+ get {
+ return ResourceManager.GetString("config.general.group.overview", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to .
+ ///
+ internal static string config_general_indexPageFrequentUseNum_description {
+ get {
+ return ResourceManager.GetString("config.general.indexPageFrequentUseNum.description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Frequent Items Count.
+ ///
+ internal static string config_general_indexPageFrequentUseNum_name {
+ get {
+ return ResourceManager.GetString("config.general.indexPageFrequentUseNum.name", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 1|2|3|4|5|6|7|8|9|10.
+ ///
+ internal static string config_general_indexPageFrequentUseNum_options {
+ get {
+ return ResourceManager.GetString("config.general.indexPageFrequentUseNum.options", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to .
+ ///
+ internal static string config_general_indexPageMoreNum_description {
+ get {
+ return ResourceManager.GetString("config.general.indexPageMoreNum.description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to More Items Count.
+ ///
+ internal static string config_general_indexPageMoreNum_name {
+ get {
+ return ResourceManager.GetString("config.general.indexPageMoreNum.name", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20.
+ ///
+ internal static string config_general_indexPageMoreNum_options {
+ get {
+ return ResourceManager.GetString("config.general.indexPageMoreNum.options", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Keep the current window size instead of using the default.
+ ///
+ internal static string config_general_isSaveWindowSize_description {
+ get {
+ return ResourceManager.GetString("config.general.isSaveWindowSize.description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Remember Window Size.
+ ///
+ internal static string config_general_isSaveWindowSize_name {
+ get {
+ return ResourceManager.GetString("config.general.isSaveWindowSize.name", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Automatically run Tai when the computer starts.
+ ///
+ internal static string config_general_isStartAtBoot_description {
+ get {
+ return ResourceManager.GetString("config.general.isStartAtBoot.description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Autostart.
+ ///
+ internal static string config_general_isStartAtBoot_name {
+ get {
+ return ResourceManager.GetString("config.general.isStartAtBoot.name", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to This option has no effect when auto-starting with the system.
+ ///
+ internal static string config_general_isStartupShowMainWindow_description {
+ get {
+ return ResourceManager.GetString("config.general.isStartupShowMainWindow.description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Show Main Window on Startup.
+ ///
+ internal static string config_general_isStartupShowMainWindow_name {
+ get {
+ return ResourceManager.GetString("config.general.isStartupShowMainWindow.name", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Track website visits in supported browsers: Google Chrome, MS Edge, or any browser supporting Chrome extensions. Go to “About > Browser Tracking Plugin” for installation and usage instructions..
+ ///
+ internal static string config_general_isWebEnabled_description {
+ get {
+ return ResourceManager.GetString("config.general.isWebEnabled.description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Website Activity Tracking.
+ ///
+ internal static string config_general_isWebEnabled_name {
+ get {
+ return ResourceManager.GetString("config.general.isWebEnabled.name", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Select which page is shown when the app is opened.
+ ///
+ internal static string config_general_startPage_description {
+ get {
+ return ResourceManager.GetString("config.general.startPage.description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Startup Page.
+ ///
+ internal static string config_general_startPage_name {
+ get {
+ return ResourceManager.GetString("config.general.startPage.name", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Overview|Statistics|Details|Categories.
+ ///
+ internal static string config_general_startPage_options {
+ get {
+ return ResourceManager.GetString("config.general.startPage.options", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Choose between light or dark mode.
+ ///
+ internal static string config_general_theme_description {
+ get {
+ return ResourceManager.GetString("config.general.theme.description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Theme Mode.
+ ///
+ internal static string config_general_theme_name {
+ get {
+ return ResourceManager.GetString("config.general.theme.name", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Light|Dark.
+ ///
+ internal static string config_general_theme_options {
+ get {
+ return ResourceManager.GetString("config.general.theme.options", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to .
+ ///
+ internal static string config_general_themeColor_description {
+ get {
+ return ResourceManager.GetString("config.general.themeColor.description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Theme Color.
+ ///
+ internal static string config_general_themeColor_name {
+ get {
+ return ResourceManager.GetString("config.general.themeColor.name", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 设置一个名称用于识别该关联.
+ ///
+ internal static string config_linkMode_name_description {
+ get {
+ return ResourceManager.GetString("config.linkMode.name.description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Name.
+ ///
+ internal static string config_linkMode_name_name {
+ get {
+ return ResourceManager.GetString("config.linkMode.name.name", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 将需要关联的进程名称(不带.exe)添加到此,至少两个。.
+ ///
+ internal static string config_linkMode_processList_description {
+ get {
+ return ResourceManager.GetString("config.linkMode.processList.description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 关联进程.
+ ///
+ internal static string config_linkMode_processList_name {
+ get {
+ return ResourceManager.GetString("config.linkMode.processList.name", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to No data available.
+ ///
+ internal static string emptyData_noData {
+ get {
+ return ResourceManager.GetString("emptyData.noData", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Nothing.
+ ///
+ internal static string emptyData_tooltip {
+ get {
+ return ResourceManager.GetString("emptyData.tooltip", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Categories.
+ ///
+ internal static string main_categories {
+ get {
+ return ResourceManager.GetString("main.categories", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Details.
+ ///
+ internal static string main_details {
+ get {
+ return ResourceManager.GetString("main.details", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Overview.
+ ///
+ internal static string main_overview {
+ get {
+ return ResourceManager.GetString("main.overview", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Settings.
+ ///
+ internal static string main_settings {
+ get {
+ return ResourceManager.GetString("main.settings", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Statistics.
+ ///
+ internal static string main_statistics {
+ get {
+ return ResourceManager.GetString("main.statistics", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Apps.
+ ///
+ internal static string page_apps {
+ get {
+ return ResourceManager.GetString("page.apps", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Categories.
+ ///
+ internal static string page_chart_categories {
+ get {
+ return ResourceManager.GetString("page.chart.categories", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to hours.
+ ///
+ internal static string page_chart_hours {
+ get {
+ return ResourceManager.GetString("page.chart.hours", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Last Week.
+ ///
+ internal static string page_chart_lastWeek {
+ get {
+ return ResourceManager.GetString("page.chart.lastWeek", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Longest usage.
+ ///
+ internal static string page_chart_longestUsage {
+ get {
+ return ResourceManager.GetString("page.chart.longestUsage", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Unique apps.
+ ///
+ internal static string page_chart_numberOfApps {
+ get {
+ return ResourceManager.GetString("page.chart.numberOfApps", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to This Week.
+ ///
+ internal static string page_chart_thisWeek {
+ get {
+ return ResourceManager.GetString("page.chart.thisWeek", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Total time.
+ ///
+ internal static string page_chart_total {
+ get {
+ return ResourceManager.GetString("page.chart.total", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Uncategorized.
+ ///
+ internal static string page_chart_uncategorized {
+ get {
+ return ResourceManager.GetString("page.chart.uncategorized", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to total.
+ ///
+ internal static string page_chart_unique {
+ get {
+ return ResourceManager.GetString("page.chart.unique", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Categories.
+ ///
+ internal static string page_chart_view_categories {
+ get {
+ return ResourceManager.GetString("page.chart.view.categories", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Default.
+ ///
+ internal static string page_chart_view_default {
+ get {
+ return ResourceManager.GetString("page.chart.view.default", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Summary.
+ ///
+ internal static string page_chart_view_summary {
+ get {
+ return ResourceManager.GetString("page.chart.view.summary", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to {0} added to whitelist.
+ ///
+ internal static string page_detail_addedToWhitelist {
+ get {
+ return ResourceManager.GetString("page.detail.addedToWhitelist", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Add to whitelist.
+ ///
+ internal static string page_detail_addToWhitelist {
+ get {
+ return ResourceManager.GetString("page.detail.addToWhitelist", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Clear statistics.
+ ///
+ internal static string page_detail_clearAppData {
+ get {
+ return ResourceManager.GetString("page.detail.clearAppData", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Copy path.
+ ///
+ internal static string page_detail_copyPath {
+ get {
+ return ResourceManager.GetString("page.detail.copyPath", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Copy name.
+ ///
+ internal static string page_detail_copyProcessname {
+ get {
+ return ResourceManager.GetString("page.detail.copyProcessname", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Edit alias.
+ ///
+ internal static string page_detail_editAlias {
+ get {
+ return ResourceManager.GetString("page.detail.editAlias", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Open app.
+ ///
+ internal static string page_detail_launchApp {
+ get {
+ return ResourceManager.GetString("page.detail.launchApp", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Open folder.
+ ///
+ internal static string page_detail_openDir {
+ get {
+ return ResourceManager.GetString("page.detail.openDir", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Reload.
+ ///
+ internal static string page_detail_reload {
+ get {
+ return ResourceManager.GetString("page.detail.reload", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to {0} removed from whitelist.
+ ///
+ internal static string page_detail_removedFromWhitelist {
+ get {
+ return ResourceManager.GetString("page.detail.removedFromWhitelist", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Remove from whitelist.
+ ///
+ internal static string page_detail_removeFromWhitelist {
+ get {
+ return ResourceManager.GetString("page.detail.removeFromWhitelist", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Set category.
+ ///
+ internal static string page_detail_setCategory {
+ get {
+ return ResourceManager.GetString("page.detail.setCategory", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Other.
+ ///
+ internal static string page_index_more {
+ get {
+ return ResourceManager.GetString("page.index.more", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Today.
+ ///
+ internal static string page_index_time_today {
+ get {
+ return ResourceManager.GetString("page.index.time.today", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to This Week.
+ ///
+ internal static string page_index_time_week {
+ get {
+ return ResourceManager.GetString("page.index.time.week", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Refresh.
+ ///
+ internal static string page_refresh {
+ get {
+ return ResourceManager.GetString("page.refresh", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Tai Version:.
+ ///
+ internal static string page_settings_about_version {
+ get {
+ return ResourceManager.GetString("page.settings.about.version", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to About.
+ ///
+ internal static string page_settings_category_about {
+ get {
+ return ResourceManager.GetString("page.settings.category.about", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Associations.
+ ///
+ internal static string page_settings_category_associations {
+ get {
+ return ResourceManager.GetString("page.settings.category.associations", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Behavior.
+ ///
+ internal static string page_settings_category_behavior {
+ get {
+ return ResourceManager.GetString("page.settings.category.behavior", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Data.
+ ///
+ internal static string page_settings_category_data {
+ get {
+ return ResourceManager.GetString("page.settings.category.data", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to General.
+ ///
+ internal static string page_settings_category_general {
+ get {
+ return ResourceManager.GetString("page.settings.category.general", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to There was an error executing the updater!.
+ ///
+ internal static string page_settings_updaterError {
+ get {
+ return ResourceManager.GetString("page.settings.updaterError", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to It seems like the updater was removed. Please download new versions manually on the release page..
+ ///
+ internal static string page_settings_updaterRemoved {
+ get {
+ return ResourceManager.GetString("page.settings.updaterRemoved", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Top.
+ ///
+ internal static string page_top {
+ get {
+ return ResourceManager.GetString("page.top", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Websites.
+ ///
+ internal static string page_websites {
+ get {
+ return ResourceManager.GetString("page.websites", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Daily.
+ ///
+ internal static string time_daily {
+ get {
+ return ResourceManager.GetString("time.daily", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to {0}h.
+ ///
+ internal static string time_hours {
+ get {
+ return ResourceManager.GetString("time.hours", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to {0}h {1}min.
+ ///
+ internal static string time_hoursWithMinutes {
+ get {
+ return ResourceManager.GetString("time.hoursWithMinutes", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to {0}min.
+ ///
+ internal static string time_minutes {
+ get {
+ return ResourceManager.GetString("time.minutes", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to {0}min {1}sec.
+ ///
+ internal static string time_minutesWithSeconds {
+ get {
+ return ResourceManager.GetString("time.minutesWithSeconds", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Monthly.
+ ///
+ internal static string time_monthly {
+ get {
+ return ResourceManager.GetString("time.monthly", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to {0}sec.
+ ///
+ internal static string time_seconds {
+ get {
+ return ResourceManager.GetString("time.seconds", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Weekly.
+ ///
+ internal static string time_weekly {
+ get {
+ return ResourceManager.GetString("time.weekly", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Yearly.
+ ///
+ internal static string time_yearly {
+ get {
+ return ResourceManager.GetString("time.yearly", resourceCulture);
+ }
+ }
+ }
+}
diff --git a/UI/Resources/Localization/Localization.resx b/UI/Resources/Localization/Localization.resx
new file mode 100644
index 0000000..1e63ffa
--- /dev/null
+++ b/UI/Resources/Localization/Localization.resx
@@ -0,0 +1,370 @@
+
+
+
+
+
+
+ {0}sec
+
+
+ {0}min
+
+
+ {0}min {1}sec
+
+
+ {0}h
+
+
+ {0}h {1}min
+
+
+ Daily
+
+
+ Weekly
+
+
+ Monthly
+
+
+ Yearly
+
+
+ Refresh
+
+
+ Top
+
+
+ Apps
+
+
+ Websites
+
+
+
+
+ Today
+
+
+ This Week
+
+
+
+
+ Other
+
+
+
+
+ Details
+
+
+ Statistics
+
+
+ Overview
+
+
+ Categories
+
+
+
+
+ Settings
+
+
+
+
+ Open app
+
+
+ Copy name
+
+
+ Copy path
+
+
+ Open folder
+
+
+ Reload
+
+
+ Clear statistics
+
+
+ Set category
+
+
+ Edit alias
+
+
+ Remove from whitelist
+
+
+ Add to whitelist
+
+
+
+ {0} removed from whitelist
+
+
+ {0} added to whitelist
+
+
+
+
+ It seems like the updater was removed. Please download new versions manually on the release page.
+
+
+ There was an error executing the updater!
+
+
+ There was an error executing the updater!
+
+
+
+ General
+
+
+ Associations
+
+
+ Behavior
+
+
+ Data
+
+
+ About
+
+
+
+
+ This Week
+
+
+ Last Week
+
+
+ Default
+
+
+ Summary
+
+
+ Categories
+
+
+ Uncategorized
+
+
+
+
+ hours
+
+
+ Total time
+
+
+ total
+
+
+ Unique apps
+
+
+ Longest usage
+
+
+ Categories
+
+
+
+
+ Tai Version:
+
+
+
+
+ Name
+
+
+ 设置一个名称用于识别该关联
+
+
+ 关联进程
+
+
+ 将需要关联的进程名称(不带.exe)添加到此,至少两个。
+
+
+
+
+ Sleep Monitoring
+
+
+ Automatically stops tracking when away from the computer. Takes effect after restarting the software. (Not recommended to disable)
+
+
+ Preferences
+
+
+
+ Ignored Apps
+
+
+ Match by process name or regex. Regexes can match program paths.
+
+
+ Process name (no ".exe" needed). Supports regular expressions
+
+
+ Ignored Apps
+
+
+
+ Ignored URLs
+
+
+ Filter websites or links that should not be tracked.
+
+
+ Supports regexes
+
+
+ Ignored URLs
+
+
+
+ Application Whitelist
+
+
+ Only track applications in the whitelist
+
+
+ Application Whitelist
+
+
+
+ Application Whitelist
+
+
+ Match by process name or regex. Regexes can match program paths.
+
+
+ Process name (no ".exe" needed). Supports regular expressions
+
+
+
+
+ Basic
+
+
+ Appearance
+
+
+ Overview Page
+
+
+ Features
+
+
+
+ Autostart
+
+
+ Automatically run Tai when the computer starts
+
+
+
+ Theme Mode
+
+
+ Choose between light or dark mode
+
+
+ Light|Dark
+
+
+
+ Theme Color
+
+
+
+
+
+
+ Remember Window Size
+
+
+ Keep the current window size instead of using the default
+
+
+
+ Startup Page
+
+
+ Select which page is shown when the app is opened
+
+
+ Overview|Statistics|Details|Categories
+
+
+
+ Show Main Window on Startup
+
+
+ This option has no effect when auto-starting with the system
+
+
+
+ Frequent Items Count
+
+
+
+
+
+ 1|2|3|4|5|6|7|8|9|10
+
+
+
+ More Items Count
+
+
+
+
+
+ 1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20
+
+
+
+ Website Activity Tracking
+
+
+ Track website visits in supported browsers: Google Chrome, MS Edge, or any browser supporting Chrome extensions. Go to “About > Browser Tracking Plugin” for installation and usage instructions.
+
+
+
+
+ No data available
+
+
+ Nothing
+
+
+
+
+ text/microsoft-resx
+
+
+ 1.3
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/UI/Resources/Localization/Localization.zh-CN.Designer.cs b/UI/Resources/Localization/Localization.zh-CN.Designer.cs
new file mode 100644
index 0000000..4c5d71a
--- /dev/null
+++ b/UI/Resources/Localization/Localization.zh-CN.Designer.cs
@@ -0,0 +1,980 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace UI.Resources.Localization {
+ using System;
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Localization_zh_CN {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Localization_zh_CN() {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("UI.Resources.Localization.Localization.zh-CN", typeof(Localization_zh_CN).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 忽略应用.
+ ///
+ internal static string config_behaviorModel_group_ignoreProcess {
+ get {
+ return ResourceManager.GetString("config.behaviorModel.group.ignoreProcess", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 忽略URL.
+ ///
+ internal static string config_behaviorModel_group_ignoreURL {
+ get {
+ return ResourceManager.GetString("config.behaviorModel.group.ignoreURL", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 偏好.
+ ///
+ internal static string config_behaviorModel_group_isSleepWatch {
+ get {
+ return ResourceManager.GetString("config.behaviorModel.group.isSleepWatch", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 应用白名单.
+ ///
+ internal static string config_behaviorModel_group_whiteList {
+ get {
+ return ResourceManager.GetString("config.behaviorModel.group.whiteList", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 可以通过进程名称或者正则表达式进行匹配。当使用正则表达式时可以匹配程序路径.
+ ///
+ internal static string config_behaviorModel_ignoreProcessList_description {
+ get {
+ return ResourceManager.GetString("config.behaviorModel.ignoreProcessList.description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 忽略应用.
+ ///
+ internal static string config_behaviorModel_ignoreProcessList_name {
+ get {
+ return ResourceManager.GetString("config.behaviorModel.ignoreProcessList.name", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 进程名称,不需要输入.exe。支持正则表达式.
+ ///
+ internal static string config_behaviorModel_ignoreProcessList_placeholder {
+ get {
+ return ResourceManager.GetString("config.behaviorModel.ignoreProcessList.placeholder", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 过滤不需要统计的网站或链接.
+ ///
+ internal static string config_behaviorModel_ignoreURLList_description {
+ get {
+ return ResourceManager.GetString("config.behaviorModel.ignoreURLList.description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 忽略URL.
+ ///
+ internal static string config_behaviorModel_ignoreURLList_name {
+ get {
+ return ResourceManager.GetString("config.behaviorModel.ignoreURLList.name", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to URL 支持正则表达式.
+ ///
+ internal static string config_behaviorModel_ignoreURLList_placeholder {
+ get {
+ return ResourceManager.GetString("config.behaviorModel.ignoreURLList.placeholder", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 离开电脑时自动停止统计,重启软件生效。(一般情况不建议关闭).
+ ///
+ internal static string config_behaviorModel_isSleepWatch_description {
+ get {
+ return ResourceManager.GetString("config.behaviorModel.isSleepWatch.description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 睡眠监测.
+ ///
+ internal static string config_behaviorModel_isSleepWatch_name {
+ get {
+ return ResourceManager.GetString("config.behaviorModel.isSleepWatch.name", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 仅统计白名单内的应用.
+ ///
+ internal static string config_behaviorModel_isWhiteList_description {
+ get {
+ return ResourceManager.GetString("config.behaviorModel.isWhiteList.description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 应用白名单.
+ ///
+ internal static string config_behaviorModel_isWhiteList_name {
+ get {
+ return ResourceManager.GetString("config.behaviorModel.isWhiteList.name", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 可以通过进程名称或者正则表达式进行匹配,当使用正则表达式时可以匹配程序路径.
+ ///
+ internal static string config_behaviorModel_processWhiteList_description {
+ get {
+ return ResourceManager.GetString("config.behaviorModel.processWhiteList.description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 应用白名单.
+ ///
+ internal static string config_behaviorModel_processWhiteList_name {
+ get {
+ return ResourceManager.GetString("config.behaviorModel.processWhiteList.name", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 进程名称,不需要输入.exe。支持正则表达式.
+ ///
+ internal static string config_behaviorModel_processWhiteList_placeholder {
+ get {
+ return ResourceManager.GetString("config.behaviorModel.processWhiteList.placeholder", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 外观.
+ ///
+ internal static string config_general_group_appearance {
+ get {
+ return ResourceManager.GetString("config.general.group.appearance", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 基础.
+ ///
+ internal static string config_general_group_basic {
+ get {
+ return ResourceManager.GetString("config.general.group.basic", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 功能.
+ ///
+ internal static string config_general_group_feature {
+ get {
+ return ResourceManager.GetString("config.general.group.feature", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 概览页.
+ ///
+ internal static string config_general_group_overview {
+ get {
+ return ResourceManager.GetString("config.general.group.overview", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to .
+ ///
+ internal static string config_general_indexPageFrequentUseNum_description {
+ get {
+ return ResourceManager.GetString("config.general.indexPageFrequentUseNum.description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 最为频繁显示条数.
+ ///
+ internal static string config_general_indexPageFrequentUseNum_name {
+ get {
+ return ResourceManager.GetString("config.general.indexPageFrequentUseNum.name", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 1|2|3|4|5|6|7|8|9|10.
+ ///
+ internal static string config_general_indexPageFrequentUseNum_options {
+ get {
+ return ResourceManager.GetString("config.general.indexPageFrequentUseNum.options", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to .
+ ///
+ internal static string config_general_indexPageMoreNum_description {
+ get {
+ return ResourceManager.GetString("config.general.indexPageMoreNum.description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 更多显示条数.
+ ///
+ internal static string config_general_indexPageMoreNum_name {
+ get {
+ return ResourceManager.GetString("config.general.indexPageMoreNum.name", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20.
+ ///
+ internal static string config_general_indexPageMoreNum_options {
+ get {
+ return ResourceManager.GetString("config.general.indexPageMoreNum.options", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 保留当前的窗口大小,而非使用系统默认尺寸.
+ ///
+ internal static string config_general_isSaveWindowSize_description {
+ get {
+ return ResourceManager.GetString("config.general.isSaveWindowSize.description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 保留窗口大小.
+ ///
+ internal static string config_general_isSaveWindowSize_name {
+ get {
+ return ResourceManager.GetString("config.general.isSaveWindowSize.name", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 在电脑启动时自动运行 Tai.
+ ///
+ internal static string config_general_isStartAtBoot_description {
+ get {
+ return ResourceManager.GetString("config.general.isStartAtBoot.description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 开机自启动.
+ ///
+ internal static string config_general_isStartAtBoot_name {
+ get {
+ return ResourceManager.GetString("config.general.isStartAtBoot.name", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 在开机自启动时此选项无效.
+ ///
+ internal static string config_general_isStartupShowMainWindow_description {
+ get {
+ return ResourceManager.GetString("config.general.isStartupShowMainWindow.description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 启动软件时显示主界面.
+ ///
+ internal static string config_general_isStartupShowMainWindow_name {
+ get {
+ return ResourceManager.GetString("config.general.isStartupShowMainWindow.name", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 统计浏览器的网站访问数据,支持:Google Chrome、MSEdge或任何能够安装Chrome拓展的浏览器。请点击 “关于 > 浏览器统计插件” 了解如何安装和使用此功能。.
+ ///
+ internal static string config_general_isWebEnabled_description {
+ get {
+ return ResourceManager.GetString("config.general.isWebEnabled.description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 网站浏览统计.
+ ///
+ internal static string config_general_isWebEnabled_name {
+ get {
+ return ResourceManager.GetString("config.general.isWebEnabled.name", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 设置打开主界面时显示的页面.
+ ///
+ internal static string config_general_startPage_description {
+ get {
+ return ResourceManager.GetString("config.general.startPage.description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 启动页.
+ ///
+ internal static string config_general_startPage_name {
+ get {
+ return ResourceManager.GetString("config.general.startPage.name", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 概览|统计|详细|分类.
+ ///
+ internal static string config_general_startPage_options {
+ get {
+ return ResourceManager.GetString("config.general.startPage.options", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 设置以浅色或深色模式显示.
+ ///
+ internal static string config_general_theme_description {
+ get {
+ return ResourceManager.GetString("config.general.theme.description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 主题模式.
+ ///
+ internal static string config_general_theme_name {
+ get {
+ return ResourceManager.GetString("config.general.theme.name", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 浅色|深色.
+ ///
+ internal static string config_general_theme_options {
+ get {
+ return ResourceManager.GetString("config.general.theme.options", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to .
+ ///
+ internal static string config_general_themeColor_description {
+ get {
+ return ResourceManager.GetString("config.general.themeColor.description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 主题颜色.
+ ///
+ internal static string config_general_themeColor_name {
+ get {
+ return ResourceManager.GetString("config.general.themeColor.name", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 设置一个名称用于识别该关联.
+ ///
+ internal static string config_linkMode_name_description {
+ get {
+ return ResourceManager.GetString("config.linkMode.name.description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 名称.
+ ///
+ internal static string config_linkMode_name_name {
+ get {
+ return ResourceManager.GetString("config.linkMode.name.name", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 将需要关联的进程名称(不带.exe)添加到此,至少两个。.
+ ///
+ internal static string config_linkMode_processList_description {
+ get {
+ return ResourceManager.GetString("config.linkMode.processList.description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 关联进程.
+ ///
+ internal static string config_linkMode_processList_name {
+ get {
+ return ResourceManager.GetString("config.linkMode.processList.name", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 暂时没有数据.
+ ///
+ internal static string emptyData_noData {
+ get {
+ return ResourceManager.GetString("emptyData.noData", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 什么都没有.
+ ///
+ internal static string emptyData_tooltip {
+ get {
+ return ResourceManager.GetString("emptyData.tooltip", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 分类.
+ ///
+ internal static string main_categories {
+ get {
+ return ResourceManager.GetString("main.categories", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 详细.
+ ///
+ internal static string main_details {
+ get {
+ return ResourceManager.GetString("main.details", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 概览.
+ ///
+ internal static string main_overview {
+ get {
+ return ResourceManager.GetString("main.overview", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 设置.
+ ///
+ internal static string main_settings {
+ get {
+ return ResourceManager.GetString("main.settings", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 统计.
+ ///
+ internal static string main_statistics {
+ get {
+ return ResourceManager.GetString("main.statistics", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 应用.
+ ///
+ internal static string page_apps {
+ get {
+ return ResourceManager.GetString("page.apps", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 分类.
+ ///
+ internal static string page_chart_categories {
+ get {
+ return ResourceManager.GetString("page.chart.categories", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 小时.
+ ///
+ internal static string page_chart_hours {
+ get {
+ return ResourceManager.GetString("page.chart.hours", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 上周.
+ ///
+ internal static string page_chart_lastWeek {
+ get {
+ return ResourceManager.GetString("page.chart.lastWeek", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 最长使用.
+ ///
+ internal static string page_chart_longestUsage {
+ get {
+ return ResourceManager.GetString("page.chart.longestUsage", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 应用量.
+ ///
+ internal static string page_chart_numberOfApps {
+ get {
+ return ResourceManager.GetString("page.chart.numberOfApps", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 本周.
+ ///
+ internal static string page_chart_thisWeek {
+ get {
+ return ResourceManager.GetString("page.chart.thisWeek", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 总计.
+ ///
+ internal static string page_chart_total {
+ get {
+ return ResourceManager.GetString("page.chart.total", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 未分类.
+ ///
+ internal static string page_chart_uncategorized {
+ get {
+ return ResourceManager.GetString("page.chart.uncategorized", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 个.
+ ///
+ internal static string page_chart_unique {
+ get {
+ return ResourceManager.GetString("page.chart.unique", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 分类视图.
+ ///
+ internal static string page_chart_view_categories {
+ get {
+ return ResourceManager.GetString("page.chart.view.categories", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 默认视图.
+ ///
+ internal static string page_chart_view_default {
+ get {
+ return ResourceManager.GetString("page.chart.view.default", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 汇总视图.
+ ///
+ internal static string page_chart_view_summary {
+ get {
+ return ResourceManager.GetString("page.chart.view.summary", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 已添加至白名单 {0}.
+ ///
+ internal static string page_detail_addedToWhitelist {
+ get {
+ return ResourceManager.GetString("page.detail.addedToWhitelist", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 添加到白名单.
+ ///
+ internal static string page_detail_addToWhitelist {
+ get {
+ return ResourceManager.GetString("page.detail.addToWhitelist", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 清空统计.
+ ///
+ internal static string page_detail_clearAppData {
+ get {
+ return ResourceManager.GetString("page.detail.clearAppData", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 复制应用文件路径.
+ ///
+ internal static string page_detail_copyPath {
+ get {
+ return ResourceManager.GetString("page.detail.copyPath", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 复制应用进程名称.
+ ///
+ internal static string page_detail_copyProcessname {
+ get {
+ return ResourceManager.GetString("page.detail.copyProcessname", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 编辑别名.
+ ///
+ internal static string page_detail_editAlias {
+ get {
+ return ResourceManager.GetString("page.detail.editAlias", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 启动应用.
+ ///
+ internal static string page_detail_launchApp {
+ get {
+ return ResourceManager.GetString("page.detail.launchApp", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 打开应用所在目录.
+ ///
+ internal static string page_detail_openDir {
+ get {
+ return ResourceManager.GetString("page.detail.openDir", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 刷新.
+ ///
+ internal static string page_detail_reload {
+ get {
+ return ResourceManager.GetString("page.detail.reload", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 已从白名单移除此应用 {0}.
+ ///
+ internal static string page_detail_removedFromWhitelist {
+ get {
+ return ResourceManager.GetString("page.detail.removedFromWhitelist", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 从白名单移除.
+ ///
+ internal static string page_detail_removeFromWhitelist {
+ get {
+ return ResourceManager.GetString("page.detail.removeFromWhitelist", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 设置分类.
+ ///
+ internal static string page_detail_setCategory {
+ get {
+ return ResourceManager.GetString("page.detail.setCategory", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 更多.
+ ///
+ internal static string page_index_more {
+ get {
+ return ResourceManager.GetString("page.index.more", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 今日.
+ ///
+ internal static string page_index_time_today {
+ get {
+ return ResourceManager.GetString("page.index.time.today", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 本周.
+ ///
+ internal static string page_index_time_week {
+ get {
+ return ResourceManager.GetString("page.index.time.week", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 刷新.
+ ///
+ internal static string page_refresh {
+ get {
+ return ResourceManager.GetString("page.refresh", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Tai 版本号.
+ ///
+ internal static string page_settings_about_version {
+ get {
+ return ResourceManager.GetString("page.settings.about.version", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 关于.
+ ///
+ internal static string page_settings_category_about {
+ get {
+ return ResourceManager.GetString("page.settings.category.about", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 关联.
+ ///
+ internal static string page_settings_category_associations {
+ get {
+ return ResourceManager.GetString("page.settings.category.associations", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 行为.
+ ///
+ internal static string page_settings_category_behavior {
+ get {
+ return ResourceManager.GetString("page.settings.category.behavior", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 数据.
+ ///
+ internal static string page_settings_category_data {
+ get {
+ return ResourceManager.GetString("page.settings.category.data", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 常规.
+ ///
+ internal static string page_settings_category_general {
+ get {
+ return ResourceManager.GetString("page.settings.category.general", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 无法正确启动检查更新程序.
+ ///
+ internal static string page_settings_updaterError {
+ get {
+ return ResourceManager.GetString("page.settings.updaterError", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 升级程序似乎已被删除,请手动前往发布页查看新版本.
+ ///
+ internal static string page_settings_updaterRemoved {
+ get {
+ return ResourceManager.GetString("page.settings.updaterRemoved", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 最为频繁.
+ ///
+ internal static string page_top {
+ get {
+ return ResourceManager.GetString("page.top", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 网站.
+ ///
+ internal static string page_websites {
+ get {
+ return ResourceManager.GetString("page.websites", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 按天.
+ ///
+ internal static string time_daily {
+ get {
+ return ResourceManager.GetString("time.daily", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to {0}小时.
+ ///
+ internal static string time_hours {
+ get {
+ return ResourceManager.GetString("time.hours", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to {0}小时{1}分.
+ ///
+ internal static string time_hoursWithMinutes {
+ get {
+ return ResourceManager.GetString("time.hoursWithMinutes", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to {0}分钟.
+ ///
+ internal static string time_minutes {
+ get {
+ return ResourceManager.GetString("time.minutes", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to {0}分钟{1}秒.
+ ///
+ internal static string time_minutesWithSeconds {
+ get {
+ return ResourceManager.GetString("time.minutesWithSeconds", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 按月.
+ ///
+ internal static string time_monthly {
+ get {
+ return ResourceManager.GetString("time.monthly", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to {0}秒.
+ ///
+ internal static string time_seconds {
+ get {
+ return ResourceManager.GetString("time.seconds", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 按周.
+ ///
+ internal static string time_weekly {
+ get {
+ return ResourceManager.GetString("time.weekly", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 按年.
+ ///
+ internal static string time_yearly {
+ get {
+ return ResourceManager.GetString("time.yearly", resourceCulture);
+ }
+ }
+ }
+}
diff --git a/UI/Resources/Localization/Localization.zh-CN.resx b/UI/Resources/Localization/Localization.zh-CN.resx
new file mode 100644
index 0000000..3238e14
--- /dev/null
+++ b/UI/Resources/Localization/Localization.zh-CN.resx
@@ -0,0 +1,372 @@
+
+
+
+
+
+
+ {0}秒
+
+
+ {0}分钟
+
+
+ {0}分钟{1}秒
+
+
+ {0}小时
+
+
+ {0}小时{1}分
+
+
+ 按天
+
+
+ 按周
+
+
+ 按月
+
+
+ 按年
+
+
+ 刷新
+
+
+ 最为频繁
+
+
+ 应用
+
+
+ 网站
+
+
+
+
+ 今日
+
+
+ 本周
+
+
+
+
+ 更多
+
+
+
+
+ 详细
+
+
+ 统计
+
+
+ 概览
+
+
+ 分类
+
+
+
+
+ 设置
+
+
+
+
+ 启动应用
+
+
+ 复制应用进程名称
+
+
+ 复制应用文件路径
+
+
+ 打开应用所在目录
+
+
+ 刷新
+
+
+ 清空统计
+
+
+ 设置分类
+
+
+ 编辑别名
+
+
+ 从白名单移除
+
+
+ 添加到白名单
+
+
+
+ 已从白名单移除此应用 {0}
+
+
+ 已添加至白名单 {0}
+
+
+
+
+ 升级程序似乎已被删除,请手动前往发布页查看新版本
+
+
+ 无法正确启动检查更新程序
+
+
+
+ 常规
+
+
+ 关联
+
+
+ 行为
+
+
+ 数据
+
+
+ 关于
+
+
+
+
+ 本周
+
+
+ 上周
+
+
+ 默认视图
+
+
+ 汇总视图
+
+
+ 分类视图
+
+
+ 未分类
+
+
+
+
+ 小时
+
+
+ 总计
+
+
+ 个
+
+
+ 应用量
+
+
+ 最长使用
+
+
+ 分类
+
+
+
+
+ Tai 版本号
+
+
+
+
+ 名称
+
+
+ 设置一个名称用于识别该关联
+
+
+ 关联进程
+
+
+ 将需要关联的进程名称(不带.exe)添加到此,至少两个。
+
+
+
+
+ 睡眠监测
+
+
+ 离开电脑时自动停止统计,重启软件生效。(一般情况不建议关闭)
+
+
+ 偏好
+
+
+
+ 忽略应用
+
+
+ 可以通过进程名称或者正则表达式进行匹配。当使用正则表达式时可以匹配程序路径
+
+
+ 进程名称,不需要输入.exe。支持正则表达式
+
+
+ 忽略应用
+
+
+
+ 忽略URL
+
+
+ 过滤不需要统计的网站或链接
+
+
+ URL 支持正则表达式
+
+
+ 忽略URL
+
+
+
+ 应用白名单
+
+
+ 仅统计白名单内的应用
+
+
+ 应用白名单
+
+
+
+ 应用白名单
+
+
+ 可以通过进程名称或者正则表达式进行匹配,当使用正则表达式时可以匹配程序路径
+
+
+ 进程名称,不需要输入.exe。支持正则表达式
+
+
+
+
+ 基础
+
+
+ 外观
+
+
+ 概览页
+
+
+ 功能
+
+
+
+ 开机自启动
+
+
+ 在电脑启动时自动运行 Tai
+
+
+
+ 主题模式
+
+
+ 设置以浅色或深色模式显示
+
+
+ 浅色|深色
+
+
+
+ 主题颜色
+
+
+
+
+
+
+ 保留窗口大小
+
+
+ 保留当前的窗口大小,而非使用系统默认尺寸
+
+
+
+ 启动页
+
+
+ 设置打开主界面时显示的页面
+
+
+ 概览|统计|详细|分类
+
+
+
+ 启动软件时显示主界面
+
+
+ 在开机自启动时此选项无效
+
+
+
+ 最为频繁显示条数
+
+
+
+
+
+ 1|2|3|4|5|6|7|8|9|10
+
+
+
+ 更多显示条数
+
+
+
+
+
+ 1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20
+
+
+
+ 网站浏览统计
+
+
+ 统计浏览器的网站访问数据,支持:Google Chrome、MSEdge或任何能够安装Chrome拓展的浏览器。请点击 “关于 > 浏览器统计插件” 了解如何安装和使用此功能。
+
+
+
+
+ 暂时没有数据
+
+
+ 什么都没有
+
+
+
+
+ text/microsoft-resx
+
+
+ 1.3
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral,
+ PublicKeyToken=b77a5c561934e089
+
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral,
+ PublicKeyToken=b77a5c561934e089
+
+
+
\ No newline at end of file
diff --git a/UI/Servicers/ILocalizationServicer.cs b/UI/Servicers/ILocalizationServicer.cs
new file mode 100644
index 0000000..0e8e572
--- /dev/null
+++ b/UI/Servicers/ILocalizationServicer.cs
@@ -0,0 +1,9 @@
+namespace UI.Servicers
+{
+ public interface ILocalizationServicer
+ {
+ string Translated(string key);
+ string Translated(string key, params object[] args);
+ string Translated(params object[] args);
+ }
+}
\ No newline at end of file
diff --git a/UI/Servicers/LocalizationServicer.cs b/UI/Servicers/LocalizationServicer.cs
new file mode 100644
index 0000000..4d5a2c2
--- /dev/null
+++ b/UI/Servicers/LocalizationServicer.cs
@@ -0,0 +1,42 @@
+using System.Globalization;
+using System.Linq;
+using System.Resources;
+using UI.Resources.Localization;
+
+namespace UI.Servicers
+{
+ public class LocalizationServicer : ILocalizationServicer
+ {
+ public static LocalizationServicer Instance;
+
+ private ResourceManager resourceManager;
+ private CultureInfo culture;
+
+ public LocalizationServicer()
+ {
+ resourceManager = new ResourceManager("UI.Resources.Localization.Localization", typeof(LocalizationServicer).Assembly);
+ culture = CultureInfo.CurrentUICulture;
+ Instance = this;
+ }
+
+ public void SetCulture(CultureInfo culture)
+ {
+ this.culture = culture ?? CultureInfo.InvariantCulture;
+ }
+
+ public string Translated(string key)
+ {
+ return resourceManager.GetString(key, culture) ?? key;
+ }
+
+ public string Translated(string key, params object[] args)
+ {
+ return string.Format(culture, Translated(key), args);
+ }
+
+ public string Translated(params object[] args)
+ {
+ return string.Format(culture, Translated(args[0] as string), args.Skip(1).ToArray());
+ }
+ }
+}
\ No newline at end of file
diff --git a/UI/Themes/Base/EmptyData.xaml b/UI/Themes/Base/EmptyData.xaml
index 1d33b16..c8e7b74 100644
--- a/UI/Themes/Base/EmptyData.xaml
+++ b/UI/Themes/Base/EmptyData.xaml
@@ -1,13 +1,14 @@
+ xmlns:local="clr-namespace:UI.Controls.Base"
+ xmlns:loc="clr-namespace:UI.Markup">