Módulo:Citar livro: diferenças entre revisões
Conteúdo apagado Conteúdo adicionado
solicitado em Predefinição Discussão:Citar livro#Erros |
discutido em Predefinição_Discussão:Citar_livro |
||
Linha 12:
config.usaVolume = true
config.usaContributor = true
-- |publication-place= e |place= (|location=) permitido se diferentes
if not is_set(A.PublicationPlace) and is_set(A.Place) then
A.PublicationPlace = A.Place -- promove |place= (|location=) a |publication-place
end
if A.PublicationPlace == A.Place then
A.Place = '' -- não precisa de dois se são iguais
end
local sn = is_set(A.PublisherName) and '' or ': [s.n.]'
local sl = is_set(A.PublicationPlace) and '' or '[S.l.]: '
if mw.text.trim(A.PublisherName):lower():match("^desconhecido$") then
sn = ''
A.PublisherName = ''
end
if mw.text.trim(A.PublicationPlace):lower():match("^desconhecido$") then
sl = ''
A.PublicationPlace = ''
end
-- Função com o código abstraído
Linha 17 ⟶ 37:
A, B = citation0( config, args, A)
if (sn ~= '') and (sl ~= '') then
sl = B.sepc .. " [S.l.: s.n.]"
sn = ''
end
if is_set(A.PublicationDate) then
A.PublicationDate = wrap_msg ('published', A.PublicationDate)
end
if is_set(A.PublisherName) then
B.Publisher = B.sepc .. " " .. (is_set(A.PublicationPlace) and (A.PublicationPlace .. ": ")
or
elseif is_set(A.PublicationPlace) then
B.Publisher= B.sepc .. " " .. A.PublicationPlace
..
else
B.Publisher =
end
|