Mobs: update translation and some fixes

This commit is contained in:
MoNTE48 2020-09-17 10:46:42 +02:00
parent 14e6aec843
commit 04642bf665
18 changed files with 121 additions and 81 deletions

View File

@ -171,6 +171,15 @@ Dry Shrub=Сухой Куст
Jungle Grass=Джунгли-трава
Grass=Трава
Dry Grass=Сухая Трава
Bush Stem=Стебель Куста
Bush Leaves=Листья Куста
Bush Sapling=Саженец Куста
Acacia Bush Stem=Стебель Куста Акации
Acacia Bush Leaves=Листья Куста Акации
Acacia Bush Sapling=Саженец Куста Акации
Pine Bush Stem=Стебель Соснового Куста
Pine Bush Needles=Иголки Соснового Куста
Pine Bush Sapling=Саженец Соснового Куста
Bookshelf=Книжный Шкаф
Apple Wood Ladder=Лестница из Дерева Яблони
Acacia Wood Ladder=Лестница из Дерева Акации
@ -229,48 +238,9 @@ Ruby Sword=Рубиновый Меч
Fishing Pole=Удочка
Owned by @1=Владелец: @1
#mobs_redo
(Tamed)=(Прирученн.)
Name Tag=Именная Метка
Leather=Кожа
Raw Meat=Сырое Мясо
Cooked Meat=Приготовленное Мясо
Raw Pork=Сырая Свинина
Cooked Pork=Приготовленная Свинина
Raw Rabbit=Сырая Крольчатина
Cooked Rabbit=Приготовленный Кролик
Rabbit Hide=Кролик
Egg=Яйцо
Fried Egg=Жареное Яйцо
Raw Chicken=Сырая Курица
Cooked Chicken=Приготовленная Курица
Cheese=Сыр
Cheese Block=Блок Сыра
Rotten Flesh=Гнилая Плоть
Steel Shears=Стальные Ножницы
Cobweb=Паутина
Turtle Shell=Черепаший Панцирь
Bear Egg=Яйцо Спавна Медведя
Bunny Egg=Яйцо Спавна Кролика
Chicken Egg=Яйцо Спавна Курицы
Cow Egg=Яйцо Спавна Коровы
Wolf's Egg=Яйцо Спавна Волка
Dog Egg=Яйцо Спавна Собаки
Cat's Egg=Яйцо Спавна Кошки
Pig Egg=Яйцо Спавна Свиньи
Sheep Egg=Яйцо Спавна Овцы
Parror Egg=Яйцо Спавна Попугая
Skeleton Egg=Яйцо Спавна Скелета
Spider Egg=Яйцо Спавна Паука
Small Spider Egg=Яйцо Спавна Маленького Паука
Zombie Head=Голова Зомби
Turtle Egg=Яйцо Спавна Черепахи
Player=Игрок
#player_skin
Appearance=Внешний Вид
Male=Парень

View File

@ -82,4 +82,4 @@ mobs:spawn({
day_toggle = true
})
mobs:register_egg("mobs_animal:bear", "Bear Egg", "mobs_bear_egg.png", true)
mobs:register_egg("mobs_animal:bear", mobs_animal.S"Bear Egg", "mobs_bear_egg.png", true)

View File

@ -95,4 +95,4 @@ mobs:spawn({
day_toggle = true
})
mobs:register_egg("mobs_animal:bunny", "Bunny Egg", "mobs_bunny_evil.png", true)
mobs:register_egg("mobs_animal:bunny", mobs_animal.S"Bunny Egg", "mobs_bunny_evil.png", true)

View File

@ -116,5 +116,5 @@ mobs:spawn({
day_toggle = true
})
mobs:register_egg("mobs_animal:wolf", "Wolf's Egg", "wool_grey.png", true)
mobs:register_egg("mobs_animal:dog", "Dog Egg", "wool_brown.png", true)
mobs:register_egg("mobs_animal:wolf", mobs_animal.S"Wolf's Egg", "wool_grey.png", true)
mobs:register_egg("mobs_animal:dog", mobs_animal.S"Dog Egg", "wool_brown.png", true)

