diff --git a/translate.lua b/translate.lua index 5aa1b3c..33d0601 100644 --- a/translate.lua +++ b/translate.lua @@ -61,7 +61,7 @@ function load_mo_file(mo_file) hash[sub(mo_data,oo+1,oo+ol)]=sub(mo_data,to+1,to+tl) end return function(text) - return hash[text] or text + return hash[text] end end @@ -75,5 +75,8 @@ if LANG == translate.source then return text; end; else - __ = load_mo_file(LANG..'.mo'); + translate.strings = load_mo_file(LANG..'.mo'); + __ = function(text) + return translate.strings[text]; + end end