summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorDiego Martínez <kaeza@users.noreply.github.com>2017-02-11 01:56:54 -0300
committerDiego Martínez <kaeza@users.noreply.github.com>2017-02-11 03:42:36 -0300
commit122d1a83cc380eb3919e28d20531b001c5cf8bac (patch)
treec15732cd5e198c42c64e81b5ef2a27d4a0a1faa3 /init.lua
parentc667cd0de67e01792072f66ee9f0d539f18f75ad (diff)
Fix warnings issued by `luacheck`.
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/init.lua b/init.lua
index 497b725..ce01b24 100644
--- a/init.lua
+++ b/init.lua
@@ -86,7 +86,7 @@ end
local function catngettext(catalogs, msgid, msgid_plural, n)
n = math.floor(n)
- for i, cat in ipairs(catalogs) do
+ for _, cat in ipairs(catalogs) do
local msgstr = cat and cat[msgid]
if msgstr then
local index = cat.plural_index(n)
@@ -107,18 +107,18 @@ function intllib.make_gettext_pair(modname)
local localedir = minetest.get_modpath(modname).."/locale"
local catalogs = gettext.load_catalogs(localedir)
local getter = Getter(modname)
- local function gettext(msgid, ...)
+ local function gettext_func(msgid, ...)
local msgstr = (catgettext(catalogs, msgid)
or getter(msgid))
return do_replacements(msgstr, ...)
end
- local function ngettext(msgid, msgid_plural, n, ...)
+ local function ngettext_func(msgid, msgid_plural, n, ...)
local msgstr = (catngettext(catalogs, msgid, msgid_plural, n)
or getter(msgid))
return do_replacements(msgstr, ...)
end
- gettext_getters[modname] = { gettext, ngettext }
- return gettext, ngettext
+ gettext_getters[modname] = { gettext_func, ngettext_func }
+ return gettext_func, ngettext_func
end