remove intllib
This commit is contained in:
parent
df9c4baed9
commit
9a89d0751d
@ -1,5 +0,0 @@
|
||||
default
|
||||
sethome?
|
||||
creative?
|
||||
intllib?
|
||||
craftguide?
|
@ -1 +0,0 @@
|
||||
Replaces inventory with a simple custom version that can be expanded.
|
20
init.lua
20
init.lua
@ -11,10 +11,24 @@ Edited by TenPlus1 (26th August 2020)
|
||||
]]--
|
||||
|
||||
|
||||
-- Load support for intllib.
|
||||
-- mod path
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S = minetest.get_translator and minetest.get_translator("inventory_plus") or
|
||||
dofile(MP .. "/intllib.lua")
|
||||
|
||||
-- Translation support
|
||||
local S
|
||||
|
||||
if minetest.get_translator then
|
||||
S = minetest.get_translator("inventory_plus") -- 5.x translation function
|
||||
else
|
||||
S = function(str, ...) -- boilerplate function
|
||||
|
||||
local args = {...}
|
||||
|
||||
return str:gsub("@%d+", function(match)
|
||||
return args[tonumber(match:sub(2))]
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
-- compatibility with older minetest versions
|
||||
if not rawget(_G, "creative") then
|
||||
|
45
intllib.lua
45
intllib.lua
@ -1,45 +0,0 @@
|
||||
|
||||
-- Fallback functions for when `intllib` is not installed.
|
||||
-- Code released under Unlicense <http://unlicense.org>.
|
||||
|
||||
-- Get the latest version of this file at:
|
||||
-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua
|
||||
|
||||
local function format(str, ...)
|
||||
local args = { ... }
|
||||
local function repl(escape, open, num, close)
|
||||
if escape == "" then
|
||||
local replacement = tostring(args[tonumber(num)])
|
||||
if open == "" then
|
||||
replacement = replacement..close
|
||||
end
|
||||
return replacement
|
||||
else
|
||||
return "@"..open..num..close
|
||||
end
|
||||
end
|
||||
return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl))
|
||||
end
|
||||
|
||||
local gettext, ngettext
|
||||
if minetest.get_modpath("intllib") then
|
||||
if intllib.make_gettext_pair then
|
||||
-- New method using gettext.
|
||||
gettext, ngettext = intllib.make_gettext_pair()
|
||||
else
|
||||
-- Old method using text files.
|
||||
gettext = intllib.Getter()
|
||||
end
|
||||
end
|
||||
|
||||
-- Fill in missing functions.
|
||||
|
||||
gettext = gettext or function(msgid, ...)
|
||||
return format(msgid, ...)
|
||||
end
|
||||
|
||||
ngettext = ngettext or function(msgid, msgid_plural, n, ...)
|
||||
return format(n==1 and msgid or msgid_plural, ...)
|
||||
end
|
||||
|
||||
return gettext, ngettext
|
63
locale/it.po
63
locale/it.po
@ -1,63 +0,0 @@
|
||||
# ITALIAN LOCALIZATION FILE FOR INVENTORY PLUS.
|
||||
# Copyright (C) 2018 Brett O'Donnell http://cornernote.github.io
|
||||
# This file is distributed under the same license as the Inventory Plus package.
|
||||
# Hamlet <h4mlet@riseup.net>, 2018.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Inventory Plus\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-03-03 23:17+0100\n"
|
||||
"PO-Revision-Date: 2018-03-03 23:00+0100\n"
|
||||
"Last-Translator: Hamlet <h4mlet@riseup.net>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: it\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Poedit 1.6.10\n"
|
||||
|
||||
#: init.lua home_gui.lua
|
||||
msgid "Back"
|
||||
msgstr "Indietro"
|
||||
|
||||
#: init.lua
|
||||
msgid "NO PLAYER INVENTORY FOUND!"
|
||||
msgstr "L'INVENTARIO DEL PERSONAGGIO NON È STATO TROVATO"
|
||||
|
||||
#: init.lua
|
||||
msgid "Craft"
|
||||
msgstr "Assemb."
|
||||
|
||||
#: init.lua
|
||||
msgid "Creative"
|
||||
msgstr "Creativa"
|
||||
|
||||
#: init.lua
|
||||
msgid "sethome found, adding home_gui to inventory plus"
|
||||
msgstr "sethome trovato, home_gui viene aggiunta a Inventory Plus"
|
||||
|
||||
#: home_gui.lua
|
||||
msgid "Set Home"
|
||||
msgstr "Imp. casa"
|
||||
|
||||
#: home_gui.lua
|
||||
msgid "Go Home"
|
||||
msgstr "And. casa"
|
||||
|
||||
#: home_gui.lua
|
||||
msgid "Spawn"
|
||||
msgstr "Origine"
|
||||
|
||||
#: home_gui.lua
|
||||
msgid "Home set to:"
|
||||
msgstr "Casa impostata a:"
|
||||
|
||||
#: home_gui.lua
|
||||
msgid "Home Pos"
|
||||
msgstr "Pos. casa"
|
||||
|
||||
#: home_gui.lua
|
||||
msgid "Go to Spawn"
|
||||
msgstr "And. origine"
|
@ -1,18 +0,0 @@
|
||||
# textdomain: inventory_plus
|
||||
# author: Hamlet
|
||||
# last update: 2018/Mar/03
|
||||
|
||||
### init.lua ###
|
||||
Back=Indietro
|
||||
NO PLAYER INVENTORY FOUND!=L'INVENTARIO DEL PERSONAGGIO NON È STATO TROVATO
|
||||
Craft=Assemb.
|
||||
Creative=Creativa
|
||||
sethome found, adding home_gui to inventory plus=sethome trovato, home_gui viene aggiunta a Inventory Plus
|
||||
|
||||
### home_gui.lua ###
|
||||
Set Home=Imp. casa
|
||||
Go Home=And. casa
|
||||
Spawn=Origine
|
||||
Home set to:=Casa impostata a:
|
||||
Home Pos=Pos. casa
|
||||
Go to Spawn=And. origine
|
@ -1,62 +0,0 @@
|
||||
# LANGUAGE_NAME LOCALIZATION FILE FOR INVENTORY PLUS.
|
||||
# Copyright (C) 2018 Brett O'Donnell http://cornernote.github.io
|
||||
# This file is distributed under the same license as the Inventory Plus package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Inventory Plus\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-03-03 23:17+0100\n"
|
||||
"PO-Revision-Date: \n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: init.lua home_gui.lua
|
||||
msgid "Back"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "NO PLAYER INVENTORY FOUND!"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Craft"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Creative"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "sethome found, adding home_gui to inventory plus"
|
||||
msgstr ""
|
||||
|
||||
#: home_gui.lua
|
||||
msgid "Set Home"
|
||||
msgstr ""
|
||||
|
||||
#: home_gui.lua
|
||||
msgid "Go Home"
|
||||
msgstr ""
|
||||
|
||||
#: home_gui.lua
|
||||
msgid "Spawn"
|
||||
msgstr ""
|
||||
|
||||
#: home_gui.lua
|
||||
msgid "Home set to:"
|
||||
msgstr ""
|
||||
|
||||
#: home_gui.lua
|
||||
msgid "Home Pos"
|
||||
msgstr ""
|
||||
|
||||
#: home_gui.lua
|
||||
msgid "Go to Spawn"
|
||||
msgstr ""
|
Loading…
x
Reference in New Issue
Block a user