Skip to content

Commit

Permalink
Merge PR #154 Add Traditional Chinese language translation into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Moataz Elmasry committed Feb 15, 2018
2 parents c32b266 + b8f0dd9 commit 9ad2541
Show file tree
Hide file tree
Showing 11 changed files with 7,475 additions and 8 deletions.
4 changes: 4 additions & 0 deletions src/Cedar/SW.c
Original file line number Diff line number Diff line change
Expand Up @@ -1220,6 +1220,10 @@ UINT SwGetLangIcon(char *name)
{
ret = ICO_LANG_CHINESE;
}
else if (StrCmpi(name, "tw") == 0)
{
ret = ICO_LANG_TRADITIONAL_CHINESE;
}

return ret;
}
Expand Down
17 changes: 17 additions & 0 deletions src/Cedar/WinUi.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,10 @@ UINT UpdateNoticeDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void
{
font_name = "Microsoft YaHei";
}
else if (_GETLANG() == 3)
{
font_name = "Microsoft JhengHei";
}
}

SetFont(hWnd, S_INFO, GetFont(font_name, 11, false, false, false, false));
Expand Down Expand Up @@ -1670,6 +1674,10 @@ HFONT GetMeiryoFontEx2(UINT font_size, bool bold)
{
return GetFont("Microsoft YaHei", font_size, bold, false, false, false);
}
else if (_GETLANG() == 3)
{
return GetFont("Microsoft JhengHei", font_size, bold, false, false, false);
}
else
{
return GetFont(NULL, font_size, bold, false, false, false);
Expand Down Expand Up @@ -2258,6 +2266,11 @@ UINT KakushiDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void *par
SetFont(hWnd, S_INFO, GetFont("Microsoft YaHei", 11, false, false, false, false));
b = true;
}
else if (_GETLANG() == 3)
{
SetFont(hWnd, S_INFO, GetFont("Microsoft JhengHei", 11, false, false, false, false));
b = true;
}
}

if (b == false)
Expand Down Expand Up @@ -2869,6 +2882,10 @@ HFONT GetDialogDefaultFontEx(bool meiryo)
{
default_font_name = "Microsoft YaHei";
}
if (_GETLANG() == 3)
{
default_font_name = "Microsoft JhengHei";
}
else
{
default_font_name = GetMeiryoFontName();
Expand Down
Binary file added src/PenCore/LANG_TRADITIONAL_CHINESE.ico
Binary file not shown.
30 changes: 25 additions & 5 deletions src/PenCore/PenCore.rc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#undef APSTUDIO_READONLY_SYMBOLS

/////////////////////////////////////////////////////////////////////////////
// ���{�� resources
// ��� resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_JPN)
#ifdef _WIN32
Expand Down Expand Up @@ -220,7 +220,6 @@ BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 326
BOTTOMMARGIN, 304
HORZGUIDE, 315
END

D_REMOTE, DIALOG
Expand Down Expand Up @@ -4842,12 +4841,33 @@ END
//

BIN_WINPCAP BIN "Dummy.bin"
#endif // ���{�� resources
#endif // ��� resources
/////////////////////////////////////////////////////////////////////////////


/////////////////////////////////////////////////////////////////////////////
// �p�� (�č�) resources
// ���� (�x�W) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHT)
#ifdef _WIN32
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL
#pragma code_page(950)
#endif //_WIN32

/////////////////////////////////////////////////////////////////////////////
//
// Icon
//

// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
ICO_LANG_TRADITIONAL_CHINESE ICON "LANG_TRADITIONAL_CHINESE.ico"
#endif // ���� (�x�W) resources
/////////////////////////////////////////////////////////////////////////////


/////////////////////////////////////////////////////////////////////////////
// �^�� (����) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
Expand Down Expand Up @@ -4908,7 +4928,7 @@ BMP_ZURUKKO BITMAP "Zurukko.bmp"
BMP_VPNGATEEN BITMAP "VPNGateEN.bmp"
BMP_VPNGATEJA BITMAP "VPNGateJA.bmp"
BMP_UNIVTSUKUBA BITMAP "UnivTsukuba.bmp"
#endif // �p�� (�č�) resources
#endif // �^�� (����) resources
/////////////////////////////////////////////////////////////////////////////


Expand Down
8 changes: 8 additions & 0 deletions src/PenCore/PenCore.vcproj
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,10 @@
RelativePath=".\Ibaraki.bmp"
>
</File>
<File
RelativePath=".\icon3.ico"
>
</File>
<File
RelativePath=".\Information.ico"
>
Expand Down Expand Up @@ -308,6 +312,10 @@
RelativePath=".\LANG_JAPANESE.ico"
>
</File>
<File
RelativePath=".\LANG_TRADITIONAL_CHINESE.ico"
>
</File>
<File
RelativePath=".\Language.ico"
>
Expand Down
3 changes: 2 additions & 1 deletion src/PenCore/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@
#define ICO_RESEARCH 239
#define BMP_UNIVTSUKUBA 240
#define ICO_POLICE 241
#define ICO_LANG_TRADITIONAL_CHINESE 243
#define S_TITLE 1007
#define S_INSERT_SECURE 1008
#define S_TITLE2 1008
Expand Down Expand Up @@ -1206,7 +1207,7 @@
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
#define _APS_NEXT_RESOURCE_VALUE 242
#define _APS_NEXT_RESOURCE_VALUE 244
#define _APS_NEXT_COMMAND_VALUE 40111
#define _APS_NEXT_CONTROL_VALUE 1518
#define _APS_NEXT_SYMED_VALUE 102
Expand Down
4 changes: 2 additions & 2 deletions src/bin/hamcore/languages.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# 番号 識別子 英語表記 ローカル表記 Windowsロケール番号 UNIXロケール文字一覧
0 ja Japanese 日本語 1041 ja,jp,sjis,shift_jis,euc
1 en English English 1033 en,us,c
2 cn Simplified_Chinese 简体中文 2052,4100,1028,3076,5124 zh,cn,tw,hkg,mac,sg,chi

2 cn Simplified_Chinese 简体中文 2052,4100,3076,5124 cn,hkg,mac,sg,chi
3 tw Traditional_Chinese 繁體中文 1028 tw,zh-tw

0 comments on commit 9ad2541

Please sign in to comment.