aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/script/lua_api/l_mainmenu.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/script/lua_api/l_mainmenu.cpp b/src/script/lua_api/l_mainmenu.cpp
index 6417d1e18..55376690e 100644
--- a/src/script/lua_api/l_mainmenu.cpp
+++ b/src/script/lua_api/l_mainmenu.cpp
@@ -979,9 +979,8 @@ int ModApiMainMenu::l_download_file(lua_State *L)
/******************************************************************************/
int ModApiMainMenu::l_gettext(lua_State *L)
{
- const char* str = luaL_checkstring(L, 1);
- str = gettext(str);
- lua_pushstring(L, str);
+ std::wstring wtext = wstrgettext((std::string) luaL_checkstring(L, 1));
+ lua_pushstring(L, wide_to_narrow(wtext).c_str());
return 1;
}