[i18n] GetText: fix fuzzy detection for certain strings (#11648)

Reported in <https://github.com/koreader/koreader/pull/11647#issue-2233008767>.

Probably overlooked in #5807
reviewable/pr11659/r1
Frans de Jonge 3 weeks ago committed by GitHub
parent fb86acaf1a
commit 31c28378e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -275,6 +275,8 @@ function GetText_mt.__index.changeLang(new_lang)
-- unescape \\ or msgid won't match
s = s:gsub("\\\\", "\\")
data[what] = (data[what] or "") .. s
elseif what and s == "" and fuzzy then -- luacheck: ignore 542
-- Ignore the likes of msgid "" and msgstr ""
else
-- Don't save this fuzzy string and unset fuzzy for the next one.
fuzzy = false

Loading…
Cancel
Save