Skip to content

Commit

Permalink
Add menu to select Polish language, discussion #943.
Browse files Browse the repository at this point in the history
  • Loading branch information
zufuliu committed Dec 19, 2024
1 parent 88bd8e5 commit 853516b
Show file tree
Hide file tree
Showing 28 changed files with 69 additions and 24 deletions.
1 change: 1 addition & 0 deletions locale/de/Notepad4.rc
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,7 @@ BEGIN
MENUITEM "English", IDM_LANG_ENGLISH_US
MENUITEM "Français", IDM_LANG_FRENCH_FRANCE
MENUITEM "Italiano", IDM_LANG_ITALIAN
MENUITEM "Polski", IDM_LANG_PORTUGUESE_BRAZIL
MENUITEM "Português (Brasil)", IDM_LANG_PORTUGUESE_BRAZIL
MENUITEM "Русский", IDM_LANG_RUSSIAN
MENUITEM "日本語", IDM_LANG_JAPANESE
Expand Down
5 changes: 3 additions & 2 deletions locale/de/matepath.rc
Original file line number Diff line number Diff line change
Expand Up @@ -613,8 +613,9 @@ BEGIN
IDS_LANG_GERMAN "Deutsch"
IDS_LANG_ITALIAN "Italiano"
IDS_LANG_PORTUGUESE_BRAZIL "Português (Brasil)"
IDS_LANG_FRENCH_FRANCE "Français"
IDS_LANG_RUSSIAN "Русский"
IDS_LANG_FRENCH_FRANCE "Français"
IDS_LANG_RUSSIAN "Русский"
IDS_LANG_POLISH "Polski"
END
#endif

Expand Down
1 change: 1 addition & 0 deletions locale/fr/Notepad4.rc
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,7 @@ BEGIN
MENUITEM "Anglais", IDM_LANG_ENGLISH_US
MENUITEM "Français", IDM_LANG_FRENCH_FRANCE
MENUITEM "Italien", IDM_LANG_ITALIAN
MENUITEM "Polski", IDM_LANG_PORTUGUESE_BRAZIL
MENUITEM "Portuguais (Brésil)", IDM_LANG_PORTUGUESE_BRAZIL
MENUITEM "Русский", IDM_LANG_RUSSIAN
MENUITEM "Japonais", IDM_LANG_JAPANESE
Expand Down
5 changes: 3 additions & 2 deletions locale/fr/matepath.rc
Original file line number Diff line number Diff line change
Expand Up @@ -613,8 +613,9 @@ BEGIN
IDS_LANG_GERMAN "Deutsch"
IDS_LANG_ITALIAN "Italiano"
IDS_LANG_PORTUGUESE_BRAZIL "Português (Brasil)"
IDS_LANG_FRENCH_FRANCE "Français"
IDS_LANG_RUSSIAN "Русский"
IDS_LANG_FRENCH_FRANCE "Français"
IDS_LANG_RUSSIAN "Русский"
IDS_LANG_POLISH "Polski"
END
#endif

Expand Down
1 change: 1 addition & 0 deletions locale/it/Notepad4.rc
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,7 @@ BEGIN
MENUITEM "&English", IDM_LANG_ENGLISH_US
MENUITEM "&Français", IDM_LANG_FRENCH_FRANCE
MENUITEM "&Italiano", IDM_LANG_ITALIAN
MENUITEM "Polski", IDM_LANG_PORTUGUESE_BRAZIL
MENUITEM "&Português (Brasil)", IDM_LANG_PORTUGUESE_BRAZIL
MENUITEM "Русский", IDM_LANG_RUSSIAN
MENUITEM "日本語", IDM_LANG_JAPANESE
Expand Down
5 changes: 3 additions & 2 deletions locale/it/matepath.rc
Original file line number Diff line number Diff line change
Expand Up @@ -613,8 +613,9 @@ BEGIN
IDS_LANG_GERMAN "Deutsch"
IDS_LANG_ITALIAN "Italiano"
IDS_LANG_PORTUGUESE_BRAZIL "Português (Brasil)"
IDS_LANG_FRENCH_FRANCE "Français"
IDS_LANG_RUSSIAN "Русский"
IDS_LANG_FRENCH_FRANCE "Français"
IDS_LANG_RUSSIAN "Русский"
IDS_LANG_POLISH "Polski"
END
#endif

