fix matching for events without locale

This commit is contained in:
Franzi 2023-12-26 09:01:47 +01:00
parent d908c361f8
commit 3b845964e7
2 changed files with 5 additions and 5 deletions

View file

@ -182,7 +182,7 @@ function node.render()
local talk = all_next_talks[idx]
local title = talk.title
if show_language and talk.locale then
if show_language and talk.locale ~= json.null then
title = title .. " (" .. talk.locale .. ")"
end
@ -196,7 +196,7 @@ function node.render()
if #talk.persons > 0 then
local joiner = ({
de = "mit",
})[talk.locale] or "with"
})[talk.locale or ""] or "with"
info_line = info_line .. " " .. joiner .. " " .. table.concat(talk.persons, ", ")
end

View file

@ -192,7 +192,7 @@ local function view_next_talk(starts, ends, config, x1, y1, x2, y2)
local y_start = y
local title = current_talk.title
if show_language and current_talk.locale then
if show_language and current_talk.locale ~= json.null then
title = title .. " (" .. current_talk.locale .. ")"
end
@ -278,7 +278,7 @@ local function view_all_talks(starts, ends, config, x1, y1, x2, y2)
local talk = all_next_talks[idx]
local title = talk.title
if show_language and talk.locale then
if show_language and talk.locale ~= json.null then
title = title .. " (" .. talk.locale .. ")"
end
@ -292,7 +292,7 @@ local function view_all_talks(starts, ends, config, x1, y1, x2, y2)
if show_speakers and #talk.persons > 0 then
local joiner = ({
de = "mit",
})[talk.locale] or "with"
})[talk.locale or ""] or "with"
info_line = info_line .. " " .. joiner .. " " .. table.concat(talk.persons, ", ")
end