1
0
mirror of https://codeberg.org/tenplus1/mobs_animal.git synced 2024-12-23 01:10:25 +01:00

Added intllib support (en/de)

This commit is contained in:
TenPlus1 2016-06-11 11:14:08 +01:00
parent 23ffc0d0da
commit 09a6592f69
12 changed files with 182 additions and 38 deletions

10
bee.lua
View File

@ -1,4 +1,6 @@
local S = mobs.intllib
-- Bee by KrupnoPavel -- Bee by KrupnoPavel
mobs:register_mob("mobs_animal:bee", { mobs:register_mob("mobs_animal:bee", {
@ -41,21 +43,21 @@ mobs:register_mob("mobs_animal:bee", {
mobs:register_spawn("mobs_animal:bee", {"group:flower"}, 20, 10, 9000, 1, 31000, true) mobs:register_spawn("mobs_animal:bee", {"group:flower"}, 20, 10, 9000, 1, 31000, true)
mobs:register_egg("mobs_animal:bee", "Bee", "mobs_bee_inv.png", 0) mobs:register_egg("mobs_animal:bee", S("Bee"), "mobs_bee_inv.png", 0)
-- compatibility -- compatibility
mobs:alias_mob("mobs:bee", "mobs_animal:bee") mobs:alias_mob("mobs:bee", "mobs_animal:bee")
-- honey -- honey
minetest.register_craftitem(":mobs:honey", { minetest.register_craftitem(":mobs:honey", {
description = "Honey", description = S("Honey"),
inventory_image = "mobs_honey_inv.png", inventory_image = "mobs_honey_inv.png",
on_use = minetest.item_eat(6), on_use = minetest.item_eat(6),
}) })
-- beehive (when placed spawns bee) -- beehive (when placed spawns bee)
minetest.register_node(":mobs:beehive", { minetest.register_node(":mobs:beehive", {
description = "Beehive", description = S("Beehive"),
drawtype = "plantlike", drawtype = "plantlike",
visual_scale = 1.0, visual_scale = 1.0,
tiles = {"mobs_beehive.png"}, tiles = {"mobs_beehive.png"},
@ -126,7 +128,7 @@ minetest.register_craft({
-- honey block -- honey block
minetest.register_node(":mobs:honey_block", { minetest.register_node(":mobs:honey_block", {
description = "Honey Block", description = S("Honey Block"),
tiles = {"mobs_honey_block.png"}, tiles = {"mobs_honey_block.png"},
groups = {snappy = 3, flammable = 2}, groups = {snappy = 3, flammable = 2},
sounds = default.node_sound_dirt_defaults(), sounds = default.node_sound_dirt_defaults(),

View File

@ -1,4 +1,6 @@
local S = mobs.intllib
-- Bunny by ExeterDad -- Bunny by ExeterDad
mobs:register_mob("mobs_animal:bunny", { mobs:register_mob("mobs_animal:bunny", {
@ -81,7 +83,7 @@ mobs:register_mob("mobs_animal:bunny", {
mobs:register_spawn("mobs_animal:bunny", mobs:register_spawn("mobs_animal:bunny",
{"default:dirt_with_grass", "ethereal:prairie_dirt"}, 20, 10, 15000, 2, 31000, true) {"default:dirt_with_grass", "ethereal:prairie_dirt"}, 20, 10, 15000, 2, 31000, true)
mobs:register_egg("mobs_animal:bunny", "Bunny", "mobs_bunny_inv.png", 0) mobs:register_egg("mobs_animal:bunny", S("Bunny"), "mobs_bunny_inv.png", 0)
-- compatibility -- compatibility
mobs:alias_mob("mobs:bunny", "mobs_animal:bunny") mobs:alias_mob("mobs:bunny", "mobs_animal:bunny")

View File

@ -1,4 +1,6 @@
local S = mobs.intllib
-- Chicken by JK Murray -- Chicken by JK Murray
mobs:register_mob("mobs_animal:chicken", { mobs:register_mob("mobs_animal:chicken", {
@ -79,7 +81,7 @@ mobs:register_mob("mobs_animal:chicken", {
mobs:register_spawn("mobs_animal:chicken", mobs:register_spawn("mobs_animal:chicken",
{"default:dirt_with_grass", "ethereal:bamboo_dirt"}, 20, 10, 15000, 1, 31000, true) {"default:dirt_with_grass", "ethereal:bamboo_dirt"}, 20, 10, 15000, 1, 31000, true)
mobs:register_egg("mobs_animal:chicken", "Chicken", "mobs_chicken_inv.png", 0) mobs:register_egg("mobs_animal:chicken", S("Chicken"), "mobs_chicken_inv.png", 0)
-- compatibility -- compatibility
mobs:alias_mob("mobs:chicken", "mobs_animal:chicken") mobs:alias_mob("mobs:chicken", "mobs_animal:chicken")
@ -199,7 +201,7 @@ end
-- egg -- egg
minetest.register_node(":mobs:egg", { minetest.register_node(":mobs:egg", {
description = "Chicken Egg", description = S("Chicken Egg"),
tiles = {"mobs_chicken_egg.png"}, tiles = {"mobs_chicken_egg.png"},
inventory_image = "mobs_chicken_egg.png", inventory_image = "mobs_chicken_egg.png",
visual_scale = 0.7, visual_scale = 0.7,
@ -224,7 +226,7 @@ minetest.register_node(":mobs:egg", {
-- fried egg -- fried egg
minetest.register_craftitem(":mobs:chicken_egg_fried", { minetest.register_craftitem(":mobs:chicken_egg_fried", {
description = "Fried Egg", description = S("Fried Egg"),
inventory_image = "mobs_chicken_egg_fried.png", inventory_image = "mobs_chicken_egg_fried.png",
on_use = minetest.item_eat(2), on_use = minetest.item_eat(2),
}) })
@ -237,14 +239,14 @@ minetest.register_craft({
-- raw chicken -- raw chicken
minetest.register_craftitem(":mobs:chicken_raw", { minetest.register_craftitem(":mobs:chicken_raw", {
description = "Raw Chicken", description = S("Raw Chicken"),
inventory_image = "mobs_chicken_raw.png", inventory_image = "mobs_chicken_raw.png",
on_use = minetest.item_eat(2), on_use = minetest.item_eat(2),
}) })
-- cooked chicken -- cooked chicken
minetest.register_craftitem(":mobs:chicken_cooked", { minetest.register_craftitem(":mobs:chicken_cooked", {
description = "Cooked Chicken", description = S("Cooked Chicken"),
inventory_image = "mobs_chicken_cooked.png", inventory_image = "mobs_chicken_cooked.png",
on_use = minetest.item_eat(6), on_use = minetest.item_eat(6),
}) })

12
cow.lua
View File

@ -1,4 +1,6 @@
local S = mobs.intllib
-- Cow by Krupnovpavel (additional texture by JurajVajda) -- Cow by Krupnovpavel (additional texture by JurajVajda)
mobs:register_mob("mobs_animal:cow", { mobs:register_mob("mobs_animal:cow", {
@ -68,7 +70,7 @@ mobs:register_mob("mobs_animal:cow", {
if self.gotten == true then if self.gotten == true then
minetest.chat_send_player(clicker:get_player_name(), minetest.chat_send_player(clicker:get_player_name(),
"Cow already milked!") S("Cow already milked!"))
return return
end end
@ -96,14 +98,14 @@ mobs:register_mob("mobs_animal:cow", {
mobs:register_spawn("mobs_animal:cow", mobs:register_spawn("mobs_animal:cow",
{"default:dirt_with_grass", "ethereal:green_dirt"}, 20, 10, 15000, 1, 31000, true) {"default:dirt_with_grass", "ethereal:green_dirt"}, 20, 10, 15000, 1, 31000, true)
mobs:register_egg("mobs_animal:cow", "Cow", "default_grass.png", 1) mobs:register_egg("mobs_animal:cow", S("Cow"), "default_grass.png", 1)
-- compatibility -- compatibility
mobs:alias_mob("mobs:cow", "mobs_animal:cow") mobs:alias_mob("mobs:cow", "mobs_animal:cow")
-- bucket of milk -- bucket of milk
minetest.register_craftitem(":mobs:bucket_milk", { minetest.register_craftitem(":mobs:bucket_milk", {
description = "Bucket of Milk", description = S("Bucket of Milk"),
inventory_image = "mobs_bucket_milk.png", inventory_image = "mobs_bucket_milk.png",
stack_max = 1, stack_max = 1,
on_use = minetest.item_eat(8, 'bucket:bucket_empty'), on_use = minetest.item_eat(8, 'bucket:bucket_empty'),
@ -111,7 +113,7 @@ minetest.register_craftitem(":mobs:bucket_milk", {
-- cheese wedge -- cheese wedge
minetest.register_craftitem(":mobs:cheese", { minetest.register_craftitem(":mobs:cheese", {
description = "Cheese", description = S("Cheese"),
inventory_image = "mobs_cheese.png", inventory_image = "mobs_cheese.png",
on_use = minetest.item_eat(4), on_use = minetest.item_eat(4),
}) })
@ -126,7 +128,7 @@ minetest.register_craft({
-- cheese block -- cheese block
minetest.register_node(":mobs:cheeseblock", { minetest.register_node(":mobs:cheeseblock", {
description = "Cheese Block", description = S("Cheese Block"),
tiles = {"mobs_cheeseblock.png"}, tiles = {"mobs_cheeseblock.png"},
is_ground_content = false, is_ground_content = false,
groups = {crumbly = 3}, groups = {crumbly = 3},

View File

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

View File

@ -1,6 +1,15 @@
local path = minetest.get_modpath("mobs_animal") local path = minetest.get_modpath("mobs_animal")
-- Intllib
local S
if minetest.get_modpath("intllib") then
S = intllib.Getter()
else
S = function(s) return s end
end
mobs.intllib = S
-- Animals -- Animals
dofile(path .. "/chicken.lua") -- JKmurray dofile(path .. "/chicken.lua") -- JKmurray
@ -12,4 +21,4 @@ dofile(path .. "/bee.lua") -- KrupnoPavel
dofile(path .. "/bunny.lua") -- ExeterDad dofile(path .. "/bunny.lua") -- ExeterDad
dofile(path .. "/kitten.lua") -- Jordach/BFD dofile(path .. "/kitten.lua") -- Jordach/BFD
print ("[MOD] Mobs Redo 'Animals' loaded") print (S("[MOD] Mobs Redo 'Animals' loaded"))

View File

@ -1,4 +1,6 @@
local S = mobs.intllib
-- Kitten by Jordach / BFD -- Kitten by Jordach / BFD
mobs:register_mob("mobs_animal:kitten", { mobs:register_mob("mobs_animal:kitten", {
@ -53,7 +55,7 @@ mobs:register_mob("mobs_animal:kitten", {
mobs:register_spawn("mobs_animal:kitten", mobs:register_spawn("mobs_animal:kitten",
{"default:dirt_with_grass", "ethereal:grove_dirt"}, 20, 12, 22000, 1, 31000, true) {"default:dirt_with_grass", "ethereal:grove_dirt"}, 20, 12, 22000, 1, 31000, true)
mobs:register_egg("mobs_animal:kitten", "Kitten", "mobs_kitten_inv.png", 0) mobs:register_egg("mobs_animal:kitten", S("Kitten"), "mobs_kitten_inv.png", 0)
-- compatibility -- compatibility
mobs:alias_mob("mobs:kitten", "mobs_animal:kitten") mobs:alias_mob("mobs:kitten", "mobs_animal:kitten")

60
locale/de.txt Normal file
View File

@ -0,0 +1,60 @@
# German Translation for mobs_animal mod
# Deutsche Übersetzung der mobs_animal Mod
# last update: 2016/June/10
# Author: Xanthin
#bee.lua
Bee = Biene
Honey = Honig
Beehive = Bienenstock
Honey Block = Honigblock
#bunny.lua
Bunny = Häschen
#chicken.lua
Chicken = Huhn
Chicken Egg = Hühnerei
Fried Egg = Spiegelei
Raw Chicken = Rohes Hühnchen
Cooked Chicken = Gekochtes Hühnchen
#cow.lua
Cow already milked! = Kuh ist bereits gemolken!
Cow = Kuh
Bucket of Milk = Eimer Milch
Cheese = Käse
Cheese Block = Käseblock
#init.lua
[MOD] Mobs Redo 'Animals' loaded = [MOD] Mobs Redo 'Animals' geladen
#kitten.lua
Kitten = Kätzchen
#rat.lua
Rat = Ratte
Cooked Rat = Gekochte Ratte
#sheep.lua
Black = Schwarzes
Blue = Blaues
Brown = Braunes
Cyan = Cyan
Dark Green = Dunkelgrünes
Dark Grey = Dunkelgraues
Green = Grünes
Grey = Graues
Magenta = Magenta
Orange = Oranges
Pink = Pinkes
Red = Rotes
Violet = Violettes
White = Weißes
Yellow = Gelbes
Sheep = Schaf
#warthog.lua
Warthog = Warzenschwein
Raw Porkchop = Rohes Schweinekotelett
Cooked Porkchop = Gekochtes Schweinekotelett

58
locale/template.txt Normal file
View File

@ -0,0 +1,58 @@
# Template for translations of mobs_animal mod
# last update: 2016/June/10
#bee.lua
Bee =
Honey =
Beehive =
Honey Block =
#bunny.lua
Bunny =
#chicken.lua
Chicken =
Chicken Egg =
Fried Egg =
Raw Chicken =
Cooked Chicken =
#cow.lua
Cow already milked! =
Cow =
Bucket of Milk =
Cheese =
Cheese Block =
#init.lua
[MOD] Mobs Redo 'Animals' loaded =
#kitten.lua
Kitten =
#rat.lua
Rat =
Cooked Rat =
#sheep.lua
Black =
Blue =
Brown =
Cyan =
Dark Green =
Dark Grey =
Green =
Grey =
Magenta =
Orange =
Pink =
Red =
Violet =
White =
Yellow =
Sheep =
#warthog.lua
Warthog =
Raw Porkchop =
Cooked Porkchop =

View File

@ -1,4 +1,6 @@
local S = mobs.intllib
-- Rat by PilzAdam -- Rat by PilzAdam
mobs:register_mob("mobs_animal:rat", { mobs:register_mob("mobs_animal:rat", {
@ -57,14 +59,14 @@ mobs:register_mob("mobs_animal:rat", {
mobs:register_spawn("mobs_animal:rat", {"default:stone"}, 20, 5, 15000, 2, 0) mobs:register_spawn("mobs_animal:rat", {"default:stone"}, 20, 5, 15000, 2, 0)
mobs:register_egg("mobs_animal:rat", "Rat", "mobs_rat_inventory.png", 0) mobs:register_egg("mobs_animal:rat", S("Rat"), "mobs_rat_inventory.png", 0)
-- compatibility -- compatibility
mobs:alias_mob("mobs:rat", "mobs_animal:rat") mobs:alias_mob("mobs:rat", "mobs_animal:rat")
-- cooked rat, yummy! -- cooked rat, yummy!
minetest.register_craftitem(":mobs:rat_cooked", { minetest.register_craftitem(":mobs:rat_cooked", {
description = "Cooked Rat", description = S("Cooked Rat"),
inventory_image = "mobs_cooked_rat.png", inventory_image = "mobs_cooked_rat.png",
on_use = minetest.item_eat(3), on_use = minetest.item_eat(3),
}) })

View File

@ -1,20 +1,22 @@
local S = mobs.intllib
local all_colours = { local all_colours = {
{"black", "Black", "#000000b0"}, {"black", S("Black"), "#000000b0"},
{"blue", "Blue", "#015dbb70"}, {"blue", S("Blue"), "#015dbb70"},
{"brown", "Brown", "#663300a0"}, {"brown", S("Brown"), "#663300a0"},
{"cyan", "Cyan", "#01ffd870"}, {"cyan", S("Cyan"), "#01ffd870"},
{"dark_green", "Dark Green", "#005b0770"}, {"dark_green", S("Dark Green"), "#005b0770"},
{"dark_grey", "Dark Grey", "#303030b0"}, {"dark_grey", S("Dark Grey"), "#303030b0"},
{"green", "Green", "#61ff0170"}, {"green", S("Green"), "#61ff0170"},
{"grey", "Grey", "#5b5b5bb0"}, {"grey", S("Grey"), "#5b5b5bb0"},
{"magenta", "Magenta", "#ff05bb70"}, {"magenta", S("Magenta"), "#ff05bb70"},
{"orange", "Orange", "#ff840170"}, {"orange", S("Orange"), "#ff840170"},
{"pink", "Pink", "#ff65b570"}, {"pink", S("Pink"), "#ff65b570"},
{"red", "Red", "#ff0000a0"}, {"red", S("Red"), "#ff0000a0"},
{"violet", "Violet", "#2000c970"}, {"violet", S("Violet"), "#2000c970"},
{"white", "White", "#abababc0"}, {"white", S("White"), "#abababc0"},
{"yellow", "Yellow", "#e3ff0070"}, {"yellow", S("Yellow"), "#e3ff0070"},
} }
-- Sheep by PilzAdam, texture converted to minetest by AMMOnym from Summerfield pack -- Sheep by PilzAdam, texture converted to minetest by AMMOnym from Summerfield pack
@ -168,7 +170,7 @@ for _, col in pairs(all_colours) do
end end
}) })
mobs:register_egg("mobs_animal:sheep_"..col[1], col[2] .. " Sheep", "wool_"..col[1]..".png", 1) mobs:register_egg("mobs_animal:sheep_"..col[1], col[2] .. " " .. S("Sheep"), "wool_"..col[1]..".png", 1)
-- compatibility -- compatibility
mobs:alias_mob("mobs:sheep_" .. col[1], "mobs_animal:sheep_" .. col[1]) mobs:alias_mob("mobs:sheep_" .. col[1], "mobs_animal:sheep_" .. col[1])

View File

@ -1,4 +1,6 @@
local S = mobs.intllib
-- Warthog by KrupnoPavel -- Warthog by KrupnoPavel
mobs:register_mob("mobs_animal:pumba", { mobs:register_mob("mobs_animal:pumba", {
@ -56,21 +58,21 @@ mobs:register_mob("mobs_animal:pumba", {
mobs:register_spawn("mobs_animal:pumba", mobs:register_spawn("mobs_animal:pumba",
{"ethereal:mushroom_dirt", "default:dirt_with_dry_grass"}, 20, 10, 15000, 1, 31000, true) {"ethereal:mushroom_dirt", "default:dirt_with_dry_grass"}, 20, 10, 15000, 1, 31000, true)
mobs:register_egg("mobs_animal:pumba", "Warthog", "wool_pink.png", 1) mobs:register_egg("mobs_animal:pumba", S("Warthog"), "wool_pink.png", 1)
-- compatibility -- compatibility
mobs:alias_mob("mobs:pumba", "mobs_animal:pumba") mobs:alias_mob("mobs:pumba", "mobs_animal:pumba")
-- raw porkchop -- raw porkchop
minetest.register_craftitem(":mobs:pork_raw", { minetest.register_craftitem(":mobs:pork_raw", {
description = "Raw Porkchop", description = S("Raw Porkchop"),
inventory_image = "mobs_pork_raw.png", inventory_image = "mobs_pork_raw.png",
on_use = minetest.item_eat(4), on_use = minetest.item_eat(4),
}) })
-- cooked porkchop -- cooked porkchop
minetest.register_craftitem(":mobs:pork_cooked", { minetest.register_craftitem(":mobs:pork_cooked", {
description = "Cooked Porkchop", description = S("Cooked Porkchop"),
inventory_image = "mobs_pork_cooked.png", inventory_image = "mobs_pork_cooked.png",
on_use = minetest.item_eat(8), on_use = minetest.item_eat(8),
}) })