mirror of
https://notabug.org/TenPlus1/lucky_block.git
synced 2024-10-04 03:33:05 +02:00
remove intllib
This commit is contained in:
parent
a56384fea7
commit
d70a52c6f8
@ -1,7 +0,0 @@
|
|||||||
default?
|
|
||||||
tnt?
|
|
||||||
screwdriver?
|
|
||||||
intllib?
|
|
||||||
mcl_core?
|
|
||||||
mcl_sounds?
|
|
||||||
pova?
|
|
@ -1 +0,0 @@
|
|||||||
Adds lucky blocks into the game which may give good, bad, hurtful items when open :)
|
|
25
init.lua
25
init.lua
@ -34,26 +34,17 @@ end
|
|||||||
|
|
||||||
-- translation support
|
-- translation support
|
||||||
local S
|
local S
|
||||||
if minetest.get_translator ~= nil then
|
if minetest.get_translator then
|
||||||
S = minetest.get_translator("lucky_block") -- 5.x translation function
|
S = minetest.get_translator("lucky_block") -- 5.x translation function
|
||||||
else
|
else -- boilerplate function
|
||||||
if minetest.get_modpath("intllib") then
|
S = function(str, ...)
|
||||||
dofile(minetest.get_modpath("intllib") .. "/init.lua")
|
local args = {...}
|
||||||
if intllib.make_gettext_pair then
|
return str:gsub("@%d+", function(match)
|
||||||
gettext, ngettext = intllib.make_gettext_pair() -- new gettext method
|
return args[tonumber(match:sub(2))]
|
||||||
else
|
end)
|
||||||
gettext = intllib.Getter() -- old text file method
|
|
||||||
end
|
|
||||||
S = gettext
|
|
||||||
else -- boilerplate function
|
|
||||||
S = function(str, ...)
|
|
||||||
local args = {...}
|
|
||||||
return str:gsub("@%d+", function(match)
|
|
||||||
return args[tonumber(match:sub(2))]
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
lucky_block.intllib = S
|
lucky_block.intllib = S
|
||||||
|
|
||||||
|
|
||||||
|
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
|
|
50
locale/ru.po
50
locale/ru.po
@ -1,50 +0,0 @@
|
|||||||
# SOME DESCRIPTIVE TITLE.
|
|
||||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
|
||||||
# This file is distributed under the same license as the PACKAGE package.
|
|
||||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
|
||||||
#
|
|
||||||
#, fuzzy
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2017-05-14 08:34+0200\n"
|
|
||||||
"PO-Revision-Date: 2017-08-28 11:14+ZONE\n"
|
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
|
||||||
"Language: ru\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Stop hitting yourself!"
|
|
||||||
msgstr "Прекратите удары себя"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Dry shrub takeover!"
|
|
||||||
msgstr "Поглощение сухих кустов"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Random teleport!"
|
|
||||||
msgstr "Случайный телепорт!"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Lucky Block"
|
|
||||||
msgstr "Удачливый блок"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Super Lucky Block (use pick)"
|
|
||||||
msgstr "Супер удачливый блок (используйте кирку)"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "[MOD] Lucky Blocks loaded (@1 in total)"
|
|
||||||
msgstr "[MOD] Удачливый блок нагруженный (Всего @1)"
|
|
||||||
|
|
||||||
#: blocks.lua
|
|
||||||
msgid "Super Mega Magenta Ultra Screwdriver 2500\n(left-click to rotate face, right-click to rotates axis)"
|
|
||||||
msgstr "Пурпурная супер мега ультра отвёртка 2500\n(левая кнопка для вращения лицевой части, правая кнопка для вращения осей)"
|
|
||||||
|
|
||||||
#: blocks.lua
|
|
||||||
msgid "Void Mirror (Place to see through solid walls during daytime"
|
|
||||||
msgstr "Пустое зеркало (Установите, чтобы видеть сквозь сплошные стены в дневное время)"
|
|
@ -1,15 +0,0 @@
|
|||||||
# textdomain: lucky_block
|
|
||||||
# author:
|
|
||||||
# last update: 2017/Aug/28
|
|
||||||
|
|
||||||
### init.lua ###
|
|
||||||
Stop hitting yourself!=Прекратите удары себя
|
|
||||||
Dry shrub takeover!=Поглощение сухих кустов
|
|
||||||
Random teleport!=Случайный телепорт!
|
|
||||||
Lucky Block=Удачливый блок
|
|
||||||
Super Lucky Block (use pick)=Супер удачливый блок (используйте кирку)
|
|
||||||
[MOD] Lucky Blocks loaded (@1 in total)=[MOD] Удачливый блок нагруженный (Всего @1)
|
|
||||||
|
|
||||||
### blocks.lua ###
|
|
||||||
Super Mega Magenta Ultra Screwdriver 2500\n(left-click to rotate face, right-click to rotates axis)"=Пурпурная супер мега ультра отвёртка 2500\n(левая кнопка для вращения лицевой части, правая кнопка для вращения осей)
|
|
||||||
Void Mirror (Place to see through solid walls during daytime=Пустое зеркало (Установите, чтобы видеть сквозь сплошные стены в дневное время)
|
|
@ -1,50 +0,0 @@
|
|||||||
# SOME DESCRIPTIVE TITLE.
|
|
||||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
|
||||||
# This file is distributed under the same license as the PACKAGE package.
|
|
||||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
|
||||||
#
|
|
||||||
#, fuzzy
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2017-05-14 08:34+0200\n"
|
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
|
||||||
"Language: \n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=CHARSET\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Stop hitting yourself!"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Dry shrub takeover!"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Random teleport!"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Lucky Block"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "Super Lucky Block (use pick)"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: init.lua
|
|
||||||
msgid "[MOD] Lucky Blocks loaded (@1 in total)"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: blocks.lua
|
|
||||||
msgid "Super Mega Magenta Ultra Screwdriver 2500\n(left-click to rotate face, right-click to rotates axis)"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: blocks.lua
|
|
||||||
msgid "Void Mirror (Place to see through solid walls during daytime"
|
|
||||||
msgstr ""
|
|
2
mod.conf
2
mod.conf
@ -1,4 +1,4 @@
|
|||||||
name = lucky_block
|
name = lucky_block
|
||||||
depends =
|
depends =
|
||||||
optional_depends = default, mcl_core, mcl_sounds, tnt, screwdriver, intllib, pova
|
optional_depends = default, mcl_core, mcl_sounds, tnt, screwdriver, pova
|
||||||
description = Adds lucky blocks into the game which may give good, bad, hurtful items when open :)
|
description = Adds lucky blocks into the game which may give good, bad, hurtful items when open :)
|
||||||
|
Loading…
Reference in New Issue
Block a user