Content deleted Content added
No edit summary |
No edit summary |
||
Line 40:
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a
]]
Line 59:
end
if is_set (args.last4)
contributors = args.last1 .. args.first .. ' et al.';
elseif is_set (args.last3)
contributors = args.last1 .. args.first .. ', ' .. args.last2 .. ' & ' .. args.last3;
elseif is_set (args.last2)
contributors = args.last1 .. args.first .. ' & ' .. args.last2;
elseif is_set (args.last1
contributors = args.last1 .. args.first;
else
Line 72:
--form the source author-date list
if is_set (args.in4)
source = args.in1 .. ' et al.';
elseif is_set (args.in3)
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif is_set (args.in2)
source = args.in1 .. ' & ' .. args.in2;
elseif is_set (args.in1
source = args.in1;
else
Line 84:
end
if args.year:match('^[1-9]%d%d%d%l?') then -- four digits with possible disambiguator
source = source .. ' (' .. args.year .. ')';
else
args.err_msg = args.err_msg .. ' invalid or missing year.';
end
--assemble CITEREF wikilink
source = "[[#CITEREF" .. mw.uri.anchorEncode(table.concat ({args.in1, args.in2, args.in3, args.in4, args.year})) .. "|" .. source .. "]]";
Line 101 ⟶ 102:
end
-- pages and other insource ___location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource ___location info
end
if args.loc ~= '' then
args.
end
--wrap error messages in span
args.err_msg = '<span style="font-size:100%" class="error">' .. args.err_msg .. '</span>';
Line 165 ⟶ 166:
args.postscript = '.'; -- separator not CS2 and postscript not set; use default terminal punctuation
end
else -- if here, postscript set
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
end
if not is_set (args.separator) then
args.separator = '.'; -- not set in template and we didn't set it here so set to default
end
args.url = pframe.args.url or ''; -- url for chapter or contribution
Line 190 ⟶ 179:
args.year = pframe.args.year or '';
if
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = url; -- if set it will give us linkable text
-- args.url=''; -- if no contribution set url to empty string so we don't link the error message
end
|