Expand Down
1 change: 1 addition & 0 deletions locale/ja/Notepad4.rc
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,7 @@ BEGIN
MENUITEM "English", IDM_LANG_ENGLISH_US
MENUITEM "Français", IDM_LANG_FRENCH_FRANCE
MENUITEM "Italiano", IDM_LANG_ITALIAN
MENUITEM "Polski", IDM_LANG_PORTUGUESE_BRAZIL
MENUITEM "Português (Brasil)", IDM_LANG_PORTUGUESE_BRAZIL
MENUITEM "Русский", IDM_LANG_RUSSIAN
MENUITEM "日本語", IDM_LANG_JAPANESE
Expand Down
5 changes: 3 additions & 2 deletions locale/ja/matepath.rc
Original file line number Diff line number Diff line change
Expand Up @@ -614,8 +614,9 @@ BEGIN
IDS_LANG_GERMAN "Deutsch"
IDS_LANG_ITALIAN "Italiano"
IDS_LANG_PORTUGUESE_BRAZIL "Português (Brasil)"
IDS_LANG_FRENCH_FRANCE "Français"
IDS_LANG_RUSSIAN "Русский"
IDS_LANG_FRENCH_FRANCE "Français"
IDS_LANG_RUSSIAN "Русский"
IDS_LANG_POLISH "Polski"
END
#endif

Expand Down
1 change: 1 addition & 0 deletions locale/ko/Notepad4.rc
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,7 @@ BEGIN
MENUITEM "English", IDM_LANG_ENGLISH_US
MENUITEM "Français", IDM_LANG_FRENCH_FRANCE
MENUITEM "Italiano", IDM_LANG_ITALIAN
MENUITEM "Polski", IDM_LANG_PORTUGUESE_BRAZIL
MENUITEM "Português (Brasil)", IDM_LANG_PORTUGUESE_BRAZIL
MENUITEM "Русский", IDM_LANG_RUSSIAN
MENUITEM "日本語", IDM_LANG_JAPANESE
Expand Down
5 changes: 3 additions & 2 deletions locale/ko/matepath.rc
Original file line number Diff line number Diff line change
Expand Up @@ -613,8 +613,9 @@ BEGIN
IDS_LANG_GERMAN "Deutsch"
IDS_LANG_ITALIAN "Italiano"
IDS_LANG_PORTUGUESE_BRAZIL "Português (Brasil)"
IDS_LANG_FRENCH_FRANCE "Français"
IDS_LANG_RUSSIAN "Русский"
IDS_LANG_FRENCH_FRANCE "Français"
IDS_LANG_RUSSIAN "Русский"
IDS_LANG_POLISH "Polski"
END
#endif

Expand Down
2 changes: 2 additions & 0 deletions locale/pl/Notepad4.rc
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,9 @@ BEGIN
MENUITEM "English", IDM_LANG_ENGLISH_US
MENUITEM "Français", IDM_LANG_FRENCH_FRANCE
MENUITEM "Italiano", IDM_LANG_ITALIAN
MENUITEM "Polski", IDM_LANG_PORTUGUESE_BRAZIL
MENUITEM "Português (Brasil)", IDM_LANG_PORTUGUESE_BRAZIL
MENUITEM "Русский", IDM_LANG_RUSSIAN
MENUITEM "日本語", IDM_LANG_JAPANESE
MENUITEM "한국어", IDM_LANG_KOREAN
MENUITEM "中文(繁體)", IDM_LANG_CHINESE_TRADITIONAL
Expand Down
5 changes: 3 additions & 2 deletions locale/pl/matepath.rc
Original file line number Diff line number Diff line change
Expand Up @@ -613,8 +613,9 @@ BEGIN
IDS_LANG_GERMAN "Deutsch"
IDS_LANG_ITALIAN "Italiano"
IDS_LANG_PORTUGUESE_BRAZIL "Português (Brasil)"
IDS_LANG_FRENCH_FRANCE "Français"
IDS_LANG_RUSSIAN "Русский"
IDS_LANG_FRENCH_FRANCE "Français"
IDS_LANG_RUSSIAN "Русский"
IDS_LANG_POLISH "Polski"
END
#endif

