locale: reuse "faction x doesn't exist"

This commit is contained in:
Luke aka SwissalpS 2024-09-15 01:50:53 +02:00
parent 827751f562
commit f5c68e3c5d
3 changed files with 7 additions and 11 deletions

@ -244,7 +244,7 @@ local function handle_command(name, param)
)
elseif not facts[faction_name] then
elseif name ~= factions.get_owner(faction_name) and not minetest.get_player_privs(name)[factions.priv] then
return false, S("That faction doesn't exist.")
return false, S("Faction @1 doesn't exist.", faction_name)
return false, S("Permission denied: You are not the owner of that faction, " ..
"and don't have the @1 privilege.", factions.priv)
elseif not factions.valid_password(faction_name, password) then
@ -279,7 +279,7 @@ local function handle_command(name, param)
end
end
if facts[faction_name] == nil then
return false, S("That faction doesn't exist.")
return false, S("Faction @1 doesn't exist.", faction_name)
else
local fmembers = ""
if table.getn(facts[faction_name].members) > factions.max_members_list then
@ -345,7 +345,7 @@ local function handle_command(name, param)
elseif not faction_name then
return false, S("Missing faction name.")
elseif facts[faction_name] == nil then
return false, S("The faction @1 doesn't exist.", faction_name)
return false, S("Faction @1 doesn't exist.", faction_name)
elseif not factions.valid_password(faction_name, password) then
return false, S("Permission denied: Wrong password.")
else
@ -374,7 +374,7 @@ local function handle_command(name, param)
faction_name = params[2]
end
if faction_name == nil then
return false, S("The given faction doesn't exist.")
return false, S("Faction @1 doesn't exist.", faction_name)
elseif factions.get_owner(faction_name) == name then
return false, S("You cannot leave your own faction, change owner or disband it.")
else
@ -510,7 +510,7 @@ local function handle_command(name, param)
elseif not faction_name then
return false, S("Missing faction name.")
elseif facts[faction_name] == nil then
return false, S("The faction @1 doesn't exist.", faction_name)
return false, S("Faction @1 doesn't exist.", faction_name)
elseif not minetest.player_exists(target) then
return false, S("The player doesn't exist.")
elseif factions.mode_unique_faction and factions.get_player_faction(target) ~= nil then

@ -46,15 +46,13 @@ Registered @1.=@1 enregistrée.
See information on a faction=Voir les informations dune faction
See information on a player=Voir les informations dun joueur
That faction already exists.=Cette faction existe déjà.
The faction @1 doesn't exist.=La faction @1 nexiste pas.
Faction @1 doesn't exist.=La faction @1 nexiste pas.
The faction has more than @1 members, the members list can't be shown.=Cette faction a plus que @1 membres, la liste des membres ne peut pas être affichée.
The given faction doesn't exist.=La faction en question nexiste pas.
The player doesn't exist.=Le joueur nexiste pas.
The player is already in the faction "@1".=Le joueur est déjà dans la faction "@1".
There are no factions yet.=Il ny a pas encore de factions.
That faction doesn't exist.=Cette faction nexiste pas.
Player @1 doesn't exist or isn't in any faction.=Le joueur @1 nexiste pas ou nest dans aucune faction.
@1 is not in the specified faction.=@1 nest pas dans la faction spécifiée.
@1 doesn't own any factions.=@1 nest propriétaire daucune faction.

@ -46,15 +46,13 @@ Registered @1.=
See information on a faction=
See information on a player=
That faction already exists.=
The faction @1 doesn't exist.=
Faction @1 doesn't exist.=
The faction has more than @1 members, the members list can't be shown.=
The given faction doesn't exist.=
The player doesn't exist.=
The player is already in the faction "@1".=
There are no factions yet.=
That faction doesn't exist.=
Player @1 doesn't exist or isn't in any faction.=
@1 is not in the specified faction.=
@1 doesn't own any factions.=