Add minetest.translator support (issue #56)

This commit is contained in:
Joachim Stolberg 2020-11-13 20:32:21 +01:00
parent 8102ab7275
commit 0acb2e82cd
7 changed files with 48 additions and 55 deletions

@ -83,4 +83,3 @@ SmartLine Timer=SmartLine Timer
SmartLine Timer Help@n@nThe Timer is for a daytime controlled sending of commands@ne.g. to turn street lights on/off. The timer checks the @ntime every few seconds. If the block was just loaded, @nthe timer will check the last 4 hours for commands@nthat still need to be executed.=SmartLine Timer Hilfe@n@nDer Timer st zum Tageszeit abhängigem Senden von Kommandos@nDer Timer prüft die regeln alle paar Sekunden.@nFalls die Block gerade erst aktiviert wurde (Spieler kommt in die Nähe),@nwerden auch die Kommandos der letzten 4 Spielstunden@ngeprüft und ggf. ausgeführt. SmartLine Timer Help@n@nThe Timer is for a daytime controlled sending of commands@ne.g. to turn street lights on/off. The timer checks the @ntime every few seconds. If the block was just loaded, @nthe timer will check the last 4 hours for commands@nthat still need to be executed.=SmartLine Timer Hilfe@n@nDer Timer st zum Tageszeit abhängigem Senden von Kommandos@nDer Timer prüft die regeln alle paar Sekunden.@nFalls die Block gerade erst aktiviert wurde (Spieler kommt in die Nähe),@nwerden auch die Kommandos der letzten 4 Spielstunden@ngeprüft und ggf. ausgeführt.
Time=Zeit Time=Zeit

@ -71,7 +71,7 @@ local function formspec_help()
default.gui_slots.. default.gui_slots..
"label[3,0;"..S("Player Detector Help").."]".. "label[3,0;"..S("Player Detector Help").."]"..
"label[0,1;"..help.."]".. "label[0,1;"..help.."]"..
"button_exit[4,8;2,1;exit;"..S("close").."]" "button_exit[4,8;2,1;exit2;"..S("close").."]"
end end
@ -83,7 +83,7 @@ local function formspec(numbers, names)
"label[2,0;"..S("Player Detector").."]".. "label[2,0;"..S("Player Detector").."]"..
"field[0.3,1;8,1;numbers;"..S("Receiver node numbers:")..";"..numbers.."]" .. "field[0.3,1;8,1;numbers;"..S("Receiver node numbers:")..";"..numbers.."]" ..
"field[0.3,2.5;8,1;names;"..S("Player name(s):")..";"..names.."]" .. "field[0.3,2.5;8,1;names;"..S("Player name(s):")..";"..names.."]" ..
"button_exit[5,3.5;2,1;exit;"..S("Save").."]".. "button_exit[5,3.5;2,1;exit1;"..S("Save").."]"..
"button[1,3.5;1,1;help;"..S("help").."]" "button[1,3.5;1,1;help;"..S("help").."]"
end end
@ -91,15 +91,16 @@ local function on_receive_fields(pos, formname, fields, player)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
local owner = meta:get_string("owner") local owner = meta:get_string("owner")
if player:get_player_name() == owner then if player:get_player_name() == owner then
if fields.exit == "Save" then print(dump(fields))
if fields.exit1 then
if tubelib.check_numbers(fields.numbers) then if tubelib.check_numbers(fields.numbers) then
meta:set_string("numbers", fields.numbers) meta:set_string("numbers", fields.numbers)
end end
meta:set_string("names", fields.names) meta:set_string("names", fields.names)
meta:set_string("formspec", formspec(fields.numbers, fields.names)) meta:set_string("formspec", formspec(fields.numbers, fields.names))
elseif fields.help ~= nil then elseif fields.help then
meta:set_string("formspec", formspec_help()) meta:set_string("formspec", formspec_help())
elseif fields.exit == "close" then elseif fields.exit2 then
local numbers = meta:get_string("numbers") local numbers = meta:get_string("numbers")
local names = meta:get_string("names") local names = meta:get_string("names")
meta:set_string("formspec", formspec(numbers, names)) meta:set_string("formspec", formspec(numbers, names))

@ -607,7 +607,7 @@ function tubelib.temporary_remove_node(pos, number, name, add_data)
add_data.name = name add_data.name = name
TemporaryRemovedNodes[key] = add_data TemporaryRemovedNodes[key] = add_data
else else
local data = table.copy(TemporaryRemovedNodes[key]) local data = table.copy(TemporaryRemovedNodes[key] or {})
TemporaryRemovedNodes[key] = nil TemporaryRemovedNodes[key] = nil
return data return data
end end

@ -119,7 +119,7 @@ local function formspec(player)
local ypos = 0.2 + idx * 0.4 local ypos = 0.2 + idx * 0.4
tRes[#tRes+1] = "label[0,"..ypos..";"..idx.."]" tRes[#tRes+1] = "label[0,"..ypos..";"..idx.."]"
tRes[#tRes+1] = "label[0.8,"..ypos..";"..P2S(pos1).."]" tRes[#tRes+1] = "label[0.8,"..ypos..";"..P2S(pos1).."]"
tRes[#tRes+1] = "label[3.2,"..ypos..";to]" tRes[#tRes+1] = "label[3.2,"..ypos..";"..S("to").."]"
tRes[#tRes+1] = "label[4,"..ypos..";"..P2S(pos2).."]" tRes[#tRes+1] = "label[4,"..ypos..";"..P2S(pos2).."]"
end end
return table.concat(tRes) return table.concat(tRes)
@ -148,7 +148,7 @@ minetest.register_node("tubelib:forceload", {
if add_pos(pos, placer) then if add_pos(pos, placer) then
minetest.forceload_block(pos, true) minetest.forceload_block(pos, true)
local pos1, pos2, num, max = get_data(pos, placer) local pos1, pos2, num, max = get_data(pos, placer)
M(pos):set_string("infotext", S("Area").." "..P2S(pos1).." to "..P2S(pos2).." "..S("loaded!").."\n".. M(pos):set_string("infotext", S("Area").." "..P2S(pos1).." "..S("to").." "..P2S(pos2).." "..S("loaded!").."\n"..
S("Punch the block to make the area visible.")) S("Punch the block to make the area visible."))
chat(placer, S("Area").." ("..num.."/"..max..") "..P2S(pos1).." "..S("to").." "..P2S(pos2).." "..S("loaded!")) chat(placer, S("Area").." ("..num.."/"..max..") "..P2S(pos1).." "..S("to").." "..P2S(pos2).." "..S("loaded!"))
tubelib.mark_region(placer:get_player_name(), pos1, pos2) tubelib.mark_region(placer:get_player_name(), pos1, pos2)

@ -41,7 +41,7 @@ List of your Forceload Blocks=Liste deiner Forceload Blöcke
Punch the block to make the area visible.=Schlage den Block um den Bereich anzuzeigen Punch the block to make the area visible.=Schlage den Block um den Bereich anzuzeigen
Tubelib Forceload Block=Tubelib Forceload Block Tubelib Forceload Block=Tubelib Forceload Block
loaded!=geladen! loaded!=geladen!
to=zu to=bis
### init.lua ### ### init.lua ###

@ -23,7 +23,7 @@ Save=Speichern
### ceilinglamp.lua ### ### ceilinglamp.lua ###
Tubelib Ceiling Lamp= Tubelib Ceiling Lamp=Tubelib Deckenleuchte
### colorlamp.lua ### ### colorlamp.lua ###
### colorlamp_ud.lua ### ### colorlamp_ud.lua ###
@ -33,7 +33,7 @@ Tubelib Color Lamp=Tubelib Farblampe
### doorblock.lua ### ### doorblock.lua ###
Select texture=Wähle Textur Select texture=Wähle Textur
Tubelib Door Block= Tubelib Door Block=Tubelib Türblock
### gateblock.lua ### ### gateblock.lua ###
@ -41,86 +41,78 @@ Tubelib Gate Block=Tubelib Torblock
### industriallamp.lua ### ### industriallamp.lua ###
Tubelib Industrial Lamp= Tubelib Industrial Lamp=Tubelib Industrielampe
### invisiblelamp.lua ### ### invisiblelamp.lua ###
Tubelib Invisible Lamp= Tubelib Invisible Lamp=Tubelib Unsichtbare Lampe
### logic_not.lua ### ### logic_not.lua ###
Tubelib Logic Not= #WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Tubelib Logic Not=Tubelib Logisches NOT
### logic_not.lua ### ### logic_not.lua ###
### mesecons_converter.lua ### ### mesecons_converter.lua ###
### repeater.lua ### ### repeater.lua ###
: connected with= : connected with=: verbunden mit
: not connected= : not connected=: nicht verbunden
Destination node numbers= Destination node numbers=Zielknotennummern
### mesecons_converter.lua ### ### mesecons_converter.lua ###
Tubelib Mesecons Converter= Tubelib Mesecons Converter=Tubelib Mesecons Konverter
### mesecons_converter.lua ### ### mesecons_converter.lua ###
### repeater.lua ### ### repeater.lua ###
: fault (overloaded)= : fault (overloaded)=: Fehler (überlastet)
### programmer.lua ### ### programmer.lua ###
Tubelib Programmer= Tubelib Programmer=Tubelib Programmer
[Tubelib Programmer] Error: programmer not supported!= [Tubelib Programmer] Error: programmer not supported!=[Tubelib Programmer] Fehler: Programmer wird nicht unterstützt!
[Tubelib Programmer] Unknown node on= [Tubelib Programmer] Unknown node on=[Tubelib Programmer] Unbekannter Knoten an
[Tubelib Programmer] foreign or unknown node!= [Tubelib Programmer] foreign or unknown node!=[Tubelib Programmer] fremder oder unbekannter Knoten!
[Tubelib Programmer] node programmed!= [Tubelib Programmer] node programmed!=[Tubelib Programmer] Knoten programmiert!
[Tubelib Programmer] number= [Tubelib Programmer] number=[Tubelib Programmer] Nummer
[Tubelib Programmer] programmer reset= [Tubelib Programmer] programmer reset=[Tubelib Programmer] Programmer zurückgesetzt
read= read=lesen
### repeater.lua ### ### repeater.lua ###
Tubelib Repeater= #WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Tubelib Repeater=Tubelib Repeater
### sequencer.lua ### ### sequencer.lua ###
Define a sequence of commands@nto control other machines.= Define a sequence of commands@nto control other machines.=Definieren Sie eine Folge von Befehlen@nandere Maschinen zu steuern.
If endless is set, the Sequencer@nrestarts again and again.= If endless is set, the Sequencer@nrestarts again and again.=Wenn endlos eingestellt ist, wird der Sequenzer@nimmer wieder neu gestartet.
Numbers(s) are the node numbers,@nthe command shall sent to.= Numbers(s) are the node numbers,@nthe command shall sent to.=Zahlen sind die Knotennummern,@nzu denen der Befehl gesendet werden soll.
Offset is the time to the@nnext line in seconds (1..999).= Offset is the time to the@nnext line in seconds (1..999).=Offset ist die Zeit bis zur@nnächste Zeile in Sekunden (1..999).
Run endless= Run endless=Laufe endlos
Sequencer Help= Sequencer Help=Sequenzer-Hilfe
The command ' ' does nothing,@nonly consuming the offset time.= The command ' ' does nothing,@nonly consuming the offset time.=Der Befehl '' macht nichts,@nverbraucht nur die Wartezeit.
The commands 'on'/'off' are used@n for machines and other nodes.= The commands 'on'/'off' are used@n for machines and other nodes.=Die Befehle 'ein'/'aus' werden@nfür Maschinen und andere Knoten verwendet.
Tubelib Sequencer= Tubelib Sequencer=Tubelib Sequenzer
exit= exit=raus
help= help=Hilfe
### sequencer.lua ### ### sequencer.lua ###
### timer.lua ### ### timer.lua ###
Command= Command=Befehl
### streetlamp.lua ### ### streetlamp.lua ###
Tubelib Street Lamp= Tubelib Street Lamp=Tubelib Straßenlaterne
### timer.lua ### ### timer.lua ###
Number(s)= Number(s)=Nummer(n)
Time= Time=Zeit
Tubelib Timer= Tubelib Timer=Tubelib Timer
##### not used anymore #####
Glas,Obsidian Glas=Glas,Obsidian Glas
Cobblestone,Sandstone,Stone,Desert Sandstone,=Kopfsteinpflaster,Sandstein,Stein,Wüstensandstein
Copper,Steel,Tin,Coral,=Kupfer,Stahl,Zinn,Koralle
Desert Stone,Silver Sandstone,Mossy Cobble,Desert Cobble,=Wüstenstein,Silbersandstein,Moosiges Kopfsteinpflaster
Glas,Obsidian Glas,Ice,Gate Wood=Glas,Obsidian Glas,Eis,Torholz
Wood,Aspen Wood,Jungle Wood,Pine Wood,=Holz,Espenholz,Dschungelholz,Kiefernholz

@ -1,6 +1,7 @@
# textdomain: tubelib_addons3 # textdomain: tubelib_addons3
### chest.lua ### ### chest.lua ###
HighPerf Chest= HighPerf Chest=