Added intllib support

Added german translation
This commit is contained in:
Xanthin 2014-03-12 16:45:08 +01:00 committed by sapier
parent 8a04d1aabb
commit 598426a17e
13 changed files with 97 additions and 17 deletions

View File

@ -1,2 +1,3 @@
default
mobf
intllib?

View File

@ -13,6 +13,16 @@
--
-- Contact sapier a t gmx net
-------------------------------------------------------------------------------
-- Boilerplate to support localized strings if intllib mod is installed.
local S
if (minetest.get_modpath("intllib")) then
dofile(minetest.get_modpath("intllib").."/intllib.lua")
S = intllib.Getter(minetest.get_current_modname())
else
S = function ( s ) return s end
end
minetest.log("action","MOD: barn mod loading ...")
local version = "0.0.11"
@ -31,7 +41,7 @@ barn_breedpairs_small = {
dofile (modpath .. "/model.lua")
minetest.register_craftitem("barn:barn_empty", {
description = "Barn to breed animals",
description = S("Barn to breed animals"),
image = minetest.inventorycube("barn_3d_empty_top.png","barn_3d_empty_side.png","barn_3d_empty_side.png"),
on_place = function(item, placer, pointed_thing)
if pointed_thing.type == "node" then
@ -47,7 +57,7 @@ minetest.register_craftitem("barn:barn_empty", {
})
minetest.register_craftitem("barn:barn_small_empty", {
description = "Barn to breed small animals",
description = S("Barn to breed small animals"),
image = "barn_small.png",
on_place = function(item, placer, pointed_thing)
if pointed_thing.type == "node" then
@ -362,4 +372,4 @@ minetest.register_entity(":barn:barn_small_empty_ent",
})
minetest.log("action","MOD: barn mod version " .. version .. " loaded")
minetest.log("action","MOD: barn mod version " .. version .. " loaded")

4
barn/locale/de.txt Normal file
View File

@ -0,0 +1,4 @@
# Translation by Xanthin
Barn to breed animals = Raufe um Tiere zu zuechten
Barn to breed small animals = Raufe um kleine Tiere zu zuechten

4
barn/locale/template.txt Normal file
View File

@ -0,0 +1,4 @@
# Template
Barn to breed animals =
Barn to breed small animals =

View File

@ -1,3 +1,4 @@
default
animalmaterials
adv_spawning
adv_spawning
intllib?

View File

@ -18,6 +18,14 @@
--
-- Contact sapier a t gmx net
-------------------------------------------------------------------------------
-- Boilerplate to support localized strings if intllib mod is installed.
local S
if intllib then
S = intllib.Getter()
else
S = function(s) return s end
end
-------------------------------------------------------------------------------
mobf_assert_backtrace(mob_inventory == nil)
--! @class mob_inventory
--! @brief inventory handling for trader like mobs
@ -392,21 +400,21 @@ function mob_inventory.init_trader_inventory(entity)
.. tostring(entity) .. "\"" )
local trader_formspec = "size[8,10;]" ..
"label[2,0;Trader " .. tradername .. " Inventory]" ..
"label[0,1;Selling:]" ..
"label[2,0;"..S("Trader %s Inventory"):format(tradername).."]" ..
"label[0,1;"..S("Selling:").."]" ..
"list[detached:" .. unique_entity_id .. ";goods;0,1.5;8,2;]" ..
"label[0,4.0;Selection]" ..
"label[0,4.0;"..S("Selection").."]" ..
"list[detached:" .. unique_entity_id .. ";selection;0,4.5;1,1;]" ..
"label[1.25,4.75;-->]" ..
"label[2,4.0;Price]" ..
"label[2,4.0;"..S("Price").."]" ..
"list[detached:" .. unique_entity_id .. ";price_1;2,4.5;1,1;]" ..
"label[3,4.0;or]" ..
"label[3,4.0;"..S("or").."]" ..
"list[detached:" .. unique_entity_id .. ";price_2;3,4.5;1,1;]" ..
"label[4.25,4.75;-->]" ..
"label[5,4.0;Pay]" ..
"label[5,4.0;"..S("Pay").."]" ..
"list[detached:" .. unique_entity_id .. ";pay;5,4.5;1,1;]" ..
"label[6.25,4.75;-->]" ..
"label[6.75,4.0;Takeaway]" ..
"label[6.75,4.0;"..S("Takeaway").."]" ..
"list[detached:" .. unique_entity_id .. ";takeaway;7,4.5;1,1;]" ..
"list[current_player;main;0,6;8,4;]"
@ -618,4 +626,4 @@ function mob_inventory.add_goods(entity,trader_inventory)
goods_to_add[i][1])
end
end
end

12
mobf/locale/de.txt Normal file
View File

@ -0,0 +1,12 @@
# Translation by Xanthin
Path marker tool = Pfadmarkierer
###Inventory.lua###
Trader %s Inventory = Haendler %s Waren
Selling: = Zu verkaufen:
Selection = Auswahl
Price = Preis
or = oder
Pay = Bezahlen
Takeaway = Wegnehmen

12
mobf/locale/template.txt Normal file
View File

@ -0,0 +1,12 @@
# Template
Path marker tool =
###Inventory.lua###
Trader %s Inventory =
Selling: =
Selection =
Price =
or =
Pay =
Takeaway =

View File

@ -12,6 +12,16 @@
--! @date 2013-02-09
--
-- Contact sapier a t gmx net
-- Boilerplate to support localized strings if intllib mod is installed.
local S
if (minetest.get_modpath("intllib")) then
dofile(minetest.get_modpath("intllib").."/intllib.lua")
S = intllib.Getter(minetest.get_current_modname())
else
S = function ( s ) return s end
end
-------------------------------------------------------------------------------
mobf_assert_backtrace(mobf_path == nil)
mobf_path = {}
@ -59,7 +69,7 @@ function mobf_path.init()
})
minetest.register_craftitem(":mobf:path_marker", {
description = "Path marker tool",
description = S("Path marker tool"),
image = "mobf_path_marker_item.png",
on_place = function(item, placer, pointed_thing)
if pointed_thing.type == "node" then
@ -594,4 +604,4 @@ function mobf_path.getpoints(pathowner,pathname)
end
return mobf_rtd.path_data.users[pathowner].paths[pathname].points
end
end

View File

@ -2,3 +2,4 @@ default
animal_vombie
mobf
animalmaterials
intllib?

View File

@ -1,9 +1,18 @@
-- Boilerplate to support localized strings if intllib mod is installed.
local S
if (minetest.get_modpath("intllib")) then
dofile(minetest.get_modpath("intllib").."/intllib.lua")
S = intllib.Getter(minetest.get_current_modname())
else
S = function ( s ) return s end
end
local version = "0.0.3"
minetest.log("action","MOD: trap mod loading ...")
minetest.register_craftitem("trap:undead", {
description = "Trap for undead mobs",
description = S("Trap for undead mobs"),
image = minetest.inventorycube("trap_undead.png","trap_undead.png","trap_undead.png"),
on_place = function(item, placer, pointed_thing)
if pointed_thing.type == "node" then
@ -76,7 +85,7 @@ minetest.register_entity(":trap:undead_ent",
minetest.register_node("trap:cought_vombie", {
description = "Trap containing vombie",
description = S("Trap containing vombie"),
tile_images = {"trap_cought_vombie.png"},
drawtype = "normal",
groups = { snappy=3 },
@ -84,4 +93,4 @@ minetest.register_node("trap:cought_vombie", {
light_source = 2,
})
minetest.log("action","MOD: trap mod version " .. version .. " loaded")
minetest.log("action","MOD: trap mod version " .. version .. " loaded")

4
trap/locale/de.txt Normal file
View File

@ -0,0 +1,4 @@
# Translation by Xanthin
Trap for undead mobs = Falle fuer untote Wesen
Trap containing vombie = Falle mit Vombie

4
trap/locale/template.txt Normal file
View File

@ -0,0 +1,4 @@
# Template
Trap for undead mobs =
Trap containing vombie =