mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add translation for main menu
Add engine.gettext() and remove gettext() calls in guiFormspecMenu.cpp
This commit is contained in:
parent
787b43b218
commit
09a50d0458
13 changed files with 241 additions and 224 deletions
|
@ -980,6 +980,16 @@ int ModApiMainMenu::l_download_file(lua_State *L)
|
|||
return 1;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
int ModApiMainMenu::l_gettext(lua_State *L)
|
||||
{
|
||||
const char* str = luaL_checkstring(L, 1);
|
||||
str = gettext(str);
|
||||
lua_pushstring(L, str);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
void ModApiMainMenu::Initialize(lua_State *L, int top)
|
||||
{
|
||||
|
@ -1013,4 +1023,5 @@ void ModApiMainMenu::Initialize(lua_State *L, int top)
|
|||
API_FCT(get_modstore_list);
|
||||
API_FCT(sound_play);
|
||||
API_FCT(sound_stop);
|
||||
API_FCT(gettext);
|
||||
}
|
||||
|
|
|
@ -81,6 +81,8 @@ private:
|
|||
|
||||
static int l_sound_stop(lua_State *L);
|
||||
|
||||
static int l_gettext(lua_State *L);
|
||||
|
||||
//gui
|
||||
|
||||
static int l_show_keys_menu(lua_State *L);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue