Add localization support
parent
44d3e24683
commit
83fb1227de
4
api.lua
4
api.lua
|
@ -29,6 +29,8 @@
|
|||
-- @module api.lua
|
||||
|
||||
|
||||
local S = core.get_translator(asm.modname)
|
||||
|
||||
local registered_eggs = {}
|
||||
|
||||
--- Retrieves egg that spawns specified entity.
|
||||
|
@ -75,7 +77,7 @@ local function formatTitle(s)
|
|||
table.insert(t, v)
|
||||
end
|
||||
|
||||
return table.concat(t, " ") .. " Spawn Egg"
|
||||
return S("@1 Spawn Egg", table.concat(t, " "))
|
||||
end
|
||||
|
||||
--- Registers new egg in game.
|
||||
|
|
|
@ -3,17 +3,21 @@ v1.2
|
|||
----
|
||||
- added method to retrieve registered egg by entity name
|
||||
- added optional field "title" for EggDef
|
||||
- added localization support
|
||||
|
||||
|
||||
v1.1
|
||||
----
|
||||
- egg names are titleized & underscores are replaced with space
|
||||
|
||||
|
||||
v1.0
|
||||
----
|
||||
- made independent of any other mods or games
|
||||
- renamed to "asm_spawneggs" (Another Spawneggs Mod)
|
||||
- added API reference
|
||||
|
||||
|
||||
v0.1
|
||||
----
|
||||
- created mod for Antum game
|
||||
|
|
|
@ -25,7 +25,9 @@
|
|||
--]]
|
||||
|
||||
|
||||
local S = core.get_translator(asm.modname)
|
||||
|
||||
core.register_craftitem(":spawneggs:egg", {
|
||||
description = "Spawn Egg",
|
||||
description = S("Spawn Egg"),
|
||||
inventory_image = "spawneggs_egg.png",
|
||||
})
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
# textdomain:asm_spawneggs
|
||||
|
||||
# Translators:
|
||||
|
||||
|
||||
Spawn Egg=
|
||||
@1 Spawn Egg=
|
Loading…
Reference in New Issue