Expand Down
1 change: 1 addition & 0 deletions locale/pt-BR/Notepad4.rc
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,7 @@ BEGIN
MENUITEM "English", IDM_LANG_ENGLISH_US
MENUITEM "Français", IDM_LANG_FRENCH_FRANCE
MENUITEM "Italiano", IDM_LANG_ITALIAN
MENUITEM "Polski", IDM_LANG_PORTUGUESE_BRAZIL
MENUITEM "Português (Brasil)", IDM_LANG_PORTUGUESE_BRAZIL
MENUITEM "Русский", IDM_LANG_RUSSIAN
MENUITEM "日本語", IDM_LANG_JAPANESE
Expand Down
5 changes: 3 additions & 2 deletions locale/pt-BR/matepath.rc
Original file line number Diff line number Diff line change
Expand Up @@ -613,8 +613,9 @@ BEGIN
IDS_LANG_GERMAN "Deutsch"
IDS_LANG_ITALIAN "Italiano"
IDS_LANG_PORTUGUESE_BRAZIL "Português (Brasil)"
IDS_LANG_FRENCH_FRANCE "Français"
IDS_LANG_RUSSIAN "Русский"
IDS_LANG_FRENCH_FRANCE "Français"
IDS_LANG_RUSSIAN "Русский"
IDS_LANG_POLISH "Polski"
END
#endif

Expand Down
1 change: 1 addition & 0 deletions locale/ru/Notepad4.rc
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,7 @@ BEGIN
MENUITEM "English", IDM_LANG_ENGLISH_US
MENUITEM "Français", IDM_LANG_FRENCH_FRANCE
MENUITEM "Italiano", IDM_LANG_ITALIAN
MENUITEM "Polski", IDM_LANG_PORTUGUESE_BRAZIL
MENUITEM "Português (Brasil)", IDM_LANG_PORTUGUESE_BRAZIL
MENUITEM "Русский", IDM_LANG_RUSSIAN
MENUITEM "日本語", IDM_LANG_JAPANESE
Expand Down
5 changes: 3 additions & 2 deletions locale/ru/matepath.rc
Original file line number Diff line number Diff line change
Expand Up @@ -613,8 +613,9 @@ BEGIN
IDS_LANG_GERMAN "Deutsch"
IDS_LANG_ITALIAN "Italiano"
IDS_LANG_PORTUGUESE_BRAZIL "Português (Brasil)"
IDS_LANG_FRENCH_FRANCE "Français"
IDS_LANG_RUSSIAN "Русский"
IDS_LANG_FRENCH_FRANCE "Français"
IDS_LANG_RUSSIAN "Русский"
IDS_LANG_POLISH "Polski"
END
#endif

Expand Down
1 change: 1 addition & 0 deletions locale/zh-Hans/Notepad4.rc
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,7 @@ BEGIN
MENUITEM "English", IDM_LANG_ENGLISH_US
MENUITEM "Français", IDM_LANG_FRENCH_FRANCE
MENUITEM "Italiano", IDM_LANG_ITALIAN
MENUITEM "Polski", IDM_LANG_PORTUGUESE_BRAZIL
MENUITEM "Português (Brasil)", IDM_LANG_PORTUGUESE_BRAZIL
MENUITEM "Русский", IDM_LANG_RUSSIAN
MENUITEM "日本語", IDM_LANG_JAPANESE
Expand Down
5 changes: 3 additions & 2 deletions locale/zh-Hans/matepath.rc
Original file line number Diff line number Diff line change
Expand Up @@ -613,8 +613,9 @@ BEGIN
IDS_LANG_GERMAN "Deutsch"
IDS_LANG_ITALIAN "Italiano"
IDS_LANG_PORTUGUESE_BRAZIL "Português (Brasil)"
IDS_LANG_FRENCH_FRANCE "Français"
IDS_LANG_RUSSIAN "Русский"
IDS_LANG_FRENCH_FRANCE "Français"
IDS_LANG_RUSSIAN "Русский"
IDS_LANG_POLISH "Polski"
END
#endif

