diff options
author | Diego MartÃnez <kaeza@users.noreply.github.com> | 2017-02-11 01:56:54 -0300 |
---|---|---|
committer | Diego MartÃnez <kaeza@users.noreply.github.com> | 2017-02-11 03:42:36 -0300 |
commit | 122d1a83cc380eb3919e28d20531b001c5cf8bac (patch) | |
tree | c15732cd5e198c42c64e81b5ef2a27d4a0a1faa3 /init.lua | |
parent | c667cd0de67e01792072f66ee9f0d539f18f75ad (diff) |
Fix warnings issued by `luacheck`.
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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 |