forked from minetest-mods/unified_inventory
Ensure formspec escaping for translated strings
This commit is contained in:
4
init.lua
4
init.lua
@ -2,6 +2,7 @@
|
||||
|
||||
local modpath = minetest.get_modpath(minetest.get_current_modname())
|
||||
local worldpath = minetest.get_worldpath()
|
||||
local mygettext = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end
|
||||
|
||||
-- Data tables definitions
|
||||
unified_inventory = {
|
||||
@ -31,7 +32,8 @@ unified_inventory = {
|
||||
default = "craft",
|
||||
|
||||
-- intllib
|
||||
gettext = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end,
|
||||
gettext = mygettext,
|
||||
fgettext = function(s) return minetest.formspec_escape(mygettext(s)) end,
|
||||
|
||||
-- "Lite" mode
|
||||
lite_mode = minetest.setting_getbool("unified_inventory_lite"),
|
||||
|
Reference in New Issue
Block a user