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
local AuthorFormat = args["author-format"] or args.authorformat▼
table.insert( z.error_categories, 'Pages using citations with old-style implicit et al.' );
table.insert( MessageTail, 'Citation uses old-style implicit et al. for authors' );
elseif Maximum == nil then
local control = {
sep = (args["author-separator"] or ";") .. " ",
namesep = (args["author-name-separator"] or args["name-separator"] or ",") .. " ",
maximum = Maximum,
lastauthoramp = LastAuthorAmp
-- If the coauthor field is also used, prevent ampersand and et al. formatting.
control.lastauthoramp = nil;
control.maximum = #a + 1;
end
Authors = listpeople(control, a)
end
local EditorCount
if ( Editors == nil ) then
local
Maximum = 3;
local EditorFormat = args["editor-format"] or args.editorformat▼
table.insert( z.error_categories, 'Pages using citations with old-style implicit et al.' );
table.insert( MessageTail, 'Citation uses old-style implicit et al. for editors' );
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 ",") .. " ",
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' );
▲ else
▲ end
end
வரி 734 ⟶ 760:
if ( AccessDate ~= nil and AccessDate ~= '' ) then
table.insert( z.error_categories, 'Pages using citations with accessdate and no URL' );
AccessDate = nil;
▲ if MessageTail ~= '' then
▲ 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' );
▲ else
▲ end
end
வரி 801 ⟶ 819:
Title = "\"" .. Title .. "\""
elseif ( config.CitationClass == "web"
or config.CitationClass == "news" )
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
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 ~=
text = text .. hiddencomment( table.concat( MessageTail, "; " ) );
end
| |||