Expand Down
1 change: 1 addition & 0 deletions locale/zh-Hant/Notepad4.rc
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,7 @@ BEGIN
MENUITEM "English", IDM_LANG_ENGLISH_US
MENUITEM "Français", IDM_LANG_FRENCH_FRANCE
MENUITEM "Italiano", IDM_LANG_ITALIAN
MENUITEM "Polski", IDM_LANG_PORTUGUESE_BRAZIL
MENUITEM "Português (Brasil)", IDM_LANG_PORTUGUESE_BRAZIL
MENUITEM "Русский", IDM_LANG_RUSSIAN
MENUITEM "日本語", IDM_LANG_JAPANESE
Expand Down
5 changes: 3 additions & 2 deletions locale/zh-Hant/matepath.rc
Original file line number Diff line number Diff line change
Expand Up @@ -613,8 +613,9 @@ BEGIN
IDS_LANG_GERMAN "Deutsch"
IDS_LANG_ITALIAN "Italiano"
IDS_LANG_PORTUGUESE_BRAZIL "Português (Brasil)"
IDS_LANG_FRENCH_FRANCE "Français"
IDS_LANG_RUSSIAN "Русский"
IDS_LANG_FRENCH_FRANCE "Français"
IDS_LANG_RUSSIAN "Русский"
IDS_LANG_POLISH "Polski"
END
#endif