View File

@ -1,5 +1,15 @@
mobs_animal = {}
local translator = minetest.get_translator
mobs_animal.S = translator and translator("mobs_animal") or intllib.make_gettext_pair()
if translator and not minetest.is_singleplayer() then
local lang = minetest.settings:get("language")
if lang and lang == "ru" then
mobs_animal.S = intllib.make_gettext_pair()
end
end
mobs_animal.spawn_nodes = {
"default:dirt", "default:sand", "default:redsand",
"default:snow", "default:snowblock",

View File

@ -55,4 +55,4 @@ mobs:spawn({
day_toggle = true
})
mobs:register_egg("mobs_animal:kitten", "Cat's Egg", "mobs_kitten_egg.png", true)
mobs:register_egg("mobs_animal:kitten", mobs_animal.S"Cat's Egg", "mobs_kitten_egg.png", true)

View File

@ -0,0 +1,8 @@
# textdomain: mobs_animal
Bear Egg=Яйцо Спавна Медведя
Bunny Egg=Яйцо Спавна Кролика
Wolf's Egg=Яйцо Спавна Волка
Dog Egg=Яйцо Спавна Собаки
Cat's Egg=Яйцо Спавна Кошки
Pig Egg=Яйцо Спавна Свиньи
Sheep Egg=Яйцо Спавна Овцы

View File

@ -53,4 +53,4 @@ mobs:spawn({
day_toggle = true
})
mobs:register_egg("mobs_animal:pig", "Pig Egg", "mobs_pig_egg.png")
mobs:register_egg("mobs_animal:pig", mobs_animal.S"Pig Egg", "mobs_pig_egg.png")

View File

@ -134,7 +134,7 @@ for i = 1, #dyes do
minetest.register_alias("mobs_animal:sheep_" .. name, "mobs_animal:sheep_white")
end
mobs:register_egg("mobs_animal:sheep_white", "Sheep Egg", "wool_white.png", true)
mobs:register_egg("mobs_animal:sheep_white", mobs_animal.S"Sheep Egg", "wool_white.png", true)
mobs:spawn({
name = "mobs_animal:sheep_white",

View File

@ -1,5 +1,15 @@
mobs_monster = {}
local translator = minetest.get_translator
mobs_monster.S = translator and translator("mobs_monster") or intllib.make_gettext_pair()
if translator and not minetest.is_singleplayer() then
local lang = minetest.settings:get("language")
if lang and lang == "ru" then
mobs_monster.S = intllib.make_gettext_pair()
end
end
mobs_monster.spawn_nodes = {
"default:dirt", "default:sandstone", "default:stone",
"default:sand", "default:redsand",

View File

@ -0,0 +1,6 @@
# textdomain: mobs_monster
Skeleton Egg=Яйцо Спавна Скелета
Spider Egg=Яйцо Спавна Паука
Small Spider Egg=Яйцо Спавна Маленького Паука
Zombie Head=Голова Зомби
Giant Zombie Head=Голова Гигантского Зомби

View File

@ -49,4 +49,4 @@ mobs:spawn({
chance = 15000
})
mobs:register_egg("mobs_monster:skeleton", "Skeleton Egg", "mobs_monster_egg.png^default_bone.png")
mobs:register_egg("mobs_monster:skeleton", mobs_monster.S"Skeleton Egg", "mobs_monster_egg.png^default_bone.png")

View File

@ -107,8 +107,8 @@ mobs:register_mob("mobs_monster:small_spider", {
}
})
mobs:register_egg("mobs_monster:spider", "Spider Egg", "mobs_monster_egg.png^mobs_spider_egg.png")
mobs:register_egg("mobs_monster:small_spider", "Small Spider Egg", "mobs_monster_egg.png^mobs_spider_small_egg.png")
mobs:register_egg("mobs_monster:spider", mobs_monster.S"Spider Egg", "mobs_monster_egg.png^mobs_spider_egg.png")
mobs:register_egg("mobs_monster:small_spider", mobs_monster.S"Small Spider Egg", "mobs_monster_egg.png^mobs_spider_small_egg.png")
mobs:spawn({
name = "mobs_monster:spider",

View File

@ -107,5 +107,5 @@ mobs:spawn({
chance = 35000
})
mobs:register_egg("mobs_monster:zombie", "Zombie Head", "zombie_head.png")
mobs:register_egg("mobs_monster:zombie_giant", "Giant Zombie Head", "zombie_head.png")
mobs:register_egg("mobs_monster:zombie", mobs_monster.S"Zombie Head", "zombie_head.png")
mobs:register_egg("mobs_monster:zombie_giant", mobs_monster.S"Giant Zombie Head", "zombie_head.png")

View File

@ -1,12 +1,21 @@
-- Intllib
local S = intllib.make_gettext_pair()
mobs = {
mod = "redo",
version = "20200725",
invis = minetest.global_exists("invisibility") and invisibility or {}
}
local translator = minetest.get_translator
mobs.S = translator and translator("mobs") or intllib.make_gettext_pair()
if translator and not minetest.is_singleplayer() then
local lang = minetest.settings:get("language")
if lang and lang == "ru" then
mobs.S = intllib.make_gettext_pair()
end
end
local S = mobs.S
-- creative check
local creative = minetest.settings:get_bool("creative_mode")
function mobs.is_creative(name)
@ -1299,7 +1308,7 @@ function mob_class:breed()
textures = self.child_texture[1]
end
local infotext = Sl("Owned by @1", self.owner or "")
local infotext = S("Owned by @1", self.owner or "")
-- and resize to half height
mob:set_properties({
@ -3566,7 +3575,7 @@ local function spawn_mob(pos, mob, data, placer, drop)
if ent.type ~= "monster" then
ent.owner = player_name
ent.tamed = true
local infotext = Sl("Owned by @1", Sl(player_name))
local infotext = S("Owned by @1", S(player_name))
ent.infotext = infotext
obj:set_properties({
infotext = infotext
@ -3634,7 +3643,7 @@ function mobs:register_egg(mob, desc, background, addegg, no_creative)
-- register new spawn egg containing mob information
minetest.register_craftitem(mob .. "_set", {
description = Sl(desc) .. " " .. Sl("(Tamed)"),
description = desc .. " " .. S"(Tamed)",
inventory_image = invimg,
groups = {spawn_egg = 2, not_in_creative_inventory = 1},
stack_max = 1,
@ -3661,7 +3670,7 @@ function mobs:register_egg(mob, desc, background, addegg, no_creative)
-- register old stackable mob egg
minetest.register_craftitem(mob, {
description = Sl(desc),
description = desc,
inventory_image = invimg,
groups = grp,
stack_max = 1,
@ -3852,9 +3861,10 @@ function mobs:feed_tame(self, clicker, feed_count, breed, tame)
self.health = self.hp_max
if self.htimer < 1 then
local mob_name = self.name:split(":")[2]:split("_")[1]:gsub("^%l", string.upper)
minetest.chat_send_player(clicker:get_player_name(),
S("\"@1\" at full health: @2",
S(self.name:split(":")[2]:split("_")[1]:gsub("^%l", string.upper)), tostring(self.health)))
S(mob_name), tostring(self.health)))
self.htimer = 5
end
end
@ -3881,9 +3891,10 @@ function mobs:feed_tame(self, clicker, feed_count, breed, tame)
if tame then
if self.tamed == false then
local mob_name = self.name:split(":")[2]:split("_")[1]:gsub("^%l", string.upper)
minetest.chat_send_player(clicker:get_player_name(),
S("\"@1\" has been tamed!",
S(self.name:split(":")[2]:split("_")[1]:gsub("^%l", string.upper))))
S(mob_name)))
self:mob_sound("mobs_spell")
end
@ -3892,7 +3903,7 @@ function mobs:feed_tame(self, clicker, feed_count, breed, tame)
local pn = clicker:get_player_name()
self.owner = pn
local infotext = Sl("Owned by @1", Sl(pn))
local infotext = S("Owned by @1", S(pn))
self.infotext = infotext
self.object:set_properties({
infotext = infotext

View File

@ -1,6 +1,8 @@
local S = mobs.S
-- name tag
minetest.register_craftitem("mobs:nametag", {
description = "Name Tag",
description = S"Name Tag",
inventory_image = "mobs_nametag.png",
groups = {flammable = 2, nohit = 1}
})
@ -13,14 +15,14 @@ minetest.register_craft({
-- leather
minetest.register_craftitem("mobs:leather", {
description = "Leather",
description = S"Leather",
inventory_image = "mobs_leather.png",
groups = {flammable = 2}
})
-- raw meat
minetest.register_craftitem("mobs:meat_raw", {
description = "Raw Meat",
description = S"Raw Meat",
inventory_image = "mobs_meat_raw.png",
on_use = minetest.item_eat(3, nil, -4),
groups = {food_meat_raw = 1, flammable = 2, food = 1}
@ -28,7 +30,7 @@ minetest.register_craftitem("mobs:meat_raw", {
-- cooked meat
minetest.register_craftitem("mobs:meat", {
description = "Cooked Meat",
description = S"Cooked Meat",
inventory_image = "mobs_meat.png",
on_use = minetest.item_eat(8),
groups = {food_meat = 1, flammable = 2, food = 1}
@ -43,7 +45,7 @@ minetest.register_craft({
-- raw pork
minetest.register_craftitem("mobs:pork_raw", {
description = "Raw Pork",
description = S"Raw Pork",
inventory_image = "mobs_pork_raw.png",
on_use = minetest.item_eat(3, nil, -4),
groups = {food_meat_raw = 1, flammable = 2, food = 1}
@ -51,7 +53,7 @@ minetest.register_craftitem("mobs:pork_raw", {
-- cooked pork
minetest.register_craftitem("mobs:pork", {
description = "Cooked Pork",
description = S"Cooked Pork",
inventory_image = "mobs_pork_cooked.png",
on_use = minetest.item_eat(8),
groups = {food_meat = 1, flammable = 2, food = 1}
@ -66,7 +68,7 @@ minetest.register_craft({
-- raw rabbit
minetest.register_craftitem("mobs:rabbit_raw", {
description = "Raw Rabbit",
description = S"Raw Rabbit",
inventory_image = "mobs_rabbit_raw.png",
on_use = minetest.item_eat(3, nil, -4),
groups = {food_meat_raw = 1, flammable = 2, food = 1}
@ -74,7 +76,7 @@ minetest.register_craftitem("mobs:rabbit_raw", {
-- cooked rabbit
minetest.register_craftitem("mobs:rabbit_cooked", {
description = "Cooked Rabbit",
description = S"Cooked Rabbit",
inventory_image = "mobs_rabbit_cooked.png",
on_use = minetest.item_eat(5),
groups = {food_meat = 1, flammable = 2, food = 1}
@ -89,7 +91,7 @@ minetest.register_craft({
-- rabbit hide
minetest.register_craftitem("mobs:rabbit_hide", {
description = "Rabbit Hide",
description = S"Rabbit Hide",
inventory_image = "mobs_rabbit_hide.png",
groups = {flammable = 2}
})
@ -130,7 +132,7 @@ local function chicken_egg_shoot(itemstack, thrower)
end
minetest.register_craftitem("mobs:chicken_egg", {
description = "Egg",
description = S"Egg",
inventory_image = "mobs_chicken_egg.png",
visual_scale = 0.7,
groups = {food = 1},
@ -141,7 +143,7 @@ minetest.register_alias("mobs:egg", "air")
-- fried egg
minetest.register_craftitem("mobs:chicken_egg_fried", {
description = "Fried Egg",
description = S"Fried Egg",
inventory_image = "mobs_chicken_egg_fried.png",
on_use = minetest.item_eat(2),
groups = {flammable = 2, food = 1}
@ -155,7 +157,7 @@ minetest.register_craft({
-- raw chicken
minetest.register_craftitem("mobs:chicken_raw", {
description = "Raw Chicken",
description = S"Raw Chicken",
inventory_image = "mobs_chicken_raw.png",
on_use = minetest.item_eat(2, nil, -3),
groups = {food_meat_raw = 1, food_chicken_raw = 1, flammable = 2, food = 1}
@ -163,7 +165,7 @@ minetest.register_craftitem("mobs:chicken_raw", {
-- cooked chicken
minetest.register_craftitem("mobs:chicken_cooked", {
description = "Cooked Chicken",
description = S"Cooked Chicken",
inventory_image = "mobs_chicken_cooked.png",
on_use = minetest.item_eat(6),
groups = {food_meat = 1, food_chicken = 1, flammable = 2, food = 1}
@ -177,7 +179,7 @@ minetest.register_craft({
-- cheese wedge
minetest.register_craftitem("mobs:cheese", {
description = "Cheese",
description = S"Cheese",
inventory_image = "mobs_cheese.png",
wield_image = "mobs_cheese_wield.png",
on_use = minetest.item_eat(4),
@ -194,7 +196,7 @@ minetest.register_craft({
-- cheese block
minetest.register_node("mobs:cheeseblock", {
description = "Cheese Block",
description = S"Cheese Block",
tiles = {"mobs_cheeseblock.png"},
is_ground_content = false,
groups = {crumbly = 3},
@ -219,7 +221,7 @@ minetest.register_craft({
-- rotten flesh
minetest.register_craftitem("mobs:rotten_flesh", {
description = "Rotten Flesh",
description = S"Rotten Flesh",
inventory_image = "mobs_rotten_flesh.png",
on_use = minetest.item_eat(4, nil, -4),
groups = {flammable = 2, food = 1}
@ -232,7 +234,7 @@ minetest.register_alias("mobs:protector", "default:goldblock")
-- shears
minetest.register_tool("mobs:shears", {
description = "Steel Shears",
description = S"Steel Shears",
inventory_image = "mobs_shears.png",
groups = {flammable = 2, nohit = 1}
})
@ -247,7 +249,7 @@ minetest.register_craft({
-- cobweb
minetest.register_node("mobs:cobweb", {
description = "Cobweb",
description = S"Cobweb",
drawtype = "plantlike",
visual_scale = 1.2,
tiles = {"mobs_cobweb.png"},

View File

@ -1,2 +1,3 @@
# textdomain: mobs
-- Oh, A fatal typo
Tutrle = Turtle

View File

@ -1,3 +1,4 @@
# textdomain: mobs
Not tamed!=Не приручен!
@1 is owner!=@1 является владельцем!
Missed!=Потерян!
@ -8,8 +9,29 @@ Already protected!=Уже защищён!
Enter name:=Введите имя:
Rename=Переименовать
Health:=Здоровье:
Cow already milked!=Корова уже подоена!
Active Mob Limit Reached!=Достигнут Лимит Активных Мобов!
Owned by @1=Владелец: @1
Player=Игрок
(Tamed)=(Прирученн.)
Name Tag=Именная Метка
Leather=Кожа
Raw Meat=Сырое Мясо
Cooked Meat=Приготовленное Мясо
Raw Pork=Сырая Свинина
Cooked Pork=Приготовленная Свинина
Raw Rabbit=Сырая Крольчатина
Cooked Rabbit=Приготовленный Кролик
Rabbit Hide=Кролик
Egg=Яйцо
Fried Egg=Жареное Яйцо
Raw Chicken=Сырая Курица
Cooked Chicken=Приготовленная Курица
Cheese=Сыр
Cheese Block=Блок Сыра
Rotten Flesh=Гнилая Плоть
Steel Shears=Стальные Ножницы
Cobweb=Паутина
Bear=Медведь
Bunny=Кролик