Refactored to use strictly locals

This commit is contained in:
HW
2013-10-18 22:38:07 +02:00
parent 8efdff65d3
commit ef111b99c6
107 changed files with 1987 additions and 1654 deletions

View File

@@ -1,11 +1,16 @@
lua_gettext.init("./i18n", "koreader")
local GetText = {}
local GetText_mt = {}
function _(string)
function GetText_mt.__call(gettext, string)
return lua_gettext.translate(string)
end
function gettextChangeLang(new_lang)
function GetText.changeLang(new_lang)
lua_gettext.change_lang(new_lang)
end
setmetatable(GetText, GetText_mt)
return GetText