Merge pull request #3248 from hpwamr/mui

MUI - Sync the layout of "resource.h" file for "#define MUI_BASE_LNG"
This commit is contained in:
Pairi Daiza 2021-03-30 20:35:40 +02:00 committed by GitHub
commit 7b97aca03e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 51 additions and 49 deletions

View File

@ -1,27 +1,29 @@
====================================================================================================
=== How to build a NON MUI Notepad3 version for desired Language ===
=== How to build a NON MUI Notepad3 version for desired Language (Mono-language) ===
====================================================================================================
I. Edit ".\src\resource.h":
- Comment-out define "HAVE_DYN_LOAD_LIBS_MUI_LNGS" => "///#define HAVE_DYN_LOAD_LIBS_MUI_LNGS 1"
Important: Make all modifications with a text editor (not Resource-Editor), e.g. Notepad3
----------
I. Edit: ".\src\resource.h"
".\minipath\src\resource.h"
- Comment-out define "HAVE_DYN_LOAD_LIBS_MUI_LNGS" => "//#define HAVE_DYN_LOAD_LIBS_MUI_LNGS 1"
- Enable next define for the desired Base Language, e.g. "#define MUI_BASE_LNG_DE_DE 1" for German
(Keep all other Base Language defines in comments)
II. Edit ".\src\Notepad3.rc" with text editor (not Resource-Editor), e.g. Notepad3:
- Ensure, that the desired Base Language (previous define) #includes corresponding Language resources.
(Keep all other Base Languages #define in comments)
II. Edit ".\src\Notepad3.rc":
".\minipath\src\Notepad3.rc"
- Make sure that the desired Base Language (previous #define) #includes the
corresponding Language resources.
(At the begin of the Notepad3.rc file _AND_ at the end of this file (the real include section)
III. (Re-)Compile Notepad3 project
The resulting Notepad3.exe does not has the ability to change the language (MUI) anymore.
III. (Re-)Compile the Notepad3 project
The resulting Notepad3.exe and Minipath.exe are Mono-langue (if as #define above: German only).
---------------------------------------------------------------------------------------------------
TODOs:
------
- #define LanguageID in resource.h (e.g. "de-DE" too, to set language for common system controls, etc.)
- make Mono-Language MiniPath.exe too
- if building MUI DLLs but using other Base Language than "en-US", need to refactor Language Menu accordingly
-

View File

@ -18,7 +18,7 @@
#define HAVE_DYN_LOAD_LIBS_MUI_LNGS 1
// -----------------------------------------------------
#ifdef HAVE_DYN_LOAD_LIBS_MUI_LNGS
// currently only en-US allowed for Base-Lng in MUI env
// currently only en-US allowed for Base-Lng in MUI env
#define MUI_BASE_LNG_EN_US 1
#else
// 2. Uncomment one of the following lines
@ -51,7 +51,7 @@
//#define MUI_BASE_LNG_ZH_TW 1
#endif
// -----------------------------------------------------
// 3. extent minipath.rc file accordingly (new language)
// 3. Extent minipath.rc file accordingly (new language)
// -----------------------------------------------------
#include "../language/common_res.h"

View File

@ -16,40 +16,40 @@
#define HAVE_DYN_LOAD_LIBS_MUI_LNGS 1
// -----------------------------------------------------
#ifdef HAVE_DYN_LOAD_LIBS_MUI_LNGS
// currently only en-US allowed for Base-Lng in MUI env
#define MUI_BASE_LNG_EN_US 1
// currently only en-US allowed for Base-Lng in MUI env
#define MUI_BASE_LNG_EN_US 1
#else
// 2. Uncomment one of the following lines
// according to the desired Language
#define MUI_BASE_LNG_EN_US 1
//#define MUI_BASE_LNG_AF_ZA 1
//#define MUI_BASE_LNG_BE_BY 1
//#define MUI_BASE_LNG_DE_DE 1
//#define MUI_BASE_LNG_EL_GR 1
//#define MUI_BASE_LNG_EN_GB 1
//#define MUI_BASE_LNG_ES_419 1
//#define MUI_BASE_LNG_ES_ES 1
//#define MUI_BASE_LNG_FR_FR 1
//#define MUI_BASE_LNG_HI_IN 1
//#define MUI_BASE_LNG_HU_HU 1
//#define MUI_BASE_LNG_ID_ID 1
//#define MUI_BASE_LNG_IT_IT 1
//#define MUI_BASE_LNG_JA_JP 1
//#define MUI_BASE_LNG_KO_KR 1
//#define MUI_BASE_LNG_NL_NL 1
//#define MUI_BASE_LNG_PL_PL 1
//#define MUI_BASE_LNG_PT_BR 1
//#define MUI_BASE_LNG_PT_PT 1
//#define MUI_BASE_LNG_RU_RU 1
//#define MUI_BASE_LNG_SK_SK 1
//#define MUI_BASE_LNG_SV_SE 1
//#define MUI_BASE_LNG_TR_TR 1
//#define MUI_BASE_LNG_VI_VN 1
//#define MUI_BASE_LNG_ZH_CN 1
//#define MUI_BASE_LNG_ZH_TW 1
//#define MUI_BASE_LNG_EN_US 1
//#define MUI_BASE_LNG_AF_ZA 1
//#define MUI_BASE_LNG_BE_BY 1
//#define MUI_BASE_LNG_DE_DE 1
//#define MUI_BASE_LNG_EL_GR 1
//#define MUI_BASE_LNG_EN_GB 1
//#define MUI_BASE_LNG_ES_419 1
//#define MUI_BASE_LNG_ES_ES 1
//#define MUI_BASE_LNG_FR_FR 1
//#define MUI_BASE_LNG_HI_IN 1
//#define MUI_BASE_LNG_HU_HU 1
//#define MUI_BASE_LNG_ID_ID 1
//#define MUI_BASE_LNG_IT_IT 1
//#define MUI_BASE_LNG_JA_JP 1
//#define MUI_BASE_LNG_KO_KR 1
//#define MUI_BASE_LNG_NL_NL 1
//#define MUI_BASE_LNG_PL_PL 1
//#define MUI_BASE_LNG_PT_BR 1
//#define MUI_BASE_LNG_PT_PT 1
//#define MUI_BASE_LNG_RU_RU 1
//#define MUI_BASE_LNG_SK_SK 1
//#define MUI_BASE_LNG_SV_SE 1
//#define MUI_BASE_LNG_TR_TR 1
//#define MUI_BASE_LNG_VI_VN 1
//#define MUI_BASE_LNG_ZH_CN 1
//#define MUI_BASE_LNG_ZH_TW 1
#endif
// -----------------------------------------------------
// 3. extent Notepad3.rc file accordingly (new language)
// 3. Extent Notepad3.rc file accordingly (new language)
// -----------------------------------------------------
// ==========================================