Merge pull request #59 from Wuzzy2/trans

Update translation strings, update German, more formspec escaping
This commit is contained in:
Vanessa Ezekowitz 2016-08-07 12:56:53 -04:00 committed by GitHub
commit 6ec72eba74
13 changed files with 154 additions and 115 deletions

View File

@ -1,4 +1,5 @@
local S = unified_inventory.gettext local S = unified_inventory.gettext
local F = unified_inventory.fgettext
-- Create detached creative inventory after loading all mods -- Create detached creative inventory after loading all mods
minetest.after(0.01, function() minetest.after(0.01, function()
@ -158,7 +159,7 @@ end
unified_inventory.register_craft_type("normal", { unified_inventory.register_craft_type("normal", {
description = "Crafting", description = F("Crafting"),
icon = "ui_craftgrid_icon.png", icon = "ui_craftgrid_icon.png",
width = 3, width = 3,
height = 3, height = 3,
@ -174,7 +175,7 @@ unified_inventory.register_craft_type("normal", {
unified_inventory.register_craft_type("shapeless", { unified_inventory.register_craft_type("shapeless", {
description = "Mixing", description = F("Mixing"),
icon = "ui_craftgrid_icon.png", icon = "ui_craftgrid_icon.png",
width = 3, width = 3,
height = 3, height = 3,
@ -189,7 +190,7 @@ unified_inventory.register_craft_type("shapeless", {
unified_inventory.register_craft_type("cooking", { unified_inventory.register_craft_type("cooking", {
description = "Cooking", description = F("Cooking"),
icon = "default_furnace_front.png", icon = "default_furnace_front.png",
width = 1, width = 1,
height = 1, height = 1,
@ -197,7 +198,7 @@ unified_inventory.register_craft_type("cooking", {
unified_inventory.register_craft_type("digging", { unified_inventory.register_craft_type("digging", {
description = "Digging", description = F("Digging"),
icon = "default_tool_steelpick.png", icon = "default_tool_steelpick.png",
width = 1, width = 1,
height = 1, height = 1,

View File

@ -4,16 +4,17 @@
-- License: GPLv3 -- License: GPLv3
local S = unified_inventory.gettext local S = unified_inventory.gettext
local F = unified_inventory.fgettext
unified_inventory.register_page("bags", { unified_inventory.register_page("bags", {
get_formspec = function(player) get_formspec = function(player)
local player_name = player:get_player_name() local player_name = player:get_player_name()
local formspec = "background[0.06,0.99;7.92,7.52;ui_bags_main_form.png]" local formspec = "background[0.06,0.99;7.92,7.52;ui_bags_main_form.png]"
formspec = formspec.."label[0,0;"..S("Bags").."]" formspec = formspec.."label[0,0;"..F("Bags").."]"
formspec = formspec.."button[0,2;2,0.5;bag1;Bag 1]" formspec = formspec.."button[0,2;2,0.5;bag1;"..F("Bag 1").."]"
formspec = formspec.."button[2,2;2,0.5;bag2;Bag 2]" formspec = formspec.."button[2,2;2,0.5;bag2;"..F("Bag 2").."]"
formspec = formspec.."button[4,2;2,0.5;bag3;Bag 3]" formspec = formspec.."button[4,2;2,0.5;bag3;"..F("Bag 3").."]"
formspec = formspec.."button[6,2;2,0.5;bag4;Bag 4]" formspec = formspec.."button[6,2;2,0.5;bag4;"..F("Bag 4").."]"
formspec = formspec.."listcolors[#00000000;#00000000]" formspec = formspec.."listcolors[#00000000;#00000000]"
formspec = formspec.."list[detached:"..minetest.formspec_escape(player_name).."_bags;bag1;0.5,1;1,1;]" formspec = formspec.."list[detached:"..minetest.formspec_escape(player_name).."_bags;bag1;0.5,1;1,1;]"
formspec = formspec.."list[detached:"..minetest.formspec_escape(player_name).."_bags;bag2;2.5,1;1,1;]" formspec = formspec.."list[detached:"..minetest.formspec_escape(player_name).."_bags;bag2;2.5,1;1,1;]"
@ -36,7 +37,7 @@ unified_inventory.register_button("bags", {
local stack = player:get_inventory():get_stack("bag1", 1) local stack = player:get_inventory():get_stack("bag1", 1)
local image = stack:get_definition().inventory_image local image = stack:get_definition().inventory_image
local formspec = "image[7,0;1,1;"..image.."]" local formspec = "image[7,0;1,1;"..image.."]"
formspec = formspec.."label[0,0;Bag 1]" formspec = formspec.."label[0,0;"..F("Bag 1").."]"
formspec = formspec.."listcolors[#00000000;#00000000]" formspec = formspec.."listcolors[#00000000;#00000000]"
formspec = formspec.."list[current_player;bag1contents;0,1;8,3;]" formspec = formspec.."list[current_player;bag1contents;0,1;8,3;]"
formspec = formspec.."listring[current_name;bag1contents]" formspec = formspec.."listring[current_name;bag1contents]"
@ -57,7 +58,7 @@ unified_inventory.register_button("bags", {
local stack = player:get_inventory():get_stack("bag2", 1) local stack = player:get_inventory():get_stack("bag2", 1)
local image = stack:get_definition().inventory_image local image = stack:get_definition().inventory_image
local formspec = "image[7,0;1,1;"..image.."]" local formspec = "image[7,0;1,1;"..image.."]"
formspec = formspec.."label[0,0;Bag 2]" formspec = formspec.."label[0,0;"..F("Bag 2").."]"
formspec = formspec.."listcolors[#00000000;#00000000]" formspec = formspec.."listcolors[#00000000;#00000000]"
formspec = formspec.."list[current_player;bag2contents;0,1;8,3;]" formspec = formspec.."list[current_player;bag2contents;0,1;8,3;]"
formspec = formspec.."listring[current_name;bag2contents]" formspec = formspec.."listring[current_name;bag2contents]"
@ -78,7 +79,7 @@ unified_inventory.register_button("bags", {
local stack = player:get_inventory():get_stack("bag3", 1) local stack = player:get_inventory():get_stack("bag3", 1)
local image = stack:get_definition().inventory_image local image = stack:get_definition().inventory_image
local formspec = "image[7,0;1,1;"..image.."]" local formspec = "image[7,0;1,1;"..image.."]"
formspec = formspec.."label[0,0;Bag 3]" formspec = formspec.."label[0,0;"..F("Bag 3").."]"
formspec = formspec.."listcolors[#00000000;#00000000]" formspec = formspec.."listcolors[#00000000;#00000000]"
formspec = formspec.."list[current_player;bag3contents;0,1;8,3;]" formspec = formspec.."list[current_player;bag3contents;0,1;8,3;]"
formspec = formspec.."listring[current_name;bag3contents]" formspec = formspec.."listring[current_name;bag3contents]"
@ -99,7 +100,7 @@ unified_inventory.register_button("bags", {
local stack = player:get_inventory():get_stack("bag4", 1) local stack = player:get_inventory():get_stack("bag4", 1)
local image = stack:get_definition().inventory_image local image = stack:get_definition().inventory_image
local formspec = "image[7,0;1,1;"..image.."]" local formspec = "image[7,0;1,1;"..image.."]"
formspec = formspec.."label[0,0;Bag 4]" formspec = formspec.."label[0,0;"..F("Bag 4").."]"
formspec = formspec.."listcolors[#00000000;#00000000]" formspec = formspec.."listcolors[#00000000;#00000000]"
formspec = formspec.."list[current_player;bag4contents;0,1;8,3;]" formspec = formspec.."list[current_player;bag4contents;0,1;8,3;]"
formspec = formspec.."listring[current_name;bag4contents]" formspec = formspec.."listring[current_name;bag4contents]"

View File

@ -2,6 +2,7 @@
local modpath = minetest.get_modpath(minetest.get_current_modname()) local modpath = minetest.get_modpath(minetest.get_current_modname())
local worldpath = minetest.get_worldpath() local worldpath = minetest.get_worldpath()
local mygettext = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end
-- Data tables definitions -- Data tables definitions
unified_inventory = { unified_inventory = {
@ -31,7 +32,8 @@ unified_inventory = {
default = "craft", default = "craft",
-- intllib -- intllib
gettext = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end, gettext = mygettext,
fgettext = function(s) return minetest.formspec_escape(mygettext(s)) end,
-- "Lite" mode -- "Lite" mode
lite_mode = minetest.setting_getbool("unified_inventory_lite"), lite_mode = minetest.setting_getbool("unified_inventory_lite"),

View File

@ -1,4 +1,5 @@
local S = unified_inventory.gettext local S = unified_inventory.gettext
local F = unified_inventory.fgettext
-- This pair of encoding functions is used where variable text must go in -- This pair of encoding functions is used where variable text must go in
-- button names, where the text might contain formspec metacharacters. -- button names, where the text might contain formspec metacharacters.
@ -135,39 +136,39 @@ function unified_inventory.get_formspec(player, page)
formspec[n] = formspec[n] =
"image_button[" .. (start_x + 0.6 * 0) "image_button[" .. (start_x + 0.6 * 0)
.. ",9;.8,.8;ui_skip_backward_icon.png;start_list;]" .. ",9;.8,.8;ui_skip_backward_icon.png;start_list;]"
.. "tooltip[start_list;" .. minetest.formspec_escape(S("First page")) .. "]" .. "tooltip[start_list;" .. F("First page") .. "]"
.. "image_button[" .. (start_x + 0.6 * 1) .. "image_button[" .. (start_x + 0.6 * 1)
.. ",9;.8,.8;ui_doubleleft_icon.png;rewind3;]" .. ",9;.8,.8;ui_doubleleft_icon.png;rewind3;]"
.. "tooltip[rewind3;" .. minetest.formspec_escape(S("Back three pages")) .. "]" .. "tooltip[rewind3;" .. F("Back three pages") .. "]"
.. "image_button[" .. (start_x + 0.6 * 2) .. "image_button[" .. (start_x + 0.6 * 2)
.. ",9;.8,.8;ui_left_icon.png;rewind1;]" .. ",9;.8,.8;ui_left_icon.png;rewind1;]"
.. "tooltip[rewind1;" .. minetest.formspec_escape(S("Back one page")) .. "]" .. "tooltip[rewind1;" .. F("Back one page") .. "]"
.. "image_button[" .. (start_x + 0.6 * 3) .. "image_button[" .. (start_x + 0.6 * 3)
.. ",9;.8,.8;ui_right_icon.png;forward1;]" .. ",9;.8,.8;ui_right_icon.png;forward1;]"
.. "tooltip[forward1;" .. minetest.formspec_escape(S("Forward one page")) .. "]" .. "tooltip[forward1;" .. F("Forward one page") .. "]"
.. "image_button[" .. (start_x + 0.6 * 4) .. "image_button[" .. (start_x + 0.6 * 4)
.. ",9;.8,.8;ui_doubleright_icon.png;forward3;]" .. ",9;.8,.8;ui_doubleright_icon.png;forward3;]"
.. "tooltip[forward3;" .. minetest.formspec_escape(S("Forward three pages")) .. "]" .. "tooltip[forward3;" .. F("Forward three pages") .. "]"
.. "image_button[" .. (start_x + 0.6 * 5) .. "image_button[" .. (start_x + 0.6 * 5)
.. ",9;.8,.8;ui_skip_forward_icon.png;end_list;]" .. ",9;.8,.8;ui_skip_forward_icon.png;end_list;]"
.. "tooltip[end_list;" .. minetest.formspec_escape(S("Last page")) .. "]" .. "tooltip[end_list;" .. F("Last page") .. "]"
else else
formspec[n] = formspec[n] =
"image_button[" .. (8.2 + 0.65 * 0) "image_button[" .. (8.2 + 0.65 * 0)
.. ",5.8;.8,.8;ui_skip_backward_icon.png;start_list;]" .. ",5.8;.8,.8;ui_skip_backward_icon.png;start_list;]"
.. "tooltip[start_list;" .. minetest.formspec_escape(S("First page")) .. "]" .. "tooltip[start_list;" .. F("First page") .. "]"
.. "image_button[" .. (8.2 + 0.65 * 1) .. "image_button[" .. (8.2 + 0.65 * 1)
.. ",5.8;.8,.8;ui_left_icon.png;rewind1;]" .. ",5.8;.8,.8;ui_left_icon.png;rewind1;]"
.. "tooltip[rewind1;" .. minetest.formspec_escape(S("Back one page")) .. "]" .. "tooltip[rewind1;" .. F("Back one page") .. "]"
.. "image_button[" .. (8.2 + 0.65 * 2) .. "image_button[" .. (8.2 + 0.65 * 2)
.. ",5.8;.8,.8;ui_right_icon.png;forward1;]" .. ",5.8;.8,.8;ui_right_icon.png;forward1;]"
.. "tooltip[forward1;" .. minetest.formspec_escape(S("Forward one page")) .. "]" .. "tooltip[forward1;" .. F("Forward one page") .. "]"
.. "image_button[" .. (8.2 + 0.65 * 3) .. "image_button[" .. (8.2 + 0.65 * 3)
.. ",5.8;.8,.8;ui_skip_forward_icon.png;end_list;]" .. ",5.8;.8,.8;ui_skip_forward_icon.png;end_list;]"
.. "tooltip[end_list;" .. minetest.formspec_escape(S("Last page")) .. "]" .. "tooltip[end_list;" .. F("Last page") .. "]"
end end
n = n+1 n = n+1
@ -177,12 +178,12 @@ function unified_inventory.get_formspec(player, page)
formspec[n] = "field[9.5,8.325;3,1;searchbox;;" formspec[n] = "field[9.5,8.325;3,1;searchbox;;"
.. minetest.formspec_escape(unified_inventory.current_searchbox[player_name]) .. "]" .. minetest.formspec_escape(unified_inventory.current_searchbox[player_name]) .. "]"
formspec[n+1] = "image_button[12.2,8.1;.8,.8;ui_search_icon.png;searchbutton;]" formspec[n+1] = "image_button[12.2,8.1;.8,.8;ui_search_icon.png;searchbutton;]"
.. "tooltip[searchbutton;" ..S("Search") .. "]" .. "tooltip[searchbutton;" ..F("Search") .. "]"
else else
formspec[n] = "field[8.5,5.225;2.2,1;searchbox;;" formspec[n] = "field[8.5,5.225;2.2,1;searchbox;;"
.. minetest.formspec_escape(unified_inventory.current_searchbox[player_name]) .. "]" .. minetest.formspec_escape(unified_inventory.current_searchbox[player_name]) .. "]"
formspec[n+1] = "image_button[10.3,5;.8,.8;ui_search_icon.png;searchbutton;]" formspec[n+1] = "image_button[10.3,5;.8,.8;ui_search_icon.png;searchbutton;]"
.. "tooltip[searchbutton;" ..S("Search") .. "]" .. "tooltip[searchbutton;" ..F("Search") .. "]"
end end
n = n+2 n = n+2
@ -193,7 +194,7 @@ function unified_inventory.get_formspec(player, page)
-- Items list -- Items list
if #unified_inventory.filtered_items_list[player_name] == 0 then if #unified_inventory.filtered_items_list[player_name] == 0 then
formspec[n] = "label[8.2,"..ui_peruser.form_header_y..";" .. S(no_matches) .. "]" formspec[n] = "label[8.2,"..ui_peruser.form_header_y..";" .. F(no_matches) .. "]"
else else
local dir = unified_inventory.active_search_direction[player_name] local dir = unified_inventory.active_search_direction[player_name]
local list_index = unified_inventory.current_index[player_name] local list_index = unified_inventory.current_index[player_name]
@ -216,13 +217,13 @@ function unified_inventory.get_formspec(player, page)
end end
end end
end end
formspec[n] = "label[8.2,"..ui_peruser.form_header_y..";"..S("Page") .. ": " formspec[n] = "label[8.2,"..ui_peruser.form_header_y..";"..F("Page") .. ": "
.. S("%s of %s"):format(page,pagemax).."]" .. S("%s of %s"):format(page,pagemax).."]"
end end
n= n+1 n= n+1
if unified_inventory.activefilter[player_name] ~= "" then if unified_inventory.activefilter[player_name] ~= "" then
formspec[n] = "label[8.2,"..(ui_peruser.form_header_y + 0.4)..";" .. S("Filter") .. ":]" formspec[n] = "label[8.2,"..(ui_peruser.form_header_y + 0.4)..";" .. F("Filter") .. ":]"
formspec[n+1] = "label[9.1,"..(ui_peruser.form_header_y + 0.4)..";"..minetest.formspec_escape(unified_inventory.activefilter[player_name]).."]" formspec[n+1] = "label[9.1,"..(ui_peruser.form_header_y + 0.4)..";"..minetest.formspec_escape(unified_inventory.activefilter[player_name]).."]"
end end
return table.concat(formspec, "") return table.concat(formspec, "")

View File

@ -1,71 +1,87 @@
# Translation mostly by Xanthin # Translation mostly by Xanthin
### bags.lua ### ### bags.lua ###
Bags = Rucksaecke Bags = Taschen
Bag 1 = Rucksack 1 Bag 1 = Tasche 1
Bag 2 = Rucksack 2 Bag 2 = Tasche 2
Bag 3 = Rucksack 3 Bag 3 = Tasche 3
Bag 4 = Rucksack 4 Bag 4 = Tasche 4
Small Bag = Rucksack (klein) Small Bag = Kleine Tasche
Medium Bag = Rucksack (mittel) Medium Bag = Mittelgroße Tasche
Large Bag = Rucksack (gross) Large Bag = Große Tasche
### inernal.lua ### ### inernal.lua ###
First page = Erste Seite First page = Erste Seite
Back three pages = Drei Seiten zurueckblaettern Back three pages = Drei Seiten zurueckblättern
Back one page = Eine Seiten zurueckblaettern Back one page = Eine Seite zurueckblättern
Forward one page = Eine Seiten vorblaettern Forward one page = Eine Seite vorblättern
Forward three pages = Drei Seiten vorblaettern Forward three pages = Drei Seiten vorblättern
Last page = Letzte Seite Last page = Letzte Seite
No matching items = Keine passenden Gegenstände No matching items = Keine passenden Gegenstände
Page = Seite Page = Seite
%s of %s = %s von %s %s of %s = %s von %s
Filter = Suche Filter = Filter
Search = Suchen Search = Suchen
### register.lua ### ### register.lua ###
Can use the creative inventory = Kann das Kreativinventar nutzen Can use the creative inventory = Kann das Kreativinventar nutzen
Home position set to: %s = Ausgangsposition nach: %s gesetzt Home position set to: %s = Heimatposition nach: %s gesetzt
Time of day set to 6am = Tageszeit auf 6 Uhr morgens geaendert Time of day set to 6am = Tageszeit auf 6 Uhr geändert
You don't have the settime privilege! = Du hast nicht das "settime" Privileg! You don't have the settime privilege! = Du hast nicht das „settime“-Privileg!
Time of day set to 9pm = Tageszeit auf 9 Uhr abends geaendert Time of day set to 9pm = Tageszeit auf 21 Uhr geändert
This button has been disabled outside of creative mode to prevent accidental inventory trashing. Use the trash slot instead. = Diese Funktion ist ausserhalb des Kreativmodus deaktiviert um ein versehentliches Loeschen des ganzen Inventars zu verhindern.\nNutze stattdessen das Muellfeld. This button has been disabled outside of creative mode to prevent accidental inventory trashing. Use the trash slot instead. = Diese Funktion ist außerhalb des Kreativmodus deaktiviert, um ein versehentliches Löschen des ganzen Inventars zu verhindern.\nNutze stattdessen das Müllfeld.
Inventory Cleared! = Inventar geleert! Inventory cleared! = Inventar geleert!
Crafting = Bauen Crafting = Fertigung
Trash: = Muell: Digging = Graben
Refill: = Nachfuellen: Cooking = Kochen
Crafting Guide = Bauanleitung Mixing = Mischen
Trash: = Müll:
Refill: = Nachfüllen:
Crafting Guide = Fertigungsführer
Method: = Methode: Method: = Methode:
Result: %s = Ergebnis: %s Result: %s = Ergebnis: %s
crafting = Bauen crafting = Bauen
shapeless crafting = Formloses Bauen shapeless crafting = Formlose Fertigung
cooking = Kochen cooking = Kochen
alloy cooking = Legierung Kochen alloy cooking = Legierung Kochen
Copy to craft grid: = Kopiere ins Baufeld: Copy to craft grid: = Ins Fertigungsraster kopieren:
All = Alles All = Alles
Recipe %s of %s = Rezept %s von %s
Alternate = Alternative Alternate = Alternative
Crafting Grid = Crafting Grid = Fertigungsraster
Recipe %d of %d = Rezept %d von %d
Usage %d of %d = Verwendung %d von %d
No recipes = Keine Rezepte
No usages = Keine Verwendungen
Result = Ergebnis
Ingredient = Zutat
Set time to day = Zur Tageszeit wechseln
Set time to night = Zur Nachtzeit wechseln
Set home position = Heimatposition setzen
Go home = Nach Hause gehen
Clear inventory = Inventar leeren
Give me: = Gib mir:
To craft grid: = Ins Fertigungsraster:
### waypoints.lua ### ### waypoints.lua ###
White = Weiß White = Weiß
Yellow = Gelb Yellow = Gelb
Red = Rot Red = Rot
Green = Gruen Green = Grün
Blue = Blau Blue = Blau
Waypoints = Markierungen Waypoints = Wegpunkte
Waypoint active = Markierung aktiv Waypoint %d = Wegpunkt Nr. %d
Waypoint inactive = Markierung inaktiv Waypoint active = Wegpunkt aktiv
World position = Welt Position Waypoint inactive = Wegpunkt inaktiv
Name = World position = Weltposition
HUD text color = Name = Name
Edit waypoint name = Name der Markierung aendern HUD text color = HUD-Textfarbe
Rename waypoint = Markierung umbenennen Edit waypoint name = Name des Wegpunkts ändern
Change color of waypoint display = Farbe der Darstellung der Markierung aendern Rename waypoint = Wegpunkt umbenennen
Set waypoint to current location = Setze Markierung zur derzeitigen Position Change color of waypoint display = Farbe der Darstellung der Wegpunkte ändern
Make waypoint visible = Markierung sichtbar machen Set waypoint to current location = Setze Wegpunkt zur derzeitigen Position
Make waypoint invisible = Markierung verstecken Make waypoint visible = Wegpunkt sichtbar machen
Disable display of waypoint coordinates = Make waypoint invisible = Wegpunkt verstecken
Enable display of waypoint coordinates = Disable display of waypoint coordinates = Anzeige der Wegpunktkoordinaten deaktivieren
Finish editing = Enable display of waypoint coordinates = Anzeige der Wegpunktkoordinaten aktivieren
Select Waypoint #%d = Finish editing = Bearbeitung abschließen
Select Waypoint #%d = Wegpunkt Nr. %d auswählen

View File

@ -31,7 +31,7 @@ Time of day set to 6am = Hora del día cambiada a 6AM
You don't have the settime priviledge! = ¡No tienes el privilegio `settime'! You don't have the settime priviledge! = ¡No tienes el privilegio `settime'!
Time of day set to 9pm = Hora del día cambiada a 9PM Time of day set to 9pm = Hora del día cambiada a 9PM
This button has been disabled outside of creative mode to prevent accidental inventory trashing. Use the trash slot instead. = Éste botón ha sido deshabilitado para prevenir la destrucción accidental del inventario.\nUsa la ranura para basura en su lugar. This button has been disabled outside of creative mode to prevent accidental inventory trashing. Use the trash slot instead. = Éste botón ha sido deshabilitado para prevenir la destrucción accidental del inventario.\nUsa la ranura para basura en su lugar.
Inventory Cleared! = ¡Inventario limpio! Inventory cleared! = ¡Inventario limpio!
Crafting = Elaboración Crafting = Elaboración
Trash: = Basura: Trash: = Basura:
Refill: = Rellenar: Refill: = Rellenar:

View File

@ -31,7 +31,7 @@ Time of day set to 6am = Heure fixée à 6h
You don't have the settime priviledge! = Vous n'avez pas le privilège 'settime' ! You don't have the settime priviledge! = Vous n'avez pas le privilège 'settime' !
Time of day set to 9pm = Heure fixée à 21h Time of day set to 9pm = Heure fixée à 21h
This button has been disabled outside of creative mode to prevent accidental inventory trashing.\nUse the trash slot instead. = Ce bouton a été désactivé en dehors du mode créatif pour éviter des saccages dans l'inventaire.\nUtilisez plutôt la case poubelle. This button has been disabled outside of creative mode to prevent accidental inventory trashing.\nUse the trash slot instead. = Ce bouton a été désactivé en dehors du mode créatif pour éviter des saccages dans l'inventaire.\nUtilisez plutôt la case poubelle.
Inventory Cleared! = Inventaire vidé ! Inventory cleared! = Inventaire vidé !
Crafting = Création Crafting = Création
Trash: = Poubelle : Trash: = Poubelle :
Refill: = Remplir : Refill: = Remplir :

View File

@ -30,7 +30,7 @@ Time of day set to 6am = Czas ustawiony na 6:00
You don't have the settime priviledge! = Nie masz uprawnien do zmiany czasu (settime)! You don't have the settime priviledge! = Nie masz uprawnien do zmiany czasu (settime)!
Time of day set to 9pm = Czas ustawiony na 21:00 Time of day set to 9pm = Czas ustawiony na 21:00
This button has been disabled outside of creative mode to prevent accidental inventory trashing.\nUse the trash slot instead. = This button has been disabled outside of creative mode to prevent accidental inventory trashing.\nUse the trash slot instead. =
Inventory Cleared! = Inventory cleared! =
Crafting = Crafting =
Trash: = Smietnik: Trash: = Smietnik:
Refill: = Uzupelnianie: Refill: = Uzupelnianie:

View File

@ -31,7 +31,7 @@ Time of day set to 6am = Установлено время 6 утра
You don't have the settime priviledge! = Вам не разрешено устанавливать время! You don't have the settime priviledge! = Вам не разрешено устанавливать время!
Time of day set to 9pm = Установлено время 9 вечера Time of day set to 9pm = Установлено время 9 вечера
This button has been disabled outside of creative mode to prevent accidental inventory trashing.\nUse the trash slot instead. = Эта кнопка отключена вне творческого режима, чтобы предотвратить случайное уничтожение предметов.\nИспользуйте слот корзины вместо нее. This button has been disabled outside of creative mode to prevent accidental inventory trashing.\nUse the trash slot instead. = Эта кнопка отключена вне творческого режима, чтобы предотвратить случайное уничтожение предметов.\nИспользуйте слот корзины вместо нее.
Inventory Cleared! = Инвентарь очищен! Inventory cleared! = Инвентарь очищен!
Crafting = Крафт Crafting = Крафт
Trash: = Корзина: Trash: = Корзина:
Refill: = Размножить: Refill: = Размножить:

View File

@ -26,13 +26,17 @@ Search =
### register.lua ### ### register.lua ###
Can use the creative inventory = Can use the creative inventory =
Forces Unified Inventory to be displayed in Full mode if Lite mode is configured globally =
Home position set to: %s = Home position set to: %s =
Time of day set to 6am = Time of day set to 6am =
You don't have the settime priviledge! = You don't have the settime priviledge! =
Time of day set to 9pm = Time of day set to 9pm =
This button has been disabled outside of creative mode to prevent accidental inventory trashing.\nUse the trash slot instead. = This button has been disabled outside of creative mode to prevent accidental inventory trashing.\nUse the trash slot instead. =
Inventory Cleared! = Inventory cleared! =
Crafting = Crafting =
Digging =
Cooking =
Mixing =
Trash: = Trash: =
Refill: = Refill: =
Crafting Guide = Crafting Guide =
@ -44,9 +48,21 @@ cooking =
alloy cooking = alloy cooking =
Copy to craft grid: = Copy to craft grid: =
All = All =
Recipe %s of %s =
Alternate = Alternate =
Crafting Grid = Crafting Grid =
Recipe %d of %d =
Usage %d of %d =
No recipes =
No usages =
Result =
Ingredient =
Set time to day =
Set time to night =
Set home position =
Go home =
Clear inventory =
Give me: =
To craft grid: =
### waypoints.lua ### ### waypoints.lua ###
White = White =
@ -55,6 +71,7 @@ Red =
Green = Green =
Blue = Blue =
Waypoints = Waypoints =
Waypoint %d =
Waypoint active = Waypoint active =
Waypoint inactive = Waypoint inactive =
World position = World position =

View File

@ -31,7 +31,7 @@ Time of day set to 6am = Saat 06:00 olarak ayarlandı
You don't have the settime priviledge = Saati düzenleme yetkiniz yok! You don't have the settime priviledge = Saati düzenleme yetkiniz yok!
Time of day set to 9pm = Saat 19:00 olarak ayarlandı Time of day set to 9pm = Saat 19:00 olarak ayarlandı
This button has been disabled outside of creative mode to prevent accidental inventory trashing.\nUse the trash slot instead. = Yaratıcı modu dışında iken bu tuş kullanılamaz. This button has been disabled outside of creative mode to prevent accidental inventory trashing.\nUse the trash slot instead. = Yaratıcı modu dışında iken bu tuş kullanılamaz.
Inventory Cleared! = Envanter temizlendi! Inventory cleared! = Envanter temizlendi!
Crafting = Üretim Crafting = Üretim
Trash: = Çöp Trash: = Çöp
Refill: = Doldur Refill: = Doldur

View File

@ -1,12 +1,13 @@
local S = unified_inventory.gettext local S = unified_inventory.gettext
local F = unified_inventory.fgettext
minetest.register_privilege("creative", { minetest.register_privilege("creative", {
description = "Can use the creative inventory", description = S("Can use the creative inventory"),
give_to_singleplayer = false, give_to_singleplayer = false,
}) })
minetest.register_privilege("ui_full", { minetest.register_privilege("ui_full", {
description = "Forces UI to display in Full mode when Lite mode is configured globally", description = S("Forces Unified Inventory to be displayed in Full mode if Lite mode is configured globally"),
give_to_singleplayer = false, give_to_singleplayer = false,
}) })
@ -135,7 +136,7 @@ unified_inventory.register_button("clear_inv", {
return return
end end
player:get_inventory():set_list("main", {}) player:get_inventory():set_list("main", {})
minetest.chat_send_player(player_name, 'Inventory Cleared!') minetest.chat_send_player(player_name, S('Inventory cleared!'))
minetest.sound_play("trash_all", minetest.sound_play("trash_all",
{to_player=player_name, gain = 1.0}) {to_player=player_name, gain = 1.0})
end, end,
@ -150,16 +151,16 @@ unified_inventory.register_page("craft", {
local player_name = player:get_player_name() local player_name = player:get_player_name()
local formspec = "background[2,"..formspecy..";6,3;ui_crafting_form.png]" local formspec = "background[2,"..formspecy..";6,3;ui_crafting_form.png]"
formspec = formspec.."background[0,"..(formspecy + 3.5)..";8,4;ui_main_inventory.png]" formspec = formspec.."background[0,"..(formspecy + 3.5)..";8,4;ui_main_inventory.png]"
formspec = formspec.."label[0,"..formheadery..";Crafting]" formspec = formspec.."label[0,"..formheadery..";" ..F("Crafting").."]"
formspec = formspec.."listcolors[#00000000;#00000000]" formspec = formspec.."listcolors[#00000000;#00000000]"
formspec = formspec.."list[current_player;craftpreview;6,"..formspecy..";1,1;]" formspec = formspec.."list[current_player;craftpreview;6,"..formspecy..";1,1;]"
formspec = formspec.."list[current_player;craft;2,"..formspecy..";3,3;]" formspec = formspec.."list[current_player;craft;2,"..formspecy..";3,3;]"
formspec = formspec.."label[7,"..(formspecy + 1.5)..";" .. S("Trash:") .. "]" formspec = formspec.."label[7,"..(formspecy + 1.5)..";" .. F("Trash:") .. "]"
formspec = formspec.."list[detached:trash;main;7,"..(formspecy + 2)..";1,1;]" formspec = formspec.."list[detached:trash;main;7,"..(formspecy + 2)..";1,1;]"
formspec = formspec.."listring[current_name;craft]" formspec = formspec.."listring[current_name;craft]"
formspec = formspec.."listring[current_player;main]" formspec = formspec.."listring[current_player;main]"
if unified_inventory.is_creative(player_name) then if unified_inventory.is_creative(player_name) then
formspec = formspec.."label[0,"..(formspecy + 1.5)..";" .. S("Refill:") .. "]" formspec = formspec.."label[0,"..(formspecy + 1.5)..";" .. F("Refill:") .. "]"
formspec = formspec.."list[detached:"..minetest.formspec_escape(player_name).."refill;main;0,"..(formspecy +2)..";1,1;]" formspec = formspec.."list[detached:"..minetest.formspec_escape(player_name).."refill;main;0,"..(formspecy +2)..";1,1;]"
end end
return {formspec=formspec} return {formspec=formspec}
@ -195,8 +196,8 @@ local function stack_image_button(x, y, w, h, buttonname_prefix, item)
end end
local recipe_text = { local recipe_text = {
recipe = "Recipe", recipe = "Recipe %d of %d",
usage = "Usage", usage = "Usage %d of %d",
} }
local no_recipe_text = { local no_recipe_text = {
recipe = "No recipes", recipe = "No recipes",
@ -223,7 +224,7 @@ unified_inventory.register_page("craftguide", {
local player_privs = minetest.get_player_privs(player_name) local player_privs = minetest.get_player_privs(player_name)
local formspec = "" local formspec = ""
formspec = formspec.."background[0,"..(formspecy + 3.5)..";8,4;ui_main_inventory.png]" formspec = formspec.."background[0,"..(formspecy + 3.5)..";8,4;ui_main_inventory.png]"
formspec = formspec.."label[0,"..formheadery..";" .. S("Crafting Guide") .. "]" formspec = formspec.."label[0,"..formheadery..";" .. F("Crafting Guide") .. "]"
formspec = formspec.."listcolors[#00000000;#00000000]" formspec = formspec.."listcolors[#00000000;#00000000]"
local item_name = unified_inventory.current_item[player_name] local item_name = unified_inventory.current_item[player_name]
if not item_name then return {formspec=formspec} end if not item_name then return {formspec=formspec} end
@ -242,20 +243,20 @@ unified_inventory.register_page("craftguide", {
formspec = formspec.."background[0.5,"..(formspecy + 0.2)..";8,3;ui_craftguide_form.png]" formspec = formspec.."background[0.5,"..(formspecy + 0.2)..";8,3;ui_craftguide_form.png]"
formspec = formspec.."textarea["..craftresultx..","..craftresulty formspec = formspec.."textarea["..craftresultx..","..craftresulty
..";10,1;;"..minetest.formspec_escape(role_text[dir]..": "..item_name)..";]" ..";10,1;;"..minetest.formspec_escape(F(role_text[dir])..": "..item_name)..";]"
formspec = formspec..stack_image_button(0, formspecy, 1.1, 1.1, "item_button_" formspec = formspec..stack_image_button(0, formspecy, 1.1, 1.1, "item_button_"
.. rdir .. "_", ItemStack(item_name)) .. rdir .. "_", ItemStack(item_name))
if not craft then if not craft then
formspec = formspec.."label[5.5,"..(formspecy + 2.35)..";" formspec = formspec.."label[5.5,"..(formspecy + 2.35)..";"
..minetest.formspec_escape(no_recipe_text[dir]).."]" ..minetest.formspec_escape(F(no_recipe_text[dir])).."]"
local no_pos = dir == "recipe" and 4.5 or 6.5 local no_pos = dir == "recipe" and 4.5 or 6.5
local item_pos = dir == "recipe" and 6.5 or 4.5 local item_pos = dir == "recipe" and 6.5 or 4.5
formspec = formspec.."image["..no_pos..","..formspecy..";1.1,1.1;ui_no.png]" formspec = formspec.."image["..no_pos..","..formspecy..";1.1,1.1;ui_no.png]"
formspec = formspec..stack_image_button(item_pos, formspecy, 1.1, 1.1, "item_button_" formspec = formspec..stack_image_button(item_pos, formspecy, 1.1, 1.1, "item_button_"
..other_dir[dir].."_", ItemStack(item_name)) ..other_dir[dir].."_", ItemStack(item_name))
if player_privs.give == true then if player_privs.give == true then
formspec = formspec.."label[0,"..(formspecy + 2.10)..";" .. S("Give me:") .. "]" formspec = formspec.."label[0,"..(formspecy + 2.10)..";" .. F("Give me:") .. "]"
.."button[0, "..(formspecy + 2.7)..";0.6,0.5;craftguide_giveme_1;1]" .."button[0, "..(formspecy + 2.7)..";0.6,0.5;craftguide_giveme_1;1]"
.."button[0.6,"..(formspecy + 2.7)..";0.7,0.5;craftguide_giveme_10;10]" .."button[0.6,"..(formspecy + 2.7)..";0.7,0.5;craftguide_giveme_10;10]"
.."button[1.3,"..(formspecy + 2.7)..";0.8,0.5;craftguide_giveme_99;99]" .."button[1.3,"..(formspecy + 2.7)..";0.8,0.5;craftguide_giveme_99;99]"
@ -297,23 +298,22 @@ unified_inventory.register_page("craftguide", {
end end
if craft_type.uses_crafting_grid then if craft_type.uses_crafting_grid then
formspec = formspec.."label[0,"..(formspecy + 0.9)..";" .. S("To craft grid:") .. "]" formspec = formspec.."label[0,"..(formspecy + 0.9)..";" .. F("To craft grid:") .. "]"
.."button[0, "..(formspecy + 1.5)..";0.6,0.5;craftguide_craft_1;1]" .."button[0, "..(formspecy + 1.5)..";0.6,0.5;craftguide_craft_1;1]"
.."button[0.6,"..(formspecy + 1.5)..";0.7,0.5;craftguide_craft_10;10]" .."button[0.6,"..(formspecy + 1.5)..";0.7,0.5;craftguide_craft_10;10]"
.."button[1.3,"..(formspecy + 1.5)..";0.8,0.5;craftguide_craft_max;" .. S("All") .. "]" .."button[1.3,"..(formspecy + 1.5)..";0.8,0.5;craftguide_craft_max;" .. F("All") .. "]"
end end
if player_privs.give then if player_privs.give then
formspec = formspec.."label[0,"..(formspecy + 2.1)..";" .. S("Give me:") .. "]" formspec = formspec.."label[0,"..(formspecy + 2.1)..";" .. F("Give me:") .. "]"
.."button[0, "..(formspecy + 2.7)..";0.6,0.5;craftguide_giveme_1;1]" .."button[0, "..(formspecy + 2.7)..";0.6,0.5;craftguide_giveme_1;1]"
.."button[0.6,"..(formspecy + 2.7)..";0.7,0.5;craftguide_giveme_10;10]" .."button[0.6,"..(formspecy + 2.7)..";0.7,0.5;craftguide_giveme_10;10]"
.."button[1.3,"..(formspecy + 2.7)..";0.8,0.5;craftguide_giveme_99;99]" .."button[1.3,"..(formspecy + 2.7)..";0.8,0.5;craftguide_giveme_99;99]"
end end
if alternates and alternates > 1 then if alternates and alternates > 1 then
formspec = formspec.."label[5.5,"..(formspecy + 1.6)..";"..recipe_text[dir].." " formspec = formspec.."label[5.5,"..(formspecy + 1.6)..";"
..tostring(alternate).." of " ..string.format(F(recipe_text[dir]), alternate, alternates).."]"
..tostring(alternates).."]" .."button[5.5,"..(formspecy + 2)..";2,1;alternate;" .. F("Alternate") .. "]"
.."button[5.5,"..(formspecy + 2)..";2,1;alternate;" .. S("Alternate") .. "]"
end end
return {formspec = formspec} return {formspec = formspec}
end, end,

View File

@ -1,4 +1,5 @@
local S = unified_inventory.gettext local S = unified_inventory.gettext
local F = unified_inventory.fgettext
local hud_colors = { local hud_colors = {
{"#FFFFFF", 0xFFFFFF, S("White")}, {"#FFFFFF", 0xFFFFFF, S("White")},
@ -24,7 +25,7 @@ unified_inventory.register_page("waypoints", {
local waypoints = datastorage.get(player_name, "waypoints") local waypoints = datastorage.get(player_name, "waypoints")
local formspec = "background[0,4.5;8,4;ui_main_inventory.png]" .. local formspec = "background[0,4.5;8,4;ui_main_inventory.png]" ..
"image[0,0;1,1;ui_waypoints_icon.png]" .. "image[0,0;1,1;ui_waypoints_icon.png]" ..
"label[1,0;" .. S("Waypoints") .. "]" "label[1,0;" .. F("Waypoints") .. "]"
-- Tabs buttons: -- Tabs buttons:
for i = 1, 5, 1 do for i = 1, 5, 1 do
@ -34,13 +35,13 @@ unified_inventory.register_page("waypoints", {
"ui_" .. i .. "_icon.png;" .. "ui_" .. i .. "_icon.png;" ..
"select_waypoint" .. i .. ";]" .. "select_waypoint" .. i .. ";]" ..
"tooltip[select_waypoint" .. i .. ";" "tooltip[select_waypoint" .. i .. ";"
.. minetest.formspec_escape(S("Select Waypoint #%d"):format(i)).."]" .. (S("Select Waypoint #%d"):format(i)).."]"
end end
local i = waypoints.selected or 1 local i = waypoints.selected or 1
local waypoint = waypoints[i] or {} local waypoint = waypoints[i] or {}
local temp = waypoints_temp[player_name][i] or {} local temp = waypoints_temp[player_name][i] or {}
local default_name = "Waypoint "..i local default_name = string.format(S("Waypoint %d"), i)
-- Main buttons: -- Main buttons:
formspec = formspec .. formspec = formspec ..
@ -48,43 +49,43 @@ unified_inventory.register_page("waypoints", {
"ui_waypoint_set_icon.png;".. "ui_waypoint_set_icon.png;"..
"set_waypoint"..i..";]".. "set_waypoint"..i..";]"..
"tooltip[set_waypoint" .. i .. ";" "tooltip[set_waypoint" .. i .. ";"
.. minetest.formspec_escape(S("Set waypoint to current location")).."]" .. F("Set waypoint to current location").."]"
formspec = formspec .. formspec = formspec ..
"image_button[5.2,3.7;.8,.8;".. "image_button[5.2,3.7;.8,.8;"..
(waypoint.active and "ui_on_icon.png" or "ui_off_icon.png")..";".. (waypoint.active and "ui_on_icon.png" or "ui_off_icon.png")..";"..
"toggle_waypoint"..i..";]".. "toggle_waypoint"..i..";]"..
"tooltip[toggle_waypoint" .. i .. ";" "tooltip[toggle_waypoint" .. i .. ";"
.. minetest.formspec_escape(S("Make waypoint " .. F("Make waypoint "
..(waypoint.active and "invisible" or "visible"))).."]" ..(waypoint.active and "invisible" or "visible")).."]"
formspec = formspec .. formspec = formspec ..
"image_button[5.9,3.7;.8,.8;".. "image_button[5.9,3.7;.8,.8;"..
(waypoint.display_pos and "ui_green_icon_background.png" or "ui_red_icon_background.png").."^ui_xyz_icon.png;".. (waypoint.display_pos and "ui_green_icon_background.png" or "ui_red_icon_background.png").."^ui_xyz_icon.png;"..
"toggle_display_pos" .. i .. ";]".. "toggle_display_pos" .. i .. ";]"..
"tooltip[toggle_display_pos" .. i .. ";" "tooltip[toggle_display_pos" .. i .. ";"
.. minetest.formspec_escape(S((waypoint.display_pos and "Disable" or "Enable") .. F((waypoint.display_pos and "Disable" or "Enable")
.." display of waypoint coordinates")).."]" .." display of waypoint coordinates").."]"
formspec = formspec .. formspec = formspec ..
"image_button[6.6,3.7;.8,.8;".. "image_button[6.6,3.7;.8,.8;"..
"ui_circular_arrows_icon.png;".. "ui_circular_arrows_icon.png;"..
"toggle_color"..i..";]".. "toggle_color"..i..";]"..
"tooltip[toggle_color" .. i .. ";" "tooltip[toggle_color" .. i .. ";"
.. minetest.formspec_escape(S("Change color of waypoint display")).."]" .. F("Change color of waypoint display").."]"
formspec = formspec .. formspec = formspec ..
"image_button[7.3,3.7;.8,.8;".. "image_button[7.3,3.7;.8,.8;"..
"ui_pencil_icon.png;".. "ui_pencil_icon.png;"..
"rename_waypoint"..i..";]".. "rename_waypoint"..i..";]"..
"tooltip[rename_waypoint" .. i .. ";" "tooltip[rename_waypoint" .. i .. ";"
.. minetest.formspec_escape(S("Edit waypoint name")).."]" .. F("Edit waypoint name").."]"
-- Waypoint's info: -- Waypoint's info:
if waypoint.active then if waypoint.active then
formspec = formspec .. "label[1,0.8;"..S("Waypoint active").."]" formspec = formspec .. "label[1,0.8;"..F("Waypoint active").."]"
else else
formspec = formspec .. "label[1,0.8;"..S("Waypoint inactive").."]" formspec = formspec .. "label[1,0.8;"..F("Waypoint inactive").."]"
end end
if temp.edit then if temp.edit then
@ -95,13 +96,13 @@ unified_inventory.register_page("waypoints", {
"ui_ok_icon.png;".. "ui_ok_icon.png;"..
"confirm_rename"..i.. ";]".. "confirm_rename"..i.. ";]"..
"tooltip[confirm_rename" .. i .. ";" "tooltip[confirm_rename" .. i .. ";"
.. minetest.formspec_escape(S("Finish editing")).."]" .. F("Finish editing").."]"
end end
formspec = formspec .. "label[1,1.3;"..S("World position")..": " .. formspec = formspec .. "label[1,1.3;"..F("World position")..": " ..
minetest.pos_to_string(waypoint.world_pos or vector.new()) .. "]" .. minetest.pos_to_string(waypoint.world_pos or vector.new()) .. "]" ..
"label[1,1.8;"..S("Name")..": ".. (waypoint.name or default_name) .. "]" .. "label[1,1.8;"..F("Name")..": ".. (waypoint.name or default_name) .. "]" ..
"label[1,2.3;"..S("HUD text color")..": " .. "label[1,2.3;"..F("HUD text color")..": " ..
hud_colors[waypoint.color or 1][3] .. "]" hud_colors[waypoint.color or 1][3] .. "]"
return {formspec=formspec} return {formspec=formspec}