62 737
modifications
mAucun résumé des modifications |
Aucun résumé des modifications |
||
Ligne 28 : | Ligne 28 : | ||
-------------------------------------- | -------------------------------------- | ||
function p. | function p.buildOneReference(frame) | ||
local | local args = getArgs(frame) | ||
local type = args['type'] | local type = args['type'] | ||
if not type then | if not type then | ||
Ligne 36 : | Ligne 36 : | ||
end | end | ||
local type = type:lower() | local type = type:lower() | ||
local attributes = {} | |||
local name = args['nom'] | local name = args['nom'] | ||
if name then | if name then | ||
attributes['name'] = name | |||
end | end | ||
local group = args['groupe'] | |||
if group then | |||
attributes['group'] = group | |||
end | |||
local content = '' | |||
local lang = args['langue'] or 'fr' | local lang = args['langue'] or 'fr' | ||
Ligne 62 : | Ligne 68 : | ||
local character2 = args['personnage2'] or 'personnage2 ?' | local character2 = args['personnage2'] or 'personnage2 ?' | ||
content = content .. 'Conversation entre ' .. character1 .. ' et ' .. character2 .. ' :' | |||
content = content .. '<br/>' | |||
for i = 1, 6 do | for i = 1, 6 do | ||
local sentence = args['phrase' .. i] | local sentence = args['phrase' .. i] | ||
if sentence then | if sentence then | ||
content = content .. '— ' .. formatSentence(sentence, lang) .. '<br/>' | |||
else | else | ||
break | break | ||
Ligne 76 : | Ligne 82 : | ||
local file = args['fichier'] or 'fichier ?' | local file = args['fichier'] or 'fichier ?' | ||
content = content .. 'Extrait du fichier ' .. file .. ', ' .. game | |||
elseif type == 'document' then | elseif type == 'document' then | ||
local quotation = args['citation'] | local quotation = args['citation'] | ||
if quotation then | if quotation then | ||
content = content .. '« ' .. formatSentence(quotation, lang) .. ' »<br/>' | |||
end | end | ||
Ligne 89 : | Ligne 95 : | ||
local page = args['page'] or 'page ?' | local page = args['page'] or 'page ?' | ||
content = content .. author .. '. \'\'' .. document .. '\'\'. ' .. publisher .. ', ' .. date .. '. pp. ' .. page | |||
end | end | ||
return frame:extensionTag( 'ref', content, attributes ) | |||
end | end | ||
return p | return p |
modifications