From f5c982cc8523899e443eff71b1608f0c778a504f Mon Sep 17 00:00:00 2001 From: IFRFSX <34205903+IFRFSX@users.noreply.github.com> Date: Wed, 15 Jan 2020 20:02:48 +0800 Subject: [PATCH 1/8] Add Chinese Translation (#141) --- locale/unified_inventory.zh_CN.tr | 78 +++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 locale/unified_inventory.zh_CN.tr diff --git a/locale/unified_inventory.zh_CN.tr b/locale/unified_inventory.zh_CN.tr new file mode 100644 index 0000000..524ad67 --- /dev/null +++ b/locale/unified_inventory.zh_CN.tr @@ -0,0 +1,78 @@ +# textdomain: unified_inventory +# traslation by: IFRFSX(BingFengFSX) +#Email: IFRFSX@Protonmail.com + +Crafting=合成 +Mixing=混合 +Cooking=烹饪 +Digging=挖出 +Bags=背包 +Bag @1=背包@1 +Small Bag=小背包 +Medium Bag=中背包 +Large Bag=大背包 + and = 和 +First page=第一页 +Back three pages=后退三页 +Back one page=后退一页 +Forward one page=前进一页 +Forward three pages=前进三页 +Last page=最后一页 +Search=搜索 +No matching items=没有匹配物品 +No matches.=没有匹配 +Page=页面 +@1 of @2=第@1页,共@2页 +Filter=过滤器 +Can use the creative inventory=可以使用创造背包 +Crafting Grid=合成表 +Crafting Guide=合成指南 +Set home position=设置家的位置 +Home position set to: @1=家的位置设置到: @1 +You don't have the "home" privilege!=你没有“home”权限! +Go home=回家 +Set time to day=设置时间到白天 +Time of day set to 6am=时间设置到早晨6点 +You don't have the settime privilege!=你没有“settime”权限! +Set time to night=设置时间到晚上 +Time of day set to 9pm=时间设置到晚上9点 + +Inventory cleared!=清空背包 +Clear inventory=清空背包 + +Trash:=丢弃: +Refill:=填满: +Recipe @1 of @2=第@1配方,共@2个 +Usage @1 of @2=第@1用法,共@2个 +No recipes=没有配方 +No usages=没有用法 +Result=结果 +Ingredient=原料 +Give me:=给予: +To craft grid:=填充物品到合成表 +All=全部 +White=白 +Yellow=黄 +Red=红 +Green=绿 +Blue=蓝 +Waypoints=航路点 +Select Waypoint #@1=查询航路点 #@1 +Waypoint @1=航路点 @1 +Set waypoint to current location=将航路点设置到当前位置 +invisible=不可见的 +visible=可见的 +Make waypoint @1=设置航路点 @1 +@1 display of waypoint coordinates=显示航路点@1坐标 +Change color of waypoint display=改变航路点显示的颜色 +Edit waypoint name=编辑航路点名称 +Waypoint active=航路点已激活 +Waypoint inactive=航路点未激活 +Finish editing=完成编辑 +World position=世界位置 +Name=名称 +HUD text color=HUD文本颜色 + +#new + +Reset search and display everything=重置搜索并显示所有物品 From a89245c41be24e9b11960797c39fae01e62d3809 Mon Sep 17 00:00:00 2001 From: IFRFSX <34205903+IFRFSX@users.noreply.github.com> Date: Sun, 2 Feb 2020 23:24:57 +0800 Subject: [PATCH 2/8] Add traditional Chinese translation (#142) --- locale/unified_inventory.zh_TW.tr | 73 +++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 locale/unified_inventory.zh_TW.tr diff --git a/locale/unified_inventory.zh_TW.tr b/locale/unified_inventory.zh_TW.tr new file mode 100644 index 0000000..26b38f1 --- /dev/null +++ b/locale/unified_inventory.zh_TW.tr @@ -0,0 +1,73 @@ +# textdomain: unified_inventory +# traslation by: IFRFSX(BingFengFSX) +#Email: IFRFSX@Protonmail.com +Crafting=合成 +Mixing=混合 +Cooking=烹飪 +Digging=挖出 +Bags=背包 +Bag @1=背包@1 +Small Bag=小背包 +Medium Bag=中背包 +Large Bag=大背包 +and =和 +First page=第一頁 +Back three pages=後退三頁 +Back one page=後退一頁 +Forward one page=前進一頁 +Forward three pages=前進三頁 +Last page=最後一頁 +Search=蒐索 +No matching items=沒有匹配物品 +No matches.=沒有匹配 +Page=頁面 +@1 of @2=第@1頁,共@2頁 +Filter=篩檢程式 +Can use the creative inventory=可以使用創造背包 +Crafting Grid=合成錶 +Crafting Guide=合成指南 +Set home position=設定家的位置 +Home position set to: @1=家的位置設定到:@1 +You don't have the“home”privilege!=你沒有“home”許可權! +Go home=回家 +Set time to day=設定時間到白天 +Time of day set to 6am=時間設定到早晨6點 +You don't have the settime privilege!=你沒有“settime”許可權! +Set time to night=設定時間到晚上 +Time of day set to 9pm=時間設定到晚上9點 +Inventory cleared!=清空背包 +Clear inventory=清空背包 +Trash:=丟棄: +Refill:=填滿: +Recipe @1 of @2=第@1配方,共@2個 +Usage @1 of @2=第@1用法,共@2個 +No recipes=沒有配方 +No usages=沒有用法 +Result=結果 +Ingredient=原料 +Give me:=給予: +To craft grid:=填充物品到合成錶 +All=全部 +White=白 +Yellow=黃 +Red=紅 +Green=綠 +Blue=藍 +Waypoints=航路點 +Select Waypoint #@1=査詢航路點#@1 +Waypoint @1=航路點@1 +Set waypoint to current location=將航路點設定到當前位置 +invisible=不可見的 +visible=可見的 +Make waypoint @1=設定航路點@1 +@1 display of waypoint coordinates=顯示航路點@1座標 +Change color of waypoint display=改變航路點顯示的顏色 +Edit waypoint name=編輯航路點名稱 +Waypoint active=航路點已啟動 +Waypoint inactive=航路點未啟動 +Finish editing=完成編輯 +World position=世界位置 +Name=名稱 +HUD text color=HUD文字顏色 +#new +Reset search and display everything=重置蒐索並顯示所有物品 From 26e0e41593fc4477b33484f2a9fe38b13d0c5d43 Mon Sep 17 00:00:00 2001 From: IFRFSX <34205903+IFRFSX@users.noreply.github.com> Date: Thu, 13 Feb 2020 02:14:22 +0800 Subject: [PATCH 3/8] Improve traditional Chinese zh_TW (#143) --- locale/unified_inventory.zh_TW.tr | 65 +++++++++++++++++-------------- 1 file changed, 35 insertions(+), 30 deletions(-) diff --git a/locale/unified_inventory.zh_TW.tr b/locale/unified_inventory.zh_TW.tr index 26b38f1..fa81bbc 100644 --- a/locale/unified_inventory.zh_TW.tr +++ b/locale/unified_inventory.zh_TW.tr @@ -1,42 +1,45 @@ # textdomain: unified_inventory -# traslation by: IFRFSX(BingFengFSX) +# traslation by: IFRFSX(BingFengFSX) #Email: IFRFSX@Protonmail.com + Crafting=合成 Mixing=混合 Cooking=烹飪 Digging=挖出 -Bags=背包 -Bag @1=背包@1 -Small Bag=小背包 -Medium Bag=中背包 -Large Bag=大背包 -and =和 +Bags=揹包 +Bag @1=揹包@1 +Small Bag=小揹包 +Medium Bag=中揹包 +Large Bag=大揹包 + and = 和 First page=第一頁 Back three pages=後退三頁 Back one page=後退一頁 Forward one page=前進一頁 Forward three pages=前進三頁 Last page=最後一頁 -Search=蒐索 +Search=搜索 No matching items=沒有匹配物品 No matches.=沒有匹配 Page=頁面 @1 of @2=第@1頁,共@2頁 -Filter=篩檢程式 -Can use the creative inventory=可以使用創造背包 -Crafting Grid=合成錶 +Filter=過濾器 +Can use the creative inventory=可以使用創造揹包 +Crafting Grid=合成表 Crafting Guide=合成指南 -Set home position=設定家的位置 -Home position set to: @1=家的位置設定到:@1 -You don't have the“home”privilege!=你沒有“home”許可權! +Set home position=設置家的位置 +Home position set to: @1=家的位置設置到: @1 +You don't have the "home" privilege!=你沒有“home”權限! Go home=回家 -Set time to day=設定時間到白天 -Time of day set to 6am=時間設定到早晨6點 -You don't have the settime privilege!=你沒有“settime”許可權! -Set time to night=設定時間到晚上 -Time of day set to 9pm=時間設定到晚上9點 -Inventory cleared!=清空背包 -Clear inventory=清空背包 +Set time to day=設置時間到白天 +Time of day set to 6am=時間設置到早晨6點 +You don't have the settime privilege!=你沒有“settime”權限! +Set time to night=設置時間到晚上 +Time of day set to 9pm=時間設置到晚上9點 + +Inventory cleared!=清空揹包 +Clear inventory=清空揹包 + Trash:=丟棄: Refill:=填滿: Recipe @1 of @2=第@1配方,共@2個 @@ -46,7 +49,7 @@ No usages=沒有用法 Result=結果 Ingredient=原料 Give me:=給予: -To craft grid:=填充物品到合成錶 +To craft grid:=填充物品到合成表 All=全部 White=白 Yellow=黃 @@ -54,20 +57,22 @@ Red=紅 Green=綠 Blue=藍 Waypoints=航路點 -Select Waypoint #@1=査詢航路點#@1 -Waypoint @1=航路點@1 -Set waypoint to current location=將航路點設定到當前位置 +Select Waypoint #@1=查詢航路點 #@1 +Waypoint @1=航路點 @1 +Set waypoint to current location=將航路點設置到當前位置 invisible=不可見的 visible=可見的 -Make waypoint @1=設定航路點@1 +Make waypoint @1=設置航路點 @1 @1 display of waypoint coordinates=顯示航路點@1座標 Change color of waypoint display=改變航路點顯示的顏色 Edit waypoint name=編輯航路點名稱 -Waypoint active=航路點已啟動 -Waypoint inactive=航路點未啟動 +Waypoint active=航路點已激活 +Waypoint inactive=航路點未激活 Finish editing=完成編輯 World position=世界位置 Name=名稱 -HUD text color=HUD文字顏色 +HUD text color=HUD文本顏色 + #new -Reset search and display everything=重置蒐索並顯示所有物品 + +Reset search and display everything=重置搜索並顯示所有物品 From c0bd9977be5f7108ef2869582aa78fdcfb19db1f Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Sat, 21 Mar 2020 18:57:53 +0100 Subject: [PATCH 4/8] Modernize. Bags: use strings --- README.md | 6 ++++-- bags.lua | 10 +++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 15802c6..be95e09 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Unified Inventory +![Screenshot](screenshot.png) + Unified Inventory replaces the default survival and creative inventory. @@ -13,14 +15,14 @@ Unified Inventory replaces the default survival and creative inventory. * Home function to teleport * Trash slot * Lite mode: reduces the item browser width + * `minetest.conf` setting `unified_inventory_lite = true` * Mod API for modders: see [mod_api.txt](doc/mod_api.txt) * Setting-determinated features: see [settingtypes.txt](settingtypes.txt) ## Requirements - * Minetest 5.0.0+ since commit 4403b69 - * Minetest 0.4.16+ prior commit 4403b69 + * Minetest 5.0.0+ # Licenses diff --git a/bags.lua b/bags.lua index 1ebbdd3..a365139 100644 --- a/bags.lua +++ b/bags.lua @@ -250,7 +250,7 @@ if minetest.get_modpath("farming") ~= nil then minetest.register_craft({ output = "unified_inventory:bag_small", recipe = { - {"", "farming:cotton", ""}, + {"", "farming:string", ""}, {"group:wool", "group:wool", "group:wool"}, {"group:wool", "group:wool", "group:wool"}, }, @@ -260,8 +260,8 @@ if minetest.get_modpath("farming") ~= nil then output = "unified_inventory:bag_medium", recipe = { {"", "", ""}, - {"farming:cotton", "unified_inventory:bag_small", "farming:cotton"}, - {"farming:cotton", "unified_inventory:bag_small", "farming:cotton"}, + {"farming:string", "unified_inventory:bag_small", "farming:string"}, + {"farming:string", "unified_inventory:bag_small", "farming:string"}, }, }) @@ -269,8 +269,8 @@ if minetest.get_modpath("farming") ~= nil then output = "unified_inventory:bag_large", recipe = { {"", "", ""}, - {"farming:cotton", "unified_inventory:bag_medium", "farming:cotton"}, - {"farming:cotton", "unified_inventory:bag_medium", "farming:cotton"}, + {"farming:string", "unified_inventory:bag_medium", "farming:string"}, + {"farming:string", "unified_inventory:bag_medium", "farming:string"}, }, }) end From 606ba6a1a3ad6c425e8834975fe47203f8d9fa67 Mon Sep 17 00:00:00 2001 From: David Leal Date: Wed, 25 Mar 2020 11:46:35 -0600 Subject: [PATCH 5/8] Add GitHub workflow (#149) --- .github/workflows/check-release.yml | 11 +++++++++++ .luacheckrc | 18 ++++++++++++++++++ README.md | 3 ++- api.lua | 4 ++-- bags.lua | 3 +-- callbacks.lua | 2 -- internal.lua | 5 ++--- item_names.lua | 2 +- 8 files changed, 37 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/check-release.yml create mode 100644 .luacheckrc diff --git a/.github/workflows/check-release.yml b/.github/workflows/check-release.yml new file mode 100644 index 0000000..47313ff --- /dev/null +++ b/.github/workflows/check-release.yml @@ -0,0 +1,11 @@ +on: [push, pull_request] +name: Check & Release +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: lint + uses: Roang-zero1/factorio-mod-luacheck@master + with: + luacheckrc_url: https://raw.githubusercontent.com/minetest-mods/unified_inventory/master/.luacheckrc diff --git a/.luacheckrc b/.luacheckrc new file mode 100644 index 0000000..709c485 --- /dev/null +++ b/.luacheckrc @@ -0,0 +1,18 @@ +unused_args = false +allow_defined_top = true +max_line_length = 999 + +globals = { + "unified_inventory", +} + +read_globals = { + string = {fields = {"split", "trim"}}, + table = {fields = {"copy", "getn"}}, + + "minetest", "vector", + "ItemStack", "datastorage", +} + +files["callbacks.lua"].ignore = { "player", "draw_lite_mode" } +files["bags.lua"].ignore = { "player" } diff --git a/README.md b/README.md index be95e09..8c917ec 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Unified Inventory +[![](https://github.com/minetest-mods/unified_inventory/workflows/Check%20&%20Release/badge.svg)](https://github.com/minetest-mods/unified_inventory/actions) + ![Screenshot](screenshot.png) Unified Inventory replaces the default survival and creative inventory. @@ -24,7 +26,6 @@ Unified Inventory replaces the default survival and creative inventory. * Minetest 5.0.0+ - # Licenses Copyright (C) 2012-2014 Maciej Kasatkin (RealBadAngel) diff --git a/api.lua b/api.lua index 071900d..d24135b 100644 --- a/api.lua +++ b/api.lua @@ -16,8 +16,8 @@ minetest.after(0.01, function() table.insert(unified_inventory.items_list, name) local all_names = rev_aliases[name] or {} table.insert(all_names, name) - for _, name in ipairs(all_names) do - local recipes = minetest.get_all_craft_recipes(name) + for _, player_name in ipairs(all_names) do + local recipes = minetest.get_all_craft_recipes(player_name) if recipes then for _, recipe in ipairs(recipes) do diff --git a/bags.lua b/bags.lua index a365139..c61c982 100644 --- a/bags.lua +++ b/bags.lua @@ -1,4 +1,4 @@ ---[[ +--[[ Bags for Minetest Copyright (c) 2012 cornernote, Brett O'Donnell @@ -166,7 +166,6 @@ local function load_bags_metadata(player, bags_inv) end minetest.register_on_joinplayer(function(player) - local player_inv = player:get_inventory() local player_name = player:get_player_name() local bags_inv = minetest.create_detached_inventory(player_name .. "_bags",{ on_put = function(inv, listname, index, stack, player) diff --git a/callbacks.lua b/callbacks.lua index 8bfe6b6..bc90237 100644 --- a/callbacks.lua +++ b/callbacks.lua @@ -28,7 +28,6 @@ minetest.register_on_joinplayer(function(player) -- Refill slot local refill = minetest.create_detached_inventory(player_name.."refill", { allow_put = function(inv, listname, index, stack, player) - local player_name = player:get_player_name() if unified_inventory.is_creative(player_name) then return stack:get_count() else @@ -36,7 +35,6 @@ minetest.register_on_joinplayer(function(player) end end, on_put = function(inv, listname, index, stack, player) - local player_name = player:get_player_name() local handle_refill = (minetest.registered_items[stack:get_name()] or {}).on_refill or default_refill stack = handle_refill(stack) inv:set_stack(listname, index, stack) diff --git a/internal.lua b/internal.lua index 05dc5f5..ee8b4a9 100644 --- a/internal.lua +++ b/internal.lua @@ -215,11 +215,10 @@ function unified_inventory.get_formspec(player, page) else local dir = unified_inventory.active_search_direction[player_name] local list_index = unified_inventory.current_index[player_name] - local page = math.floor(list_index / (ui_peruser.items_per_page) + 1) + local page2 = math.floor(list_index / (ui_peruser.items_per_page) + 1) local pagemax = math.floor( (#unified_inventory.filtered_items_list[player_name] - 1) / (ui_peruser.items_per_page) + 1) - local item = {} 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] @@ -254,7 +253,7 @@ function unified_inventory.get_formspec(player, page) end end formspec[n] = "label[8.2,"..ui_peruser.form_header_y..";"..F(S("Page")) .. ": " - .. S("@1 of @2",page,pagemax).."]" + .. S("@1 of @2",page2,pagemax).."]" end n= n+1 diff --git a/item_names.lua b/item_names.lua index d374b14..111c9ee 100644 --- a/item_names.lua +++ b/item_names.lua @@ -1,6 +1,6 @@ -- Based on 4itemnames mod by 4aiman -local item_names = {} -- [player_name] = { hud, dtime, itemname } +local item_names = {} -- [player_name] = { hud, dtime, itemname } local dlimit = 3 -- HUD element will be hidden after this many seconds local air_hud_mod = minetest.get_modpath("4air") local hud_mod = minetest.get_modpath("hud") From eb96c89b5dd418d9d8f6f432f00d06761cd98030 Mon Sep 17 00:00:00 2001 From: CarlosBarrazaE <61398224+CarlosBarrazaE@users.noreply.github.com> Date: Fri, 1 May 2020 12:15:08 -0400 Subject: [PATCH 6/8] Update the Spanish language (#144) Complete missing translations; error corrections. Co-authored-by: David Leal --- locale/unified_inventory.es.tr | 122 ++++++++++++++++++++------- locale/unified_inventory.template.tr | 100 ++++++++++++++++++++++ register.lua | 2 +- 3 files changed, 193 insertions(+), 31 deletions(-) create mode 100644 locale/unified_inventory.template.tr diff --git a/locale/unified_inventory.es.tr b/locale/unified_inventory.es.tr index b90bad9..18b6c77 100644 --- a/locale/unified_inventory.es.tr +++ b/locale/unified_inventory.es.tr @@ -1,38 +1,100 @@ # textdomain: unified_inventory -Crafting=Elaboración -Cooking=hornear -Bags=Bolsas -Bag @1=Bolsa @1 -Small Bag=Bolsa Pequeña -Medium Bag=Bolsa Mediana -Large Bag=Bolsa Grande -Page=Página -@1 of @2=@1 de @2 -Filter=Filtro -Can use the creative inventory=Puede usar el inventario creativo -Crafting Guide=Guía de Elaboración -Set home position=Posición en el mundo -Home position set to: @1=Posición de hogar cambiada a: @1 -You don't have the "home" privilege!=¡No tienes el privilegio "home"! -Time of day set to 6am=Hora del día cambiada a 6AM -You don't have the settime privilege!=¡No tienes el privilegio "settime"! -Time of day set to 9pm=Hora del día cambiada a 9PM -Inventory cleared!=¡Inventario limpio! -Trash:=Basura: -Refill:=Rellenar: -Recipe @1 of @2=Receta @1 de @2 -Result=Resultado -To craft grid:=Copiar al cuadro de elaboración -All=Todos + +# waypoints.lua + White=Blanco Yellow=Amarillo Red=Rojo Green=Verde Blue=Azul -Waypoints=Puntos de paso -Waypoint @1=Puntos de paso @1 -Waypoint active=Punto de paso activo -Waypoint inactive=Punto de paso inactivo +Waypoints=Puntos +Select Waypoint #@1=Seleccionar Punto #@1 +Waypoint @1=Punto @1 +Set waypoint to current location=Establecer el punto a la ubicación actual +Make waypoint @1=Hacer punto @1 +invisible=invisible +visible=visible +@1 display of waypoint coordinates=Visualizar coordenadas del punto @1 +Disable=Deshabilitado +Enable=Habilitado +Change color of waypoint display=Cambiar el color del punto +Edit waypoint name=Editar nombre del punto +Waypoint active=Punto activo +Waypoint inactive=Punto inactivo +Finish editing=Terminar edición World position=Posición en el mundo Name=Nombre -HUD text color=Color del HUD +HUD text color=Color del texto de la Interfaz + +# group.lua + + and = y + +# register.lua + +Can use the creative inventory=Puede usar el inventario creativo +Forces Unified Inventory to be displayed in Full mode if Lite mode is configured globally=Obliga al Inventario Unificado a mostrarse en modo Completo si el modo Simple está configurado globalmente +Crafting Grid=Cuadricula de Elaboración +Crafting Guide=Guía de Elaboración +Set home position=Establecer posición de la casa +Home position set to: @1=Posición de la casa cambiada a: @1 +You don't have the \"home\" privilege!=¡No tienes el privilegio \"home\"! +Go home=Ir a casa +Set time to day=Cambiar a dia +Set time to night=Cambiar a noche +Time of day set to 6am=Hora del día cambiada a 6 AM +Time of day set to 9pm=Hora del día cambiada a 9 PM +You don't have the settime privilege!=¡No tienes el privilegio "settime"! +Clear inventory=Limpiar inventario +Inventory cleared!=¡Inventario limpio! +This button has been disabled outside=Este botón ha sido deshabilitado +Crafting=Elaboración +Trash:=Basura: +Refill:=Rellenar: +Any item belonging to the @1 group=Cualquier elemento que pertenezca al grupo @1 +Any item belonging to the groups @1=Cualquier elemento perteneciente a los grupos @1 +Recipe @1 of @2=Receta @1 de @2 +Usage @1 of @2=Uso @1 de @2 +No recipes=No tiene receta +No usages=No tiene uso +Result=Resultado +Ingredient=Ingrediente +Show next recipe=Mostrar la siguiente receta +Show next usage=Mostrar el siguiente uso +Show previous recipe=Mostrar la receta anterior +Show previous usage=Mostrar el uso anterior +@1 (@2)=@1 (@2) +Give me:=Dame: +This recipe is too@nlarge to be displayed.=Esta receta es demasiado@ngrande para ser mostrada. +To craft grid:=Construir: +All=Todos + +# api.lua + +Mixing=Mezclar +Cooking=Hornear +Digging=Recoger + +# internal.lua + +First page=Primera página +Back three pages=Volver tres páginas +Back one page=Volver una página +Forward one page=Avanzar una página +Forward three pages=Avanzar tres páginas +Last page=Ultima Pagina +Search=Buscar +Reset search and display everything=Limpiar la busqueda y mostrar todo +No matching items=No se encontraron elementos +No matches.=No hay resultados. +Page=Página +@1 of @2=@1 de @2 +Filter=Filtro + +# bags.lua + +Bags=Bolsos +Bag @1=Bolso @1 +Small Bag=Bolso Pequeño +Medium Bag=Bolso Mediano +Large Bag=Bolso Grande diff --git a/locale/unified_inventory.template.tr b/locale/unified_inventory.template.tr new file mode 100644 index 0000000..2ea4fca --- /dev/null +++ b/locale/unified_inventory.template.tr @@ -0,0 +1,100 @@ +# textdomain: unified_inventory + +# waypoints.lua + +White= +Yellow= +Red= +Green= +Blue= +Waypoints= +Select Waypoint #@1= +Waypoint @1= +Set waypoint to current location= +Make waypoint @1= +invisible= +visible= +@1 display of waypoint coordinates= +Disable= +Enable= +Change color of waypoint display= +Edit waypoint name= +Waypoint active= +Waypoint inactive= +Finish editing= +World position= +Name= +HUD text color= + +# group.lua + + and = + +# register.lua + +Can use the creative inventory= +Forces Unified Inventory to be displayed in Full mode if Lite mode is configured globally= +Crafting Grid= +Crafting Guide= +Set home position= +Home position set to: @1= +You don't have the \"home\" privilege!= +Go home= +Set time to day= +Set time to night= +Time of day set to 6am= +Time of day set to 9pm= +You don't have the settime privilege!= +Clear inventory= +Inventory cleared!= +This button has been disabled outside= +Crafting= +Trash:= +Refill:= +Any item belonging to the @1 group= +Any item belonging to the groups @1= +Recipe @1 of @2= +Usage @1 of @2= +No recipes= +No usages= +Result= +Ingredient= +Show next recipe= +Show next usage= +Show previous recipe= +Show previous usage= +@1 (@2)= +Give me:= +This recipe is too@nlarge to be displayed.= +To craft grid:= +All= + +# api.lua + +Mixing= +Cooking= +Digging= + +# internal.lua + +First page= +Back three pages= +Back one page= +Forward one page= +Forward three pages= +Last page= +Search= +Reset search and display everything= +No matching items= +No matches.= +Page= +@1 of @2= +Filter= + +# bags.lua + +Bags= +Bag @1= +Small Bag= +Medium Bag= +Large Bag= diff --git a/register.lua b/register.lua index d89c05e..f958a6d 100644 --- a/register.lua +++ b/register.lua @@ -386,7 +386,7 @@ unified_inventory.register_page("craftguide", { else -- Error fs[#fs + 1] = string.format("label[2,%f;%s]", - formspecy, F(S("This recipe is too\nlarge to be displayed."))) + formspecy, F(S("This recipe is too@nlarge to be displayed."))) end if craft_type.uses_crafting_grid and display_size.width <= 3 then From 5a24e9f6fc8eff27f0648b208c0593c7682eed16 Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Fri, 5 Jun 2020 21:30:53 +0200 Subject: [PATCH 7/8] Fix item name position, also for hudbars --- item_names.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/item_names.lua b/item_names.lua index 111c9ee..a1368f8 100644 --- a/item_names.lua +++ b/item_names.lua @@ -2,24 +2,24 @@ local item_names = {} -- [player_name] = { hud, dtime, itemname } local dlimit = 3 -- HUD element will be hidden after this many seconds -local air_hud_mod = minetest.get_modpath("4air") -local hud_mod = minetest.get_modpath("hud") local hudbars_mod = minetest.get_modpath("hudbars") local function set_hud(player) local player_name = player:get_player_name() - local off = {x=0, y=-70} - if air_hud_mod or hud_mod then - off.y = off.y - 20 - elseif hudbars_mod then - off.y = off.y + 13 + local off = {x=0, y=-65} + if hudbars_mod then + -- Assume no alignment (2 per line) + off.y = off.y - math.ceil(hb.hudbars_count / 2) * 25 + else + off.y = off.y - 25 end + item_names[player_name] = { hud = player:hud_add({ hud_elem_type = "text", position = {x=0.5, y=1}, offset = off, - alignment = {x=0, y=0}, + alignment = {x=0, y=-1}, number = 0xFFFFFF, text = "", }), From 04b2edceb4aa9f0cba1b1f541db2e6eac9cb8cd8 Mon Sep 17 00:00:00 2001 From: David Leal Date: Sat, 6 Jun 2020 06:09:08 -0500 Subject: [PATCH 8/8] LuaCheck: Add `hb` as a global (#154) `hb` global is from HudBars by Wuzzy2. --- .luacheckrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.luacheckrc b/.luacheckrc index 709c485..9fb6a7c 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -12,6 +12,8 @@ read_globals = { "minetest", "vector", "ItemStack", "datastorage", + + "hb", } files["callbacks.lua"].ignore = { "player", "draw_lite_mode" }