Merge pull request #14 from AntumMT/intllib_update

Intllib update
master
Kilarin 2018-02-12 18:47:15 -06:00 committed by GitHub
commit ec96e18b3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 4 deletions

View File

@ -9,9 +9,13 @@ local growing_wall_maps=false
-- Boilerplate to support localized strings if intllib mod is installed.
local S
if (minetest.get_modpath("intllib")) then
if (minetest.global_exists("intllib")) then
dofile(minetest.get_modpath("intllib").."/intllib.lua")
S = intllib.Getter(minetest.get_current_modname())
if (intllib.make_gettext_pair) then
S = intllib.make_gettext_pair(minetest.get_current_modname())
else
S = intllib.Getter(minetest.get_current_modname())
end
else
S = function ( s ) return s end
end

View File

@ -16,8 +16,12 @@
-- Boilerplate to support localized strings if intllib mod is installed.
local S
if (minetest.get_modpath("intllib")) then
S = intllib.Getter()
if (minetest.global_exists("intllib")) then
if (intllib.make_gettext_pair) then
S = intllib.make_gettext_pair()
else
S = intllib.Getter()
end
else
S = function ( s ) return s end
end