aboutsummaryrefslogtreecommitdiff
path: root/boards/intllib.lua
diff options
context:
space:
mode:
authorNiklp <89982526+Niklp09@users.noreply.github.com>2023-07-24 09:59:26 +0200
committerGitHub <noreply@github.com>2023-07-24 09:59:26 +0200
commit1440f35fa62fd2c01b4844261290c88e42d2430f (patch)
treee42db53056e5d6f1c4fd562a924934081ae787c4 /boards/intllib.lua
parente0e03058362e038d07d4063c4fbd6999ad27109c (diff)
downloaddisplay_modpack_no_craft-1440f35fa62fd2c01b4844261290c88e42d2430f.tar.gz
display_modpack_no_craft-1440f35fa62fd2c01b4844261290c88e42d2430f.zip
Add luacheck, update translations, replace ABMs, bug fixes (#1)
* luacheck, mt 5 translation, german translation, maintenance * fix luacheck warnings * Fix digital clock nodebox and texture * Fix luacheck usage * Add comment why fonts are not split into several lines
Diffstat (limited to 'boards/intllib.lua')
-rw-r--r--boards/intllib.lua45
1 files changed, 0 insertions, 45 deletions
diff --git a/boards/intllib.lua b/boards/intllib.lua
deleted file mode 100644
index 6669d72..0000000
--- a/boards/intllib.lua
+++ /dev/null
@@ -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