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