gettext: unescape \n

Fixes the problem that any msgid with \n in it wouldn't show up translated.
This commit is contained in:
Frans de Jonge
2014-11-19 21:32:33 +01:00
parent fad702b6d5
commit ab442c2434

View File

@@ -77,6 +77,8 @@ function GetText_mt.__index.changeLang(new_lang)
s = line:match("^%s*\"(.*)\"%s*$")
end
if what and s then
-- unescape \n or msgid won't match
s = s:gsub("\\n", "\n")
data[what] = (data[what] or "") .. s
end
end