mirror of
https://github.com/minetest-mods/areas.git
synced 2024-08-20 18:24:05 +02:00
Rework on messages displayed
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
This commit is contained in:
parent
2f4eddd324
commit
448fe3ebf1
@ -33,7 +33,7 @@ minetest.register_chatcommand("protect", {
|
|||||||
|
|
||||||
minetest.register_chatcommand("set_owner", {
|
minetest.register_chatcommand("set_owner", {
|
||||||
params = S("<PlayerName>").." "..S("<AreaName>"),
|
params = S("<PlayerName>").." "..S("<AreaName>"),
|
||||||
description = S("Protect an area beetween two positions and give"
|
description = S("Protect an area between two positions and give"
|
||||||
.." a player access to it without setting the parent of the"
|
.." a player access to it without setting the parent of the"
|
||||||
.." area to any existing area"),
|
.." area to any existing area"),
|
||||||
privs = areas.adminPrivs,
|
privs = areas.adminPrivs,
|
||||||
@ -117,7 +117,7 @@ minetest.register_chatcommand("add_owner", {
|
|||||||
|
|
||||||
minetest.register_chatcommand("rename_area", {
|
minetest.register_chatcommand("rename_area", {
|
||||||
params = S("<ID>").." "..S("<newName>"),
|
params = S("<ID>").." "..S("<newName>"),
|
||||||
description = S("Rename a area that you own"),
|
description = S("Rename an area that you own"),
|
||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
local id, newName = param:match("^(%d+)%s(.+)$")
|
local id, newName = param:match("^(%d+)%s(.+)$")
|
||||||
if not id then
|
if not id then
|
||||||
@ -141,7 +141,7 @@ minetest.register_chatcommand("rename_area", {
|
|||||||
|
|
||||||
|
|
||||||
minetest.register_chatcommand("find_areas", {
|
minetest.register_chatcommand("find_areas", {
|
||||||
params = S("<regexp>"),
|
params = "<regexp>",
|
||||||
description = S("Find areas using a Lua regular expression"),
|
description = S("Find areas using a Lua regular expression"),
|
||||||
privs = areas.adminPrivs,
|
privs = areas.adminPrivs,
|
||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
@ -193,7 +193,7 @@ minetest.register_chatcommand("list_areas", {
|
|||||||
|
|
||||||
minetest.register_chatcommand("recursive_remove_areas", {
|
minetest.register_chatcommand("recursive_remove_areas", {
|
||||||
params = S("<ID>"),
|
params = S("<ID>"),
|
||||||
description = S("Recursively remove areas using an id"),
|
description = S("Recursively remove areas using an ID"),
|
||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
local id = tonumber(param)
|
local id = tonumber(param)
|
||||||
if not id then
|
if not id then
|
||||||
@ -215,7 +215,7 @@ minetest.register_chatcommand("recursive_remove_areas", {
|
|||||||
|
|
||||||
minetest.register_chatcommand("remove_area", {
|
minetest.register_chatcommand("remove_area", {
|
||||||
params = S("<ID>"),
|
params = S("<ID>"),
|
||||||
description = S("Remove an area using an id"),
|
description = S("Remove an area using an ID"),
|
||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
local id = tonumber(param)
|
local id = tonumber(param)
|
||||||
if not id then
|
if not id then
|
||||||
@ -236,7 +236,7 @@ minetest.register_chatcommand("remove_area", {
|
|||||||
|
|
||||||
minetest.register_chatcommand("change_owner", {
|
minetest.register_chatcommand("change_owner", {
|
||||||
params = S("<ID>").." "..S("<NewOwner>"),
|
params = S("<ID>").." "..S("<NewOwner>"),
|
||||||
description = S("Change the owner of an area using it's ID"),
|
description = S("Change the owner of an area using its ID"),
|
||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
local id, newOwner = param:match("^(%d+)%s(%S+)$")
|
local id, newOwner = param:match("^(%d+)%s(%S+)$")
|
||||||
if not id then
|
if not id then
|
||||||
@ -361,27 +361,15 @@ minetest.register_chatcommand("area_info", {
|
|||||||
local max_size = has_high_limit and
|
local max_size = has_high_limit and
|
||||||
size_limit_high or size_limit
|
size_limit_high or size_limit
|
||||||
|
|
||||||
-- Privilege information
|
-- Self protection information
|
||||||
local self_prot_line = (self_prot and prot_priv) and
|
local self_prot_line = self_prot and S("Self protection is enabled.") or
|
||||||
(has_prot_priv and
|
|
||||||
(self_prot and
|
|
||||||
S("Self protection is enabled and you have the "..
|
|
||||||
"necessary privilege (\"@1\").", prot_priv) or
|
|
||||||
S("Self protection is disabled and you have the "..
|
|
||||||
"necessary privilege (\"@1\").", prot_priv)
|
|
||||||
) or
|
|
||||||
(self_prot and
|
|
||||||
S("Self protection is enabled but you don't have the "..
|
|
||||||
"necessary privilege (\"@1\").", prot_priv) or
|
|
||||||
S("Self protection is disabled but you don't have the "..
|
|
||||||
"necessary privilege (\"@1\").", prot_priv)
|
|
||||||
)
|
|
||||||
) or
|
|
||||||
(self_prot and
|
|
||||||
S("Self protection is enabled.") or
|
|
||||||
S("Self protection is disabled.")
|
S("Self protection is disabled.")
|
||||||
)
|
|
||||||
table.insert(lines, self_prot_line)
|
table.insert(lines, self_prot_line)
|
||||||
|
-- Privilege information
|
||||||
|
local priv_line = has_prot_priv and
|
||||||
|
S("You have the necessary privilege (\"@1\").", prot_priv) or
|
||||||
|
S("You don't have the necessary privilege (\"@1\").", prot_priv)
|
||||||
|
table.insert(lines, priv_line)
|
||||||
if privs.areas then
|
if privs.areas then
|
||||||
table.insert(lines, S("You are an area"..
|
table.insert(lines, S("You are an area"..
|
||||||
" administrator (\"areas\" privilege)."))
|
" administrator (\"areas\" privilege)."))
|
||||||
@ -398,25 +386,13 @@ minetest.register_chatcommand("area_info", {
|
|||||||
area_num = area_num + 1
|
area_num = area_num + 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local count_line = privs.areas and
|
table.insert(lines, S("You have @1 areas.", area_num))
|
||||||
((area_num <= 1) and
|
|
||||||
S("You have @1 area and have no area "..
|
-- Area limit
|
||||||
"protection limits.", area_num) or
|
local area_limit_line = privs.areas and
|
||||||
S("You have @1 areas and have no area "..
|
S("Limit: no area count limit") or
|
||||||
"protection limits.", area_num)
|
S("Limit: @1 areas", max_count)
|
||||||
) or
|
table.insert(lines, area_limit_line)
|
||||||
(can_prot and (
|
|
||||||
(area_num <= 1) and
|
|
||||||
S("You have @1 area, out of a "..
|
|
||||||
"maximum of @2.", area_num, max_count) or
|
|
||||||
S("You have @1 areas, out of a "..
|
|
||||||
"maximum of @2.", area_num, max_count)
|
|
||||||
) or
|
|
||||||
(area_num <= 1) and
|
|
||||||
S("You have @1 area.", area_num) or
|
|
||||||
S("You have @1 areas.", area_num)
|
|
||||||
)
|
|
||||||
table.insert(lines, count_line)
|
|
||||||
|
|
||||||
-- Area size limits
|
-- Area size limits
|
||||||
local function size_info(str, size)
|
local function size_info(str, size)
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
<ParentID>=<IDZonePrincipale>
|
<ParentID>=<IDZonePrincipale>
|
||||||
<PlayerName>=<NomJoueur>
|
<PlayerName>=<NomJoueur>
|
||||||
<newName>=<NouveauNom>
|
<newName>=<NouveauNom>
|
||||||
<regexp>=<regexp>
|
|
||||||
@1 has given you control over the area "@2" (ID @3).=@1 vous a donné le contrôle de la zone "@2" (ID @3).
|
@1 has given you control over the area "@2" (ID @3).=@1 vous a donné le contrôle de la zone "@2" (ID @3).
|
||||||
@1 spanning up to @2x@3x@4.=@1 s’étendant jusqu’à @2x@3x@4.
|
@1 spanning up to @2x@3x@4.=@1 s’étendant jusqu’à @2x@3x@4.
|
||||||
A regular expression is required.=Une expression régulière est requise.
|
A regular expression is required.=Une expression régulière est requise.
|
||||||
@ -21,13 +20,15 @@ Area opened.=Zone ouverte.
|
|||||||
Area protected. ID: @1=Zone protégée. ID : @1
|
Area protected. ID: @1=Zone protégée. ID : @1
|
||||||
Area renamed.=Zone renommée.
|
Area renamed.=Zone renommée.
|
||||||
Area successfully moved.=Zone déplacée avec succès.
|
Area successfully moved.=Zone déplacée avec succès.
|
||||||
Change the owner of an area using it's ID=Change le propriétaire d’une zone en utilisant son ID.
|
Change the owner of an area using its ID=Change le propriétaire d’une zone en utilisant son ID.
|
||||||
Find areas using a Lua regular expression=Trouve les zones en utilisant une expression régulière Lua.
|
Find areas using a Lua regular expression=Trouve les zones en utilisant une expression régulière Lua.
|
||||||
Get information about area configuration and usage.=Obtient des informations sur la configuration des zones et l’utilisation des zones.
|
Get information about area configuration and usage.=Obtient des informations sur la configuration des zones et l’utilisation des zones.
|
||||||
|
|
||||||
Give a player access to a sub-area beetween two positions that have already been protected, Use set_owner if you don't want the parent to be set.=Donne au joueur accès aux sous-zones entre deux positions qui ont déjà été protégées ; utilisez set_owner si vous ne voulez pas que la zone pricipale soit définie.
|
Give a player access to a sub-area beetween two positions that have already been protected, Use set_owner if you don't want the parent to be set.=Donne au joueur accès aux sous-zones entre deux positions qui ont déjà été protégées ; utilisez set_owner si vous ne voulez pas que la zone pricipale soit définie.
|
||||||
|
|
||||||
Invalid regular expression.=Expression régulière invalide.
|
Invalid regular expression.=Expression régulière invalide.
|
||||||
|
Limit: @1 areas=Limite: @1 zones.
|
||||||
|
Limit: no area count limit=Limite: pas de limite de nombre de zones.
|
||||||
List your areas, or all areas if you are an admin.=Liste vos zones, ou toutes les zones si vous êtes administrateur.
|
List your areas, or all areas if you are an admin.=Liste vos zones, ou toutes les zones si vous êtes administrateur.
|
||||||
Move (or resize) an area to the current positions.=Déplace (ou redimensionne) une zone aux positions actuelles.
|
Move (or resize) an area to the current positions.=Déplace (ou redimensionne) une zone aux positions actuelles.
|
||||||
No matches found.=Aucun résultat.
|
No matches found.=Aucun résultat.
|
||||||
@ -35,25 +36,15 @@ No visible areas.=Pas de zone visible.
|
|||||||
Owner changed.=Propriétaire changé.
|
Owner changed.=Propriétaire changé.
|
||||||
Players with the "@1" privilege can protect up to @2 areas=Les joueurs avec le privilège "@1" peuvent protéger jusqu’à @2 zones
|
Players with the "@1" privilege can protect up to @2 areas=Les joueurs avec le privilège "@1" peuvent protéger jusqu’à @2 zones
|
||||||
|
|
||||||
Protect an area beetween two positions and give a player access to it without setting the parent of the area to any existing area=Protège une zone entre deux positions et donne à un joueur accès à cette zone sans définir la zone principale de cette zone ni aucune zone existante.
|
Protect an area between two positions and give a player access to it without setting the parent of the area to any existing area=Protège une zone entre deux positions et donne à un joueur accès à cette zone sans définir la zone principale de cette zone ni aucune zone existante.
|
||||||
|
|
||||||
Protect your own area=Protège votre zone.
|
Protect your own area=Protège votre zone.
|
||||||
Recursively remove areas using an id=Supprime les zones récursivement en utilisant un ID.
|
Recursively remove areas using an ID=Supprime les zones récursivement en utilisant un ID.
|
||||||
Remove an area using an id=Supprime une zone en utilisant son ID.
|
Remove an area using an ID=Supprime une zone en utilisant son ID.
|
||||||
Removed area @1=Zone @1 supprimée.
|
Removed area @1=Zone @1 supprimée.
|
||||||
Removed area @1 and it's sub areas.=Zone @1 et ses sous-zones supprimées.
|
Removed area @1 and it's sub areas.=Zone @1 et ses sous-zones supprimées.
|
||||||
Rename a area that you own=Renomme une zone qui vous appartient.
|
Rename an area that you own=Renomme une zone qui vous appartient.
|
||||||
|
|
||||||
Self protection is disabled and you have the necessary privilege ("@1").=L’autoprotection est désactivée et vous avez le privilège nécessaire ("@1").
|
|
||||||
|
|
||||||
Self protection is disabled but you don't have the necessary privilege ("@1").=L’autoprotection est désactivée mais vous n’avez pas le privilège nécessaire ("@1").
|
|
||||||
|
|
||||||
Self protection is disabled.=L’autoprotection est désactivée.
|
Self protection is disabled.=L’autoprotection est désactivée.
|
||||||
|
|
||||||
Self protection is enabled and you have the necessary privilege ("@1").=L’autoprotection est activée et vous avez le privilège nécessaire ("@1").
|
|
||||||
|
|
||||||
Self protection is enabled but you don't have the necessary privilege ("@1").=L’autoprotection est activée mais vous n’avez pas le privilège nécessaire ("@1").
|
|
||||||
|
|
||||||
Self protection is enabled.=L’autoprotection est activée.
|
Self protection is enabled.=L’autoprotection est activée.
|
||||||
That area doesn't exist.=La zone n’existe pas.
|
That area doesn't exist.=La zone n’existe pas.
|
||||||
The player "@1" does not exist.=Le joueur "@1" n’existe pas.
|
The player "@1" does not exist.=Le joueur "@1" n’existe pas.
|
||||||
@ -63,18 +54,15 @@ You are an area administrator ("areas" privilege).=Vous êtes un administrateur
|
|||||||
You can protect areas=Vous pouvez protéger des zones.
|
You can protect areas=Vous pouvez protéger des zones.
|
||||||
You can't protect that area.=Vous ne pouvez pas protéger cette zone.
|
You can't protect that area.=Vous ne pouvez pas protéger cette zone.
|
||||||
You can't protect that area: @1=Vous ne pouvez pas protéger cette zone : @1.
|
You can't protect that area: @1=Vous ne pouvez pas protéger cette zone : @1.
|
||||||
|
You don't have the necessary privilege ("@1").=Vous n’avez pas le privilège nécessaire ("@1").
|
||||||
You don't own that area.=Vous ne possédez pas cette zone.
|
You don't own that area.=Vous ne possédez pas cette zone.
|
||||||
You have @1 area and have no area protection limits.=Vous avez @1 zone et n’avez pas de limite de protection de zones.
|
|
||||||
You have @1 area, out of a maximum of @2.=Vous avez @1 zone sur un maximum de @2.
|
|
||||||
You have @1 area.=Vous avez @1 zone.
|
|
||||||
You have @1 areas and have no area protection limits.=Vous avez @1 zones et n’avez pas de limite de protection de zones.
|
|
||||||
You have @1 areas, out of a maximum of @2.=Vous avez @1 zones sur un maximum de @2.
|
|
||||||
You have @1 areas.=Vous avez @1 zones.
|
You have @1 areas.=Vous avez @1 zones.
|
||||||
|
|
||||||
You have been granted control over area #@1. Type /list_areas to show your areas.=Vous avez reçu l’autorisation de contrôler la zone #@1.
|
You have been granted control over area #@1. Type /list_areas to show your areas.=Vous avez reçu l’autorisation de contrôler la zone #@1.
|
||||||
|
|
||||||
You have extended area protection limits ("areas_high_limit" privilege).=Votre limite de protection de zones est étendue (privilège "areas_high_limit").
|
You have extended area protection limits ("areas_high_limit" privilege).=Votre limite de protection de zones est étendue (privilège "areas_high_limit").
|
||||||
|
|
||||||
|
You have the necessary privilege ("@1").=Vous avez le privilège nécessaire ("@1").
|
||||||
You need to select an area first.=Vous devez sélectionner une zone d’abord.
|
You need to select an area first.=Vous devez sélectionner une zone d’abord.
|
||||||
|
|
||||||
### chatcommands.lua ###
|
### chatcommands.lua ###
|
||||||
@ -124,7 +112,7 @@ Area @1 selected.=Zone @1 sélectionnée.
|
|||||||
Area position @1 set to @2=Position @1 de la zone définie à @2.
|
Area position @1 set to @2=Position @1 de la zone définie à @2.
|
||||||
Position @1 set to @2=Position @1 définie à @2.
|
Position @1 set to @2=Position @1 définie à @2.
|
||||||
Position @1: =Position @1 :
|
Position @1: =Position @1 :
|
||||||
Select a area by id.=Sélectionnez une zone par son ID.
|
Select an area by ID.=Sélectionnez une zone par son ID.
|
||||||
Select position @1 by punching a node.=Sélectionnez une position en frappant un bloc.
|
Select position @1 by punching a node.=Sélectionnez une position en frappant un bloc.
|
||||||
Select positions by punching two nodes.=Sélectionnez une position en frappant deux blocs.
|
Select positions by punching two nodes.=Sélectionnez une position en frappant deux blocs.
|
||||||
|
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
<ParentID>=
|
<ParentID>=
|
||||||
<PlayerName>=
|
<PlayerName>=
|
||||||
<newName>=
|
<newName>=
|
||||||
<regexp>=
|
|
||||||
@1 has given you control over the area "@2" (ID @3).=
|
@1 has given you control over the area "@2" (ID @3).=
|
||||||
@1 spanning up to @2x@3x@4.=
|
@1 spanning up to @2x@3x@4.=
|
||||||
A regular expression is required.=
|
A regular expression is required.=
|
||||||
@ -21,13 +20,15 @@ Area opened.=
|
|||||||
Area protected. ID: @1=
|
Area protected. ID: @1=
|
||||||
Area renamed.=
|
Area renamed.=
|
||||||
Area successfully moved.=
|
Area successfully moved.=
|
||||||
Change the owner of an area using it's ID=
|
Change the owner of an area using its ID=
|
||||||
Find areas using a Lua regular expression=
|
Find areas using a Lua regular expression=
|
||||||
Get information about area configuration and usage.=
|
Get information about area configuration and usage.=
|
||||||
|
|
||||||
Give a player access to a sub-area beetween two positions that have already been protected, Use set_owner if you don't want the parent to be set.=
|
Give a player access to a sub-area beetween two positions that have already been protected, Use set_owner if you don't want the parent to be set.=
|
||||||
|
|
||||||
Invalid regular expression.=
|
Invalid regular expression.=
|
||||||
|
Limit: @1 areas=
|
||||||
|
Limit: no area count limit=
|
||||||
List your areas, or all areas if you are an admin.=
|
List your areas, or all areas if you are an admin.=
|
||||||
Move (or resize) an area to the current positions.=
|
Move (or resize) an area to the current positions.=
|
||||||
No matches found.=
|
No matches found.=
|
||||||
@ -35,25 +36,15 @@ No visible areas.=
|
|||||||
Owner changed.=
|
Owner changed.=
|
||||||
Players with the "@1" privilege can protect up to @2 areas=
|
Players with the "@1" privilege can protect up to @2 areas=
|
||||||
|
|
||||||
Protect an area beetween two positions and give a player access to it without setting the parent of the area to any existing area=
|
Protect an area between two positions and give a player access to it without setting the parent of the area to any existing area=
|
||||||
|
|
||||||
Protect your own area=
|
Protect your own area=
|
||||||
Recursively remove areas using an id=
|
Recursively remove areas using an ID=
|
||||||
Remove an area using an id=
|
Remove an area using an ID=
|
||||||
Removed area @1=
|
Removed area @1=
|
||||||
Removed area @1 and it's sub areas.=
|
Removed area @1 and it's sub areas.=
|
||||||
Rename a area that you own=
|
Rename an area that you own=
|
||||||
|
|
||||||
Self protection is disabled and you have the necessary privilege ("@1").=
|
|
||||||
|
|
||||||
Self protection is disabled but you don't have the necessary privilege ("@1").=
|
|
||||||
|
|
||||||
Self protection is disabled.=
|
Self protection is disabled.=
|
||||||
|
|
||||||
Self protection is enabled and you have the necessary privilege ("@1").=
|
|
||||||
|
|
||||||
Self protection is enabled but you don't have the necessary privilege ("@1").=
|
|
||||||
|
|
||||||
Self protection is enabled.=
|
Self protection is enabled.=
|
||||||
That area doesn't exist.=
|
That area doesn't exist.=
|
||||||
The player "@1" does not exist.=
|
The player "@1" does not exist.=
|
||||||
@ -63,18 +54,15 @@ You are an area administrator ("areas" privilege).=
|
|||||||
You can protect areas=
|
You can protect areas=
|
||||||
You can't protect that area.=
|
You can't protect that area.=
|
||||||
You can't protect that area: @1=
|
You can't protect that area: @1=
|
||||||
|
You don't have the necessary privilege ("@1").=
|
||||||
You don't own that area.=
|
You don't own that area.=
|
||||||
You have @1 area and have no area protection limits.=
|
|
||||||
You have @1 area, out of a maximum of @2.=
|
|
||||||
You have @1 area.=
|
|
||||||
You have @1 areas and have no area protection limits.=
|
|
||||||
You have @1 areas, out of a maximum of @2.=
|
|
||||||
You have @1 areas.=
|
You have @1 areas.=
|
||||||
|
|
||||||
You have been granted control over area #@1. Type /list_areas to show your areas.=
|
You have been granted control over area #@1. Type /list_areas to show your areas.=
|
||||||
|
|
||||||
You have extended area protection limits ("areas_high_limit" privilege).=
|
You have extended area protection limits ("areas_high_limit" privilege).=
|
||||||
|
|
||||||
|
You have the necessary privilege ("@1").=
|
||||||
You need to select an area first.=
|
You need to select an area first.=
|
||||||
|
|
||||||
### chatcommands.lua ###
|
### chatcommands.lua ###
|
||||||
@ -124,7 +112,7 @@ Area @1 selected.=
|
|||||||
Area position @1 set to @2=
|
Area position @1 set to @2=
|
||||||
Position @1 set to @2=
|
Position @1 set to @2=
|
||||||
Position @1: =
|
Position @1: =
|
||||||
Select a area by id.=
|
Select an area by ID.=
|
||||||
Select position @1 by punching a node.=
|
Select position @1 by punching a node.=
|
||||||
Select positions by punching two nodes.=
|
Select positions by punching two nodes.=
|
||||||
|
|
||||||
|
2
pos.lua
2
pos.lua
@ -23,7 +23,7 @@ end
|
|||||||
|
|
||||||
minetest.register_chatcommand("select_area", {
|
minetest.register_chatcommand("select_area", {
|
||||||
params = S("<ID>"),
|
params = S("<ID>"),
|
||||||
description = S("Select a area by id."),
|
description = S("Select an area by ID."),
|
||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
local id = tonumber(param)
|
local id = tonumber(param)
|
||||||
if not id then
|
if not id then
|
||||||
|
Loading…
Reference in New Issue
Block a user