mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
gettext: unescape \n
Fixes the problem that any msgid with \n in it wouldn't show up translated.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user