Skip to content

Commit 283bdcf

Browse files
sfan5MoNTE48
authored andcommitted
Translate worldedit_brush
1 parent fe2a0e7 commit 283bdcf

File tree

3 files changed

+33
-11
lines changed

3 files changed

+33
-11
lines changed

worldedit_brush/init.lua

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

73
local S = minetest.get_translator("worldedit_brush")
84

@@ -20,7 +16,8 @@ local brush_on_use = function(itemstack, placer)
2016
local cmd = meta:get_string("command")
2117
if cmd == "" then
2218
worldedit.player_notify(name,
23-
S("This brush is not bound, use //brush to bind a command to it."))
19+
S("This brush is not bound, use @1 to bind a command to it.",
20+
minetest.colorize("#00ffff", "//brush")))
2421
return false
2522
end
2623

@@ -78,7 +75,7 @@ minetest.register_tool(":worldedit:brush", {
7875
worldedit.register_command("brush", {
7976
privs = {worldedit=true},
8077
params = S("none/<cmd> [parameters]"),
81-
description = S("Assign command to WorldEdit brush item"),
78+
description = S("Assign command to WorldEdit brush item or clear assignment using 'none'"),
8279
parse = function(param)
8380
local found, _, cmd, params = param:find("^([^%s]+)%s+(.+)$")
8481
if not found then
@@ -105,21 +102,22 @@ worldedit.register_command("brush", {
105102
else
106103
local cmddef = worldedit.registered_commands[cmd]
107104
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)))
105+
worldedit.player_notify(name, S("@1 cannot be used with brushes",
106+
minetest.colorize("#00ffff", "//"..cmd)))
109107
return
110108
end
111109

112110
-- Try parsing command params so we can give the user feedback
113111
local ok, err = cmddef.parse(params)
114112
if not ok then
115-
err = err or "invalid usage"
116-
worldedit.player_notify(name, S("Error with brush command: @1", err))
113+
err = err or S("invalid usage")
114+
worldedit.player_notify(name, S("Error with command: @1", err))
117115
return
118116
end
119117

120118
meta:set_string("command", cmd)
121119
meta:set_string("params", params)
122-
local fullcmd = "//" .. cmd .. " " .. params
120+
local fullcmd = minetest.colorize("#00ffff", "//"..cmd) .. " " .. params
123121
meta:set_string("description",
124122
minetest.registered_tools["worldedit:brush"].description .. ": " .. fullcmd)
125123
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)