From ab442c2434f647d41d8bdfdab6e6e1a4110f3350 Mon Sep 17 00:00:00 2001 From: Frans de Jonge Date: Wed, 19 Nov 2014 21:32:33 +0100 Subject: [PATCH] gettext: unescape \n Fixes the problem that any msgid with \n in it wouldn't show up translated. --- frontend/gettext.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/gettext.lua b/frontend/gettext.lua index a68e1c374..cd52a7024 100644 --- a/frontend/gettext.lua +++ b/frontend/gettext.lua @@ -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