Module:Soldier: Difference between revisions
Display class_section in uppercase |
Interview cue: Listen to for audio oral histories |
||
| Line 2,524: | Line 2,524: | ||
if nInterviews > 0 then | if nInterviews > 0 then | ||
local links = {} | local links = {} | ||
local anyAudio = false | |||
for _, item in ipairs(interviews) do | for _, item in ipairs(interviews) do | ||
local heading = item.heading or 'Interview' | local heading = item.heading or 'Interview' | ||
local short = item.short or heading | local short = item.short or heading | ||
if item.kind == 'audio' then | |||
anyAudio = true | |||
end | |||
table.insert( | table.insert( | ||
links, | links, | ||
| Line 2,533: | Line 2,537: | ||
end | end | ||
local label = nInterviews == 1 and 'Interview' or 'Interviews' | local label = nInterviews == 1 and 'Interview' or 'Interviews' | ||
local verb = 'Watch' | |||
if nInterviews == 1 and interviews[1].kind == 'audio' then | |||
verb = 'Listen to' | |||
elseif anyAudio and nInterviews > 1 then | |||
verb = 'Hear' | |||
end | |||
local body | local body | ||
if nInterviews == 1 then | if nInterviews == 1 then | ||
body = string.format( | body = string.format( | ||
' | '%s %s on [[Ritchie Boy Interviews#%s|%s]].', | ||
verb, | |||
name, | name, | ||
interviews[1].heading, | interviews[1].heading, | ||
| Line 2,543: | Line 2,554: | ||
else | else | ||
body = string.format( | body = string.format( | ||
' | '%s %s in %d recordings on [[Ritchie Boy Interviews]]: %s.', | ||
verb, | |||
name, | name, | ||
nInterviews, | nInterviews, | ||