forked from minetest-mods/more_chests
Add french translation
This commit is contained in:
parent
1d7edabfc3
commit
9666707470
@ -1,3 +1,6 @@
|
|||||||
|
-- translation support
|
||||||
|
local S = minetest.get_translator("more_chests")
|
||||||
|
|
||||||
local function has_locked_chest_privilege(meta, player)
|
local function has_locked_chest_privilege(meta, player)
|
||||||
if player:get_player_name() ~= meta:get_string("owner") then
|
if player:get_player_name() ~= meta:get_string("owner") then
|
||||||
return false
|
return false
|
||||||
@ -6,7 +9,7 @@ local function has_locked_chest_privilege(meta, player)
|
|||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_node("more_chests:cobble", {
|
minetest.register_node("more_chests:cobble", {
|
||||||
description = "Cobble Chest",
|
description = S("Cobble Chest"),
|
||||||
tiles = {"default_cobble.png", "default_cobble.png", "default_cobble.png",
|
tiles = {"default_cobble.png", "default_cobble.png", "default_cobble.png",
|
||||||
"default_cobble.png", "default_cobble.png", "cobblechest_front.png"},
|
"default_cobble.png", "default_cobble.png", "cobblechest_front.png"},
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
|
13
dropbox.lua
13
dropbox.lua
@ -1,3 +1,7 @@
|
|||||||
|
-- translation support
|
||||||
|
local S = minetest.get_translator("more_chests")
|
||||||
|
local DS = minetest.get_translator("default")
|
||||||
|
|
||||||
local function has_locked_chest_privilege(meta, player)
|
local function has_locked_chest_privilege(meta, player)
|
||||||
if player:get_player_name() ~= meta:get_string("owner") then
|
if player:get_player_name() ~= meta:get_string("owner") then
|
||||||
return false
|
return false
|
||||||
@ -6,7 +10,7 @@ local function has_locked_chest_privilege(meta, player)
|
|||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_node("more_chests:dropbox", {
|
minetest.register_node("more_chests:dropbox", {
|
||||||
description = "Dropbox",
|
description = S("Dropbox"),
|
||||||
tiles = {"dropbox_top.png", "dropbox_top.png", "dropbox_side.png",
|
tiles = {"dropbox_top.png", "dropbox_top.png", "dropbox_side.png",
|
||||||
"dropbox_side.png", "dropbox_side.png", "dropbox_front.png"},
|
"dropbox_side.png", "dropbox_side.png", "dropbox_front.png"},
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
@ -31,8 +35,9 @@ minetest.register_node("more_chests:dropbox", {
|
|||||||
after_place_node = function(pos, placer)
|
after_place_node = function(pos, placer)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
meta:set_string("owner", placer:get_player_name() or "")
|
meta:set_string("owner", placer:get_player_name() or "")
|
||||||
meta:set_string("infotext", "Dropbox (owned by "..
|
meta:set_string("infotext", S("@1 (owned by @2)",
|
||||||
meta:get_string("owner")..")")
|
S("Dropbox"),
|
||||||
|
meta:get_string("owner")))
|
||||||
end,
|
end,
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
@ -47,7 +52,7 @@ minetest.register_node("more_chests:dropbox", {
|
|||||||
"listring[current_name;main]" ..
|
"listring[current_name;main]" ..
|
||||||
"listring[current_player;main]" ..
|
"listring[current_player;main]" ..
|
||||||
default.get_hotbar_bg(0,4.85))
|
default.get_hotbar_bg(0,4.85))
|
||||||
meta:set_string("infotext", "Chest")
|
meta:set_string("infotext", DS("Chest"))
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
inv:set_size("main", 8*4)
|
inv:set_size("main", 8*4)
|
||||||
end,
|
end,
|
||||||
|
11
locale/more_chests.fr.tr
Normal file
11
locale/more_chests.fr.tr
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# textdomain: more_chests
|
||||||
|
Cobble Chest=Coffre en pierre taillée
|
||||||
|
Dropbox=Boîte de dépôt
|
||||||
|
Secret Chest=Coffre secret
|
||||||
|
Shared Chest=Coffre partagé
|
||||||
|
Wifi Chest=Coffre wifi
|
||||||
|
|
||||||
|
|
||||||
|
@1 (owned by @2)=@1 (appartient à @2)
|
||||||
|
Shared with (separate names with spaces)=Partagé avec (séparez les noms avec des espaces)
|
||||||
|
submit=valider
|
12
secret.lua
12
secret.lua
@ -1,3 +1,6 @@
|
|||||||
|
-- translation support
|
||||||
|
local S = minetest.get_translator("more_chests")
|
||||||
|
|
||||||
local function has_locked_chest_privilege(meta, player)
|
local function has_locked_chest_privilege(meta, player)
|
||||||
if player:get_player_name() ~= meta:get_string("owner") then
|
if player:get_player_name() ~= meta:get_string("owner") then
|
||||||
return false
|
return false
|
||||||
@ -20,7 +23,7 @@ local closed = "size[2,1]"..
|
|||||||
"button[0,0;2,1;open;open]"
|
"button[0,0;2,1;open;open]"
|
||||||
|
|
||||||
minetest.register_node("more_chests:secret", {
|
minetest.register_node("more_chests:secret", {
|
||||||
description = "Secret Chest",
|
description = S("Secret Chest"),
|
||||||
tiles = {"secret_top.png", "secret_top.png", "secret_side.png",
|
tiles = {"secret_top.png", "secret_top.png", "secret_side.png",
|
||||||
"secret_side.png", "secret_side.png", "secret_front.png"},
|
"secret_side.png", "secret_side.png", "secret_front.png"},
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
@ -45,13 +48,14 @@ minetest.register_node("more_chests:secret", {
|
|||||||
after_place_node = function(pos, placer)
|
after_place_node = function(pos, placer)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
meta:set_string("owner", placer:get_player_name() or "")
|
meta:set_string("owner", placer:get_player_name() or "")
|
||||||
meta:set_string("infotext", "Secret Chest (owned by "..
|
meta:set_string("infotext", S("@1 (owned by @2)",
|
||||||
meta:get_string("owner")..")")
|
S("Secret Chest"),
|
||||||
|
meta:get_string("owner")))
|
||||||
end,
|
end,
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
meta:set_string("formspec", open)
|
meta:set_string("formspec", open)
|
||||||
meta:set_string("infotext", "Secret Chest")
|
meta:set_string("infotext", S("Secret Chest"))
|
||||||
meta:set_string("owner", "")
|
meta:set_string("owner", "")
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
inv:set_size("main", 8*4)
|
inv:set_size("main", 8*4)
|
||||||
|
16
shared.lua
16
shared.lua
@ -1,3 +1,6 @@
|
|||||||
|
-- translation support
|
||||||
|
local S = minetest.get_translator("more_chests")
|
||||||
|
|
||||||
local function has_locked_chest_privilege(meta, player)
|
local function has_locked_chest_privilege(meta, player)
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
local shared = " "..meta:get_string("shared").." "
|
local shared = " "..meta:get_string("shared").." "
|
||||||
@ -19,15 +22,15 @@ local function get_formspec(string)
|
|||||||
"list[current_name;main;0,0.3;8,4;]"..
|
"list[current_name;main;0,0.3;8,4;]"..
|
||||||
"list[current_player;main;0,4.85;8,1;]" ..
|
"list[current_player;main;0,4.85;8,1;]" ..
|
||||||
"list[current_player;main;0,6;8,3;8]" ..
|
"list[current_player;main;0,6;8,3;8]" ..
|
||||||
"field[.25,9.5;6,1;shared;Shared with (separate names with spaces):;"..string.."]"..
|
"field[.25,9.5;8,1;shared;"..S("Shared with (separate names with spaces)")..":;"..string.."]"..
|
||||||
"button[6,9.2;2,1;submit;submit]" ..
|
"button[6,9.2;2,1;submit;"..S("submit").."]" ..
|
||||||
"listring[current_name;main]" ..
|
"listring[current_name;main]" ..
|
||||||
"listring[current_player;main]" ..
|
"listring[current_player;main]" ..
|
||||||
default.get_hotbar_bg(0,4.85)
|
default.get_hotbar_bg(0,4.85)
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_node("more_chests:shared", {
|
minetest.register_node("more_chests:shared", {
|
||||||
description = "Shared Chest",
|
description = S("Shared Chest"),
|
||||||
tiles = {"shared_top.png", "shared_top.png", "shared_side.png",
|
tiles = {"shared_top.png", "shared_top.png", "shared_side.png",
|
||||||
"shared_side.png", "shared_side.png", "shared_front.png"},
|
"shared_side.png", "shared_side.png", "shared_front.png"},
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
@ -52,13 +55,14 @@ minetest.register_node("more_chests:shared", {
|
|||||||
after_place_node = function(pos, placer)
|
after_place_node = function(pos, placer)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
meta:set_string("owner", placer:get_player_name() or "")
|
meta:set_string("owner", placer:get_player_name() or "")
|
||||||
meta:set_string("infotext", "Shared Chest (owned by "..
|
meta:set_string("infotext", S("@1 (owned by @2)",
|
||||||
meta:get_string("owner")..")")
|
S("Shared Chest"),
|
||||||
|
meta:get_string("owner")))
|
||||||
end,
|
end,
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
meta:set_string("formspec", get_formspec(""))
|
meta:set_string("formspec", get_formspec(""))
|
||||||
meta:set_string("infotext", "Shared Chest")
|
meta:set_string("infotext", S("Shared Chest"))
|
||||||
meta:set_string("owner", "")
|
meta:set_string("owner", "")
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
inv:set_size("main", 8*4)
|
inv:set_size("main", 8*4)
|
||||||
|
7
wifi.lua
7
wifi.lua
@ -1,5 +1,8 @@
|
|||||||
|
-- translation support
|
||||||
|
local S = minetest.get_translator("more_chests")
|
||||||
|
|
||||||
minetest.register_node("more_chests:wifi", {
|
minetest.register_node("more_chests:wifi", {
|
||||||
description = "Wifi Chest",
|
description = S("Wifi Chest"),
|
||||||
tiles = {"wifi_top.png", "wifi_top.png", "wifi_side.png",
|
tiles = {"wifi_top.png", "wifi_top.png", "wifi_side.png",
|
||||||
"wifi_side.png", "wifi_side.png", "wifi_front.png"},
|
"wifi_side.png", "wifi_side.png", "wifi_front.png"},
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
@ -20,7 +23,7 @@ minetest.register_node("more_chests:wifi", {
|
|||||||
"listring[current_player;main]" ..
|
"listring[current_player;main]" ..
|
||||||
default.get_hotbar_bg(0,4.85))
|
default.get_hotbar_bg(0,4.85))
|
||||||
|
|
||||||
meta:set_string("infotext", "Wifi Chest")
|
meta:set_string("infotext", S("Wifi Chest"))
|
||||||
end,
|
end,
|
||||||
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
||||||
minetest.log("action", player:get_player_name()..
|
minetest.log("action", player:get_player_name()..
|
||||||
|
Loading…
Reference in New Issue
Block a user