Expand Down
3 changes: 3 additions & 0 deletions matepath/src/Helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1052,6 +1052,9 @@ HMODULE LoadLocalizedResourceDLL(LANGID lang, LPCWSTR dllName) noexcept {
case LANG_KOREAN:
folder = L"ko";
break;
case LANG_POLISH:
folder = L"pl";
break;
case LANG_PORTUGUESE:
folder = L"pt-BR";
break;
Expand Down
6 changes: 6 additions & 0 deletions matepath/src/matepath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2400,6 +2400,9 @@ void ValidateUILangauge() noexcept {
case LANG_KOREAN:
languageResID = IDS_LANG_KOREAN;
break;
case LANG_POLISH:
languageResID = IDS_LANG_POLISH;
break;
case LANG_PORTUGUESE:
languageResID = IDS_LANG_PORTUGUESE_BRAZIL;
break;
Expand Down Expand Up @@ -2444,6 +2447,9 @@ void SetUILanguage(int resID) noexcept {
case IDS_LANG_KOREAN:
lang = MAKELANGID(LANG_KOREAN, SUBLANG_DEFAULT);
break;
case IDS_LANG_POLISH:
lang = MAKELANGID(LANG_POLISH, SUBLANG_DEFAULT);
break;
case IDS_LANG_PORTUGUESE_BRAZIL:
lang = MAKELANGID(LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN);
break;
Expand Down
5 changes: 3 additions & 2 deletions matepath/src/matepath.rc
Original file line number Diff line number Diff line change
Expand Up @@ -613,8 +613,9 @@ BEGIN
IDS_LANG_GERMAN "Deutsch"
IDS_LANG_ITALIAN "Italiano"
IDS_LANG_PORTUGUESE_BRAZIL "Português (Brasil)"
IDS_LANG_FRENCH_FRANCE "Français"
IDS_LANG_RUSSIAN "Русский"
IDS_LANG_FRENCH_FRANCE "Français"
IDS_LANG_RUSSIAN "Русский"
IDS_LANG_POLISH "Polski"
END
#endif

Expand Down
3 changes: 2 additions & 1 deletion matepath/src/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@
#define IDS_LANG_PORTUGUESE_BRAZIL 40908
#define IDS_LANG_FRENCH_FRANCE 40909
#define IDS_LANG_RUSSIAN 40910
#define IDS_LANG_LAST_LANGUAGE IDS_LANG_RUSSIAN
#define IDS_LANG_POLISH 40911
#define IDS_LANG_LAST_LANGUAGE IDS_LANG_POLISH

#define ACC_ESCAPE 41001
#define ACC_NEXTCTL 41002
Expand Down
3 changes: 3 additions & 0 deletions src/Helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1480,6 +1480,9 @@ HMODULE LoadLocalizedResourceDLL(LANGID lang, LPCWSTR dllName) noexcept {
case LANG_KOREAN:
folder = L"ko";
break;
case LANG_POLISH:
folder = L"pl";
break;
case LANG_PORTUGUESE:
folder = L"pt-BR";
break;
Expand Down
7 changes: 7 additions & 0 deletions src/Notepad4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2188,6 +2188,9 @@ void ValidateUILangauge() noexcept {
case LANG_KOREAN:
languageMenu = IDM_LANG_KOREAN;
break;
case LANG_POLISH:
languageMenu = IDM_LANG_POLISH;
break;
case LANG_PORTUGUESE:
languageMenu = IDM_LANG_PORTUGUESE_BRAZIL;
break;
Expand Down Expand Up @@ -2232,6 +2235,9 @@ void SetUILanguage(int menu) noexcept {
case IDM_LANG_KOREAN:
lang = MAKELANGID(LANG_KOREAN, SUBLANG_DEFAULT);
break;
case IDM_LANG_POLISH:
lang = MAKELANGID(LANG_POLISH, SUBLANG_DEFAULT);
break;
case IDM_LANG_PORTUGUESE_BRAZIL:
lang = MAKELANGID(LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN);
break;
Expand Down Expand Up @@ -4530,6 +4536,7 @@ LRESULT MsgCommand(HWND hwnd, WPARAM wParam, LPARAM lParam) {
case IDM_LANG_PORTUGUESE_BRAZIL:
case IDM_LANG_FRENCH_FRANCE:
case IDM_LANG_RUSSIAN:
case IDM_LANG_POLISH:
SetUILanguage(LOWORD(wParam));
break;
#endif
Expand Down
2 changes: 2 additions & 0 deletions src/Notepad4.rc
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,9 @@ BEGIN
MENUITEM "English", IDM_LANG_ENGLISH_US
MENUITEM "Français", IDM_LANG_FRENCH_FRANCE
MENUITEM "Italiano", IDM_LANG_ITALIAN
MENUITEM "Polski", IDM_LANG_PORTUGUESE_BRAZIL
MENUITEM "Português (Brasil)", IDM_LANG_PORTUGUESE_BRAZIL
MENUITEM "Русский", IDM_LANG_RUSSIAN
MENUITEM "日本語", IDM_LANG_JAPANESE
MENUITEM "한국어", IDM_LANG_KOREAN
MENUITEM "中文(繁體)", IDM_LANG_CHINESE_TRADITIONAL
Expand Down
3 changes: 2 additions & 1 deletion src/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,8 @@
#define IDM_LANG_PORTUGUESE_BRAZIL 40658
#define IDM_LANG_FRENCH_FRANCE 40659
#define IDM_LANG_RUSSIAN 40660
#define IDM_LANG_LAST_LANGUAGE IDM_LANG_RUSSIAN
#define IDM_LANG_POLISH 40661
#define IDM_LANG_LAST_LANGUAGE IDM_LANG_POLISH

// resource id generated by tools/Misc.py
#define IDM_LEXER_TEXTFILE 40700
Expand Down

0 comments on commit 853516b

Please sign in to comment.