Modulo:Citazione: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
mostra i curatori anche se autore-capitolo è compilato, vedi discussioni 1 e 2
m una versione importata
 
(3 versioni intermedie di 2 utenti non mostrate)
Riga 1 189:
end
-- evito ripetizione se il dominio è stato usato come titolo o editore
if Periodical and mw.ustring.lower(Title or '') == mw.ustring.loweris_set(Periodical) then
if Periodical and mw.ustring.lower(PublisherName or ''Title) == mw.ustring.lower(Periodical) then
Periodical = nil''
end
end
if Periodical and mw.ustring.lower(PublisherName or '') == mw.ustring.lower(Periodical) then
if mw.ustring.lower(PublisherName) == mw.ustring.lower(Periodical) nilthen
PublisherName = ''
end
end
auto_Periodical = true
Line 1 222 ⟶ 1 224:
 
---------------------------------------------------------------
-- Compone la stringa deldella linguaggiolingua
---------------------------------------------------------------
local Language_code = ""
Line 1 240 ⟶ 1 242:
first_language = frame_lingue[1]:lower();
local lg_error;
Language_code, lg_error = require("Modulo:LinguaggiLingue").lingue(frame_lingue)
if lg_error and #lg_error > 0 then
local error_string = mw.text.listToText(lg_error, ", ", " e " )
Line 1 299 ⟶ 1 301:
-- Recupero e formatto lista curatori
------------------------------------------------------------------------------
local EditorCount, msg_editors
local CuratoriEtal = A['Etalcuratori']
control.coauthors = false
ifcontrol.etal = is_set(CuratoriEtal) then
control.etal = true
else
control.etal = false
end
if is_set(Editors) then
msg_editors = 'editors'
else
local EditorCount
Editors, EditorCount = list_people(control, e)
if is_set(Editors) then
ifmsg_editors = EditorCount <= 1 then msg_editors =and 'editor' else msg_editors =or 'editors' end
end
end
------------------------------------------------------------------------------
-- Se non sono definiti autori sostituisco con curatori
------------------------------------------------------------------------------
if not is_set(Authors) and is_set(Editors) then
Authors = Editors
Editors = ""
end
 
------------------------------------------------------------------------------
-- Recupero e formatto lista autori e curatori di un singolo capitolo dell'opera citata
------------------------------------------------------------------------------
local Contributorsmsg_chapter_editors
local Contributors, ChapterEditors = "", ""
if is_set(Chapter) then
local ChapterEditorCount
local c = extract_names( args, 'ContributorList', A:ORIGIN('Chapter') );
control.etal = false
Contributors = list_people(control, c)
local c = extract_names( args, 'ContributorList', A:ORIGIN('Chapter') );)
ChapterEditors, ChapterEditorCount = list_people(control,
extract_names( args, 'ChapterEditorList', A:ORIGIN('Chapter') ))
if is_set(EditorsChapterEditors) then
msg_chapter_editors = ChapterEditorCount <= 1 and 'editor' or 'editors'
end
end
 
Line 1 603 ⟶ 1 602:
elseif is_set(PublisherName) then
PublisherName = PublisherName .. " " .. OrigDate
elseif is_set(PlasePlace) then
Place = Place .. " " .. OrigDate
else
Line 1 647 ⟶ 1 646:
fragment_citation:append(fragment_Title)
else
if is_set(AuthorsChapterEditors) and (is_set(EditorsContributors) andor is_set(Title)args["anteposizione-curatore"] and== not is_set(Chapter"no") then
EditorsChapterEditors = 'a cura di ' .. EditorsChapterEditors
fragment_citation = Fragment.new({AuthorsContributors, Chapter, ChapterEditors}, sepc)
fragment_citation:appends({fragment_Title, Editors})
else
if is_set(msg_editorsChapterEditors) then
ChapterEditors = wrap(msg_chapter_editors, ChapterEditors)
if is_set(Editors) then
end
Editors = wrap(msg_editors, Editors)
if is_set(Chapter) and not (is_set(Contributors) or is_set(ChapterEditors)) then
else
Authorsif = wrapis_set(msg_editors, Authors) then
Contributors, Authors = Authors, ""
elseif is_set(Editors) and args["anteposizione-curatore"] ~= "no" then
ChapterEditors, Editors = wrap(msg_editors, Editors), ""
end
end
iffragment_citation = Fragment.new({is_set(Contributors) and is_set(Title)Contributors thenor ChapterEditors, Chapter}, sepc)
end
Authors, Editors = Contributors, is_set(Editors) and Editors or Authors
if is_set(Chapter) then
-- antepone "su" anzichè "in" per i siti web
if A:ORIGIN('Periodical') == 'sito' or auto_Periodical then
fragment_citation:last("su")
else
fragment_citation:last("in")
end
end
fragment_citation = Fragment.new({Authors, Chapter}, sepc)
if is_set(Editors) and (is_set(Authors) or args["anteposizione-curatore"] == "no" and not is_set(Chapter)) then
if Chapter ~= "" or Editors ~= "" then
Editors = 'a cura di ' .. Editors
-- antepone "su" anzichè "in" per i siti web
fragment_citation:appends({Authors, fragment_Title, Editors})
if A:ORIGIN('Periodical') == 'sito' or auto_Periodical then
else
fragment_citation:last("su")
if not is_set(Authors) and is_set(Editors) then
else
Editors = wrap(msg_editors, Editors)
fragment_citation:last("in")
end
end
fragment_citation:appends({is_set(Authors) and Authors or Editors, fragment_Title})
end
end
Line 1 682 ⟶ 1 688:
local fragment_Via = Fragment.new(Via):start(".")
local fragment_Quote = Fragment.new({Quote}):start(".")
fragment_citation:appends({fragment_ID_list, fragment_URL, fragment_AccessDate, fragment_Archived, fragment_Via, fragment_Quote})
if PostScript == 'nessuno' then
fragment_citation:last("nothing")
Line 1 688 ⟶ 1 694:
fragment_citation:last("..")
end
fragment_citation:appends({fragment_Quote})
fragment_citation:start(" ")
local text = Language_code .. tostring(fragment_citation)