1
0
mirror of https://github.com/mt-mods/moretrees.git synced 2025-06-29 06:31:15 +02:00

1 Commits

Author SHA1 Message Date
ac3e30ae86 Added localization for wooden planks, fence, tree, etc. (#52)
* Added localization for wooden planks, fence, tree, etc.

* Added russian localization, localizations for wooden stuff

* Localization fixes

* Localization fixes #2
2024-11-17 11:22:18 -05:00
7 changed files with 293 additions and 43 deletions

View File

@ -15,39 +15,41 @@
moretrees = {}
local S = minetest.get_translator("moretrees")
if minetest.get_modpath("default") then
minetest.override_item("default:sapling", {
description = "Sapling"
description = S("Sapling")
})
minetest.override_item("default:tree", {
description = "Tree"
description = S("Tree")
})
minetest.override_item("default:wood", {
description = "Wooden Planks"
description = S("Wooden Planks")
})
minetest.override_item("default:leaves", {
description = "Leaves"
description = S("Leaves")
})
minetest.override_item("default:fence_wood", {
description = "Wooden Fence"
description = S("Wooden Fence")
})
minetest.override_item("default:fence_rail_wood", {
description = "Wooden Fence Rail"
description = S("Wooden Fence Rail")
})
end
if minetest.get_modpath("doors") then
minetest.override_item("doors:gate_wood_closed", {
description = "Wooden Fence Gate"
description = S("Wooden Fence Gate")
})
minetest.override_item("doors:gate_wood_open", {
description = "Wooden Fence Gate"
description = S("Wooden Fence Gate")
})
end
@ -134,6 +136,7 @@ function translate_biome_defs(def, treename, index)
if not index then index = 1 end
local deco_def = {
name = treename .. "_" .. index,
deco_type = "simple",
place_on = def.place_on,
sidelen = 16,
fill_ratio = def.fill_ratio or 0.001,
@ -142,16 +145,9 @@ function translate_biome_defs(def, treename, index)
y_max = def.max_elevation,
spawn_by = def.spawn_by,
num_spawn_by = def.num_spawn_by,
decoration = "moretrees:"..treename.."_sapling_ongen"
}
if minetest.features.lsystem_decoration_type then
deco_def.deco_type = "lsystem"
deco_def.treedef = moretrees[treename .. "_model"]
else
deco_def.deco_type = "simple"
deco_def.decoration = "moretrees:"..treename.."_sapling_ongen"
end
deco_ids[#deco_ids+1] = treename .. ("_" .. index or "_1")
return deco_def
@ -182,35 +178,33 @@ minetest.register_decoration(translate_biome_defs(moretrees.poplar_biome_3, "pop
minetest.register_decoration(translate_biome_defs(moretrees.poplar_small_biome, "poplar_small", 4))
minetest.register_decoration(translate_biome_defs(moretrees.poplar_small_biome_2, "poplar_small", 5))
if not minetest.features.lsystem_decoration_type then
--[[
this is purposefully wrapped in a on mods loaded callback to that it gets the proper ids
if other mods clear the registered decorations
]]
minetest.register_on_mods_loaded(function()
for k, v in pairs(deco_ids) do
deco_ids[k] = minetest.get_decoration_id(v)
end
minetest.set_gen_notify("decoration", deco_ids)
end)
--[[
this is purposefully wrapped in a on mods loaded callback to that it gets the proper ids
if other mods clear the registered decorations
]]
minetest.register_on_mods_loaded(function()
for k, v in pairs(deco_ids) do
deco_ids[k] = minetest.get_decoration_id(v)
end
minetest.set_gen_notify("decoration", deco_ids)
end)
minetest.register_on_generated(function(minp, maxp, blockseed)
local g = minetest.get_mapgen_object("gennotify")
local locations = {}
for _, id in pairs(deco_ids) do
local deco_locations = g["decoration#" .. id] or {}
for _, pos in pairs(deco_locations) do
locations[#locations+1] = pos
end
minetest.register_on_generated(function(minp, maxp, blockseed)
local g = minetest.get_mapgen_object("gennotify")
local locations = {}
for _, id in pairs(deco_ids) do
local deco_locations = g["decoration#" .. id] or {}
for _, pos in pairs(deco_locations) do
locations[#locations+1] = pos
end
end
if #locations == 0 then return end
for _, pos in ipairs(locations) do
local timer = minetest.get_node_timer({x=pos.x, y=pos.y+1, z=pos.z})
timer:start(math.random(2,10))
end
end)
end
if #locations == 0 then return end
for _, pos in ipairs(locations) do
local timer = minetest.get_node_timer({x=pos.x, y=pos.y+1, z=pos.z})
timer:start(math.random(2,10))
end
end)
-- Code to spawn a birch tree

View File

@ -209,3 +209,12 @@ Willow Tree Trunk=Weidenstamm
Willow Tree Trunk Slab=Weidenstammplatte
Willow Tree Trunk Stair=Weidenstammstufe
Yellow=gelb
# init.lua
Sapling=Setzling
Tree=Baum
Wooden Planks=Holzbretter
Leaves=Blätter
Wooden Fence=Holzzaun
Wooden Fence Rail=Holzschiene
Wooden Fence Gate=Holztor

View File

@ -209,3 +209,12 @@ Willow Tree Trunk=Tronco de Árbol de Sauce
Willow Tree Trunk Slab=Losa de Tronco de Árbol de Sauce
Willow Tree Trunk Stair=Escalera de Tronco de Árbol de Sauce
Yellow=Amarillo
# init.lua
Sapling=Retoño
Tree=Árbol
Wooden Planks=Tablones
Leaves=Hojas
Wooden Fence=Valla
Wooden Fence Rail=Riel de Valla
Wooden Fence Gate=Puerta de Valla

View File

@ -209,3 +209,12 @@ Willow Tree Trunk=Tronc d'arbre de saule
Willow Tree Trunk Slab=Dalle en tronc de saule
Willow Tree Trunk Stair=Escalier en tronc de saule
Yellow=jaune
# init.lua
Sapling=Jeune Arbre
Tree=Arbre
Wooden Planks=Planches
Leaves=Feuilles
Wooden Fence=Barrière en bois
Wooden Fence Rail=Rail de clôture en bois
Wooden Fence Gate=Porte de clôture en bois

219
locale/moretrees.ru.tr Normal file
View File

@ -0,0 +1,219 @@
# textdomain: moretrees
### cocos_palm.lua ###
Coconut=Кокос
Coconut Flower=Цветок кокоса
### crafts.lua ###
Acorn Muffin=Маффин с желудями
Acorn Muffin batter=Тесто для маффина с желудями
Coconut Milk=Кокосовое молоко
Date=Финик
Date & nut snack=Закуска из фиников и орехов
Date-nut cake=Финиково-ореховый пирог
Date-nut cake batter=Тесто для финиково-орехового пирога
Date-nut energy bar=Финиково-ореховый батончик
Raw Coconut=Сырой кокос
Roasted Cedar Cone Nuts=Жареные кедровые орешки
Roasted Fir Cone Nuts=Жареные орешки пихты
Roasted Spruce Cone Nuts=Жареные еловые орешки
### date_palm.lua ###
Date Flowers=Цветки фиников
Date Stem=Стебель финика
Dates=Финики
### node_defs.lua ###
@1 (fast growth)=@1 (бестрый рост)
Acorn=Желудь
Apple Tree=Яблоня
Apple Tree Fence=Яблоневый забор
Apple Tree Fence Gate=Яблоневые ворота
Apple Tree Fence Rail=Яблоневые перила
Apple Tree Leaves=Листья яблони
Apple Tree Planks=Яблоневые доски
Apple Tree Planks Slab=Яблоневые доски (плита)
Apple Tree Planks Stair=Яблоневые доски (ступени)
Apple Tree Sapling=Саженец яблони
Apple Tree Trunk=Ствол яблони
Apple Tree Trunk Slab=Ствол яблони (плита)
Apple Tree Trunk Stair=Ствол яблони (ступени)
Beech Tree=Бук
Beech Tree Fence=Забор из бука
Beech Tree Fence Gate=Ворота из бука
Beech Tree Fence Rail=Перила из бука
Beech Tree Leaves=Листья бука
Beech Tree Planks=Доски из бука
Beech Tree Planks Slab=Доски из бука (плита)
Beech Tree Planks Stair=Доски из бука (ступени)
Beech Tree Sapling=Саженец бука
Beech Tree Trunk=Ствол бука
Beech Tree Trunk Slab=Ствол бука (плита)
Beech Tree Trunk Stair=Ствол бука (ступени)
Birch Tree=Береза
Birch Tree Fence=Березовый забор
Birch Tree Fence Gate=Березовые ворота
Birch Tree Fence Rail=Березовые перила
Birch Tree Leaves=Березовые листья
Birch Tree Planks=Березовые доски
Birch Tree Planks Slab=Березовые доски (плита)
Birch Tree Planks Stair=Березовые доски (ступени)
Birch Tree Sapling=Саженец березы
Birch Tree Trunk=Ствол березы
Birch Tree Trunk Slab=Ствол березы (плита)
Birch Tree Trunk Stair=Ствол березы (ступени)
Cedar Cone=Кедровая шишка
Cedar Tree=Кедр
Cedar Tree Fence=Забор из кедра
Cedar Tree Fence Gate=Ворота из кедра
Cedar Tree Fence Rail=Перила из кедра
Cedar Tree Leaves=Кедровая хвоя
Cedar Tree Planks=Доски из кедра
Cedar Tree Planks Slab=Доски из кедра (плита)
Cedar Tree Planks Stair=Доски из кедра (ступени)
Cedar Tree Sapling=Саженец кедра
Cedar Tree Trunk=Ствол кедра
Cedar Tree Trunk Slab=Ствол кедра (плита)
Cedar Tree Trunk Stair=Ствол кедра (ступени)
Date Palm Tree=Финиковая пальма
Date Palm Tree Fence=Забор из финиковой пальмы
Date Palm Tree Fence Gate=Ворота из финиковой пальмы
Date Palm Tree Fence Rail=Перила из финиковой пальмы
Date Palm Tree Leaves=Листья финиковой пальмы
Date Palm Tree Planks=Доски из финиковой пальмы
Date Palm Tree Planks Slab=Доски из финиковой пальмы (плита)
Date Palm Tree Planks Stair=Доски из финиковой пальмы (ступени)
Date Palm Tree Sapling=Саженец финиковой пальмы
Date Palm Tree Trunk=Ствол финиковой пальмы
Date Palm Tree Trunk Slab=Ствол финиковой пальмы (плита)
Date Palm Tree Trunk Stair=Ствол финиковой пальмы (ступени)
Douglas Fir=Дугласова пихта
Douglas Fir Fence=Забор из дугласовой пихты
Douglas Fir Fence Gate=Ворота из дугласовой пихты
Douglas Fir Fence Rail=Перила из дугласовой пихты
Douglas Fir Leaves=Хвоя дугласовой пихты
Douglas Fir Leaves (Bright)=Листья дугласовой пихты (яркие)
Douglas Fir Planks=Доски из дугласовой пихты
Douglas Fir Planks Slab=Доски из дугласовой пихты (плита)
Douglas Fir Planks Stair=Доски из дугласовой пихты (ступени)
Douglas Fir Sapling=Саженец дугласовой пихты
Douglas Fir Trunk=Ствол дугласовой пихты
Douglas Fir Trunk Slab=Ствол дугласовой пихты (плита)
Douglas Fir Trunk Stair=Ствол дугласовой пихты (ступени)
Fir Cone=Пихтовая шишка
Giant Sequoia=Гигантская секвойя
Giant Sequoia Fence=Забор из гигантской секвойи
Giant Sequoia Fence Gate=Ворота из гигантской секвойи
Giant Sequoia Fence Rail=Перила из гигантской секвойи
Giant Sequoia Leaves=Хвоя гигантской секвойи
Giant Sequoia Planks=Доски из гигантской секвойи
Giant Sequoia Planks Slab=Доски из гигантской секвойи (плита)
Giant Sequoia Planks Stair=Доски из гигантской секвойи (ступени)
Giant Sequoia Sapling=Саженец гигантской секвойи
Giant Sequoia Trunk=Ствол гигантской секвойи
Giant Sequoia Trunk Slab=Ствол гигантской секвойи (плита)
Giant Sequoia Trunk Stair=Ствол гигантской секвойи (ступени)
Jungle Tree=Тропическое дерево
Jungle Tree Fence=Забор из тропического дерева
Jungle Tree Fence Gate=Ворота из тропического дерева
Jungle Tree Fence Rail=Перила из тропического дерева
Jungle Tree Leaves=Листья тропического дерева
Jungle Tree Leaves (@1)=Листья тропического дерева (@1)
Jungle Tree Planks=Доски из тропического дерева
Jungle Tree Planks Slab=Доски из тропического дерева (плита)
Jungle Tree Planks Stair=Доски из тропического дерева (ступени)
Jungle Tree Sapling=Саженец тропического дерева
Jungle Tree Trunk=Ствол тропического дерева
Jungle Tree Trunk Slab=Ствол тропического дерева (плита)
Jungle Tree Trunk Stair=Ствол тропического дерева (ступени)
Oak Tree=Дуб
Oak Tree Fence=Дубовый забор
Oak Tree Fence Gate=Дубовые ворота
Oak Tree Fence Rail=Дубовые перила
Oak Tree Leaves=Листья дуба
Oak Tree Planks=Дубовые доски
Oak Tree Planks Slab=Дубовые доски (плита)
Oak Tree Planks Stair=Дубовые доски (ступени)
Oak Tree Sapling=Саженец дуба
Oak Tree Trunk=Ствол дуба
Oak Tree Trunk Slab=Ствол дуба (плита)
Oak Tree Trunk Stair=Ствол дуба (ступени)
Palm Tree=Пальма
Palm Tree Fence=Пальмовый забор
Palm Tree Fence Gate=Пальмовые ворота
Palm Tree Fence Rail=Пальмовые перила
Palm Tree Leaves=Листья пальмы
Palm Tree Planks=Пальмовые доски
Palm Tree Planks Slab=Пальмовые доски (плита)
Palm Tree Planks Stair=Пальмовые доски (ступени)
Palm Tree Sapling=Саженец пальмы
Palm Tree Trunk=Ствол пальмы
Palm Tree Trunk Slab=Ствол пальмы (плита)
Palm Tree Trunk Stair=Ствол пальмы (ступени)
Poplar Tree=Тополь
Poplar Tree Fence=Забор из тополя
Poplar Tree Fence Gate=Ворота из тополя
Poplar Tree Fence Rail=Перила из тополя
Poplar Tree Leaves=Листья тополя
Poplar Tree Planks=Доски из тополя
Poplar Tree Planks Slab=Доски из тополя (плита)
Poplar Tree Planks Stair=Доски из тополя (ступени)
Poplar Tree Sapling=Саженец тополя
Poplar Tree Trunk=Ствол тополя
Poplar Tree Trunk Slab=Ствол тополя (плита)
Poplar Tree Trunk Stair=Ствол тополя (ступени)
Red=красные
Rubber Tree=Каучуковое дерево
Rubber Tree Fence=Забор из каучукового дерева
Rubber Tree Fence Gate=Ворота из каучукового дерева
Rubber Tree Fence Rail=Перила из каучукового дерева
Rubber Tree Leaves=Листья каучукового дерева
Rubber Tree Planks=Доски из каучукового дерева
Rubber Tree Planks Slab=Доски из каучукового дерева (плита)
Rubber Tree Planks Stair=Доски из каучукового дерева (ступени)
Rubber Tree Sapling=Саженец каучукового дерева
Rubber Tree Trunk=Ствол каучукового дерева
Rubber Tree Trunk (Empty)=Ствол каучукового дерева (пусто)
Rubber Tree Trunk Slab=Ствол каучукового дерева (плита)
Rubber Tree Trunk Stair=Ствол каучукового дерева (ступени)
Small poplar Tree Sapling=Малы саженец тополя
Spruce Cone=Еловая шишка
Spruce Tree=Ель
Spruce Tree Fence=Еловый забор
Spruce Tree Fence Gate=Еловые ворота
Spruce Tree Fence Rail=Еловые перила
Spruce Tree Leaves=Еловая хвоя
Spruce Tree Planks=Еловые доски
Spruce Tree Planks Slab=Еловые доски (плита)
Spruce Tree Planks Stair=Еловые доски (ступени)
Spruce Tree Sapling=Саженец ели
Spruce Tree Trunk=Ствол ели
Spruce Tree Trunk Slab=Ствол ели (плита)
Spruce Tree Trunk Stair=Ствол ели (ступени)
Willow Tree=Ива
Willow Tree Fence=Ивовый забор
Willow Tree Fence Gate=Ивовые ворота
Willow Tree Fence Rail=Ивовые перила
Willow Tree Leaves=Листья ивы
Willow Tree Planks=Ивовые доски
Willow Tree Planks Slab=Ивовые доски (плита)
Willow Tree Planks Stair=Ивовые доски (ступени)
Willow Tree Sapling=Саженец ивы
Willow Tree Trunk=Ствол ивы
Willow Tree Trunk Slab=Ствол ивы (плита)
Willow Tree Trunk Stair=Ствол ивы (ступени)
Yellow=желтые
# init.lua
Sapling=Саженец
Tree=Дерево
Wooden Planks=Деревянные доски
Leaves=Листья
Wooden Fence=Деревянный забор
Wooden Fence Rail=Деревянные перила
Wooden Fence Gate=Деревянные ворота

View File

@ -208,3 +208,12 @@ Willow Tree Trunk=
Willow Tree Trunk Slab=
Willow Tree Trunk Stair=
Yellow=
# init.lua
Sapling=
Tree=
Wooden Planks=
Leaves=
Wooden Fence=
Wooden Fence Rail=
Wooden Fence Gate=

View File

@ -261,6 +261,7 @@ moretrees.jungletree_model={
trunk_type=nil,
thin_branches=true,
fruit_chance=15,
fruit="vines:vine"
}
moretrees.fir_model={
@ -268,7 +269,7 @@ moretrees.fir_model={
rules_a=nil,
rules_b=nil,
trunk="moretrees:fir_trunk",
leaves="moretrees:fir_leaves",
leaves=nil,
angle=45,
iterations=7,
random_level=5,