Skip to content

Commit ed90867

Browse files
committed
修正帮助和FAQ链接的语言版本问题
1 parent 1a2094e commit ed90867

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

TrafficMonitor/TrafficMonitor.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,7 +1381,12 @@ void CTrafficMonitorApp::CreateDlgFont()
13811381
void CTrafficMonitorApp::OnHelp()
13821382
{
13831383
// TODO: 在此添加命令处理程序代码
1384-
ShellExecute(NULL, _T("open"), _T("https://github.com/zhongyang219/TrafficMonitor/wiki"), NULL, NULL, SW_SHOW);
1384+
CString help_url;
1385+
if (m_str_table.IsSimplifiedChinese())
1386+
help_url = _T("https://github.com/zhongyang219/TrafficMonitor/wiki");
1387+
else
1388+
help_url = _T("https://github.com/zhongyang219/TrafficMonitor/wiki/Home_en");
1389+
ShellExecute(NULL, _T("open"), help_url, NULL, NULL, SW_SHOW);
13851390
}
13861391

13871392

@@ -1393,9 +1398,8 @@ void CTrafficMonitorApp::OnFrequentyAskedQuestions()
13931398
url_domain = _T("gitee.com");
13941399
else
13951400
url_domain = _T("github.com");
1396-
CString language_code{ CCommon::LoadText(IDS_LANGUAGE_CODE) };
13971401
CString file_name;
1398-
if (language_code == _T("2"))
1402+
if (m_str_table.IsSimplifiedChinese())
13991403
file_name = _T("Help.md");
14001404
else
14011405
file_name = _T("Help_en-us.md");

TrafficMonitor/language.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@
111111
#define IDS_SUNDAY L"IDS_SUNDAY"
112112
#define IDS_CURRENT_MONTH_TOTAL_TRAFFIC L"IDS_CURRENT_MONTH_TOTAL_TRAFFIC"
113113
#define IDS_TRAFFIC_USED1 L"IDS_TRAFFIC_USED1"
114-
#define IDS_LANGUAGE_CODE L"IDS_LANGUAGE_CODE"
115114
#define IDS_CONNOT_INSERT_TO_TASKBAR_ERROR_LOG L"IDS_CONNOT_INSERT_TO_TASKBAR_ERROR_LOG"
116115
#define IDS_NO_CONNECTION L"IDS_NO_CONNECTION"
117116
#define IDS_CONTACT_TRANSLATOR L"IDS_CONTACT_TRANSLATOR"

0 commit comments

Comments
 (0)