Label alias as Birth name; expand nativity/religion
Infobox: full birth/death places, known for, awards
Line 1,363: Line 1,363:


local alias = prettyNamePart(parentArg(frame, 'alias'))
local alias = prettyNamePart(parentArg(frame, 'alias'))
local birth = yearOnly(parentArg(frame, 'birth_year'))
local birthYear = yearOnly(parentArg(frame, 'birth_year'))
local death = yearOnly(parentArg(frame, 'death_year'))
local deathYear = yearOnly(parentArg(frame, 'death_year'))
local birthDate = prettyProse(parentArg(frame, 'birth_date'))
local deathDate = prettyProse(parentArg(frame, 'death_date'))
local birthPlace = prettyProse(parentArg(frame, 'birth_place'))
local deathPlace = prettyProse(parentArg(frame, 'death_place'))
local nativity = expandNativity(parentArg(frame, 'nativity'))
local nativity = expandNativity(parentArg(frame, 'nativity'))
local religion = expandReligion(parentArg(frame, 'religion'))
local religion = expandReligion(parentArg(frame, 'religion'))
Line 1,370: Line 1,374:
local education = prettyProse(parentArg(frame, 'education'))
local education = prettyProse(parentArg(frame, 'education'))
local occupation = prettyProse(parentArg(frame, 'occupation'))
local occupation = prettyProse(parentArg(frame, 'occupation'))
local knownFor = prettyProse(parentArg(frame, 'known_for'))
local awards = prettyProse(parentArg(frame, 'awards'))
local state = prettyPlace(parentArg(frame, 'state'))
local state = prettyPlace(parentArg(frame, 'state'))
local function datePlaceCell(date, place, year)
local bits = {}
if date ~= '' then
table.insert(bits, date)
elseif year ~= '' then
table.insert(bits, year)
end
if place ~= '' then
table.insert(bits, place)
end
return table.concat(bits, '<br />')
end
local birth = datePlaceCell(birthDate, birthPlace, birthYear)
local death = datePlaceCell(deathDate, deathPlace, deathYear)


if alias ~= '' or birth ~= '' or death ~= '' or nativity ~= ''
if alias ~= '' or birth ~= '' or death ~= '' or nativity ~= ''
or religion ~= '' or marital ~= '' or education ~= ''
or religion ~= '' or marital ~= '' or education ~= ''
or occupation ~= '' or state ~= '' then
or occupation ~= '' or knownFor ~= '' or awards ~= '' or state ~= '' then
addHeader(tbl, 'Personal details')
addHeader(tbl, 'Personal details')
end
end
Line 1,386: Line 1,408:
addRow(tbl, 'Education', education)
addRow(tbl, 'Education', education)
addRow(tbl, 'Occupation', occupation)
addRow(tbl, 'Occupation', occupation)
addRow(tbl, 'Known for', knownFor)
addRow(tbl, 'Awards', awards)
if state ~= '' then
if state ~= '' then
addRow(tbl, 'State', state)
addRow(tbl, 'State', state)