Module:Citation/CS1: திருத்தங்களுக்கு இடையிலான வேறுபாடு

உள்ளடக்கம் நீக்கப்பட்டது உள்ளடக்கம் சேர்க்கப்பட்டது
sync with sandbox. Addresses format / type positioning, CITEREF encoding, and error categorization
sync with sandbox. Fixes OrigYear with no Author, position of Series, and styling of cite web with Chapter. Changes default behavior of display-authors. Cleanup error message system.
வரிசை 517:
local LastAuthorAmp = args.lastauthoramp
local no_tracking_cats = args["template doc demo"] or args.nocat or args.notracking or args["no-tracking"] or "";
local MessageTail = ""{};
 
if ( config.CitationClass == "journal" ) then
வரிசை 653:
-- We also add leading spaces and surrounding markup and punctuation to the various parts of the citation, but only when they are non-nil.
if ( Authors == nil ) then
local AuthorNameSepMaximum = tonumber(args["authordisplay-name-separatorauthors"] or args["name-separator"] or ",".displayauthors);
else
AuthorNameSep = AuthorNameSep .. " "
local-- AuthorSepPreserve = args["authorold-separator"]style implicit oret ";"al.
AuthorSepif Maximum == AuthorSepnil and #a == ..9 "then "
elseMaximum = 8;
local AuthorFormat = args["author-format"] or args.authorformat
table.insert( z.error_categories, 'Pages using citations with old-style implicit et al.' );
local AuthorMaximum = tonumber(args["display-authors"] or args.displayauthors) or 8
table.insert( MessageTail, 'Citation uses old-style implicit et al. for authors' );
local control = { sep = AuthorSep, namesep = AuthorNameSep, format = AuthorFormat, maximum = AuthorMaximum, lastauthoramp = LastAuthorAmp }
elseif Maximum == nil then
endMaximum = #a + 1;
end
end
local control = {
sep = (args["author-separator"] or ";") .. " ",
namesep = (args["author-name-separator"] or args["name-separator"] or ",") .. " ",
local AuthorFormat format = args["author-format"] or args.authorformat,
maximum = Maximum,
lastauthoramp = LastAuthorAmp
else}
-- If the coauthor field is also used, prevent ampersand and et al. formatting.
if Coauthors ~= nil ifand MessageTailCoauthors ~= ''"" then
control.lastauthoramp = nil;
control.maximum = #a + 1;
end
Authors = listpeople(control, a)
end
local EditorCount
if ( Editors == nil ) then
local EditorNameSepMaximum = tonumber(args["editordisplay-name-separatoreditors"] or args["name-separator"] or ",".displayeditors);
 
EditorNameSep = EditorNameSep .. " "
local-- EditorSepPreserve = args["editorold-separator"]style implicit oret ";"al.
EditorSepif Maximum == EditorSepnil and #e == ..4 "then "
Maximum = 3;
local EditorFormat = args["editor-format"] or args.editorformat
table.insert( z.error_categories, 'Pages using citations with old-style implicit et al.' );
local EditorMaximum = tonumber(args["display-editors"] or args.displayeditors) or 3
table.insert( MessageTail, 'Citation uses old-style implicit et al. for editors' );
local control = { sep = EditorSep, namesep = EditorNameSep, format = EditorFormat, maximum = EditorMaximum, lastauthoramp = LastAuthorAmp }
elseif Maximum == nil then
Maximum = #e + 1;
end
 
local control = {
sep = (args["editor-separator"] or ";") .. " ",
namesep = (args["editor-name-separator"] or args["name-separator"] or ",") .. " ",
local EditorFormat format = args["editor-format"] or args.editorformat,
maximum = Maximum,
lastauthoramp = LastAuthorAmp
}
 
Editors, EditorCount = listpeople(control, e)
else
வரி 724 ⟶ 754:
if ( config.CitationClass == "web" ) then
table.insert( z.error_categories, 'Pages using web citations with no URL' );
iftable.insert( MessageTail ~=, 'No URL on cite web' then);
MessageTail = MessageTail .. ", no URL on cite web";
else
MessageTail = MessageTail .. "No URL on cite web";
end
end
 
வரி 734 ⟶ 760:
if ( AccessDate ~= nil and AccessDate ~= '' ) then
table.insert( z.error_categories, 'Pages using citations with accessdate and no URL' );
table.insert( MessageTail, = MessageTail .. "'Accessdate used without URL"' );
AccessDate = nil;
if MessageTail ~= '' then
MessageTail = MessageTail .. ", accessdate used without URL";
else
MessageTail = MessageTail .. "Accessdate used without URL";
end
end
வரி 755 ⟶ 777:
( Conference == nil or Conference == "" ) then
table.insert( z.error_categories, 'Pages with citations lacking titles' );
iftable.insert( MessageTail ~=, 'Citation has no title' then);
MessageTail = MessageTail .. ", citation has no title";
else
MessageTail = MessageTail .. "Citation has no title";
end
end
 
வரி 801 ⟶ 819:
Title = "\"" .. Title .. "\""
elseif ( config.CitationClass == "web"
or config.CitationClass == "news" ) thenand
Chapter == "" then
Title = "\"" .. Title .. "\""
else
வரி 1,064 ⟶ 1,083:
tcommon = safejoin( {Title, TitleNote, Conference, Periodical, Format, TitleType, Series, Language, Volume, Issue, Edition, Publisher, Agency, Others, Position}, sepc );
else
tcommon = safejoin( {Title, TitleNote, Series, Conference, Periodical, Format, TitleType, Series, Language, Volume, Issue, Others, Edition, Publisher, Agency, Position}, sepc );
end
வரி 1,118 ⟶ 1,137:
if ( "" ~= Date ) then
if ( string.sub(tcommon,-1,-1) ~= sepc )
then Date = sepc .." " .. Date .. OrigYear
else Date = " " .. Date .. OrigYear
end
end -- endif ""~=Date
வரி 1,181 ⟶ 1,200:
z.error_categories = { 'Pages with empty citations' };
text = '<span class="error">Citation is empty</span>';
MessageTail = ''{};
end
வரி 1,192 ⟶ 1,211:
text = text .. OCinS;
if #MessageTail ~= ''0 then
text = text .. hiddencomment( table.concat( MessageTail, "; " ) );
end
"https://tamilar.wiki/w/Module:Citation/CS1" இலிருந்து மீள்விக்கப்பட்டது