fix(color): Lua scripts do not see selected language when using ALL_LANGS build (#6937)

This commit is contained in:
philmoz
2026-01-04 08:09:34 +10:00
committed by GitHub
parent 900ce6316e
commit d96ddbb8a7
2 changed files with 16 additions and 1 deletions
+8
View File
@@ -1758,7 +1758,15 @@ static int luaGetGeneralSettings(lua_State * L)
lua_pushtablenumber(L, "battMin", (90+g_eeGeneral.vBatMin) * 0.1f);
lua_pushtablenumber(L, "battMax", (120+g_eeGeneral.vBatMax) * 0.1f);
lua_pushtableinteger(L, "imperial", g_eeGeneral.imperial);
#if defined(ALL_LANGS)
char l[3];
l[0] = toupper(g_eeGeneral.ttsLanguage[0]);
l[1] = toupper(g_eeGeneral.ttsLanguage[1]);
l[2] = 0;
lua_pushtablestring(L, "language", l);
#else
lua_pushtablestring(L, "language", TRANSLATIONS);
#endif
lua_pushtablestring(L, "voice", currentLanguagePack->id);
lua_pushtableinteger(L, "gtimer", g_eeGeneral.globalTimer);
return 1;