From c8a2b8904474edef17ba7c902950e5d9cc100f07 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sun, 14 Jun 2026 10:36:53 +0900 Subject: [PATCH] Windows: Fix partial GUI translation due to exhausted translation data pool The fixed-size data pool used by LoadLanguageData() in src/Common/Language.c stores the embedded English XML strings plus the selected language's XML strings. When AddPoolData() returns NULL because the 1 MB DATA_POOL_CAPACITY is exhausted, LoadLanguageData() aborts and returns FALSE. The callers ignore the return value, so the dictionary is left partially populated: later XML entries (many controls, warnings and newer dialogs) are missing while earlier entries, including most menu items, remain translated. Since 1.26.24 the XML language files have grown enough that several languages now overflow the pool (e.g. Corsican, French, German and Dutch). Increase DATA_POOL_CAPACITY in src/Common/Dictionary.h from 1 MB to 4 MB to accommodate current and near-future translations. This regression only affects the Windows version, which uses the Win32/C localization path with this fixed pool. Linux and macOS use wxWidgets/wxTranslations and do not use src/Common/Dictionary.c for GUI localization. Fixes: GH-1587 --- src/Common/Dictionary.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Common/Dictionary.h b/src/Common/Dictionary.h index 925af3d3..7483a4c4 100644 --- a/src/Common/Dictionary.h +++ b/src/Common/Dictionary.h @@ -19,7 +19,7 @@ extern "C" { #endif -#define DATA_POOL_CAPACITY 1000000 +#define DATA_POOL_CAPACITY 4000000 void AddDictionaryEntry (char *key, int intKey, void *value); void *GetDictionaryValue (const char *key);