From 37086374198d76fe7bb104ab247c640362a76a22 Mon Sep 17 00:00:00 2001
From: AHOHNMYC <24810600+AHOHNMYC@users.noreply.github.com>
Date: Sat, 13 May 2023 11:32:26 +0300
Subject: [PATCH] +Addeded complete Russian localization +Addeded condition
jumps to English instruction pages if current language is not Chinese
+Various hardcoded units added to resources to easy i18lize project +Fixed
some mistypes
---
PluginDemo/PluginDemo.rc | 80 ++++++-
TrafficMonitor/AboutDlg.cpp | 33 ++-
TrafficMonitor/AboutDlg.h | 2 +-
TrafficMonitor/Common.cpp | 205 ++++++++----------
TrafficMonitor/Common.h | 6 +-
TrafficMonitor/CommonData.h | 33 ++-
TrafficMonitor/GeneralSettingsDlg.cpp | 7 +-
TrafficMonitor/HistoryTrafficCalendarDlg.cpp | 14 +-
TrafficMonitor/HistoryTrafficListDlg.cpp | 2 +-
TrafficMonitor/MainWndSettingsDlg.cpp | 8 +-
TrafficMonitor/NetworkInfoDlg.cpp | 24 +-
TrafficMonitor/PluginManagerDlg.cpp | 10 +-
TrafficMonitor/SkinDlg.cpp | 8 +-
TrafficMonitor/SkinFile.cpp | 22 +-
TrafficMonitor/TaskBarDlg.cpp | 33 ++-
TrafficMonitor/TaskBarSettingsDlg.cpp | 14 +-
TrafficMonitor/TaskbarDefaultStyle.cpp | 2 +-
TrafficMonitor/TrafficMonitor.cpp | 34 +--
TrafficMonitor/TrafficMonitor.rc | Bin 319292 -> 439844 bytes
TrafficMonitor/TrafficMonitor.vcxproj | 1 +
TrafficMonitor/TrafficMonitor.vcxproj.filters | 3 +
TrafficMonitor/TrafficMonitorDlg.cpp | 38 ++--
TrafficMonitor/res/Acknowledgement_ru.txt | Bin 0 -> 1394 bytes
TrafficMonitor/res/TrafficMonitor.rc2 | Bin 22508 -> 29662 bytes
TrafficMonitor/resource.h | 12 +-
25 files changed, 350 insertions(+), 241 deletions(-)
create mode 100644 TrafficMonitor/res/Acknowledgement_ru.txt
diff --git a/PluginDemo/PluginDemo.rc b/PluginDemo/PluginDemo.rc
index 5d43ed72d..1ea2d7d36 100644
--- a/PluginDemo/PluginDemo.rc
+++ b/PluginDemo/PluginDemo.rc
@@ -13,7 +13,7 @@
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
-// 中文(简体,中国) resources
+// 疏蜞轳觇 (箫痤眄铄 镨顸祛, 疏蜞) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
@@ -145,12 +145,84 @@ BEGIN
IDS_CUSTOM_DRAW_ITEM "自绘示例"
END
-#endif // 中文(简体,中国) resources
+#endif // 疏蜞轳觇 (箫痤眄铄 镨顸祛, 疏蜞) resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// 英语(美国) resources
+// 畜耨觇 (蓄耨) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
+LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
+#pragma code_page(1251)
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_OPTIONS_DIALOG DIALOGEX 0, 0, 112, 67
+STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "袜耱痤殛 溧螓 怵屐屙"
+FONT 9, "Segoe UI", 400, 0, 0x0
+BEGIN
+ DEFPUSHBUTTON "问",IDOK,7,46,48,14
+ PUSHBUTTON "悟戾磬",IDCANCEL,57,46,48,14
+ GROUPBOX "灶痨囹",IDC_STATIC,7,7,98,32
+ CONTROL "项赅琨忄螯 皴牦礓",IDC_SHOW_SECOND_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,20,81,10
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
+BEGIN
+ IDD_OPTIONS_DIALOG, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 105
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 60
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// AFX_DIALOG_LAYOUT
+//
+
+IDD_OPTIONS_DIALOG AFX_DIALOG_LAYOUT
+BEGIN
+ 0
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE
+BEGIN
+ IDS_PLUGIN_NAME "橡桁屦 镫嚆桧 TrafficMonitor"
+ IDS_PLUGIN_DESCRIPTION "橡桁屦 镫嚆桧 TrafficMonitor 潆 疣琊噌铗麒觐 镫嚆桧钼"
+ IDS_TIME "吗屐"
+ IDS_DATE "泥蜞"
+ IDS_CUSTOM_DRAW_ITEM "橡桁屦 铗痂耦怅"
+END
+
+#endif // 畜耨觇 (蓄耨) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// 理汶栝耜栝 (沿) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
@@ -217,7 +289,7 @@ BEGIN
IDS_CUSTOM_DRAW_ITEM "Custom draw example"
END
-#endif // 英语(美国) resources
+#endif // 理汶栝耜栝 (沿) resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/TrafficMonitor/AboutDlg.cpp b/TrafficMonitor/AboutDlg.cpp
index 77e56b40c..9c02c4e04 100644
--- a/TrafficMonitor/AboutDlg.cpp
+++ b/TrafficMonitor/AboutDlg.cpp
@@ -23,7 +23,7 @@ void CAboutDlg::DoDataExchange(CDataExchange* pDX)
DDX_Control(pDX, IDC_STATIC_ACKNOWLEDGEMENT, m_acknowledgement);
DDX_Control(pDX, IDC_STATIC_GITHUB, m_github);
DDX_Control(pDX, IDC_STATIC_DONATE, m_donate);
- DDX_Control(pDX, IDC_TRANSLATOR_STATIC, m_translaotr_static);
+ DDX_Control(pDX, IDC_TRANSLATOR_STATIC, m_translator_static);
DDX_Control(pDX, IDC_STATIC_LICENSE, m_license);
DDX_Control(pDX, IDC_OPENHARDWAREMONITOR_LINK, m_openhardwaremonitor_link);
DDX_Control(pDX, IDC_TINYXML2_LINK, m_tinyxml2_link);
@@ -50,8 +50,18 @@ BOOL CAboutDlg::OnInitDialog()
SetWindowText(CCommon::LoadText(IDS_TITLE_ABOUT));
m_mail.SetURL(_T("mailto:zhongyang219@hotmail.com")); //璁剧疆瓒呴摼鎺
//m_check_update.SetURL(_T("http://pan.baidu.com/s/1c1LkPQ4"));
- m_github.SetURL(_T("https://github.com/zhongyang219/TrafficMonitor"));
- m_gitee.SetURL(_T("https://gitee.com/zhongyang219/TrafficMonitor"));
+ Language language_code = (Language)_ttoi(CCommon::LoadText(IDS_LANGUAGE_CODE));
+ if (language_code == Language::SIMPLIFIED_CHINESE || language_code == Language::TRADITIONAL_CHINESE)
+ {
+ m_github.SetURL(_T("https://github.com/zhongyang219/TrafficMonitor"));
+ m_gitee.SetURL(_T("https://gitee.com/zhongyang219/TrafficMonitor"));
+ }
+ else
+ {
+ m_github.SetURL(_T("https://github.com/zhongyang219/TrafficMonitor/blob/master/README_en-us.md"));
+ m_gitee.SetURL(_T("https://gitee.com/zhongyang219/TrafficMonitor/blob/master/README_en-us.md"));
+ }
+
m_donate.SetLinkIsURL(false);
m_acknowledgement.SetLinkIsURL(false);
m_license.SetLinkIsURL(false);
@@ -110,16 +120,17 @@ BOOL CAboutDlg::OnInitDialog()
m_tool_tip.SetMaxTipWidth(800);
//璁剧疆缈昏瘧鑰呬俊鎭
- int language_code;
- language_code = _ttoi(CCommon::LoadText(IDS_LANGUAGE_CODE));
- if (language_code == 1 || language_code == 2) //璇█鏄畝浣撲腑鏂囧拰鑻辨枃鏃朵笉鏄剧ず缈昏瘧鑰呬俊鎭
- m_translaotr_static.ShowWindow(SW_HIDE);
- if (language_code == 3) //鏄剧ず绻佷綋涓枃缈昏瘧鑰呯殑淇℃伅
+ CString translator_url = CCommon::LoadText(IDS_CONTACT_TRANSLATOR_URL);
+ if (translator_url == _T(""))
+ {
+ m_translator_static.ShowWindow(SW_HIDE);
+ }
+ else
{
- m_translaotr_static.SetURL(_T("http://mkvq.blogspot.com/"));
- m_tool_tip.AddTool(&m_translaotr_static, CCommon::LoadText(IDS_CONTACT_TRANSLATOR, _T("\r\nhttp://mkvq.blogspot.com/")));
+ m_translator_static.SetURL(translator_url);
+ m_tool_tip.AddTool(&m_translator_static, CCommon::LoadText(IDS_CONTACT_TRANSLATOR) + _T("\r\n") + translator_url);
}
- m_translaotr_static.SetBackgroundColor(GetSysColor(COLOR_WINDOW));
+ m_translator_static.SetBackgroundColor(GetSysColor(COLOR_WINDOW));
//璁剧疆鍥剧墖鐨勪綅缃
CRect rect;
diff --git a/TrafficMonitor/AboutDlg.h b/TrafficMonitor/AboutDlg.h
index b74544ee0..683c3961f 100644
--- a/TrafficMonitor/AboutDlg.h
+++ b/TrafficMonitor/AboutDlg.h
@@ -23,7 +23,7 @@ class CAboutDlg : public CBaseDialog
CLinkStatic m_donate; //鈥滄崘鍔┾濊秴閾炬帴
CLinkStatic m_license; //鈥滃紑婧愬崗璁濊秴閾炬帴
CToolTipCtrl m_tool_tip; //榧犳爣鎸囧悜鏃剁殑宸ュ叿鎻愮ず
- CLinkStatic m_translaotr_static;
+ CLinkStatic m_translator_static;
CLinkStatic m_openhardwaremonitor_link;
CLinkStatic m_tinyxml2_link;
CLinkStatic m_musicplayer2_link;
diff --git a/TrafficMonitor/Common.cpp b/TrafficMonitor/Common.cpp
index e152b5685..2ea94cbbc 100644
--- a/TrafficMonitor/Common.cpp
+++ b/TrafficMonitor/Common.cpp
@@ -87,85 +87,47 @@ CString CCommon::DataSizeToString(unsigned long long size, const PublicSettingDa
switch (cfg.speed_unit)
{
case SpeedUnit::AUTO:
- if (cfg.speed_short_mode)
+ if (size < 1024 * 10) //10KB浠ヤ笅浠B涓哄崟浣嶏紝淇濈暀1浣嶅皬鏁
{
- if (size < 1024 * 10) //10KB浠ヤ笅浠B涓哄崟浣嶏紝淇濈暀1浣嶅皬鏁
- {
- value_str.Format(_T("%.1f"), size / 1024.0f);
- unit_str = _T("K");
- }
- else if (size < 1024 * 1000) //1000KB浠ヤ笅浠B涓哄崟浣嶏紝淇濈暀鏁存暟
- {
- value_str.Format(_T("%.0f"), size / 1024.0f);
- unit_str = _T("K");
- }
- else if (size < 1024 * 1024 * 1000) //1000MB浠ヤ笅浠B涓哄崟浣嶏紝淇濈暀1浣嶅皬鏁
- {
- value_str.Format(_T("%.1f"), size / 1024.0f / 1024.0f);
- unit_str = _T("M");
- }
- else
- {
- value_str.Format(_T("%.2f"), size / 1024.0f / 1024.0f / 1024.0f);
- unit_str = _T("G");
- }
+ value_str.Format(_T("%.1f"), size / 1024.0f);
+ unit_str = CCommon::LoadText(IDS_UNIT_KILO);
}
- else
+ else if (size < 1024 * 1000) //1000KB浠ヤ笅浠B涓哄崟浣嶏紝淇濈暀鏁存暟
{
- if (size < 1024 * 10) //10KB浠ヤ笅浠B涓哄崟浣嶏紝淇濈暀2浣嶅皬鏁
- {
- value_str.Format(_T("%.2f"), size / 1024.0f);
- unit_str = _T("KB");
- }
- else if (size < 1024 * 1000) //1000KB浠ヤ笅浠B涓哄崟浣嶏紝淇濈暀1浣嶅皬鏁
- {
- value_str.Format(_T("%.1f"), size / 1024.0f);
- unit_str = _T("KB");
- }
- else if (size < 1024 * 1024 * 1000) //1000MB浠ヤ笅浠B涓哄崟浣嶏紝淇濈暀2浣嶅皬鏁
- {
- value_str.Format(_T("%.2f"), size / 1024.0f / 1024.0f);
- unit_str = _T("MB");
- }
- else
- {
- value_str.Format(_T("%.2f"), size / 1024.0f / 1024.0f / 1024.0f);
- unit_str = _T("GB");
- }
+ value_str.Format(_T("%.0f"), size / 1024.0f);
+ unit_str = CCommon::LoadText(IDS_UNIT_KILO);
}
- break;
- case SpeedUnit::KBPS:
- if (cfg.speed_short_mode)
+ else if (size < 1024 * 1024 * 1000) //1000MB浠ヤ笅浠B涓哄崟浣嶏紝淇濈暀1浣嶅皬鏁
{
- if (size < 1024 * 10) //10KB浠ヤ笅淇濈暀1浣嶅皬鏁
- value_str.Format(_T("%.1f"), size / 1024.0f);
- else //10KB浠ヤ笂淇濈暀鏁存暟
- value_str.Format(_T("%.0f"), size / 1024.0f);
- if (!cfg.hide_unit)
- unit_str = _T("K");
+ value_str.Format(_T("%.1f"), size / 1024.0f / 1024.0f);
+ unit_str = CCommon::LoadText(IDS_UNIT_MEGA);
}
else
{
- if (size < 1024 * 10) //10KB浠ヤ笅淇濈暀2浣嶅皬鏁
- value_str.Format(_T("%.2f"), size / 1024.0f);
- else //10KB浠ヤ笂淇濈暀1浣嶅皬鏁
- value_str.Format(_T("%.1f"), size / 1024.0f);
- if (!cfg.hide_unit)
- unit_str = _T("KB");
+ value_str.Format(_T("%.2f"), size / 1024.0f / 1024.0f / 1024.0f);
+ unit_str = CCommon::LoadText(IDS_UNIT_GIGA);
}
+
+ if (!cfg.speed_short_mode)
+ unit_str += UNIT_TEXT_BYTE;
break;
- case SpeedUnit::MBPS:
- if (cfg.speed_short_mode)
- {
- value_str.Format(_T("%.1f"), size / 1024.0f / 1024.0f);
- if (!cfg.hide_unit)
- unit_str = _T("M");
+ case SpeedUnit::KBPS:
+ if (size < 1024 * 10) //10KB浠ヤ笅淇濈暀1浣嶅皬鏁
+ value_str.Format(_T("%.1f"), size / 1024.0f);
+ else //10KB浠ヤ笂淇濈暀鏁存暟
+ value_str.Format(_T("%.0f"), size / 1024.0f);
+ if (!cfg.hide_unit) {
+ unit_str = CCommon::LoadText(IDS_UNIT_KILO);
+ if (!cfg.speed_short_mode)
+ unit_str += UNIT_TEXT_BYTE;
}
- else
- {
- value_str.Format(_T("%.2f"), size / 1024.0f / 1024.0f);
- if (!cfg.hide_unit)
- unit_str = _T("MB");
+ break;
+ case SpeedUnit::MBPS:
+ value_str.Format(_T("%.1f"), size / 1024.0f / 1024.0f);
+ if (!cfg.hide_unit) {
+ unit_str = CCommon::LoadText(IDS_UNIT_MEGA);
+ if (!cfg.speed_short_mode)
+ unit_str += UNIT_TEXT_BYTE;
}
break;
}
@@ -177,9 +139,9 @@ CString CCommon::DataSizeToString(unsigned long long size, const PublicSettingDa
if (!cfg.unit_byte)
{
if (cfg.speed_short_mode && !cfg.hide_unit)
- str += _T('b'); //濡傛灉浣跨敤姣旂壒(bit)涓哄崟浣嶏紝鍗充娇璁剧疆浜嗙綉閫熺畝娲佹ā寮忥紝涔熷皢鈥渂鈥濇樉绀哄嚭鏉
+ str += UNIT_TEXT_BIT; //濡傛灉浣跨敤姣旂壒(bit)涓哄崟浣嶏紝鍗充娇璁剧疆浜嗙綉閫熺畝娲佹ā寮忥紝涔熷皢鈥渂鈥濇樉绀哄嚭鏉
else
- str.Replace(_T('B'), _T('b')); //濡傛灉浣跨敤姣旂壒(bit)涓哄崟浣嶏紝灏咮鏇挎崲鎴恇
+ str.Replace(UNIT_TEXT_BYTE, UNIT_TEXT_BIT); //濡傛灉浣跨敤姣旂壒(bit)涓哄崟浣嶏紝灏咮鏇挎崲鎴恇
}
return str;
}
@@ -188,15 +150,17 @@ CString CCommon::DataSizeToString(unsigned long long size, bool with_space)
{
CString str;
if (size < 1024 * 10) //10KB浠ヤ笅浠B涓哄崟浣嶏紝淇濈暀2浣嶅皬鏁
- str.Format(_T("%.2f KB"), size / 1024.0);
+ str.Format(_T("%.2f ") + UNIT_TEXT_KB, size / 1024.0);
else if (size < 1024 * 1024) //1MB浠ヤ笅浠B涓哄崟浣嶏紝淇濈暀1浣嶅皬鏁
- str.Format(_T("%.1f KB"), size / 1024.0);
+ str.Format(_T("%.1f ") + UNIT_TEXT_KB, size / 1024.0);
else if (size < 1024 * 1024 * 1024) //1GB浠ヤ笅浠B涓哄崟浣嶏紝淇濈暀2浣嶅皬鏁
- str.Format(_T("%.2f MB"), size / 1024.0 / 1024.0);
+ str.Format(_T("%.2f ") + UNIT_TEXT_MB, size / 1024.0 / 1024.0);
else if (size < 1024ll * 1024 * 1024 * 1024)
- str.Format(_T("%.2f GB"), size / 1024.0 / 1024.0 / 1024.0);
+ str.Format(_T("%.2f ") + UNIT_TEXT_GB, size / 1024.0 / 1024.0 / 1024.0);
+ else if (size < 1024ll * 1024 * 1024 * 1024 * 1024)
+ str.Format(_T("%.2f ") + UNIT_TEXT_TB, size / 1024.0 / 1024.0 / 1024.0 / 1024.0);
else
- str.Format(_T("%.2f TB"), size / 1024.0 / 1024.0 / 1024.0 / 1024.0);
+ str.Format(_T("%.2f ") + UNIT_TEXT_PB, size / 1024.0 / 1024.0 / 1024.0 / 1024.0 / 1024.0);
if (!with_space)
str.Remove(_T(' '));
return str;
@@ -211,7 +175,7 @@ CString CCommon::TemperatureToString(float temperature, const PublicSettingData&
str_val.Format(_T("%d"), static_cast(temperature));
if (cfg.separate_value_unit_with_space)
str_val += _T(' ');
- str_val += _T("掳C");
+ str_val += UNIT_TEXT_CELSIUS;
return str_val;
}
@@ -237,7 +201,13 @@ CString CCommon::FreqToString(float freq, const PublicSettingData& cfg)
if (freq < 0)
str_val = _T("--");
else
- str_val.Format(_T("%.2f GHz"), freq);
+ str_val.Format(_T("%.2f"), freq);
+ if (!cfg.hide_unit)
+ {
+ if (cfg.separate_value_unit_with_space)
+ str_val += _T(' ');
+ str_val += UNIT_TEXT_GHZ;
+ }
return str_val;
}
//CString CCommon::KBytesToString(unsigned int kb_size)
@@ -258,13 +228,13 @@ CString CCommon::KBytesToString(unsigned __int64 kb_size)
{
CString k_bytes_str;
if (kb_size < 1024)
- k_bytes_str.Format(_T("%d KB"), kb_size);
+ k_bytes_str.Format(_T("%d ") + UNIT_TEXT_KB, kb_size);
else if (kb_size < 1024 * 1024)
- k_bytes_str.Format(_T("%.2f MB"), kb_size / 1024.0);
+ k_bytes_str.Format(_T("%.2f ") + UNIT_TEXT_MB, kb_size / 1024.0);
else if (kb_size < 1024 * 1024 * 1024)
- k_bytes_str.Format(_T("%.2f GB"), kb_size / 1024.0 / 1024.0);
+ k_bytes_str.Format(_T("%.2f ") + UNIT_TEXT_GB, kb_size / 1024.0 / 1024.0);
else
- k_bytes_str.Format(_T("%.2f TB"), kb_size / 1024.0 / 1024.0 / 1024.0);
+ k_bytes_str.Format(_T("%.2f ") + UNIT_TEXT_TB, kb_size / 1024.0 / 1024.0 / 1024.0);
return k_bytes_str;
}
@@ -673,52 +643,23 @@ bool CCommon::GetURL(const wstring& url, wstring& result, bool utf8, const wstri
}
-void CCommon::GetInternetIp(wstring& ip_address, wstring& ip_location, bool global)
+void CCommon::GetInternetIpIpCn(wstring& ip_address, wstring& ip_location)
{
- wstring web_page;
- if (GetURL(L"https://ip.cn/", web_page, true))
+ wstring raw_string;
+ wstring user_agent{ L"TrafficMonitor/" };
+ user_agent += VERSION;
+ if (GetURL(L"https://ip.cn/api/index?ip=&type=0", raw_string, true, user_agent))
{
-#ifdef _DEBUG
- ofstream file{ L".\\IP_web_page.log" };
- file << UnicodeToStr(web_page.c_str()) << std::endl;
-#endif // _DEBUG
- size_t index, index1;
- index = web_page.find(L"");
- index1 = web_page.find(L"
", index + 6);
- if (index == wstring::npos || index1 == wstring::npos)
- ip_address.clear();
- else
- ip_address = web_page.substr(index + 6, index1 - index - 6); //鑾峰彇IP鍦板潃
- if (ip_address.size() > 15 || ip_address.size() < 7) //IP鍦板潃鏈闀15涓瓧绗︼紝鏈鐭7涓瓧绗
- ip_address.clear();
-
- //鑾峰彇IP鍦板潃褰掑睘鍦
- if (!global)
- {
- index = web_page.find(L"", index1 + 7);
- index1 = web_page.find(L"
", index + 6);
- if (index == wstring::npos || index1 == wstring::npos)
- ip_location.clear();
- else
- ip_location = web_page.substr(index + 6, index1 - index - 6);
- }
- else
- {
- index = web_page.find(L"GeoIP", index1 + 7);
- index1 = web_page.find(L"
", index + 6);
- if (index == wstring::npos || index1 == wstring::npos)
- ip_location.clear();
- else
- ip_location = web_page.substr(index + 7, index1 - index - 7);
- }
+ ip_address = GetJsonValueSimple(raw_string, L"ip");
}
else
{
ip_address.clear();
}
+ ip_location.clear();
}
-void CCommon::GetInternetIp2(wstring& ip_address, wstring& ip_location, bool ipv6)
+void CCommon::GetInternetIpYinghualuo(wstring& ip_address, wstring& ip_location, bool ipv6)
{
wstring raw_string;
wstring user_agent{ L"TrafficMonitor/" };
@@ -737,6 +678,29 @@ void CCommon::GetInternetIp2(wstring& ip_address, wstring& ip_location, bool ipv
}
}
+void CCommon::GetInternetIpIcanhazip(wstring& ip_address, wstring& ip_location, bool ipv6)
+{
+ wstring raw_string;
+ wstring user_agent{ L"TrafficMonitor/" };
+ user_agent += VERSION;
+ if (GetURL((ipv6 ? L"http://ipv6.icanhazip.com" : L"http://icanhazip.com"), raw_string, true, user_agent))
+ {
+ int max_length = ipv6 ? 45 : 15;
+ if (raw_string.length() <= max_length) {
+ ip_address = raw_string;
+ }
+ else
+ {
+ ip_address.clear();
+ }
+ }
+ else
+ {
+ ip_address.clear();
+ }
+ ip_location.clear();
+}
+
void CCommon::SetRect(CRect& rect, int x, int y, int width, int height)
{
@@ -782,11 +746,11 @@ CString CCommon::StringFormat(LPCTSTR format_str, const std::initializer_list& paras)
+CString CCommon::LoadTextFormat(UINT id, const std::initializer_list& params)
{
CString str;
str.LoadString(id);
- return StringFormat(str.GetString(), paras);
+ return StringFormat(str.GetString(), params);
}
CString CCommon::IntToString(__int64 n, bool thousand_separation, bool is_unsigned)
@@ -881,6 +845,7 @@ void CCommon::SetThreadLanguage(Language language)
case Language::ENGLISH: SetThreadUILanguage(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US)); break;
case Language::SIMPLIFIED_CHINESE: SetThreadUILanguage(MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED)); break;
case Language::TRADITIONAL_CHINESE: SetThreadUILanguage(MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL)); break;
+ case Language::RUSSIAN: SetThreadUILanguage(MAKELANGID(LANG_RUSSIAN, SUBLANG_RUSSIAN_RUSSIA)); break;
default: break;
}
}
diff --git a/TrafficMonitor/Common.h b/TrafficMonitor/Common.h
index e1bbf90ef..00d7679d1 100644
--- a/TrafficMonitor/Common.h
+++ b/TrafficMonitor/Common.h
@@ -216,9 +216,11 @@ class CCommon
static bool GetURL(const wstring& url, wstring& result, bool utf8 = false, const wstring& user_agent = wstring());
//鑾峰彇澶栫綉IP鍦板潃鍜孖P褰掑睘鍦
- static void GetInternetIp(wstring& ip_address, wstring& ip_location, bool global);
+ static void GetInternetIpIpCn(wstring& ip_address, wstring& ip_location);
- static void GetInternetIp2(wstring& ip_address, wstring& ip_location, bool ipv6);
+ static void GetInternetIpYinghualuo(wstring& ip_address, wstring& ip_location, bool ipv6);
+
+ static void GetInternetIpIcanhazip(wstring& ip_address, wstring& ip_location, bool ipv6);
static void SetRect(CRect& rect, int x, int y, int width, int height);
diff --git a/TrafficMonitor/CommonData.h b/TrafficMonitor/CommonData.h
index 6a6e7afba..bba75ef44 100644
--- a/TrafficMonitor/CommonData.h
+++ b/TrafficMonitor/CommonData.h
@@ -34,7 +34,7 @@ struct HistoryTraffic : public Date
//鍘嗗彶娴侀噺缁熻涓敤浜庢寚绀轰笉鍚岃寖鍥村唴鐨勬祦閲忕殑棰滆壊
#define TRAFFIC_COLOR_BLUE RGB(0, 183, 238)
#define TRAFFIC_COLOR_GREEN RGB(128, 194, 105)
-#define TRAFFIC_COLOR_YELLOE RGB(255, 216, 58)
+#define TRAFFIC_COLOR_YELLOW RGB(255, 216, 58)
#define TRAFFIC_COLOR_RED RGB(255, 95, 74)
#define TRAFFIC_COLOR_DARK_RED RGB(166, 19, 0)
@@ -47,6 +47,34 @@ enum class SpeedUnit
};
+// Support constants
+#define UNIT_TEXT_CELSIUS _T("鈩") // 掳C
+//#define UNIT_TEXT_FAHRENHEIT _T("鈩") // 掳F
+//#define UNIT_TEXT_PERCENT _T("%")
+#define UNIT_TEXT_GHZ (CCommon::LoadText(IDS_UNIT_GIGA) + CCommon::LoadText(IDS_UNIT_HERTZ))
+#define UNIT_TEXT_PER_SECOND (_T("/") + CCommon::LoadText(IDS_UNIT_SECOND))
+// Basic units
+#define UNIT_TEXT_BIT (CCommon::LoadText(IDS_UNIT_BIT))
+#define UNIT_TEXT_BYTE (CCommon::LoadText(IDS_UNIT_BYTE))
+// Metric prefixes bit
+#define UNIT_TEXT_Kb (CCommon::LoadText(IDS_UNIT_KILO) + UNIT_TEXT_BIT)
+#define UNIT_TEXT_Mb (CCommon::LoadText(IDS_UNIT_MEGA) + UNIT_TEXT_BIT)
+#define UNIT_TEXT_Gb (CCommon::LoadText(IDS_UNIT_GIGA) + UNIT_TEXT_BIT)
+// Metric prefixes byte
+#define UNIT_TEXT_KB (CCommon::LoadText(IDS_UNIT_KILO) + UNIT_TEXT_BYTE)
+#define UNIT_TEXT_MB (CCommon::LoadText(IDS_UNIT_MEGA) + UNIT_TEXT_BYTE)
+#define UNIT_TEXT_GB (CCommon::LoadText(IDS_UNIT_GIGA) + UNIT_TEXT_BYTE)
+#define UNIT_TEXT_TB (CCommon::LoadText(IDS_UNIT_TERA) + UNIT_TEXT_BYTE)
+#define UNIT_TEXT_PB (CCommon::LoadText(IDS_UNIT_PETA) + UNIT_TEXT_BYTE)
+// Speed units bit
+#define UNIT_TEXT_Kbps (UNIT_TEXT_Kb + UNIT_TEXT_PER_SECOND)
+#define UNIT_TEXT_Mbps (UNIT_TEXT_Mb + UNIT_TEXT_PER_SECOND)
+#define UNIT_TEXT_Gbps (UNIT_TEXT_Gb + UNIT_TEXT_PER_SECOND)
+// Speed units byte
+#define UNIT_TEXT_KBps (UNIT_TEXT_KB + UNIT_TEXT_PER_SECOND)
+#define UNIT_TEXT_MBps (UNIT_TEXT_MB + UNIT_TEXT_PER_SECOND)
+#define UNIT_TEXT_GBps (UNIT_TEXT_GB + UNIT_TEXT_PER_SECOND)
+
//纭欢鐩戞帶鐨勯」鐩
enum HardwareItem
{
@@ -97,7 +125,8 @@ enum class Language
FOLLOWING_SYSTEM, //璺熼殢绯荤粺
ENGLISH, //鑻辫
SIMPLIFIED_CHINESE, //绠浣撲腑鏂
- TRADITIONAL_CHINESE //绻佷綋涓枃
+ TRADITIONAL_CHINESE, //绻佷綋涓枃
+ RUSSIAN
};
//棰滆壊妯″紡
diff --git a/TrafficMonitor/GeneralSettingsDlg.cpp b/TrafficMonitor/GeneralSettingsDlg.cpp
index cb509093c..b8bee1244 100644
--- a/TrafficMonitor/GeneralSettingsDlg.cpp
+++ b/TrafficMonitor/GeneralSettingsDlg.cpp
@@ -78,7 +78,7 @@ void CGeneralSettingsDlg::AddOrUpdateAutoRunTooltip(bool add)
{
CString str_tool_tip;
#ifdef WITHOUT_TEMPERATURE
- str_tool_tip = CCommon::LoadText(IDS_AUTO_RUN_METHOD_REGESTRY);
+ str_tool_tip = CCommon::LoadText(IDS_AUTO_RUN_METHOD_REGISTRY);
#else
str_tool_tip = CCommon::LoadText(IDS_AUTO_RUN_METHOD_TASK_SCHEDULE);
#endif
@@ -214,8 +214,8 @@ BOOL CGeneralSettingsDlg::OnInitDialog()
((CButton*)GetDlgItem(IDC_TODAY_TRAFFIC_TIP_CHECK))->SetCheck(m_data.traffic_tip_enable);
m_traffic_tip_edit.SetRange(1, 32767);
m_traffic_tip_edit.SetValue(m_data.traffic_tip_value);
- m_traffic_tip_combo.AddString(_T("MB"));
- m_traffic_tip_combo.AddString(_T("GB"));
+ m_traffic_tip_combo.AddString(UNIT_TEXT_MB);
+ m_traffic_tip_combo.AddString(UNIT_TEXT_GB);
m_traffic_tip_combo.SetCurSel(m_data.traffic_tip_unit);
CheckDlgButton(IDC_MEMORY_USAGE_TIP_CHECK, m_data.memory_usage_tip.enable);
m_memory_tip_edit.SetRange(1, 100);
@@ -243,6 +243,7 @@ BOOL CGeneralSettingsDlg::OnInitDialog()
m_language_combo.AddString(_T("English"));
m_language_combo.AddString(_T("绠浣撲腑鏂"));
m_language_combo.AddString(_T("绻侀珨涓枃"));
+ m_language_combo.AddString(_T("袪褍褋褋泻懈泄"));
m_language_combo.SetCurSel(static_cast(m_data.language));
((CButton*)GetDlgItem(IDC_SHOW_ALL_CONNECTION_CHECK))->SetCheck(m_data.show_all_interface);
diff --git a/TrafficMonitor/HistoryTrafficCalendarDlg.cpp b/TrafficMonitor/HistoryTrafficCalendarDlg.cpp
index 9abc7ca72..3d7bcba4e 100644
--- a/TrafficMonitor/HistoryTrafficCalendarDlg.cpp
+++ b/TrafficMonitor/HistoryTrafficCalendarDlg.cpp
@@ -288,7 +288,7 @@ void CHistoryTrafficCalendarDlg::OnPaint()
else if (m_calendar[i][j].traffic() < 10 * 1024 * 1024) //娴侀噺灏忎簬10GB鏃剁粯鍒剁豢鑹
color = TRAFFIC_COLOR_GREEN;
else if (m_calendar[i][j].traffic() < 100 * 1024 * 1024) //娴侀噺灏忎簬100GB鏃剁粯鍒堕粍鑹
- color = TRAFFIC_COLOR_YELLOE;
+ color = TRAFFIC_COLOR_YELLOW;
else if (m_calendar[i][j].traffic() < 1024 * 1024 * 1024) //娴侀噺灏忎簬1TB鏃剁粯鍒剁孩鑹
color = TRAFFIC_COLOR_RED;
else //娴侀噺瓒呰繃1TB鏃舵樉绀烘繁绾㈣壊
@@ -338,27 +338,27 @@ void CHistoryTrafficCalendarDlg::OnPaint()
rc_legend.left = rc_legend_box.right + theApp.DPI(4);
//钃濊壊鍥句緥
draw.FillRect(rc_legend_box, TRAFFIC_COLOR_BLUE);
- draw.DrawWindowText(rc_legend, _T("0~1GB"), text_color);
+ draw.DrawWindowText(rc_legend, _T("0~1") + UNIT_TEXT_GB, text_color);
//缁胯壊鍥句緥
rc_legend.MoveToY(rc_legend.bottom + line_gap);
rc_legend_box.MoveToY(rc_legend.top + (rc_legend.Height() - box_side) / 2);
draw.FillRect(rc_legend_box, TRAFFIC_COLOR_GREEN);
- draw.DrawWindowText(rc_legend, _T("1GB~10GB"), text_color);
+ draw.DrawWindowText(rc_legend, _T("1") + UNIT_TEXT_GB + _T("~10") + UNIT_TEXT_GB, text_color);
//榛勮壊鍥句緥
rc_legend.MoveToY(rc_legend.bottom + line_gap);
rc_legend_box.MoveToY(rc_legend.top + (rc_legend.Height() - box_side) / 2);
- draw.FillRect(rc_legend_box, TRAFFIC_COLOR_YELLOE);
- draw.DrawWindowText(rc_legend, _T("10GB~100GB"), text_color);
+ draw.FillRect(rc_legend_box, TRAFFIC_COLOR_YELLOW);
+ draw.DrawWindowText(rc_legend, _T("10") + UNIT_TEXT_GB + _T("~100") + UNIT_TEXT_GB, text_color);
//绾㈣壊鍥句緥
rc_legend.MoveToY(rc_legend.bottom + line_gap);
rc_legend_box.MoveToY(rc_legend.top + (rc_legend.Height() - box_side) / 2);
draw.FillRect(rc_legend_box, TRAFFIC_COLOR_RED);
- draw.DrawWindowText(rc_legend, _T("100GB~1TB"), text_color);
+ draw.DrawWindowText(rc_legend, _T("100") + UNIT_TEXT_GB + _T("~1") + UNIT_TEXT_TB, text_color);
//娣辩孩鑹插浘渚
rc_legend.MoveToY(rc_legend.bottom + line_gap);
rc_legend_box.MoveToY(rc_legend.top + (rc_legend.Height() - box_side) / 2);
draw.FillRect(rc_legend_box, TRAFFIC_COLOR_DARK_RED);
- draw.DrawWindowText(rc_legend, _T("1TB~"), text_color);
+ draw.DrawWindowText(rc_legend, _T("1") + UNIT_TEXT_TB + _T("~"), text_color);
}
diff --git a/TrafficMonitor/HistoryTrafficListDlg.cpp b/TrafficMonitor/HistoryTrafficListDlg.cpp
index fedb8222f..8b6421f21 100644
--- a/TrafficMonitor/HistoryTrafficListDlg.cpp
+++ b/TrafficMonitor/HistoryTrafficListDlg.cpp
@@ -73,7 +73,7 @@ void CHistoryTrafficListDlg::AddListRow(const ListRowData& data, unsigned __int6
else if (total_kbytes < 10 * 1024 * 1024) //娴侀噺灏忎簬10GB鏃剁粯鍒剁豢鑹
color = TRAFFIC_COLOR_GREEN;
else if (total_kbytes < 100 * 1024 * 1024) //娴侀噺灏忎簬100GB鏃剁粯鍒堕粍鑹
- color = TRAFFIC_COLOR_YELLOE;
+ color = TRAFFIC_COLOR_YELLOW;
else if (total_kbytes < 1024 * 1024 * 1024) //娴侀噺灏忎簬1TB鏃剁粯鍒剁孩鑹
color = TRAFFIC_COLOR_RED;
else //娴侀噺瓒呰繃1TB鏃舵樉绀烘繁绾㈣壊
diff --git a/TrafficMonitor/MainWndSettingsDlg.cpp b/TrafficMonitor/MainWndSettingsDlg.cpp
index 0299662be..8ab16fea0 100644
--- a/TrafficMonitor/MainWndSettingsDlg.cpp
+++ b/TrafficMonitor/MainWndSettingsDlg.cpp
@@ -64,13 +64,13 @@ void CMainWndSettingsDlg::IniUnitCombo()
m_unit_combo.AddString(CCommon::LoadText(IDS_AUTO));
if (m_data.unit_byte)
{
- m_unit_combo.AddString(CCommon::LoadText(IDS_FIXED_AS, _T(" KB/s")));
- m_unit_combo.AddString(CCommon::LoadText(IDS_FIXED_AS, _T(" MB/s")));
+ m_unit_combo.AddString(CCommon::LoadText(IDS_FIXED_AS) + _T(" ") + UNIT_TEXT_KBps);
+ m_unit_combo.AddString(CCommon::LoadText(IDS_FIXED_AS) + _T(" ") + UNIT_TEXT_MBps);
}
else
{
- m_unit_combo.AddString(CCommon::LoadText(IDS_FIXED_AS, _T(" Kb/s")));
- m_unit_combo.AddString(CCommon::LoadText(IDS_FIXED_AS, _T(" Mb/s")));
+ m_unit_combo.AddString(CCommon::LoadText(IDS_FIXED_AS) + _T(" ") + UNIT_TEXT_Kbps);
+ m_unit_combo.AddString(CCommon::LoadText(IDS_FIXED_AS) + _T(" ") + UNIT_TEXT_Mbps);
}
m_unit_combo.SetCurSel(static_cast(m_data.speed_unit));
}
diff --git a/TrafficMonitor/NetworkInfoDlg.cpp b/TrafficMonitor/NetworkInfoDlg.cpp
index a6b9ebadd..7b236d5ea 100644
--- a/TrafficMonitor/NetworkInfoDlg.cpp
+++ b/TrafficMonitor/NetworkInfoDlg.cpp
@@ -50,7 +50,7 @@ void CNetworkInfoDlg::ShowInfo()
}
m_info_list.SetItemText(2, 1, temp);
//閫熷害
- temp.Format(_T("%dMbps"), network_info.dwSpeed / 1000000);
+ temp.Format(_T("%d ") + UNIT_TEXT_Mbps, network_info.dwSpeed / 1000000);
m_info_list.SetItemText(3, 1, temp);
//閫傞厤鍣ㄧ墿鐞嗗湴鍧
temp = _T("");
@@ -163,7 +163,11 @@ UINT CNetworkInfoDlg::GetInternetIPThreadFunc(LPVOID lpParam)
wstring ip_address, ip_location;
//IPV4
- CCommon::GetInternetIp2(ip_address, ip_location, false); //鑾峰彇澶栫綉IP鍦板潃锛
+ CCommon::GetInternetIpYinghualuo(ip_address, ip_location, false); //鑾峰彇澶栫綉IP鍦板潃锛
+ if (ip_address.empty())
+ CCommon::GetInternetIpIcanhazip(ip_address, ip_location, false);
+ if (ip_address.empty())
+ CCommon::GetInternetIpIpCn(ip_address, ip_location);
if (!IsWindow(p_instance->GetSafeHwnd())) //濡傛灉褰撳墠瀵硅瘽妗嗗凡缁忛攢姣侊紝鍒欓鍑虹嚎绋
return 0;
if (!ip_address.empty())
@@ -182,16 +186,18 @@ UINT CNetworkInfoDlg::GetInternetIPThreadFunc(LPVOID lpParam)
//IPV6
wstring ipv6_address, ipv6_location;
- CCommon::GetInternetIp2(ip_address, ip_location, true); //鑾峰彇澶栫綉IP鍦板潃锛
+ CCommon::GetInternetIpYinghualuo(ipv6_address, ipv6_location, true); //鑾峰彇澶栫綉IP鍦板潃锛
+ if (ipv6_address.empty())
+ CCommon::GetInternetIpIcanhazip(ipv6_address, ipv6_location, true);
if (!IsWindow(p_instance->GetSafeHwnd())) //濡傛灉褰撳墠瀵硅瘽妗嗗凡缁忛攢姣侊紝鍒欓鍑虹嚎绋
return 0;
- if (!ip_address.empty())
+ if (!ipv6_address.empty())
{
CString info;
- if (ip_location.empty())
- info = ip_address.c_str();
+ if (ipv6_location.empty())
+ info = ipv6_address.c_str();
else
- info.Format(_T("%s (%s)"), ip_address.c_str(), ip_location.c_str());
+ info.Format(_T("%s (%s)"), ipv6_address.c_str(), ipv6_location.c_str());
p_instance->m_info_list.SetItemText(15, 1, info);
}
else
@@ -266,8 +272,8 @@ BOOL CNetworkInfoDlg::OnInitDialog()
m_info_list.InsertItem(11, CCommon::LoadText(IDS_BYTES_RECEIVED_SINCE_START));
m_info_list.InsertItem(12, CCommon::LoadText(IDS_BYTES_SENT_SINCE_START));
m_info_list.InsertItem(13, CCommon::LoadText(IDS_PROGRAM_ELAPSED_TIME));
- m_info_list.InsertItem(14, CCommon::LoadText(IDS_INTERNET_IP_ADDRESS, _T(" (ipv4)")));
- m_info_list.InsertItem(15, CCommon::LoadText(IDS_INTERNET_IP_ADDRESS, _T(" (ipv6)")));
+ m_info_list.InsertItem(14, CCommon::LoadText(IDS_INTERNET_IP_ADDRESS, _T(" (IPv4)")));
+ m_info_list.InsertItem(15, CCommon::LoadText(IDS_INTERNET_IP_ADDRESS, _T(" (IPv6)")));
//if (theApp.m_cfg_data.m_show_internet_ip)
//{
// m_info_list.SetItemText(14, 1, CCommon::LoadText(IDS_ACQUIRING, _T("...")));
diff --git a/TrafficMonitor/PluginManagerDlg.cpp b/TrafficMonitor/PluginManagerDlg.cpp
index 2d2971de8..f362e4d3f 100644
--- a/TrafficMonitor/PluginManagerDlg.cpp
+++ b/TrafficMonitor/PluginManagerDlg.cpp
@@ -144,8 +144,12 @@ BOOL CPluginManagerDlg::OnInitDialog()
m_list_ctrl.SetItemText(index, 2, status);
}
- m_plugin_download_lnk.SetURL(L"https://github.com/zhongyang219/TrafficMonitorPlugins/blob/main/download/plugin_download.md");
- m_plugin_dev_guide_lnk.SetURL(L"https://github.com/zhongyang219/TrafficMonitor/wiki/%E6%8F%92%E4%BB%B6%E5%BC%80%E5%8F%91%E6%8C%87%E5%8D%97");
+ Language language_code = static_cast(_ttoi(CCommon::LoadText(IDS_LANGUAGE_CODE)));
+ if (language_code == Language::SIMPLIFIED_CHINESE || language_code == Language::TRADITIONAL_CHINESE)
+ m_plugin_download_lnk.SetURL(L"https://github.com/zhongyang219/TrafficMonitorPlugins/blob/main/download/plugin_download.md");
+ else
+ m_plugin_download_lnk.SetURL(L"https://github.com/zhongyang219/TrafficMonitorPlugins/blob/main/download/plugin_download_en.md");
+ m_plugin_dev_guide_lnk.SetURL(L"https://github.com/zhongyang219/TrafficMonitor/wiki/鎻掍欢寮鍙戞寚鍗");
m_open_plugin_dir_lnk.SetLinkIsURL(false);
EnableControl();
@@ -278,7 +282,7 @@ afx_msg LRESULT CPluginManagerDlg::OnLinkClicked(WPARAM wParam, LPARAM lParam)
{
wstring plugin_dir = CCommon::GetModuleDir() + L"plugins";
CreateDirectory(plugin_dir.c_str(), NULL); //濡傛灉plugins涓嶅瓨鍦紝鍒欏垱寤哄畠
- ShellExecute(NULL, _T("open"), _T("explorer"), plugin_dir.c_str(), NULL, SW_SHOWNORMAL);
+ ShellExecute(NULL, _T("explore"), plugin_dir.c_str(), NULL, NULL, SW_SHOWNORMAL);
}
return 0;
diff --git a/TrafficMonitor/SkinDlg.cpp b/TrafficMonitor/SkinDlg.cpp
index bc8deede5..f459e2a95 100644
--- a/TrafficMonitor/SkinDlg.cpp
+++ b/TrafficMonitor/SkinDlg.cpp
@@ -123,7 +123,11 @@ BOOL CSkinDlg::OnInitDialog()
ShowPreview();
//璁剧疆瓒呴摼鎺
- m_skin_course.SetURL(_T("https://github.com/zhongyang219/TrafficMonitor/wiki/%E7%9A%AE%E8%82%A4%E5%88%B6%E4%BD%9C%E6%95%99%E7%A8%8B"));
+ Language language_code = static_cast(_ttoi(CCommon::LoadText(IDS_LANGUAGE_CODE)));
+ if (language_code == Language::SIMPLIFIED_CHINESE || language_code == Language::TRADITIONAL_CHINESE)
+ m_skin_course.SetURL(_T("https://github.com/zhongyang219/TrafficMonitor/wiki/鐨偆鍒朵綔鏁欑▼"));
+ else
+ m_skin_course.SetURL(_T("https://github.com/zhongyang219/TrafficMonitor/wiki/Skin-Making-up-Tutorial"));
m_skin_download.SetURL(_T("https://github.com/zhongyang219/TrafficMonitorSkin/blob/master/鐨偆涓嬭浇.md"));
m_open_skin_dir_lnk.SetLinkIsURL(false);
@@ -157,7 +161,7 @@ afx_msg LRESULT CSkinDlg::OnLinkClicked(WPARAM wParam, LPARAM lParam)
if (pCtrl == &m_open_skin_dir_lnk)
{
CreateDirectory(theApp.m_skin_path.c_str(), NULL); //濡傛灉鐨偆鐩綍涓嶅瓨鍦紝鍒欏垱寤哄畠
- ShellExecute(NULL, _T("open"), _T("explorer"), theApp.m_skin_path.c_str(), NULL, SW_SHOWNORMAL);
+ ShellExecute(NULL, _T("explore"), theApp.m_skin_path.c_str(), NULL, NULL, SW_SHOWNORMAL);
}
return 0;
}
diff --git a/TrafficMonitor/SkinFile.cpp b/TrafficMonitor/SkinFile.cpp
index 4a0829f78..2b0393dbe 100644
--- a/TrafficMonitor/SkinFile.cpp
+++ b/TrafficMonitor/SkinFile.cpp
@@ -343,13 +343,13 @@ void CSkinFile::DrawPreview(CDC* pDC, CRect rect)
switch (*iter)
{
case TDI_UP:
- draw_str.value = _T("88.8 KB/s");
+ draw_str.value = _T("88.8 ") + UNIT_TEXT_KBps;
break;
case TDI_DOWN:
- draw_str.value = _T("88.9 KB/s");
+ draw_str.value = _T("88.9 ") + UNIT_TEXT_KBps;
break;
case TDI_TOTAL_SPEED:
- draw_str.value = _T("90 KB/s");
+ draw_str.value = _T("90 ") + UNIT_TEXT_KBps;
break;
case TDI_CPU:
draw_str.value = _T("50 %");
@@ -358,10 +358,10 @@ void CSkinFile::DrawPreview(CDC* pDC, CRect rect)
draw_str.value = _T("51 %");
break;
case TDI_CPU_TEMP: case TDI_GPU_TEMP: case TDI_HDD_TEMP: case TDI_MAIN_BOARD_TEMP:
- draw_str.value = _T("40 掳C");
+ draw_str.value = _T("40 ") UNIT_TEXT_CELSIUS;
break;
case TDI_CPU_FREQ:
- draw_str.value = _T("1.0 GHz");
+ draw_str.value = _T("1.0 ") + UNIT_TEXT_GHZ;
break;
default:
draw_str.value = _T("99");
@@ -497,13 +497,13 @@ void CSkinFile::DrawInfo(CDC* pDC, bool show_more_info, CFont& font)
CString total_speed = CCommon::DataSizeToString(theApp.m_in_speed + theApp.m_out_speed, theApp.m_main_wnd_data);
if (!theApp.m_main_wnd_data.hide_unit || theApp.m_main_wnd_data.speed_unit == SpeedUnit::AUTO)
{
- in_speed += _T("/s");
- out_speed += _T("/s");
- total_speed += _T("/s");
+ in_speed += UNIT_TEXT_PER_SECOND;
+ out_speed += UNIT_TEXT_PER_SECOND;
+ total_speed += UNIT_TEXT_PER_SECOND;
}
- map_str[TDI_UP].value = out_speed.GetString();
- map_str[TDI_DOWN].value = in_speed.GetString();
- map_str[TDI_TOTAL_SPEED].value = total_speed.GetString();
+ map_str[TDI_UP].value = out_speed;
+ map_str[TDI_DOWN].value = in_speed;
+ map_str[TDI_TOTAL_SPEED].value = total_speed;
if (theApp.m_main_wnd_data.swap_up_down) //浜ゆ崲涓婁紶鍜屼笅杞戒綅缃
{
diff --git a/TrafficMonitor/TaskBarDlg.cpp b/TrafficMonitor/TaskBarDlg.cpp
index 63aad5ff8..28d7216e8 100644
--- a/TrafficMonitor/TaskBarDlg.cpp
+++ b/TrafficMonitor/TaskBarDlg.cpp
@@ -381,11 +381,6 @@ void CTaskBarDlg::DrawDisplayItem(IDrawCommon& drawer, DisplayItem type, CRect r
//缁樺埗涓婁紶鎴栦笅杞介熷害
if (type == TDI_UP || type == TDI_DOWN || type == TDI_TOTAL_SPEED)
{
- CString format_str;
- if (theApp.m_taskbar_data.hide_unit && theApp.m_taskbar_data.speed_unit != SpeedUnit::AUTO)
- format_str = _T("%s");
- else
- format_str = _T("%s/s");
CString str_in_speed = CCommon::DataSizeToString(theApp.m_in_speed, theApp.m_taskbar_data);
CString str_out_speed = CCommon::DataSizeToString(theApp.m_out_speed, theApp.m_taskbar_data);
CString str_total_speed = CCommon::DataSizeToString(theApp.m_in_speed + theApp.m_out_speed, theApp.m_taskbar_data);
@@ -393,16 +388,18 @@ void CTaskBarDlg::DrawDisplayItem(IDrawCommon& drawer, DisplayItem type, CRect r
// std::swap(str_in_speed, str_out_speed);
if (type == TDI_UP)
{
- str_value.Format(format_str, str_out_speed.GetString());
+ str_value = str_out_speed;
}
else if (type == TDI_DOWN)
{
- str_value.Format(format_str, str_in_speed.GetString());
+ str_value = str_in_speed;
}
else
{
- str_value.Format(format_str, str_total_speed.GetString());
+ str_value = str_total_speed;
}
+ if (!theApp.m_taskbar_data.hide_unit || theApp.m_taskbar_data.speed_unit == SpeedUnit::AUTO)
+ str_value += UNIT_TEXT_PER_SECOND;
}
//褰撳唴瀛樻樉绀轰负宸蹭娇鐢ㄥ唴瀛樻垨鍙敤鍐呭瓨鏃
@@ -848,13 +845,13 @@ CString CTaskBarDlg::GetMouseTipsInfo()
tip_info += temp;
if (!IsItemShow(TDI_UP))
{
- temp.Format(_T("\r\n%s: %s/s"), CCommon::LoadText(IDS_UPLOAD),
+ temp.Format(_T("\r\n%s: %s") + UNIT_TEXT_PER_SECOND, CCommon::LoadText(IDS_UPLOAD),
CCommon::DataSizeToString(theApp.m_out_speed, theApp.m_main_wnd_data));
tip_info += temp;
}
if (!IsItemShow(TDI_DOWN))
{
- temp.Format(_T("\r\n%s: %s/s"), CCommon::LoadText(IDS_DOWNLOAD),
+ temp.Format(_T("\r\n%s: %s") + UNIT_TEXT_PER_SECOND, CCommon::LoadText(IDS_DOWNLOAD),
CCommon::DataSizeToString(theApp.m_in_speed, theApp.m_main_wnd_data));
tip_info += temp;
}
@@ -1000,19 +997,19 @@ void CTaskBarDlg::CalculateWindowSize()
if (hide_unit)
sample_str.Format(_T("%s."), digits.c_str());
else
- sample_str.Format(_T("%s.M/s"), digits.c_str());
+ sample_str.Format(_T("%s.") + CCommon::LoadText(IDS_UNIT_MEGA) + UNIT_TEXT_PER_SECOND, digits.c_str());
}
else
{
if (hide_unit)
sample_str.Format(_T("%s.8"), digits.c_str());
else
- sample_str.Format(_T("%s.8MB/s"), digits.c_str());
+ sample_str.Format(_T("%s.8") + UNIT_TEXT_MBps, digits.c_str());
}
if (!hide_unit && theApp.m_taskbar_data.separate_value_unit_with_space)
sample_str += _T(' ');
if (theApp.m_taskbar_data.speed_short_mode && !theApp.m_taskbar_data.unit_byte && !theApp.m_taskbar_data.hide_unit)
- sample_str += _T('b');
+ sample_str += UNIT_TEXT_BIT;
value_width = m_pDC->GetTextExtent(sample_str).cx; //璁$畻浣跨敤褰撳墠瀛椾綋鏄剧ず鏂囨湰闇瑕佺殑瀹藉害鍊
item_widths[TDI_UP].value_width = value_width;
item_widths[TDI_DOWN].value_width = value_width;
@@ -1038,9 +1035,9 @@ void CTaskBarDlg::CalculateWindowSize()
if (theApp.m_taskbar_data.memory_display == MemoryDisplay::MEMORY_USED || theApp.m_taskbar_data.memory_display == MemoryDisplay::MEMORY_AVAILABLE)
{
if (theApp.m_taskbar_data.separate_value_unit_with_space)
- str = _T("19.99 GB");
+ str = _T("99.99 ") + UNIT_TEXT_GB;
else
- str = _T("19.99GB");
+ str = _T("99.99") + UNIT_TEXT_GB;
memory_width = m_pDC->GetTextExtent(str).cx;
}
item_widths[TDI_CPU].value_width = value_width;
@@ -1048,13 +1045,13 @@ void CTaskBarDlg::CalculateWindowSize()
item_widths[TDI_GPU_USAGE].value_width = value_width;
item_widths[TDI_HDD_USAGE].value_width = value_width;
- item_widths[TDI_CPU_FREQ].value_width = m_pDC->GetTextExtent(_T("1.00 GHz")).cx;
+ item_widths[TDI_CPU_FREQ].value_width = m_pDC->GetTextExtent(_T("9.99 ") + UNIT_TEXT_GHZ).cx;
//璁$畻娓╁害鏄剧ず鐨勫搴
if (theApp.m_taskbar_data.separate_value_unit_with_space)
- str = _T("99 掳C");
+ str = _T("99 ") UNIT_TEXT_CELSIUS;
else
- str = _T("99掳C");
+ str = _T("99") UNIT_TEXT_CELSIUS;
value_width = m_pDC->GetTextExtent(str).cx;
value_width += DPI(2);
item_widths[TDI_CPU_TEMP].value_width = value_width;
diff --git a/TrafficMonitor/TaskBarSettingsDlg.cpp b/TrafficMonitor/TaskBarSettingsDlg.cpp
index a27e848f6..f5e7bfd82 100644
--- a/TrafficMonitor/TaskBarSettingsDlg.cpp
+++ b/TrafficMonitor/TaskBarSettingsDlg.cpp
@@ -74,13 +74,13 @@ void CTaskBarSettingsDlg::IniUnitCombo()
m_unit_combo.AddString(CCommon::LoadText(IDS_AUTO));
if (m_data.unit_byte)
{
- m_unit_combo.AddString(CCommon::LoadText(IDS_FIXED_AS, _T(" KB/s")));
- m_unit_combo.AddString(CCommon::LoadText(IDS_FIXED_AS, _T(" MB/s")));
+ m_unit_combo.AddString(CCommon::LoadText(IDS_FIXED_AS) + _T(" ") + UNIT_TEXT_KBps);
+ m_unit_combo.AddString(CCommon::LoadText(IDS_FIXED_AS) + _T(" ") + UNIT_TEXT_MBps);
}
else
{
- m_unit_combo.AddString(CCommon::LoadText(IDS_FIXED_AS, _T(" Kb/s")));
- m_unit_combo.AddString(CCommon::LoadText(IDS_FIXED_AS, _T(" Mb/s")));
+ m_unit_combo.AddString(CCommon::LoadText(IDS_FIXED_AS) + _T(" ") + UNIT_TEXT_Kbps);
+ m_unit_combo.AddString(CCommon::LoadText(IDS_FIXED_AS) + _T(" ") + UNIT_TEXT_Mbps);
}
m_unit_combo.SetCurSel(static_cast(m_data.speed_unit));
}
@@ -326,8 +326,8 @@ BOOL CTaskBarSettingsDlg::OnInitDialog()
CheckDlgButton(IDC_SHOW_NET_SPEED_FIGURE_CHECK, m_data.show_netspeed_figure);
m_net_speed_figure_max_val_edit.SetRange(1, 1024);
m_net_speed_figure_max_val_edit.SetValue(m_data.netspeed_figure_max_value);
- m_net_speed_figure_max_val_unit_combo.AddString(_T("KB"));
- m_net_speed_figure_max_val_unit_combo.AddString(_T("MB"));
+ m_net_speed_figure_max_val_unit_combo.AddString(UNIT_TEXT_KB);
+ m_net_speed_figure_max_val_unit_combo.AddString(UNIT_TEXT_MB);
m_net_speed_figure_max_val_unit_combo.SetCurSel(m_data.netspeed_figure_max_value_unit);
((CButton*)GetDlgItem(IDC_SET_ORDER_BUTTON))->SetIcon(theApp.GetMenuIcon(IDI_ITEM));
@@ -338,7 +338,7 @@ BOOL CTaskBarSettingsDlg::OnInitDialog()
for (int i{ 0 }; i < TASKBAR_DEFAULT_STYLE_NUM; i++)
{
CString item_name;
- item_name.Format(_T("%s %d"), CCommon::LoadText(IDS_PRESET).GetString(), i + 1);
+ item_name.Format(_T("%s %d"), CCommon::LoadText(IDS_PRESET), i + 1);
m_default_style_menu.AppendMenu(MF_STRING | MF_ENABLED, ID_DEFAULT_STYLE1 + i, item_name);
m_modify_default_style_menu.AppendMenu(MF_STRING | MF_ENABLED, ID_MODIFY_DEFAULT_STYLE1 + i, item_name);
}
diff --git a/TrafficMonitor/TaskbarDefaultStyle.cpp b/TrafficMonitor/TaskbarDefaultStyle.cpp
index 013a26ccf..8752cc271 100644
--- a/TrafficMonitor/TaskbarDefaultStyle.cpp
+++ b/TrafficMonitor/TaskbarDefaultStyle.cpp
@@ -54,7 +54,7 @@ void CTaskbarDefaultStyle::SaveConfig() const
{
//鍐欏叆鏃ュ織
CString log_str;
- log_str.Format(_T("鍦ㄤ繚瀛橀璁%d鏃舵娴嬪埌鑳屾櫙鑹插拰鏂囧瓧棰滆壊閮戒负榛戣壊锛岃棰勮鏈淇濆瓨銆"), i);
+ log_str.Format(_T("Both background color and text color are detected as black when preset %d is saved, the preset is not saved."), i);
CCommon::WriteLog(log_str, theApp.m_log_path.c_str());
return;
}
diff --git a/TrafficMonitor/TrafficMonitor.cpp b/TrafficMonitor/TrafficMonitor.cpp
index 283a6f255..0f4c65cf5 100644
--- a/TrafficMonitor/TrafficMonitor.cpp
+++ b/TrafficMonitor/TrafficMonitor.cpp
@@ -53,12 +53,12 @@ void CTrafficMonitorApp::LoadConfig()
m_general_data.allow_skin_cover_text = ini.GetBool(_T("general"), _T("allow_skin_cover_text"), true);
m_general_data.language = static_cast(ini.GetInt(_T("general"), _T("language"), 0));
m_general_data.show_all_interface = ini.GetBool(L"general", L"show_all_interface", false);
- bool is_chinese_language{}; //褰撳墠璇█鏄惁涓虹畝浣撲腑鏂
+ bool is_simplified_chinese_language{}; //褰撳墠璇█鏄惁涓虹畝浣撲腑鏂
if (m_general_data.language == Language::FOLLOWING_SYSTEM)
- is_chinese_language = CCommon::LoadText(IDS_LANGUAGE_CODE) == _T("2");
+ is_simplified_chinese_language = CCommon::LoadText(IDS_LANGUAGE_CODE) == _T("2");
else
- is_chinese_language = (m_general_data.language == Language::SIMPLIFIED_CHINESE);
- m_general_data.update_source = ini.GetInt(L"general", L"update_source", is_chinese_language ? 1 : 0); //濡傛灉褰撳墠璇█涓虹畝浣擄紝鍒欓粯璁ゆ洿鏂版簮涓篏itee锛屽惁鍒欎负GitHub
+ is_simplified_chinese_language = (m_general_data.language == Language::SIMPLIFIED_CHINESE);
+ m_general_data.update_source = ini.GetInt(L"general", L"update_source", is_simplified_chinese_language ? 1 : 0); //濡傛灉褰撳墠璇█涓虹畝浣擄紝鍒欓粯璁ゆ洿鏂版簮涓篏itee锛屽惁鍒欎负GitHub
//杞藉叆鑾峰彇CPU鍒╃敤鐜囩殑鏂瑰紡锛岄粯璁や娇鐢℅etSystemTimes鑾峰彇
m_general_data.m_get_cpu_usage_by_cpu_times = ini.GetBool(L"general", L"get_cpu_usage_by_cpu_times", /*m_win_version.GetMajorVersion() < 10*/ true);
m_general_data.monitor_time_span = ini.GetInt(L"general", L"monitor_time_span", 1000);
@@ -596,12 +596,12 @@ void CTrafficMonitorApp::CheckUpdate(bool message)
{
CString info;
//鏍规嵁璇█璁剧疆閫夋嫨瀵瑰簲璇█鐗堟湰鐨勬洿鏂板唴瀹
- int language_code = _ttoi(CCommon::LoadText(IDS_LANGUAGE_CODE));
+ Language language_code = static_cast(_ttoi(CCommon::LoadText(IDS_LANGUAGE_CODE)));
wstring contents_lan;
switch (language_code)
{
- case 2: contents_lan = contents_zh_cn; break;
- case 3: contents_lan = contents_zh_tw; break;
+ case Language::SIMPLIFIED_CHINESE: contents_lan = contents_zh_cn; break;
+ case Language::TRADITIONAL_CHINESE: contents_lan = contents_zh_tw; break;
default: contents_lan = contents_en; break;
}
@@ -1301,7 +1301,11 @@ void CTrafficMonitorApp::UpdatePluginMenu(CMenu* pMenu, ITMPlugin* plugin)
void CTrafficMonitorApp::OnHelp()
{
// TODO: 鍦ㄦ娣诲姞鍛戒护澶勭悊绋嬪簭浠g爜
- ShellExecute(NULL, _T("open"), _T("https://github.com/zhongyang219/TrafficMonitor/wiki"), NULL, NULL, SW_SHOW);
+ Language language_code = static_cast(_ttoi(CCommon::LoadText(IDS_LANGUAGE_CODE)));
+ if (language_code == Language::SIMPLIFIED_CHINESE || language_code == Language::TRADITIONAL_CHINESE)
+ ShellExecute(NULL, _T("open"), _T("https://github.com/zhongyang219/TrafficMonitor/wiki"), NULL, NULL, SW_SHOW);
+ else
+ ShellExecute(NULL, _T("open"), _T("https://github.com/zhongyang219/TrafficMonitor/wiki/Home_en"), NULL, NULL, SW_SHOW);
}
@@ -1313,14 +1317,14 @@ void CTrafficMonitorApp::OnFrequentyAskedQuestions()
url_domain = _T("gitee.com");
else
url_domain = _T("github.com");
- CString language_code{ CCommon::LoadText(IDS_LANGUAGE_CODE) };
CString file_name;
- if (language_code == _T("2"))
+ Language language_code = static_cast(_ttoi(CCommon::LoadText(IDS_LANGUAGE_CODE)));
+ if (language_code == Language::SIMPLIFIED_CHINESE || language_code == Language::TRADITIONAL_CHINESE)
file_name = _T("Help.md");
else
file_name = _T("Help_en-us.md");
CString url;
- url.Format(_T("https://%s/zhongyang219/TrafficMonitor/blob/master/%s"), url_domain.GetString(), file_name.GetString());
+ url.Format(_T("https://%s/zhongyang219/TrafficMonitor/blob/master/%s"), url_domain, file_name);
ShellExecute(NULL, _T("open"), url, NULL, NULL, SW_SHOW);
}
@@ -1333,15 +1337,15 @@ void CTrafficMonitorApp::OnUpdateLog()
url_domain = _T("gitee.com");
else
url_domain = _T("github.com");
- CString language_code{ CCommon::LoadText(IDS_LANGUAGE_CODE) };
CString file_name;
- if (language_code == _T("2"))
+ Language language_code = static_cast(_ttoi(CCommon::LoadText(IDS_LANGUAGE_CODE)));
+ if (language_code == Language::SIMPLIFIED_CHINESE)
file_name = _T("update_log.md");
- else if (language_code == _T("3"))
+ else if (language_code == Language::TRADITIONAL_CHINESE)
file_name = _T("update_log_zh-tw.md");
else
file_name = _T("update_log_en-us.md");
CString url;
- url.Format(_T("https://%s/zhongyang219/TrafficMonitor/blob/master/UpdateLog/%s"), url_domain.GetString(), file_name.GetString());
+ url.Format(_T("https://%s/zhongyang219/TrafficMonitor/blob/master/UpdateLog/%s"), url_domain, file_name);
ShellExecute(NULL, _T("open"), url, NULL, NULL, SW_SHOW);
}
diff --git a/TrafficMonitor/TrafficMonitor.rc b/TrafficMonitor/TrafficMonitor.rc
index 66da52cb92a5fd784545db0302148e5cddd0e8c6..d60242143e5ea00bbef1b524756d719c0d326391 100644
GIT binary patch
delta 39612
zcmeHw4R}@6neN#?@*6@3F(e_JoE&2~MhqwaA%t*30tAR52v}4KLD8a6h%Kd-S`w_q
zO8trKUY1pc2B)@;b!^m`rtMT4J8j20)(NfC+t!vFrjFBgERB8obiA##_kGuQR`xk3
zCxCW3_ul8;hX+W`-g~WYee3&uzi;jH)n{gZ=Cy)>H%pzWKuB#Hb@HFen}599c8Z_+
ziW;@}|Kp!}RsVnggRfeXoZ?X6x7Vxw=d8x3zWx_q{kgL|uwn4v9oG6;)~dmOzTZ-g
z+HuOxn!Pd55m*)25ZD@M3oH*@fuFASPFKxw+5-F4!9DKWsd8~yV3qg8MfqO$A=kP#
z`NCD|^!4ss)ql)!)opv+g6Z9TTMu8fd?Mxbc;F#4kX^hi@zj?^|K@nIyIQ(_%
z*W|J4{*smBwcnrZji|gq_nX!u{B&^OTh`CUF5fZmoHaP`oIPAa-Yf8a;oy^R*{it$
zf0*e!`2X+*EQxPGAQT7(b_Dj~Pj}$`frh|B{CRI+XJB98=0JJi+Q6>Bp1^x>r5pe6
z#V6O{|M#kcKXexkVxMlYf+4rXZN{Glx87akh60g5$Z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*e#odgelg~`o*?!~;z
z+iAw_ZKs)*n8IzJ4zyijdkiD97sv_Ag_vi?O+r7Pv!%-m#>pf_*so
zz;vDIci33DwyzUr)nfv?#8HG*e)5Hxd=POFG1f^C4^K9jB{F@(erAE`_t;oDwqFrv
zodT6eSRyh#;UKdVL}Gy?YfAxp0Yf4~0Yk?0hf%D`+kLuNHQ1*wSjDEcea=MI8Iz{3
zvteV~Zl%JuN`Cq$JD@0!3tJxB_8Kp?0xiap>4_(qWVdsbvP}^J`EWZheDxK8{<^rF
z?K~5I3PUDC5ko3NGD8W25kt!M^{d!=8PP?j14YHf6B+UtQh;%XrUfK9bGp!4wh7ZS
Z*qK2QH60i}D$@(*GcMbnw2|!)3jo@vw{ZXf
diff --git a/TrafficMonitor/TrafficMonitor.vcxproj b/TrafficMonitor/TrafficMonitor.vcxproj
index d713cee05..568a58b7b 100644
--- a/TrafficMonitor/TrafficMonitor.vcxproj
+++ b/TrafficMonitor/TrafficMonitor.vcxproj
@@ -504,6 +504,7 @@
+
diff --git a/TrafficMonitor/TrafficMonitor.vcxproj.filters b/TrafficMonitor/TrafficMonitor.vcxproj.filters
index 8d8088181..11b4be1a0 100644
--- a/TrafficMonitor/TrafficMonitor.vcxproj.filters
+++ b/TrafficMonitor/TrafficMonitor.vcxproj.filters
@@ -233,6 +233,9 @@
璧勬簮鏂囦欢
+
+ 璧勬簮鏂囦欢
+
diff --git a/TrafficMonitor/TrafficMonitorDlg.cpp b/TrafficMonitor/TrafficMonitorDlg.cpp
index f89d5a4f0..f79d078f5 100644
--- a/TrafficMonitor/TrafficMonitorDlg.cpp
+++ b/TrafficMonitor/TrafficMonitorDlg.cpp
@@ -136,13 +136,13 @@ CString CTrafficMonitorDlg::GetMouseTipsInfo()
const CSkinFile::Layout& skin_layout{ theApp.m_cfg_data.m_show_more_info ? m_skin.GetLayoutInfo().layout_l : m_skin.GetLayoutInfo().layout_s }; //褰撳墠鐨勭毊鑲ゅ竷灞
if (!skin_layout.GetItem(TDI_UP).show) //濡傛灉涓荤獥鍙d腑娌℃湁鏄剧ず涓婁紶閫熷害锛屽垯鍦ㄦ彁绀轰俊鎭腑鏄剧ず涓婁紶閫熷害
{
- temp.Format(_T("\r\n%s: %s/s"), CCommon::LoadText(IDS_UPLOAD),
+ temp.Format(_T("\r\n%s: %s") + UNIT_TEXT_PER_SECOND, CCommon::LoadText(IDS_UPLOAD),
CCommon::DataSizeToString(theApp.m_out_speed, theApp.m_main_wnd_data));
tip_info += temp;
}
if (!skin_layout.GetItem(TDI_DOWN).show)
{
- temp.Format(_T("\r\n%s: %s/s"), CCommon::LoadText(IDS_DOWNLOAD),
+ temp.Format(_T("\r\n%s: %s") + UNIT_TEXT_PER_SECOND, CCommon::LoadText(IDS_DOWNLOAD),
CCommon::DataSizeToString(theApp.m_in_speed, theApp.m_main_wnd_data));
tip_info += temp;
}
@@ -406,8 +406,8 @@ void CTrafficMonitorDlg::IniConnection()
if (theApp.m_debug_log)
{
CString log_str;
- log_str += _T("姝e湪鍒濆鍖栫綉缁滆繛鎺...\n");
- log_str += _T("杩炴帴鍒楄〃锛歕n");
+ log_str += _T("Initializing network connection...\n");
+ log_str += _T("Connection list:\n");
for (size_t i{}; i < m_connections.size(); i++)
{
log_str += m_connections[i].description.c_str();
@@ -616,22 +616,22 @@ void CTrafficMonitorDlg::UpdateNotifyIconTip()
CString in_speed = CCommon::DataSizeToString(theApp.m_in_speed);
CString out_speed = CCommon::DataSizeToString(theApp.m_out_speed);
- strTip += CCommon::StringFormat(_T("\r\n<%1%>: <%2%>/s"), { CCommon::LoadText(IDS_UPLOAD), out_speed });
- strTip += CCommon::StringFormat(_T("\r\n<%1%>: <%2%>/s"), { CCommon::LoadText(IDS_DOWNLOAD), in_speed });
- strTip += CCommon::StringFormat(_T("\r\nCPU: <%1%> %"), { theApp.m_cpu_usage });
+ strTip += CCommon::StringFormat(_T("\r\n<%1%>: <%2%>") + UNIT_TEXT_PER_SECOND, { CCommon::LoadText(IDS_UPLOAD), out_speed });
+ strTip += CCommon::StringFormat(_T("\r\n<%1%>: <%2%>") + UNIT_TEXT_PER_SECOND, { CCommon::LoadText(IDS_DOWNLOAD), in_speed });
+ strTip += CCommon::StringFormat(_T("\r\n<%1%>: <%2%> %"), { CCommon::LoadText(IDS_CPU_USAGE), theApp.m_cpu_usage });
strTip += CCommon::StringFormat(_T("\r\n<%1%>: <%2%> %"), { CCommon::LoadText(IDS_MEMORY), theApp.m_memory_usage });
if (IsTemperatureNeeded())
{
if (theApp.m_general_data.IsHardwareEnable(HI_GPU) && theApp.m_gpu_usage >= 0)
strTip += CCommon::StringFormat(_T("\r\n<%1%>: <%2%> %"), { CCommon::LoadText(IDS_GPU_USAGE), theApp.m_gpu_usage });
if (theApp.m_general_data.IsHardwareEnable(HI_CPU) && theApp.m_cpu_temperature > 0)
- strTip += CCommon::StringFormat(_T("\r\n<%1%>: <%2%> 掳C"), { CCommon::LoadText(IDS_CPU_TEMPERATURE), static_cast(theApp.m_cpu_temperature) });
+ strTip += CCommon::StringFormat(_T("\r\n<%1%>: <%2%> ") UNIT_TEXT_CELSIUS, { CCommon::LoadText(IDS_CPU_TEMPERATURE), static_cast(theApp.m_cpu_temperature) });
if (theApp.m_general_data.IsHardwareEnable(HI_GPU) && theApp.m_gpu_temperature > 0)
- strTip += CCommon::StringFormat(_T("\r\n<%1%>: <%2%> 掳C"), { CCommon::LoadText(IDS_GPU_TEMPERATURE), static_cast(theApp.m_gpu_temperature) });
+ strTip += CCommon::StringFormat(_T("\r\n<%1%>: <%2%> ") UNIT_TEXT_CELSIUS, { CCommon::LoadText(IDS_GPU_TEMPERATURE), static_cast(theApp.m_gpu_temperature) });
if (theApp.m_general_data.IsHardwareEnable(HI_HDD) && theApp.m_hdd_temperature > 0)
- strTip += CCommon::StringFormat(_T("\r\n<%1%>: <%2%> 掳C"), { CCommon::LoadText(IDS_HDD_TEMPERATURE), static_cast(theApp.m_hdd_temperature) });
+ strTip += CCommon::StringFormat(_T("\r\n<%1%>: <%2%> ") UNIT_TEXT_CELSIUS, { CCommon::LoadText(IDS_HDD_TEMPERATURE), static_cast(theApp.m_hdd_temperature) });
if (theApp.m_general_data.IsHardwareEnable(HI_MBD) && theApp.m_main_board_temperature > 0)
- strTip += CCommon::StringFormat(_T("\r\n<%1%>: <%2%> 掳C"), { CCommon::LoadText(IDS_MAINBOARD_TEMPERATURE), static_cast(theApp.m_main_board_temperature) });
+ strTip += CCommon::StringFormat(_T("\r\n<%1%>: <%2%> ") UNIT_TEXT_CELSIUS, { CCommon::LoadText(IDS_MAINBOARD_TEMPERATURE), static_cast(theApp.m_main_board_temperature) });
if (theApp.m_general_data.IsHardwareEnable(HI_HDD) && theApp.m_hdd_usage >= 0)
strTip += CCommon::StringFormat(_T("\r\n<%1%>: <%2%> %"), { CCommon::LoadText(IDS_HDD_USAGE), theApp.m_hdd_usage });
}
@@ -1250,7 +1250,7 @@ UINT CTrafficMonitorDlg::MonitorThreadCallback(LPVOID dwUser)
if (theApp.m_debug_log)
{
CString log_str;
- log_str = _T("杩炴帴鍚嶇О涓嶅尮閰嶏細\r\n");
+ log_str = _T("Connection name mismatch:\r\n");
log_str += _T("IfTable description: ");
log_str += descr.c_str();
log_str += _T("\r\nm_connection_name: ");
@@ -1567,25 +1567,25 @@ void CTrafficMonitorDlg::OnTimer(UINT_PTR nIDEvent)
checkNotifyTip(theApp.m_general_data.memory_usage_tip, theApp.m_memory_usage, last_memory_usage, memory_usage_notify_time, info.GetString());
//妫鏌ユ槸鍚﹁寮瑰嚭CPU娓╁害浣跨敤鐜囪秴鍑烘彁绀
- info.Format(CCommon::LoadText(IDS_CPU_TEMPERATURE_EXCEED, _T(" %d掳C!")), static_cast(theApp.m_cpu_temperature));
+ info.Format(CCommon::LoadText(IDS_CPU_TEMPERATURE_EXCEED, _T(" %d") UNIT_TEXT_CELSIUS _T("!")), static_cast(theApp.m_cpu_temperature));
static int last_cpu_temp;
static int cpu_temp_notify_time{ -theApp.m_notify_interval }; //璁板綍涓婃寮瑰嚭鎻愮ず鏃剁殑鏃堕棿
checkNotifyTip(theApp.m_general_data.cpu_temp_tip, theApp.m_cpu_temperature, last_cpu_temp, cpu_temp_notify_time, info.GetString());
//妫鏌ユ槸鍚﹁寮瑰嚭鏄惧崱娓╁害浣跨敤鐜囪秴鍑烘彁绀
- info.Format(CCommon::LoadText(IDS_GPU_TEMPERATURE_EXCEED, _T(" %d掳C!")), static_cast(theApp.m_gpu_temperature));
+ info.Format(CCommon::LoadText(IDS_GPU_TEMPERATURE_EXCEED, _T(" %d") UNIT_TEXT_CELSIUS _T("!")), static_cast(theApp.m_gpu_temperature));
static int last_gpu_temp;
static int gpu_temp_notify_time{ -theApp.m_notify_interval }; //璁板綍涓婃寮瑰嚭鎻愮ず鏃剁殑鏃堕棿
checkNotifyTip(theApp.m_general_data.gpu_temp_tip, theApp.m_gpu_temperature, last_gpu_temp, gpu_temp_notify_time, info.GetString());
//妫鏌ユ槸鍚﹁寮瑰嚭纭洏娓╁害浣跨敤鐜囪秴鍑烘彁绀
- info.Format(CCommon::LoadText(IDS_HDD_TEMPERATURE_EXCEED, _T(" %d掳C!")), static_cast(theApp.m_hdd_temperature));
+ info.Format(CCommon::LoadText(IDS_HDD_TEMPERATURE_EXCEED, _T(" %d") UNIT_TEXT_CELSIUS _T("!")), static_cast(theApp.m_hdd_temperature));
static int last_hdd_temp;
static int hdd_temp_notify_time{ -theApp.m_notify_interval }; //璁板綍涓婃寮瑰嚭鎻愮ず鏃剁殑鏃堕棿
checkNotifyTip(theApp.m_general_data.hdd_temp_tip, theApp.m_hdd_temperature, last_hdd_temp, hdd_temp_notify_time, info.GetString());
//妫鏌ユ槸鍚﹁寮瑰嚭涓绘澘娓╁害浣跨敤鐜囪秴鍑烘彁绀
- info.Format(CCommon::LoadText(IDS_MBD_TEMPERATURE_EXCEED, _T(" %d掳C!")), static_cast(theApp.m_main_board_temperature));
+ info.Format(CCommon::LoadText(IDS_MBD_TEMPERATURE_EXCEED, _T(" %d") UNIT_TEXT_CELSIUS _T("!")), static_cast(theApp.m_main_board_temperature));
static int last_main_board_temp;
static int main_board_temp_notify_time{ -theApp.m_notify_interval }; //璁板綍涓婃寮瑰嚭鎻愮ず鏃剁殑鏃堕棿
checkNotifyTip(theApp.m_general_data.mainboard_temp_tip, theApp.m_main_board_temperature, last_main_board_temp, main_board_temp_notify_time, info.GetString());
@@ -1641,7 +1641,7 @@ void CTrafficMonitorDlg::OnTimer(UINT_PTR nIDEvent)
if (theApp.m_debug_log)
{
CString log_str;
- log_str += _T("妫娴嬪埌 Windows10 娣辨祬鑹插彉鍖栥俓n");
+ log_str += _T("Windows 10 theme change detected.\n");
log_str += _T("IsWindows10LightTheme: ");
log_str += std::to_wstring(light_mode).c_str();
log_str += _T("\n");
@@ -1721,7 +1721,7 @@ void CTrafficMonitorDlg::OnTimer(UINT_PTR nIDEvent)
if (!erro_log_write)
{
CString log_str;
- log_str.Format(_T("妫鏌ュ埌鑳屾櫙鑹插拰鏂囧瓧棰滆壊閮戒负榛戣壊銆侷sWindows10LightTheme: %d, 绯荤粺鍚姩鏃堕棿锛%d/%.2d/%.2d %.2d:%.2d:%.2d"),
+ log_str.Format(_T("Check that the background color and text color are both black. isWindows10LightTheme: %d, system startup time: %d/%.2d/%.2d %.2d:%.2d:%.2d"),
light_mode, m_start_time.wYear, m_start_time.wMonth, m_start_time.wDay, m_start_time.wHour, m_start_time.wMinute, m_start_time.wSecond);
CCommon::WriteLog(log_str, theApp.m_log_path.c_str());
erro_log_write = true;
@@ -2584,7 +2584,7 @@ BOOL CTrafficMonitorDlg::OnQueryEndSession()
if (theApp.m_debug_log)
{
- CCommon::WriteLog(_T("TrafficMonitor杩涚▼宸茶缁堟锛岃缃凡淇濆瓨銆"), (theApp.m_config_dir + L".\\debug.log").c_str());
+ CCommon::WriteLog(_T("The TrafficMonitor process has been terminated and the settings have been saved."), (theApp.m_config_dir + L".\\debug.log").c_str());
}
return TRUE;
diff --git a/TrafficMonitor/res/Acknowledgement_ru.txt b/TrafficMonitor/res/Acknowledgement_ru.txt
new file mode 100644
index 0000000000000000000000000000000000000000..5ea4cff7d4ea119da535c1d6a545edf8c0e33527
GIT binary patch
literal 1394
zcmZ9M%}?7v5XI-Pr%Jt4J@jbqr3xlrG{o46Xh3{b0;v+W5J;eeP?8h^e|+2D+i_A_
zS!?gk&U^c2JhQ)lt%aRX2}NjzjgW=JjzWj|HnSbpt#B9`d{cZnp~m_o?)B`(=C)@)
z?ZOgku$x#j?D9^-XS^z*8t2ZJffZj4Q;q#jShKhG#&Y{^_cpUrxbAIgR}8l=Y-E>=
znGH(IEoY6bZ-<;bDQz84cPQxF!n&Yu;@lZ}c5Y`_?y!HuV{Est_%H0*UaW4LR^@R-
z4e!h7a~1vF`h?%3)k>dhyz5cHfU}o6?wLD#!}K`vg)`>%WT{nbgOl7kB*s3-TN{E}
z*mG&$CB6}-PoiFNk0P?d+mWa6^}*c`%Q`vJO5>6-FMVdLgk5HB2-_IMB3ke8oRU-L
z+b1_8Qx4}=*bg4JAAos`F`h@1_Wk2JlYngyKRP6
zX&KuCI~s1EFdGon1P1-9H2xLsY5ZTEdE}Lb8JQidYOh0OePq?6wp7JcDzL@3u&=g{
zy&5ZbS<~InqYm5D`AMwHF16oc)x(yB&B(A1a@|zNIlcvapQ0jHC8ioX>B?VT;_zNL
zLua2qJdDvD#XPEGRORXsMy!ekE7zc2lddLT>CMoho;zUW{iFU=Kklv0ly`wm-Pa1o
zXsv~dwf>PhubNT`%tgWl|?8&;RCIe`uRC#nNRirES)-3MHFvpQX=IX%S;ow0<|WiDipb
z!5yYdWZW%@)nUqE*1!3CZz(fU_zp#T4CkoEoaLboQnvSrYmg#o(OoExFMMTtT}M)%
WVQt5Zc-44jQ@n)~;`Obk8u|n6GP?W#
literal 0
HcmV?d00001
diff --git a/TrafficMonitor/res/TrafficMonitor.rc2 b/TrafficMonitor/res/TrafficMonitor.rc2
index a82d61c41e534b462f03ce8c4d1e5137fac86b01..458737a20c52825c3a0a9bf9b0125136b4bf095a 100644
GIT binary patch
delta 817
zcmaiy&2G~`5XWchQOOq+VkHrQq;>*^h$^*{n0z!waYIW3Q6mcOjW*>|LO`COZ-6v+
z#EBEMRs90(6CiFqaph7Zcmu|37ZoIg_Tb%_o!|dIvp(JxU%!dHv~^|+-oO)hMu*jk
z{~>dE%HOCzju$oTqsyy*T~$ek>xlvrYfNqV8&6|K1gG(p5}DUt
zohvc0!yOJ}chS9+KTb77R+lauY%ssadxu#z(oy+k@`PhzhqjGbf2Y!&(q>t20f*R>
zx`8KKp2OLNm2m?~oOZ%GT2*6;2@U#Qoy1qy