local worldlist = nil
--------------------------------------------------------------------------------
-local function filterTP(TPlist)
- TPlist2 = {"None"}
- for _,i in ipairs(TPlist) do
+local function filter_texture_pack_list(list)
+ retval = {"None"}
+ for _,i in ipairs(list) do
if i~="base" then
- table.insert(TPlist2, i)
+ table.insert(retval, i)
end
end
- return TPlist2
+ return retval
end
--------------------------------------------------------------------------------
"field[1,2;10,2;;ERROR: " ..
gamedata.errormessage ..
";]"..
- "button[4.5,4.2;3,0.5;btn_error_confirm;Ok]"
+ "button[4.5,4.2;3,0.5;btn_error_confirm;" .. fgettext("Ok") .. "]"
else
formspec = formspec .. tabbuilder.gettab()
end
end
--------------------------------------------------------------------------------
-function menu.render_TP_list(TPlist)
+function menu.render_texture_pack_list(list)
local retval = ""
- --local current_TP = filterlist.get_list(TPlist)
-
- for i,v in ipairs(TPlist) do
+ for i,v in ipairs(list) do
if retval ~= "" then
retval = retval ..","
end
mglist = mglist:sub(1, -2)
local retval =
- "label[2,0;World name]"..
- "label[2,1;Mapgen]"..
+ "label[2,0;" .. fgettext("World name") .. "]"..
+ "label[2,1;" .. fgettext("Mapgen") .. "]"..
"field[4.5,0.4;6,0.5;te_world_name;;]" ..
- "label[2,2;Game]"..
- "button[5,4.5;2.6,0.5;world_create_confirm;Create]" ..
- "button[7.5,4.5;2.8,0.5;world_create_cancel;Cancel]" ..
+ "label[2,2;" .. fgettext("Game") .. "]"..
+ "button[5,4.5;2.6,0.5;world_create_confirm;" .. fgettext("Create") .. "]" ..
+ "button[7.5,4.5;2.8,0.5;world_create_cancel;" .. fgettext("Cancel") .. "]" ..
"dropdown[4.2,1;6.3;dd_mapgen;" .. mglist .. ";" .. selindex .. "]" ..
"textlist[4.2,1.9;5.8,2.3;games;" ..
gamemgr.gamelist() ..
--------------------------------------------------------------------------------
function tabbuilder.dialog_delete_world()
- return "label[2,2;Delete World \"" .. filterlist.get_raw_list(worldlist)[menu.world_to_del].name .. "\"?]"..
- "button[3.5,4.2;2.6,0.5;world_delete_confirm;Yes]" ..
- "button[6,4.2;2.8,0.5;world_delete_cancel;No]"
+ return "label[2,2;" ..
+ fgettext("Delete World \"$1\"?", filterlist.get_raw_list(worldlist)[menu.world_to_del].name) .. "]"..
+ "button[3.5,4.2;2.6,0.5;world_delete_confirm;" .. fgettext("Yes").. "]" ..
+ "button[6,4.2;2.8,0.5;world_delete_cancel;" .. fgettext("No") .. "]"
end
--------------------------------------------------------------------------------
end
if tabbuilder.current_tab == "texture_packs" then
- retval = retval .. tabbuilder.tab_TP()
+ retval = retval .. tabbuilder.tab_texture_packs()
end
if tabbuilder.current_tab == "credits" then
engine.setting_set("mg_name",fields["dd_mapgen"])
message = engine.create_world(worldname,gameindex)
else
- message = "A world named \"" .. worldname .. "\" already exists"
+ message = fgettext("A world named \"$1\" already exists", worldname)
end
if message ~= nil then
filterlist.raw_index_by_uid(worldlist,worldname))
end
else
- gamedata.errormessage = "No worldname given or no game selected"
+ gamedata.errormessage =
+ fgettext("No worldname given or no game selected")
end
end
end
--------------------------------------------------------------------------------
-function tabbuilder.handle_TP_buttons(fields)
+function tabbuilder.handle_texture_pack_buttons(fields)
if fields["TPs"] ~= nil then
local event = explode_textlist_event(fields["TPs"])
if event.typ == "CHG" or event.typ=="DCL" then
local index = engine.get_textlist_index("TPs")
engine.setting_set("mainmenu_last_selected_TP",
index)
- local TPlist = filterTP(engine.get_dirlist(engine.get_texturepath(), true))
- local TPname = TPlist[engine.get_textlist_index("TPs")]
- local TPpath = engine.get_texturepath()..DIR_DELIM..TPname
- if TPname == "None" then TPpath = "" end
- engine.setting_set("texture_path", TPpath)
+ local list = filter_texture_pack_list(engine.get_dirlist(engine.get_texturepath(), true))
+ local current_index = engine.get_textlist_index("TPs")
+ if #list >= current_index then
+ local new_path = engine.get_texturepath()..DIR_DELIM..list[current_index]
+ if list[current_index] == "None" then new_path = "" end
+
+ engine.setting_set("texture_path", new_path)
+ end
end
end
end
tabbuilder.show_buttons = true
tabbuilder.current_buttons = {}
- table.insert(tabbuilder.current_buttons,{name="singleplayer", caption="Singleplayer"})
- table.insert(tabbuilder.current_buttons,{name="multiplayer", caption="Client"})
- table.insert(tabbuilder.current_buttons,{name="server", caption="Server"})
- table.insert(tabbuilder.current_buttons,{name="settings", caption="Settings"})
- table.insert(tabbuilder.current_buttons,{name="texture_packs", caption="Texture Packs"})
+ table.insert(tabbuilder.current_buttons,{name="singleplayer", caption=fgettext("Singleplayer")})
+ table.insert(tabbuilder.current_buttons,{name="multiplayer", caption=fgettext("Client")})
+ table.insert(tabbuilder.current_buttons,{name="server", caption=fgettext("Server")})
+ table.insert(tabbuilder.current_buttons,{name="settings", caption=fgettext("Settings")})
+ table.insert(tabbuilder.current_buttons,{name="texture_packs", caption=fgettext("Texture Packs")})
if engine.setting_getbool("main_menu_game_mgr") then
- table.insert(tabbuilder.current_buttons,{name="game_mgr", caption="Games"})
+ table.insert(tabbuilder.current_buttons,{name="game_mgr", caption=fgettext("Games")})
end
if engine.setting_getbool("main_menu_mod_mgr") then
- table.insert(tabbuilder.current_buttons,{name="mod_mgr", caption="Mods"})
+ table.insert(tabbuilder.current_buttons,{name="mod_mgr", caption=fgettext("Mods")})
end
- table.insert(tabbuilder.current_buttons,{name="credits", caption="Credits"})
+ table.insert(tabbuilder.current_buttons,{name="credits", caption=fgettext("Credits")})
for i=1,#tabbuilder.current_buttons,1 do
function tabbuilder.tab_multiplayer()
local retval =
- "vertlabel[0,-0.25;CLIENT]" ..
- "label[1,-0.25;Favorites:]"..
- "label[1,4.25;Address/Port]"..
- "label[9,2.75;Name/Password]" ..
+ "vertlabel[0,-0.25;".. fgettext("CLIENT") .. "]" ..
+ "label[1,-0.25;".. fgettext("Favorites:") .. "]"..
+ "label[1,4.25;".. fgettext("Address/Port") .. "]"..
+ "label[9,2.75;".. fgettext("Name/Password") .. "]" ..
"field[1.25,5.25;5.5,0.5;te_address;;" ..engine.setting_get("address") .."]" ..
"field[6.75,5.25;2.25,0.5;te_port;;" ..engine.setting_get("port") .."]" ..
- "checkbox[1,3.6;cb_public_serverlist;Public Serverlist;" ..
+ "checkbox[1,3.6;cb_public_serverlist;".. fgettext("Public Serverlist") .. ";" ..
dump(engine.setting_getbool("public_serverlist")) .. "]"
if not engine.setting_getbool("public_serverlist") then
retval = retval ..
- "button[6.45,3.95;2.25,0.5;btn_delete_favorite;Delete]"
+ "button[6.45,3.95;2.25,0.5;btn_delete_favorite;".. fgettext("Delete") .. "]"
end
retval = retval ..
- "button[9,4.95;2.5,0.5;btn_mp_connect;Connect]" ..
+ "button[9,4.95;2.5,0.5;btn_mp_connect;".. fgettext("Connect") .. "]" ..
"field[9.3,3.75;2.5,0.5;te_name;;" ..engine.setting_get("name") .."]" ..
"pwdfield[9.3,4.5;2.5,0.5;te_pwd;]" ..
"textarea[9.3,0.25;2.5,2.75;;"
)
local retval =
- "button[4,4.15;2.6,0.5;world_delete;Delete]" ..
- "button[6.5,4.15;2.8,0.5;world_create;New]" ..
- "button[9.2,4.15;2.55,0.5;world_configure;Configure]" ..
- "button[8.5,4.9;3.25,0.5;start_server;Start Game]" ..
- "label[4,-0.25;Select World:]"..
- "vertlabel[0,-0.25;START SERVER]" ..
- "checkbox[0.5,0.25;cb_creative_mode;Creative Mode;" ..
+ "button[4,4.15;2.6,0.5;world_delete;".. fgettext("Delete") .. "]" ..
+ "button[6.5,4.15;2.8,0.5;world_create;".. fgettext("New") .. "]" ..
+ "button[9.2,4.15;2.55,0.5;world_configure;".. fgettext("Configure") .. "]" ..
+ "button[8.5,4.9;3.25,0.5;start_server;".. fgettext("Start Game") .. "]" ..
+ "label[4,-0.25;".. fgettext("Select World:") .. "]"..
+ "vertlabel[0,-0.25;".. fgettext("START SERVER") .. "]" ..
+ "checkbox[0.5,0.25;cb_creative_mode;".. fgettext("Creative Mode") .. ";" ..
dump(engine.setting_getbool("creative_mode")) .. "]"..
- "checkbox[0.5,0.7;cb_enable_damage;Enable Damage;" ..
+ "checkbox[0.5,0.7;cb_enable_damage;".. fgettext("Enable Damage") .. ";" ..
dump(engine.setting_getbool("enable_damage")) .. "]"..
- "checkbox[0.5,1.15;cb_server_announce;Public;" ..
+ "checkbox[0.5,1.15;cb_server_announce;".. fgettext("Public") .. ";" ..
dump(engine.setting_getbool("server_announce")) .. "]"..
- "field[0.8,3.2;3,0.5;te_playername;Name;" ..
+ "field[0.8,3.2;3,0.5;te_playername;".. fgettext("Name") .. ";" ..
engine.setting_get("name") .. "]" ..
- "pwdfield[0.8,4.2;3,0.5;te_passwd;Password]" ..
- "field[0.8,5.2;3,0.5;te_serverport;Server Port;30000]" ..
+ "pwdfield[0.8,4.2;3,0.5;te_passwd;".. fgettext("Password") .. "]" ..
+ "field[0.8,5.2;3,0.5;te_serverport;".. fgettext("Server Port") .. ";30000]" ..
"textlist[4,0.25;7.5,3.7;srv_worlds;" ..
menu.render_world_list() ..
";" .. index .. "]"
--------------------------------------------------------------------------------
function tabbuilder.tab_settings()
- return "vertlabel[0,0;SETTINGS]" ..
- "checkbox[1,0.75;cb_fancy_trees;Fancy trees;" .. dump(engine.setting_getbool("new_style_leaves")) .. "]"..
- "checkbox[1,1.25;cb_smooth_lighting;Smooth Lighting;".. dump(engine.setting_getbool("smooth_lighting")) .. "]"..
- "checkbox[1,1.75;cb_3d_clouds;3D Clouds;" .. dump(engine.setting_getbool("enable_3d_clouds")) .. "]"..
- "checkbox[1,2.25;cb_opaque_water;Opaque Water;" .. dump(engine.setting_getbool("opaque_water")) .. "]"..
+ return "vertlabel[0,0;" .. fgettext("SETTINGS") .. "]" ..
+ "checkbox[1,0.75;cb_fancy_trees;".. fgettext("Fancy trees") .. ";"
+ .. dump(engine.setting_getbool("new_style_leaves")) .. "]"..
+ "checkbox[1,1.25;cb_smooth_lighting;".. fgettext("Smooth Lighting")
+ .. ";".. dump(engine.setting_getbool("smooth_lighting")) .. "]"..
+ "checkbox[1,1.75;cb_3d_clouds;".. fgettext("3D Clouds") .. ";"
+ .. dump(engine.setting_getbool("enable_3d_clouds")) .. "]"..
+ "checkbox[1,2.25;cb_opaque_water;".. fgettext("Opaque Water") .. ";"
+ .. dump(engine.setting_getbool("opaque_water")) .. "]"..
- "checkbox[4,0.75;cb_mipmapping;Mip-Mapping;" .. dump(engine.setting_getbool("mip_map")) .. "]"..
- "checkbox[4,1.25;cb_anisotrophic;Anisotropic Filtering;".. dump(engine.setting_getbool("anisotropic_filter")) .. "]"..
- "checkbox[4,1.75;cb_bilinear;Bi-Linear Filtering;" .. dump(engine.setting_getbool("bilinear_filter")) .. "]"..
- "checkbox[4,2.25;cb_trilinear;Tri-Linear Filtering;" .. dump(engine.setting_getbool("trilinear_filter")) .. "]"..
+ "checkbox[4,0.75;cb_mipmapping;".. fgettext("Mip-Mapping") .. ";"
+ .. dump(engine.setting_getbool("mip_map")) .. "]"..
+ "checkbox[4,1.25;cb_anisotrophic;".. fgettext("Anisotropic Filtering") .. ";"
+ .. dump(engine.setting_getbool("anisotropic_filter")) .. "]"..
+ "checkbox[4,1.75;cb_bilinear;".. fgettext("Bi-Linear Filtering") .. ";"
+ .. dump(engine.setting_getbool("bilinear_filter")) .. "]"..
+ "checkbox[4,2.25;cb_trilinear;".. fgettext("Tri-Linear Filtering") .. ";"
+ .. dump(engine.setting_getbool("trilinear_filter")) .. "]"..
- "checkbox[7.5,0.75;cb_shaders;Shaders;" .. dump(engine.setting_getbool("enable_shaders")) .. "]"..
- "checkbox[7.5,1.25;cb_pre_ivis;Preload item visuals;".. dump(engine.setting_getbool("preload_item_visuals")) .. "]"..
- "checkbox[7.5,1.75;cb_particles;Enable Particles;" .. dump(engine.setting_getbool("enable_particles")) .. "]"..
- "checkbox[7.5,2.25;cb_finite_liquid;Finite Liquid;" .. dump(engine.setting_getbool("liquid_finite")) .. "]"..
+ "checkbox[7.5,0.75;cb_shaders;".. fgettext("Shaders") .. ";"
+ .. dump(engine.setting_getbool("enable_shaders")) .. "]"..
+ "checkbox[7.5,1.25;cb_pre_ivis;".. fgettext("Preload item visuals") .. ";"
+ .. dump(engine.setting_getbool("preload_item_visuals")) .. "]"..
+ "checkbox[7.5,1.75;cb_particles;".. fgettext("Enable Particles") .. ";"
+ .. dump(engine.setting_getbool("enable_particles")) .. "]"..
+ "checkbox[7.5,2.25;cb_finite_liquid;".. fgettext("Finite Liquid") .. ";"
+ .. dump(engine.setting_getbool("liquid_finite")) .. "]"..
- "button[1,4.25;2.25,0.5;btn_change_keys;Change keys]"
+ "button[1,4.25;2.25,0.5;btn_change_keys;".. fgettext("Change keys") .. "]"
end
--------------------------------------------------------------------------------
tonumber(engine.setting_get("mainmenu_last_selected_world"))
)
- return "button[4,4.15;2.6,0.5;world_delete;Delete]" ..
- "button[6.5,4.15;2.8,0.5;world_create;New]" ..
- "button[9.2,4.15;2.55,0.5;world_configure;Configure]" ..
- "button[8.5,4.95;3.25,0.5;play;Play]" ..
- "label[4,-0.25;Select World:]"..
- "vertlabel[0,-0.25;SINGLE PLAYER]" ..
- "checkbox[0.5,0.25;cb_creative_mode;Creative Mode;" ..
+ return "button[4,4.15;2.6,0.5;world_delete;".. fgettext("Delete") .. "]" ..
+ "button[6.5,4.15;2.8,0.5;world_create;".. fgettext("New") .. "]" ..
+ "button[9.2,4.15;2.55,0.5;world_configure;".. fgettext("Configure") .. "]" ..
+ "button[8.5,4.95;3.25,0.5;play;".. fgettext("Play") .. "]" ..
+ "label[4,-0.25;".. fgettext("Select World:") .. "]"..
+ "vertlabel[0,-0.25;".. fgettext("SINGLE PLAYER") .. "]" ..
+ "checkbox[0.5,0.25;cb_creative_mode;".. fgettext("Creative Mode") .. ";" ..
dump(engine.setting_getbool("creative_mode")) .. "]"..
- "checkbox[0.5,0.7;cb_enable_damage;Enable Damage;" ..
+ "checkbox[0.5,0.7;cb_enable_damage;".. fgettext("Enable Damage") .. ";" ..
dump(engine.setting_getbool("enable_damage")) .. "]"..
"textlist[4,0.25;7.5,3.7;sp_worlds;" ..
menu.render_world_list() ..
end
--------------------------------------------------------------------------------
-function tabbuilder.tab_TP()
- local TPpath = engine.setting_get("texture_path")
- local TPlist = filterTP(engine.get_dirlist(engine.get_texturepath(), true))
+function tabbuilder.tab_texture_packs()
+ local retval = "label[4,-0.25;".. fgettext("Select texture pack:") .. "]"..
+ "vertlabel[0,-0.25;".. fgettext("TEXTURE PACKS") .. "]" ..
+ "textlist[4,0.25;7.5,5.0;TPs;"
+
+ local current_texture_path = engine.setting_get("texture_path")
+ local list = filter_texture_pack_list(engine.get_dirlist(engine.get_texturepath(), true))
local index = tonumber(engine.setting_get("mainmenu_last_selected_TP"))
+
if index == nil then index = 1 end
- if TPpath == "" then
- return "label[4,-0.25;Select texture pack:]"..
- "vertlabel[0,-0.25;TEXTURE PACKS]" ..
- "textlist[4,0.25;7.5,5.0;TPs;" ..
- menu.render_TP_list(TPlist) ..
+
+ if current_texture_path == "" then
+ retval = retval ..
+ menu.render_texture_pack_list(list) ..
";" .. index .. "]"
+ return retval
end
- local TPinfofile = TPpath..DIR_DELIM.."info.txt"
- local f = io.open(TPinfofile, "r")
- if f==nil then
- menu.TPinfo = "No information available"
- else
- menu.TPinfo = f:read("*all")
- f:close()
- end
- local TPscreenfile = TPpath..DIR_DELIM.."screenshot.png"
- local f = io.open(TPscreenfile, "r")
+
+ local infofile = current_texture_path ..DIR_DELIM.."info.txt"
+ local infotext = ""
+ local f = io.open(infofile, "r")
if f==nil then
- menu.TPscreen = nil
+ infotext = fgettext("No information available")
else
- menu.TPscreen = TPscreenfile
+ infotext = f:read("*all")
f:close()
end
- local no_screenshot = engine.get_texturepath()..DIR_DELIM.."base"..DIR_DELIM.."pack"..DIR_DELIM.."no_screenshot.png"
+ local screenfile = current_texture_path..DIR_DELIM.."screenshot.png"
+ local no_screenshot = nil
+ if not file_exists(screenfile) then
+ screenfile = nil
+ no_screenshot = engine.get_texturepath()..DIR_DELIM..
+ "base"..DIR_DELIM.."pack"..DIR_DELIM.."no_screenshot.png"
+ end
- return "label[4,-0.25;Select texture pack:]"..
- "vertlabel[0,-0.25;TEXTURE PACKS]" ..
- "textlist[4,0.25;7.5,5.0;TPs;" ..
- menu.render_TP_list(TPlist) ..
+ return retval ..
+ menu.render_texture_pack_list(list) ..
";" .. index .. "]" ..
- "image[0.65,0.25;4.0,3.7;"..(menu.TPscreen or no_screenshot).."]"..
- "textarea[1.0,3.25;3.7,1.5;;"..engine.formspec_escape(menu.TPinfo or "")..";]"
+ "image[0.65,0.25;4.0,3.7;"..(screenfile or no_screenshot).."]"..
+ "textarea[1.0,3.25;3.7,1.5;;"..engine.formspec_escape(infotext or "")..";]"
end
--------------------------------------------------------------------------------
"label[0.5,3.3;http://minetest.net]" ..
"image[0.5,1;" .. menu.defaulttexturedir .. "logo.png]" ..
"textlist[3.5,-0.25;8.5,5.8;list_credits;" ..
- "#FFFF00Core Developers," ..
+ "#FFFF00" .. fgettext("Core Developers") .."," ..
"Perttu Ahola (celeron55) <celeron55@gmail.com>,"..
"Ryan Kwolek (kwolekr) <kwolekr@minetest.net>,"..
"PilzAdam <pilzadam@minetest.net>," ..
"sfan5 <sfan5@live.de>,"..
"kahrl <kahrl@gmx.net>,"..
","..
- "#FFFF00Active Contributors," ..
+ "#FFFF00" .. fgettext("Active Contributors") .. "," ..
"sapier,"..
"Vanessa Ezekowitz (VanessaE) <vanessaezekowitz@gmail.com>,"..
"Jurgen Doser (doserj) <jurgen.doser@gmail.com>,"..
"dannydark <the_skeleton_of_a_child@yahoo.co.uk>,"..
"0gb.us <0gb.us@0gb.us>,"..
"," ..
- "#FFFF00Previous Contributors," ..
+ "#FFFF00" .. fgettext("Previous Contributors") .. "," ..
"Guiseppe Bilotta (Oblomov) <guiseppe.bilotta@gmail.com>,"..
"Jonathan Neuschafer <j.neuschaefer@gmx.net>,"..
"Nils Dagsson Moskopp (erlehmann) <nils@dieweltistgarnichtso.net>,"..
end
if tabbuilder.current_tab == "texture_packs" then
- tabbuilder.handle_TP_buttons(fields)
+ tabbuilder.handle_texture_pack_buttons(fields)
end
if tabbuilder.current_tab == "multiplayer" then
end
local retval =
- "vertlabel[0,-0.25;MODS]" ..
- "label[0.8,-0.25;Installed Mods:]" ..
+ "vertlabel[0,-0.25;".. fgettext("MODS") .. "]" ..
+ "label[0.8,-0.25;".. fgettext("Installed Mods:") .. "]" ..
"textlist[0.75,0.25;4.5,4.3;modlist;" ..
modmgr.render_modlist(modmgr.global_mods) ..
";" .. modmgr.selected_mod .. "]"
retval = retval ..
- "button[1,4.85;2,0.5;btn_mod_mgr_install_local;Install]" ..
- "button[3,4.85;2,0.5;btn_mod_mgr_download;Download]"
+ "button[1,4.85;2,0.5;btn_mod_mgr_install_local;".. fgettext("Install") .. "]" ..
+ "button[3,4.85;2,0.5;btn_mod_mgr_download;".. fgettext("Download") .. "]"
local selected_mod = nil
if selected_mod ~= nil then
if selected_mod.is_modpack then
- retval = retval .. "button[10,4.85;2,0.5;btn_mod_mgr_rename_modpack;Rename]"
+ retval = retval
+ .. "button[10,4.85;2,0.5;btn_mod_mgr_rename_modpack;" ..
+ fgettext("Rename") .. "]"
else
--show dependencies
retval = retval ..
- "label[6,1.9;Depends:]" ..
+ "label[6,1.9;".. fgettext("Depends:") .. "]" ..
"textlist[6,2.4;5.7,2;deplist;"
toadd = modmgr.get_dependencies(selected_mod.path)
--TODO read modinfo
end
--show delete button
- retval = retval .. "button[8,4.85;2,0.5;btn_mod_mgr_delete_mod;Delete]"
+ retval = retval .. "button[8,4.85;2,0.5;btn_mod_mgr_delete_mod;"
+ .. fgettext("Delete") .. "]"
end
return retval
end
local mod = filterlist.get_list(modmgr.modlist)[modmgr.selected_mod]
local retval =
- "label[1.75,1;Rename Modpack:]"..
+ "label[1.75,1;".. fgettext("Rename Modpack:") .. "]"..
"field[4.5,1.4;6,0.5;te_modpack_name;;" ..
mod.name ..
"]" ..
- "button[5,4.2;2.6,0.5;dlg_rename_modpack_confirm;Accept]" ..
- "button[7.5,4.2;2.8,0.5;dlg_rename_modpack_cancel;Cancel]"
+ "button[5,4.2;2.6,0.5;dlg_rename_modpack_confirm;"..
+ fgettext("Accept") .. "]" ..
+ "button[7.5,4.2;2.8,0.5;dlg_rename_modpack_cancel;"..
+ fgettext("Cancel") .. "]"
return retval
end
local retval =
"size[11,6.5]" ..
- "label[1.5,-0.25;World: " .. worldspec.name .. "]"
+ "label[0.5,-0.25;" .. fgettext("World:") .. "]" ..
+ "label[1.75,-0.25;" .. worldspec.name .. "]"
if modmgr.hide_gamemods then
- retval = retval .. "checkbox[0,5.75;cb_hide_gamemods;Hide Game;true]"
+ retval = retval .. "checkbox[0,5.75;cb_hide_gamemods;" .. fgettext("Hide Game") .. ";true]"
else
- retval = retval .. "checkbox[0,5.75;cb_hide_gamemods;Hide Game;false]"
+ retval = retval .. "checkbox[0,5.75;cb_hide_gamemods;" .. fgettext("Hide Game") .. ";false]"
end
if modmgr.hide_modpackcontents then
- retval = retval .. "checkbox[2,5.75;cb_hide_mpcontent;Hide mp content;true]"
+ retval = retval .. "checkbox[2,5.75;cb_hide_mpcontent;" .. fgettext("Hide mp content") .. ";true]"
else
- retval = retval .. "checkbox[2,5.75;cb_hide_mpcontent;Hide mp content;false]"
+ retval = retval .. "checkbox[2,5.75;cb_hide_mpcontent;" .. fgettext("Hide mp content") .. ";false]"
end
if mod == nil then
mod = {name=""}
end
retval = retval ..
- "label[0,0.45;Mod:]" ..
+ "label[0,0.45;" .. fgettext("Mod:") .. "]" ..
"label[0.75,0.45;" .. mod.name .. "]" ..
- "label[0,1;Depends:]" ..
+ "label[0,1;" .. fgettext("Depends:") .. "]" ..
"textlist[0,1.5;5,4.25;world_config_depends;" ..
modmgr.get_dependencies(mod.path) .. ";0]" ..
- "button[9.25,6.35;2,0.5;btn_config_world_save;Save]" ..
- "button[7.4,6.35;2,0.5;btn_config_world_cancel;Cancel]"
+ "button[9.25,6.35;2,0.5;btn_config_world_save;" .. fgettext("Save") .. "]" ..
+ "button[7.4,6.35;2,0.5;btn_config_world_cancel;" .. fgettext("Cancel") .. "]"
if mod ~= nil and mod.name ~= "" then
if mod.is_modpack then
end
if all_enabled == false then
- retval = retval .. "button[5.5,-0.125;2,0.5;btn_mp_enable;Enable MP]"
+ retval = retval .. "button[5.5,-0.125;2,0.5;btn_mp_enable;" .. fgettext("Enable MP") .. "]"
else
- retval = retval .. "button[5.5,-0.125;2,0.5;btn_mp_disable;Disable MP]"
+ retval = retval .. "button[5.5,-0.125;2,0.5;btn_mp_disable;" .. fgettext("Disable MP") .. "]"
end
else
if mod.enabled then
- retval = retval .. "checkbox[5.5,-0.375;cb_mod_enable;enabled;true]"
+ retval = retval .. "checkbox[5.5,-0.375;cb_mod_enable;" .. fgettext("enabled") .. ";true]"
else
- retval = retval .. "checkbox[5.5,-0.375;cb_mod_enable;enabled;false]"
+ retval = retval .. "checkbox[5.5,-0.375;cb_mod_enable;" .. fgettext("enabled") .. ";false]"
end
end
-
end
retval = retval ..
- "button[8.5,-0.125;2.5,0.5;btn_all_mods;Enable all]" ..
+ "button[8.5,-0.125;2.5,0.5;btn_all_mods;" .. fgettext("Enable all") .. "]" ..
"textlist[5.5,0.5;5.5,5.75;world_config_modlist;"
retval = retval .. modmgr.render_modlist(modmgr.modlist)
end
if fields["btn_mod_mgr_install_local"] ~= nil then
- engine.show_file_open_dialog("mod_mgt_open_dlg","Select Mod File:")
+ engine.show_file_open_dialog("mod_mgt_open_dlg",fgettext("Select Mod File:"))
end
if fields["btn_mod_mgr_download"] ~= nil then
local modpath = modmgr.extract(modfile)
if modpath == nil then
- gamedata.errormessage = "Install Mod: file: " .. modfile.name ..
- "\nInstall Mod: unsupported filetype \"" .. modfile.type .. "\""
+ gamedata.errormessage = fgettext("Install Mod: file: \"$1\"", modfile.name) ..
+ fgettext("\nInstall Mod: unsupported filetype \"$1\"", modfile.type)
return
end
if clean_path ~= nil then
local targetpath = engine.get_modpath() .. DIR_DELIM .. clean_path
if not engine.copy_dir(basefolder.path,targetpath) then
- gamedata.errormessage = "Failed to install " .. basename .. " to " .. targetpath
+ gamedata.errormessage = fgettext("Failed to install $1 to $2", basename, targetpath)
end
else
- gamedata.errormessage = "Install Mod: unable to find suitable foldername for modpack "
- .. modfilename
+ gamedata.errormessage = fgettext("Install Mod: unable to find suitable foldername for modpack $1", modfilename)
end
end
local targetpath = engine.get_modpath() .. DIR_DELIM .. targetfolder
engine.copy_dir(basefolder.path,targetpath)
else
- gamedata.errormessage = "Install Mod: unable to find real modname for: "
- .. modfilename
+ gamedata.errormessage = fgettext("Install Mod: unable to find real modname for: $1", modfilename)
end
end
mod.path ~= "" and
mod.path ~= engine.get_modpath() then
if not engine.delete_dir(mod.path) then
- gamedata.errormessage ="Modmgr: failed to delete >" .. mod.path .. "<"
+ gamedata.errormessage = fgettext("Modmgr: failed to delete \"$1\"", mod.path)
end
modmgr.refresh_globals()
else
- gamedata.errormessage ="Modmgr: invalid modpath >" .. mod.path .. "<"
+ gamedata.errormessage = fgettext("Modmgr: invalid modpath \"$1\"", mod.path)
end
end
local mod = filterlist.get_list(modmgr.global_mods)[modmgr.selected_mod]
local retval =
- "field[1.75,1;10,3;;Are you sure you want to delete ".. mod.name .. "?;]"..
- "button[4,4.2;1,0.5;dlg_delete_mod_confirm;Yes]" ..
- "button[6.5,4.2;3,0.5;dlg_delete_mod_cancel;No of course not!]"
+ "field[1.75,1;10,3;;" .. fgettext("Are you sure you want to delete \"$1\"?", mod.name) .. ";]"..
+ "button[4,4.2;1,0.5;dlg_delete_mod_confirm;" .. fgettext("Yes") .. "]" ..
+ "button[6.5,4.2;3,0.5;dlg_delete_mod_cancel;" .. fgettext("No of course not!") .. "]"
return retval
end