Add translations for enchanting
parent
560b3cd5f5
commit
cc7f1cb248
|
@ -30,3 +30,34 @@ You can't dig the chessboard, a game has been started. Reset it first if you're
|
|||
You can't reset the chessboard, a game has been started. If you aren't a current player, try again in @1=
|
||||
|
||||
check=
|
||||
|
||||
### cooking.lua ###
|
||||
|
||||
Bowl=
|
||||
Bowl of soup=
|
||||
Cauldron=
|
||||
Cauldron (active) - Drop foods inside to make a soup=
|
||||
Cauldron (active) - Use a bowl to eat the soup=
|
||||
Cauldron (empty)=
|
||||
Cauldron (idle)=
|
||||
No room in your inventory to add a bowl of soup.=
|
||||
No room in your inventory to add a bucket of water.=
|
||||
|
||||
### enchanting.lua ###
|
||||
|
||||
Axe=
|
||||
Bronze=
|
||||
Diamond=
|
||||
Durability=
|
||||
Efficiency=
|
||||
Enchanted @1 @2 @3=
|
||||
Enchantment Table=
|
||||
Mese=
|
||||
Pickaxe=
|
||||
Sharpness=
|
||||
Shovel=
|
||||
Steel=
|
||||
Sword=
|
||||
Your tool digs faster=
|
||||
Your tool last longer=
|
||||
Your weapon inflicts more damages=
|
||||
|
|
|
@ -30,3 +30,34 @@ You can't dig the chessboard, a game has been started. Reset it first if you're
|
|||
You can't reset the chessboard, a game has been started. If you aren't a current player, try again in @1=Vous ne pouvez pas mettre à zéro l’échiquier, une partie a été commencée. Si ce n’est pas votre tour de jouer, réessayez dans @1
|
||||
|
||||
check=échec
|
||||
|
||||
### cooking.lua ###
|
||||
|
||||
Bowl=Bol
|
||||
Bowl of soup=Bol de soupe
|
||||
Cauldron=Chaudron
|
||||
Cauldron (active) - Drop foods inside to make a soup=Chaudron (actif) - Placez des ingrédients à l’intérieur pour faire une soupe
|
||||
Cauldron (active) - Use a bowl to eat the soup=Chaudron (actif) - Utilisez un bol pour boire la soupe
|
||||
Cauldron (empty)=Chaudron (vide)
|
||||
Cauldron (idle)=Chaudron (inactif)
|
||||
No room in your inventory to add a bowl of soup.=Pas de place dans votre inventaire pour ajouter un bol de soupe.
|
||||
No room in your inventory to add a bucket of water.=Pas de place dans votre inventaire pour ajouter un seau d’eau.
|
||||
|
||||
### enchanting.lua ###
|
||||
|
||||
Axe=Hache
|
||||
Bronze=Bronze
|
||||
Diamond=Diamant
|
||||
Durability=Durabilité
|
||||
Efficiency=Efficacité
|
||||
Enchanted @1 @2 @3=@2 en @1 enchantée @3
|
||||
Enchantment Table=Table d’enchantements
|
||||
Mese=Mese
|
||||
Pickaxe=Pioche
|
||||
Sharpness=Tranchant
|
||||
Shovel=Pelle
|
||||
Steel=Fer
|
||||
Sword=Épée
|
||||
Your tool digs faster=Votre outil creuse plus vite
|
||||
Your tool last longer=Votre outil dure plus longtemps
|
||||
Your weapon inflicts more damages=Votre arme inflige plus de dégâts
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
screwdriver = screwdriver or {}
|
||||
local S = minetest.get_translator("xdecor")
|
||||
local F = minetest.formspec_escape
|
||||
local ceil, abs, random = math.ceil, math.abs, math.random
|
||||
local reg_tools = minetest.registered_tools
|
||||
|
||||
|
@ -12,8 +14,8 @@ local enchanting = {
|
|||
damages = 1, -- Sharpness
|
||||
}
|
||||
|
||||
local function cap(S) return
|
||||
S:gsub("^%l", string.upper)
|
||||
local function cap(str) return
|
||||
str:gsub("^%l", string.upper)
|
||||
end
|
||||
|
||||
local function to_percent(orig_value, final_value)
|
||||
|
@ -44,15 +46,21 @@ function enchanting:get_tooltip(enchant, orig_caps, fleshy)
|
|||
sharp = {"#ffff00", " (+" .. bonus.damages .. "%)"},
|
||||
}
|
||||
|
||||
local enchant_loc = {
|
||||
fast = S("Efficiency"),
|
||||
durable = S("Durability"),
|
||||
sharp = S("Sharpness"),
|
||||
}
|
||||
|
||||
return minetest.colorize and minetest.colorize(specs[enchant][1],
|
||||
"\n" .. cap(enchant) .. specs[enchant][2]) or
|
||||
"\n" .. cap(enchant) .. specs[enchant][2]
|
||||
"\n" .. (enchant_loc[enchant] or cap(enchant)) .. specs[enchant][2]) or
|
||||
"\n" .. (enchant_loc[enchant] or cap(enchant)) .. specs[enchant][2]
|
||||
end
|
||||
|
||||
local enchant_buttons = {
|
||||
"image_button[3.9,0.85;4,0.92;bg_btn.png;fast;Efficiency]" ..
|
||||
"image_button[3.9,1.77;4,1.12;bg_btn.png;durable;Durability]",
|
||||
"image_button[3.9,2.9;4,0.92;bg_btn.png;sharp;Sharpness]",
|
||||
"image_button[3.9,0.85;4,0.92;bg_btn.png;fast;"..F(S("Efficiency")).."]" ..
|
||||
"image_button[3.9,1.77;4,1.12;bg_btn.png;durable;"..F(S("Durability")).."]",
|
||||
"image_button[3.9,2.9;4,0.92;bg_btn.png;sharp;"..F(S("Sharpness")).."]",
|
||||
}
|
||||
|
||||
function enchanting.formspec(pos, num)
|
||||
|
@ -68,10 +76,11 @@ function enchanting.formspec(pos, num)
|
|||
listring[current_player;main]
|
||||
listring[context;mese]
|
||||
image[2,2.9;1,1;mese_layout.png]
|
||||
tooltip[sharp;Your weapon inflicts more damages]
|
||||
tooltip[durable;Your tool last longer]
|
||||
tooltip[fast;Your tool digs faster] ]] ..
|
||||
default.gui_slots .. default.get_hotbar_bg(0.5,4.5)
|
||||
]]
|
||||
.."tooltip[sharp;"..F(S("Your weapon inflicts more damages")).."]"
|
||||
.."tooltip[durable;"..F(S("Your tool last longer")).."]"
|
||||
.."tooltip[fast;"..F(S("Your tool digs faster")).."]"
|
||||
..default.gui_slots .. default.get_hotbar_bg(0.5,4.5)
|
||||
|
||||
formspec = formspec .. (enchant_buttons[num] or "")
|
||||
meta:set_string("formspec", formspec)
|
||||
|
@ -150,7 +159,7 @@ end
|
|||
|
||||
function enchanting.construct(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("infotext", "Enchantment Table")
|
||||
meta:set_string("infotext", S("Enchantment Table"))
|
||||
enchanting.formspec(pos)
|
||||
|
||||
local inv = meta:get_inventory()
|
||||
|
@ -207,7 +216,7 @@ function enchanting.timer(pos)
|
|||
end
|
||||
|
||||
xdecor.register("enchantment_table", {
|
||||
description = "Enchantment Table",
|
||||
description = S("Enchantment Table"),
|
||||
tiles = {
|
||||
"xdecor_enchantment_top.png", "xdecor_enchantment_bottom.png",
|
||||
"xdecor_enchantment_side.png", "xdecor_enchantment_side.png",
|
||||
|
@ -275,8 +284,9 @@ function enchanting:register_tools(mod, def)
|
|||
end
|
||||
|
||||
minetest.register_tool(":" .. mod .. ":enchanted_" .. tool .. "_" .. material .. "_" .. enchant, {
|
||||
description = "Enchanted " .. cap(material) .. " " .. cap(tool) ..
|
||||
self:get_tooltip(enchant, original_groupcaps[group], fleshy),
|
||||
description = S("Enchanted @1 @2 @3",
|
||||
def.material_desc[material] or cap(material), def.tool_desc[tool] or cap(tool),
|
||||
self:get_tooltip(enchant, original_groupcaps[group], fleshy)),
|
||||
inventory_image = original_tool.inventory_image .. "^[colorize:violet:50",
|
||||
wield_image = original_tool.wield_image,
|
||||
groups = {not_in_creative_inventory = 1},
|
||||
|
@ -294,12 +304,14 @@ end
|
|||
|
||||
enchanting:register_tools("default", {
|
||||
materials = "steel, bronze, mese, diamond",
|
||||
material_desc = {steel = S("Steel"), bronze = S("Bronze"), mese = S("Mese"), diamond = S("Diamond")},
|
||||
tools = {
|
||||
axe = {enchants = "durable, fast"},
|
||||
pick = {enchants = "durable, fast"},
|
||||
shovel = {enchants = "durable, fast"},
|
||||
sword = {enchants = "sharp"}
|
||||
}
|
||||
},
|
||||
tool_desc = {axe = S("Axe"), pick = S("Pickaxe"), shovel = S("Shovel"), sword = S("Sword")},
|
||||
})
|
||||
|
||||
-- Recipes
|
||||
|
|
Loading…
Reference in New Issue