Skip to content

Commit 77dd887

Browse files
sfan5MoNTE48
authored andcommitted
Translate worldedit_brush
1 parent fe2a0e7 commit 77dd887

File tree

3 files changed

+32
-12
lines changed

3 files changed

+32
-12
lines changed

worldedit_brush/init.lua

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
if minetest.raycast == nil then
2-
error(
3-
"worldedit_brush requires at least Minetest 5.0"
4-
)
5-
end
6-
71
local S = minetest.get_translator("worldedit_brush")
82

93
local BRUSH_MAX_DIST = 150
@@ -20,7 +14,8 @@ local brush_on_use = function(itemstack, placer)
2014
local cmd = meta:get_string("command")
2115
if cmd == "" then
2216
worldedit.player_notify(name,
23-
S("This brush is not bound, use //brush to bind a command to it."))
17+
S("This brush is not bound, use @1 to bind a command to it.",
18+
minetest.colorize("#00ffff", "//brush")))
2419
return false
2520
end
2621

@@ -78,7 +73,7 @@ minetest.register_tool(":worldedit:brush", {
7873
worldedit.register_command("brush", {
7974
privs = {worldedit=true},
8075
params = S("none/<cmd> [parameters]"),
81-
description = S("Assign command to WorldEdit brush item"),
76+
description = S("Assign command to WorldEdit brush item or clear assignment using 'none'"),
8277
parse = function(param)
8378
local found, _, cmd, params = param:find("^([^%s]+)%s+(.+)$")
8479
if not found then
@@ -105,21 +100,22 @@ worldedit.register_command("brush", {
105100
else
106101
local cmddef = worldedit.registered_commands[cmd]
107102
if cmddef == nil or cmddef.require_pos ~= 1 then
108-
worldedit.player_notify(name, S("@1 cannot be used with brushes", minetest.colorize("#00ffff", "//"..cmd)))
103+
worldedit.player_notify(name, S("@1 cannot be used with brushes",
104+
minetest.colorize("#00ffff", "//"..cmd)))
109105
return
110106
end
111107

112108
-- Try parsing command params so we can give the user feedback
113109
local ok, err = cmddef.parse(params)
114110
if not ok then
115-
err = err or "invalid usage"
116-
worldedit.player_notify(name, S("Error with brush command: @1", err))
111+
err = err or S("invalid usage")
112+
worldedit.player_notify(name, S("Error with command: @1", err))
117113
return
118114
end
119115

120116
meta:set_string("command", cmd)
121117
meta:set_string("params", params)
122-
local fullcmd = "//" .. cmd .. " " .. params
118+
local fullcmd = minetest.colorize("#00ffff", "//"..cmd) .. " " .. params
123119
meta:set_string("description",
124120
minetest.registered_tools["worldedit:brush"].description .. ": " .. fullcmd)
125121
worldedit.player_notify(name, S("Brush assigned to command: @1", fullcmd))
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# textdomain: worldedit_brush
2+
This brush is not bound, use @1 to bind a command to it.=
3+
Missing privileges: @1=
4+
Too far away.=
5+
WorldEdit Brush=
6+
Assign command to WorldEdit brush item or clear assignment using 'none'=
7+
Not holding brush item.=
8+
Brush assignment cleared.=
9+
@1 cannot be used with brushes=
10+
invalid usage=
11+
Error with command: @1=
12+
Brush assigned to command: @1=
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# textdomain: worldedit_brush
2+
This brush is not bound, use @1 to bind a command to it.=Dieser Pinsel ist nicht konfiguriert, nutzen Sie @1 um ein Befehl an ihn zu binden.
3+
Missing privileges: @1=Fehlende Privilegien: @1
4+
Too far away.=Zu weit weg.
5+
WorldEdit Brush=WorldEdit-Pinsel
6+
Assign command to WorldEdit brush item or clear assignment using 'none'=Befehl an WorldEdit-Pinsel binden oder Zuweisung mittels 'none' aufheben
7+
Not holding brush item.=Kein Pinsel in der Hand.
8+
Brush assignment cleared.=Pinsel-Zuweisung aufgehoben.
9+
@1 cannot be used with brushes=@1 kann nicht mit Pinseln verwendet werden
10+
invalid usage=Ungültige Verwendung
11+
Error with command: @1=Befehl ist fehlerhaft: @1
12+
Brush assigned to command: @1=Pinsel an Befehl gebunden: @1

0 commit comments

Comments
 (0)