don't accept empty strings as valid translations

This commit is contained in:
Hans-Werner Hilse
2014-05-23 11:57:33 +02:00
parent ed982d3c95
commit 6bbfae389a

View File

@@ -54,7 +54,7 @@ function GetText_mt.__index.changeLang(new_lang)
while true do
local line = po:read("*l")
if line == nil or line == "" then
if data.msgid and data.msgstr then
if data.msgid and data.msgstr and data.msgstr ~= "" then
GetText.translation[data.msgid] = string.gsub(data.msgstr, "\\(.)", c_escape)
end
-- stop at EOF: