summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2013-11-27 12:38:59 -0500
committerShadowNinja <shadowninja@minetest.net>2013-11-27 12:38:59 -0500
commit934ca0492c264bce8467881b075bdc200a1b70fd (patch)
tree256b7e6e758bb061aef730004d9300c1a955c55e
parent377dc784cde739369b1967d84bc6bc786ee4aa9d (diff)
Don't return empty translations
-rw-r--r--init.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index 5ae02a5..aa2af62 100644
--- a/init.lua
+++ b/init.lua
@@ -29,7 +29,10 @@ function intllib.Getter(modname)
local msgstr = load_strings(filename)
if msgstr then
intllib.getters[modname] = function (s)
- return msgstr[s] or s
+ if msgstr[s] and msgstr[s] ~= "" then
+ return msgstr[s]
+ end
+ return s
end
else
intllib.getters[modname] = noop_getter