Jump to content

Module:Citation/CS1: Difference between revisions

sync from sandbox;
(Undid revision 913826030 by Ivanvector (talk) broke the cs1|2 templates;)
(sync from sandbox;)
Line 2,347: Line 2,347:
local ScriptPeriodical = A['ScriptPeriodical'];
local ScriptPeriodical = A['ScriptPeriodical'];
local ScriptPeriodical_origin = A:ORIGIN('ScriptPeriodical');
local ScriptPeriodical_origin = A:ORIGIN('ScriptPeriodical');
 
-- web and news not tested for now because of
-- Wikipedia:Administrators%27_noticeboard#Is_there_a_semi-automated_tool_that_could_fix_these_annoying_"Cite_Web"_errors?
if not (is_set (Periodical) or is_set (ScriptPeriodical)) then -- 'periodical' templates require periodical parameter
if not (is_set (Periodical) or is_set (ScriptPeriodical)) then -- 'periodical' templates require periodical parameter
local p = {['journal'] = 'journal', ['magazine'] = 'magazine', ['news'] = 'newspaper', ['web'] = 'website'}; -- for error message
-- local p = {['journal'] = 'journal', ['magazine'] = 'magazine', ['news'] = 'newspaper', ['web'] = 'website'}; -- for error message
local p = {['journal'] = 'journal', ['magazine'] = 'magazine'}; -- for error message
if p[config.CitationClass]  then
if p[config.CitationClass]  then
table.insert( z.message_tail, {set_error ('missing_periodical', {config.CitationClass, p[config.CitationClass]}, true)});
table.insert( z.message_tail, {set_error ('missing_periodical', {config.CitationClass, p[config.CitationClass]}, true)});
Line 3,881: Line 3,883:
end
end
end
end
return table.concat ({citation0( config, args), frame:extensionTag ('templatestyles', '', {src=styles})});
return table.concat ({citation0( config, args), frame:extensionTag ('templatestyles', '', {src=styles, wrapper=".cs1-sandbox"})});
end
end


Cookies help us deliver our services. By using our services, you agree to our use of cookies.