7 Commits

Author SHA1 Message Date
4bf5f22696 Merge branch 'master' into nalc 2019-01-19 19:43:32 +01:00
4f666f93d0 Ajoute message de chargement du mod dans le journal "action" 2019-01-19 19:43:04 +01:00
54abad72f0 Add item tooltips with mod name
Inspired by #118, @Quent42340
2018-12-12 20:20:11 +01:00
264833ed41 Place les boutons d'inventaires sur 2 lignes 2018-11-20 22:04:24 +01:00
77c3de08ce Fix crash caused by bag swapping 2018-08-10 16:15:00 +02:00
5cff869c27 Merge branch 'master' into 'master'
Add Malay translation

See merge request VanessaE/unified_inventory!2
2018-07-17 13:35:01 +00:00
79e4a49c6b Add Malay translation 2018-07-17 12:31:08 +00:00
4 changed files with 394 additions and 9 deletions

View File

@ -200,6 +200,8 @@ minetest.register_on_joinplayer(function(player)
end
return 1
end
-- New bag is smaller: Disallow inserting
return 0
end,
allow_take = function(inv, listname, index, stack, player)
if player:get_inventory():is_empty(listname.."contents") then

View File

@ -82,3 +82,5 @@ dofile(modpath.."/item_names.lua")
if minetest.get_modpath("datastorage") then
dofile(modpath.."/waypoints.lua")
end
minetest.log("action", "[unified_inventory] loaded.")

View File

@ -99,17 +99,21 @@ function unified_inventory.get_formspec(player, page)
end
end
local j = 1 --Modif NALC (sys4 20/11/2018) 12 buttons max by row
for i, def in pairs(filtered_inv_buttons) do
if draw_lite_mode and i > 4 then
button_row = 1
button_col = 1
elseif not draw_lite_mode and j > 12 then
button_row = 1
j = 1
end
if def.type == "image" then
if (def.condition == nil or def.condition(player) == true) then
formspec[n] = "image_button["
formspec[n+1] = ( ui_peruser.main_button_x + 0.65 * (i - 1) - button_col * 0.65 * 4)
formspec[n+1] = ( ui_peruser.main_button_x + 0.65 * (j - 1) - button_col * 0.65 * 4) -- Modif NALC
formspec[n+2] = ","..(ui_peruser.main_button_y + button_row * 0.7)..";0.8,0.8;"
formspec[n+3] = F(def.image)..";"
formspec[n+4] = F(def.name)..";]"
@ -118,13 +122,14 @@ function unified_inventory.get_formspec(player, page)
n = n+7
else
formspec[n] = "image["
formspec[n+1] = ( ui_peruser.main_button_x + 0.65 * (i - 1) - button_col * 0.65 * 4)
formspec[n+1] = ( ui_peruser.main_button_x + 0.65 * (j - 1) - button_col * 0.65 * 4) -- Modif NALC
formspec[n+2] = ","..(ui_peruser.main_button_y + button_row * 0.7)..";0.8,0.8;"
formspec[n+3] = F(def.image).."^[colorize:#808080:alpha]"
n = n+4
end
end
j = j + 1 -- Modif NALC
end
if fsdata.draw_inventory ~= false then
@ -223,7 +228,8 @@ function unified_inventory.get_formspec(player, page)
for y = 0, ui_peruser.pagerows - 1 do
for x = 0, ui_peruser.pagecols - 1 do
local name = unified_inventory.filtered_items_list[player_name][list_index]
if minetest.registered_items[name] then
local item = minetest.registered_items[name]
if item then
-- Clicked on current item: Flip crafting direction
if name == unified_inventory.current_item[player_name] then
local cdir = unified_inventory.current_craft_direction[player_name]
@ -236,12 +242,18 @@ function unified_inventory.get_formspec(player, page)
-- Default: use active search direction by default
dir = unified_inventory.active_search_direction[player_name]
end
formspec[n] = "item_image_button["
..(8.2 + x * 0.7)..","
..(ui_peruser.formspec_y + ui_peruser.page_y + y * 0.7)..";.81,.81;"
..name..";item_button_"..dir.."_"
..unified_inventory.mangle_for_formspec(name)..";]"
n = n+1
local button_name = "item_button_" .. dir .. "_"
.. unified_inventory.mangle_for_formspec(name)
formspec[n] = ("item_image_button[%f,%f;.81,.81;%s;%s;]"):format(
8.2 + x * 0.7, ui_peruser.formspec_y + ui_peruser.page_y + y * 0.7,
name, button_name
)
formspec[n + 1] = ("tooltip[%s;%s \\[%s\\]]"):format(
button_name, minetest.formspec_escape(item.description),
item.mod_origin or "??"
)
n = n + 2
list_index = list_index + 1
end
end

369
locale/ms.po Normal file
View File

@ -0,0 +1,369 @@
# Malay translation for the unified_inventory mod.
# Copyright (C) 2018 Maciej Kasatkin (RealBadAngel)
# This file is distributed under the same license as the unified_inventory package.
# muhdnurhidayat <translation@mnh48.moe>, 2018.
#
msgid ""
msgstr ""
"Project-Id-Version: unified_inventory\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-04-02 03:34+0200\n"
"PO-Revision-Date: 2018-07-17 20:14+0800\n"
"Language-Team: muhdnurhidayat <translation@mnh48.moe>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.0.9\n"
"Last-Translator: muhdnurhidayat <translation@mnh48.moe>\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"Language: ms\n"
"X-Poedit-Flags-xgettext: --add-comments\n"
#: api.lua register.lua
msgid "Crafting"
msgstr "Pertukangan"
#: api.lua
msgid "Mixing"
msgstr "Pencampuran"
#: api.lua
msgid "Cooking"
msgstr "Pemasakan"
#: api.lua
msgid "Digging"
msgstr "Penggalian"
#: bags.lua
msgid "Bags"
msgstr "Beg"
#: bags.lua
msgid "Bag @1"
msgstr "Beg @1"
#: bags.lua
msgid "Small Bag"
msgstr "Beg Kecil"
#: bags.lua
msgid "Medium Bag"
msgstr "Beg Sederhana"
#: bags.lua
msgid "Large Bag"
msgstr "Beg Besar"
#: group.lua
msgid " and "
msgstr " dan "
#: internal.lua
msgid "First page"
msgstr "Halaman pertama"
#: internal.lua
msgid "Back three pages"
msgstr "Tiga halaman sebelumnya"
#: internal.lua
msgid "Back one page"
msgstr "Halaman sebelumnya"
#: internal.lua
msgid "Forward one page"
msgstr "Halaman seterusnya"
#: internal.lua
msgid "Forward three pages"
msgstr "Tiga halaman seterusnya"
#: internal.lua
msgid "Last page"
msgstr "Halaman terakhir"
#: internal.lua
msgid "Search"
msgstr "Cari"
#: internal.lua
msgid "Reset search and display everything"
msgstr "Set semula carian dan tunjukkan semua benda"
#: internal.lua
msgid "No matching items"
msgstr "Tiada item sepadan"
#: internal.lua
msgid "No matches."
msgstr "Tiada padanan."
#: internal.lua
msgid "Page"
msgstr "Halaman"
#: internal.lua
#, lua-format
msgid "%s of %s"
msgstr "%s drpd %s"
#: internal.lua
msgid "Filter"
msgstr "Tapis"
#: register.lua
msgid "Can use the creative inventory"
msgstr "Boleh guna inventori kreatif"
#: register.lua
msgid ""
"Forces Unified Inventory to be displayed in Full mode if Lite mode is "
"configured globally"
msgstr ""
"Memaksa Unified Inventory untuk dipaparkan dalam mod Full jika mod Lite "
"ditetapkan secara global"
#: register.lua
msgid "Crafting Grid"
msgstr "Grid Pertukangan"
#: register.lua
msgid "Crafting Guide"
msgstr "Panduan Pertukangan"
#: register.lua
msgid "Set home position"
msgstr "Tetapkan kedudukan rumah"
#: register.lua
#, lua-format
msgid "Home position set to: %s"
msgstr "Kedudukan rumah ditetapkan ke: %s"
#: register.lua
msgid "You don't have the \"home\" privilege!"
msgstr "Anda tidak ada keistimewaan \"home\"!"
#: register.lua
msgid "Go home"
msgstr "Balik rumah"
#: register.lua
msgid "Set time to day"
msgstr "Tetapkan masa jadi siang"
#: register.lua
msgid "Time of day set to 6am"
msgstr "Masa ditetapkan ke 6 pagi"
#: register.lua
msgid "You don't have the settime privilege!"
msgstr "Anda tidak ada keistimewaan settime!"
#: register.lua
msgid "Set time to night"
msgstr "Tetapkan masa jadi malam"
#: register.lua
msgid "Time of day set to 9pm"
msgstr "Masa ditetapkan ke 9 malam"
#: register.lua
msgid "Clear inventory"
msgstr "Kosongkan inventori"
#: register.lua
msgid ""
"This button has been disabled outside of creative mode to prevent accidental "
"inventory trashing.\n"
"Use the trash slot instead."
msgstr ""
"Butang ini dilumpuhkan di luar mod kreatif untuk mengelakkan pengosongan "
"inventori secara tidak sengaja.\n"
"Sebaliknya, gunakan slot tong sampah."
#: register.lua
msgid "Inventory cleared!"
msgstr "Inventori dikosongkan!"
#: register.lua
msgid "Trash:"
msgstr "Buang:"
#: register.lua
msgid "Refill:"
msgstr "Isi balik:"
#: register.lua
#, lua-format
msgid "Any item belonging to the %s group"
msgstr "Sebarang item dari kumpulan %s"
#: register.lua
#, lua-format
msgid "Any item belonging to the groups %s"
msgstr "Sebarang item dari kumpulan %s"
#: register.lua
#, lua-format
msgid "Recipe %d of %d"
msgstr "Resipi %d drpd %d"
#: register.lua
#, lua-format
msgid "Usage %d of %d"
msgstr "Kegunaan %d drpd %d"
#: register.lua
msgid "No recipes"
msgstr "Tiada resipi"
#: register.lua
msgid "No usages"
msgstr "Tiada kegunaan"
#: register.lua
msgid "Result"
msgstr "Hasil"
#: register.lua
msgid "Ingredient"
msgstr "Bahan"
#: register.lua
msgid "Show next recipe"
msgstr "Tunjuk resipi seterusnya"
#: register.lua
msgid "Show next usage"
msgstr "Tunjuk kegunaan seterusnya"
#: register.lua
msgid "Show previous recipe"
msgstr "Tunjuk resipi sebelumnya"
#: register.lua
msgid "Show previous usage"
msgstr "Tunjuk kegunaan sebelumnya"
#: register.lua
#, lua-format
msgid "%s (%s)"
msgstr "%s (%s)"
#: register.lua
msgid "Give me:"
msgstr "Beri saya:"
#: register.lua
msgid ""
"This recipe is too\n"
"large to be displayed."
msgstr ""
"Resipi ini terlalu\n"
"besar untuk paparan."
#: register.lua
msgid "To craft grid:"
msgstr "Ke grid pertukangan:"
#: register.lua
msgid "All"
msgstr ""
"SE\n"
"MUA"
#: waypoints.lua
msgid "White"
msgstr "Putih"
#: waypoints.lua
msgid "Yellow"
msgstr "Kuning"
#: waypoints.lua
msgid "Red"
msgstr "Merah"
#: waypoints.lua
msgid "Green"
msgstr "Hijau"
#: waypoints.lua
msgid "Blue"
msgstr "Biru"
#: waypoints.lua
msgid "Waypoints"
msgstr "Titik Arah"
#: waypoints.lua
#, lua-format
msgid "Select Waypoint #%d"
msgstr "Pilih Titik Arah #%d"
#: waypoints.lua
#, lua-format
msgid "Waypoint %d"
msgstr "Titik Arah %d"
#: waypoints.lua
msgid "Set waypoint to current location"
msgstr "Tetapkan titik arah ke lokasi semasa"
#: waypoints.lua
msgid "invisible"
msgstr "Sembunyikan"
#: waypoints.lua
msgid "visible"
msgstr "Paparkan"
#: waypoints.lua
msgid "Make waypoint @1"
msgstr "@1 titik arah"
#: waypoints.lua
msgid "Disable"
msgstr "Sembunyikan"
#: waypoints.lua
msgid "Enable"
msgstr "Paparkan"
#: waypoints.lua
msgid "@1 display of waypoint coordinates"
msgstr "@1 koordinat untuk titik arah"
#: waypoints.lua
msgid "Change color of waypoint display"
msgstr "Tukar warna paparan titik arah"
#: waypoints.lua
msgid "Edit waypoint name"
msgstr "Edit nama titik arah"
#: waypoints.lua
msgid "Waypoint active"
msgstr "Titik arah aktif"
#: waypoints.lua
msgid "Waypoint inactive"
msgstr "Titik arah tidak aktif"
#: waypoints.lua
msgid "Finish editing"
msgstr "Selesai edit"
#: waypoints.lua
msgid "World position"
msgstr "Kedudukan dunia"
#: waypoints.lua
msgid "Name"
msgstr "Nama"
#: waypoints.lua
msgid "HUD text color"
msgstr "Warna tulisan HUD"