mirror of
				https://github.com/mt-mods/homedecor_modpack.git
				synced 2025-11-04 14:55:35 +01:00 
			
		
		
		
	use current intllib API
This commit is contained in:
		@@ -1 +1,3 @@
 | 
				
			|||||||
default
 | 
					default
 | 
				
			||||||
 | 
					intllib?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,12 +5,11 @@
 | 
				
			|||||||
-- This file defines some items in order to not have to depend on other mods.
 | 
					-- This file defines some items in order to not have to depend on other mods.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- Boilerplate to support localized strings if intllib mod is installed.
 | 
					-- Boilerplate to support localized strings if intllib mod is installed.
 | 
				
			||||||
local S;
 | 
					local S
 | 
				
			||||||
if (minetest.get_modpath("intllib")) then
 | 
					if minetest.get_modpath("intllib") then
 | 
				
			||||||
    dofile(minetest.get_modpath("intllib").."/intllib.lua");
 | 
						S = intllib.Getter()
 | 
				
			||||||
    S = intllib.Getter(minetest.get_current_modname());
 | 
					 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
    S = function ( s ) return s; end
 | 
						S = function(s) return s end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if (not minetest.get_modpath("homedecor")) then
 | 
					if (not minetest.get_modpath("homedecor")) then
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,3 +5,4 @@ moreblocks?
 | 
				
			|||||||
technic?
 | 
					technic?
 | 
				
			||||||
dye?
 | 
					dye?
 | 
				
			||||||
bees?
 | 
					bees?
 | 
				
			||||||
 | 
					intllib?
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -20,11 +20,10 @@ homedecor.intllib_modpath = minetest.get_modpath("intllib")
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
-- Boilerplate to support localized strings if intllib mod is installed.
 | 
					-- Boilerplate to support localized strings if intllib mod is installed.
 | 
				
			||||||
local S
 | 
					local S
 | 
				
			||||||
if homedecor.intllib_modpath then
 | 
					if minetest.get_modpath("intllib") then
 | 
				
			||||||
    dofile(homedecor.intllib_modpath.."/intllib.lua")
 | 
						S = intllib.Getter()
 | 
				
			||||||
    S = intllib.Getter(minetest.get_current_modname())
 | 
					 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
    S = function ( s ) return s end
 | 
						S = function(s) return s end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
homedecor.gettext = S
 | 
					homedecor.gettext = S
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1 +1,3 @@
 | 
				
			|||||||
default
 | 
					default
 | 
				
			||||||
 | 
					intllib?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -69,12 +69,12 @@ signs_lib.sign_post_model = {
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					-- Boilerplate to support localized strings if intllib mod is installed.
 | 
				
			||||||
local S
 | 
					local S
 | 
				
			||||||
if signs_lib.intllib_modpath then
 | 
					if minetest.get_modpath("intllib") then
 | 
				
			||||||
    dofile(signs_lib.intllib_modpath.."/intllib.lua")
 | 
						S = intllib.Getter()
 | 
				
			||||||
    S = intllib.Getter(minetest.get_current_modname())
 | 
					 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
    S = function ( s ) return s end
 | 
						S = function(s) return s end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
signs_lib.gettext = S
 | 
					signs_lib.gettext = S
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user