mirror of
https://github.com/ElCeejo/creatura.git
synced 2025-04-30 05:41:46 -04:00
Translation support
This commit is contained in:
parent
97375e0888
commit
3c6ee5356e
2 changed files with 6 additions and 2 deletions
2
locale/template.txt
Normal file
2
locale/template.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
# textdomain: creatura
|
||||
Spawn @1=
|
|
@ -5,6 +5,8 @@
|
|||
creatura.registered_mob_spawns = {}
|
||||
creatura.registered_on_spawns = {}
|
||||
|
||||
local S = minetest.get_translator("creatura")
|
||||
|
||||
-- Math --
|
||||
|
||||
local abs = math.abs
|
||||
|
@ -87,7 +89,7 @@ function creatura.register_spawn_item(name, def)
|
|||
end
|
||||
local mod_name = name:split(":")[1]
|
||||
local mob_name = name:split(":")[2]
|
||||
def.description = def.description or "Spawn " .. format_name(name)
|
||||
def.description = def.description or S("Spawn @1", format_name(name))
|
||||
def.inventory_image = def.inventory_image or inventory_image
|
||||
def.on_place = function(itemstack, player, pointed_thing)
|
||||
-- If the player right-clicks something like a chest or item frame then
|
||||
|
@ -550,7 +552,7 @@ function creatura.register_spawn_egg(name, col1, col2, inventory_image)
|
|||
local mod_name = name:split(":")[1]
|
||||
local mob_name = name:split(":")[2]
|
||||
minetest.register_craftitem(mod_name .. ":spawn_" .. mob_name, {
|
||||
description = "Spawn " .. format_name(name),
|
||||
description = S("Spawn @1", format_name(name)),
|
||||
inventory_image = inventory_image,
|
||||
stack_max = 99,
|
||||
on_place = function(itemstack, _, pointed_thing)
|
||||
|
|
Loading…
Add table
Reference in a new issue