Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace deprecated 'intllib' function: #382

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion concrete/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ local technic = rawget(_G, "technic") or {}
technic.concrete_posts = {}

-- Boilerplate to support localized strings if intllib mod is installed.
local S = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end
local S = rawget(_G, "intllib") and intllib.make_gettext_pair() or function(s) return s end

for i = 0, 31 do
minetest.register_alias("technic:concrete_post"..i,
Expand Down
2 changes: 1 addition & 1 deletion extranodes/init.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-- Minetest 0.4.6 mod: extranodes
-- namespace: technic
-- Boilerplate to support localized strings if intllib mod is installed.
local S = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end
local S = rawget(_G, "intllib") and intllib.make_gettext_pair() or function(s) return s end

if minetest.get_modpath("moreblocks") then

Expand Down
2 changes: 1 addition & 1 deletion technic/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ technic.modpath = modpath

-- Boilerplate to support intllib
if rawget(_G, "intllib") then
technic.getter = intllib.Getter()
technic.getter = intllib.make_gettext_pair()
else
technic.getter = function(s,a,...)if a==nil then return s end a={a,...}return s:gsub("(@?)@(%(?)(%d+)(%)?)",function(e,o,n,c)if e==""then return a[tonumber(n)]..(o==""and c or"")else return"@"..o..n..c end end) end
end
Expand Down
2 changes: 1 addition & 1 deletion technic/machines/MV/lighting.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
local S
if (minetest.get_modpath("intllib")) then
dofile(minetest.get_modpath("intllib").."/intllib.lua")
S = intllib.Getter(minetest.get_current_modname())
S = intllib.make_gettext_pair(minetest.get_current_modname())
else
S = function (s) return s end
end
Expand Down
2 changes: 1 addition & 1 deletion technic_chests/register.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local S = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end
local S = rawget(_G, "intllib") and intllib.make_gettext_pair() or function(s) return s end

local pipeworks = rawget(_G, "pipeworks")
local fs_helpers = rawget(_G, "fs_helpers")
Expand Down
2 changes: 1 addition & 1 deletion technic_worldgen/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local modpath = minetest.get_modpath("technic_worldgen")

technic = rawget(_G, "technic") or {}
technic.worldgen = {
gettext = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end,
gettext = rawget(_G, "intllib") and intllib.make_gettext_pair() or function(s) return s end,
}

dofile(modpath.."/config.lua")
Expand Down
2 changes: 1 addition & 1 deletion wrench/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dofile(modpath.."/support.lua")
dofile(modpath.."/technic.lua")

-- Boilerplate to support localized strings if intllib mod is installed.
local S = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end
local S = rawget(_G, "intllib") and intllib.make_gettext_pair() or function(s) return s end

local function get_meta_type(name, metaname)
local def = wrench.registered_nodes[name]
Expand Down