Modulo:Citazione: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
aggiorno per psizione ente, editore, città nel caso di pubblicazioni, gestione a parte del parametro opera o collana per citazioni di libri |
|||
Riga 11:
message_tail = {}; -- messaggi di errore da visualizzare in coda alla citazione
}
--[[ ===============================================================================
Carica la tabella di configurazione, correggendo il nome se caricato da sandbox
-- nota: non ancora attiva per qualche motivo non funziona
===============================================================================]]
local function load_configuration_table(name)
local frame = mw.getCurrentFrame()
local real_name = name
if nil ~= string.find (frame:getTitle(), 'sandbox', 1, true) then
real_name = real_name .. '/sandbox'
end
return mw.loadData(real_name)
end
--[[ ===============================================================================
Caricamente delle tabelle di configurazione del modulo.
===============================================================================]]
local cfg = mw.loadData(
--local cfg = load_configuration_table('Module:Citazione/Configurazione')
--[[ ===============================================================================
Lista di tutti i parametri riconosciuti.
===============================================================================]]
local whitelist = mw.loadData(
--local whitelist = load_configuration_table('Module:Citazione/Whitelist')
--[[ ===============================================================================
Riga 964 ⟶ 979:
local Illustrator = A['Illustrator'];
local Translator = A['Translator'];
local Institution = A['Institution'];
if is_set(OriginalTitle) and not is_set(TransTitle) then
Riga 1 174 ⟶ 1 190:
end
auto_Periodical = true
end
------------------------------------------------------------------------------
-- Per cambiare posizione a collane o serie di libri nella citazione,
-- rispetto a nomi di rivistaed evitare di precederle con un "in"
------------------------------------------------------------------------------
local Book_series = ''
if is_set(Periodical) and (A:ORIGIN('Periodical') == "opera" or A:ORIGIN('Periodical') == "collana") then
Book_series = Periodical;
Periodical = '';
end
Riga 1 573 ⟶ 1 598:
-- Several of the above rely upon detecting this as nil, so do it last.
if is_set(Periodical) then Periodical = wrap( 'italic-title', Periodical ) end
if config.CitationClass=="news" and is_set(Place) then▼
---------------------------------------------------------------
if is_set(Periodical) then▼
-- In caso di giornali o pubblicazioni il ente, luogo di pubblicazione ed
Periodical = table.concat({Periodical, ' (', Place, ')'})▼
-- editore tra parentesi dopo il titolo
Place = ""▼
---------------------------------------------------------------
elseif is_set(Title) then▼
if is_set(Institution) then
post_title[1] = Institution
Institution = ''
end
if is_set(Place) then
post_title[#post_title+1] = Place
end
if is_set(PublisherName) then
post_title[#post_title+1] = PublisherName
PublisherName = ''
end
if #post_title > 0 then
▲ if is_set(Periodical) then
▲ elseif is_set(Title) then
Title = Title .. ' (' .. table.concat(post_title, ', ') .. ')'
end
end
end
Riga 1 641 ⟶ 1 684:
end
fragment_citation:appends( { Conference, Periodical, Translator, Illustrator, Others, Series,
Volume, Issue, Edition, Institution, Place, PublisherName, Station, Date, Book_series, Position } )
local fragment_ID_list = Fragment.new(ID_list, sepc):append(ID):start(",")
local fragment_URL = Fragment.new(URL):start(",")
Riga 1 765 ⟶ 1 808:
else
if #suggestions == 0 then
suggestions = mw.
--suggestions = load_configuration_table( 'Modulo:Citazione/Suggerimenti');
end
if suggestions[ k:lower() ] ~= nil then
|