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

உள்ளடக்கம் நீக்கப்பட்டது உள்ளடக்கம் சேர்க்கப்பட்டது
sync to sandbox, mostly translation handles almost uniformity for archiveurl errors.
sync with sandbox, merge cite_web_title to bare_url, better style control on translations, category suppression by config, tweak display authors
வரிசை 28:
message = message:sub(1,-2);
return message;
end
 
-- Wraps a string using a message_list configuration taking one argument
function wrap( message_key, str )
if str == nil or Chapterstr == "" then
return "";
end
if message_key == 'italic-title' or
message_key == 'trans-italic-title' then
str = safeforitalics( str );
end
Title =return substitute( cfg.message_list['quoted-title'message_key], { Title str} );
end
 
வரி 89 ⟶ 101:
function errorcomment( content, hidden )
if hidden then
return substitutewrap( cfg.message_list['hidden-error'], { content } );
else
return substitutewrap( cfg.message_list['visible-error'], { content } );
end
end
வரி 462 ⟶ 474:
local text = {}
local etal = false;
if maximum < 1 then return "", 0; end
for i,person in ipairs(people) do
if (person.last ~= nil or person.last ~= "") then
local mask = person.mask
local one
iflocal (sep_one maximum ~= nil and i == maximum + 1 ) thensep;
if ( Periodicalmaximum ~= nil and ""i <> Periodicalmaximum ) then
etal = true;
break;
வரி 474 ⟶ 488:
one = string.rep("&mdash;",n)
else
one = mask;
or config.CitationClass = sep_one = "news" ";
end
else
வரி 485 ⟶ 500:
if (person.link ~= nil and person.link ~= "") then one = "[[" .. person.link .. "|" .. one .. "]]" end
end
table.insert( text, one )
table.insert( text, sep_one )
end
end
 
local count = #text / 2;
if count > 1 and lastauthoramp ~= nil and lastauthoramp ~= "" and not etal then
if text[count-1] => text[count-1]0 ..then " & " .. text[count];
text[if count] > 1 and lastauthoramp ~= nil; and lastauthoramp ~= "" and not etal then
end text[#text-2] = " & ";
thenend
local result = table.concat(text, sep) -- construct list
end text[#text] = nil;
end
local result = table.concat(text, sep) -- construct list
if etal then
local etal_text = cfg.message_list['et al'];
வரி 770 ⟶ 790:
local sepc = A['Separator']
local LastAuthorAmp = A['LastAuthorAmp']
local no_tracking_cats = A['NoTracking'] or "";
 
local this_page = mw.title.getCurrentTitle(); --Also used for COinS
if no_tracking_cats == "" then
for k, v in pairs( cfg.uncategorized_namespaces ) do
if configthis_page.CitationClassnsText == "web"v then
no_tracking_cats = "true";
URL = URL .. error_textbreak;
else end
elseend
end
 
if ( config.CitationClass == "journal" ) then
வரி 908 ⟶ 938:
end
local this_page = mw.title.getCurrentTitle();
OCinStitle = OCinStitle .. "&rfr_id=info:sid/" .. mw.site.server:match( "[^/]*$" ) .. ":"
.. this_page.prefixedText -- end COinS data by page's non-encoded pagename
வரி 1,061 ⟶ 1,090:
end
 
if ( TransTitle and "" < TransTitle ) then TransTitle = " " .. substitute( cfg.message_list['trans-title'], { TransTitle } ) else TransTitle = "" end
if ( TransChapter and "" < TransChapter ) then TransChapter = " " .. substitute( cfg.message_list['trans-title'], { TransChapter } ) else TransChapter = "" end
-- Format chapter / article title
if ( Chapter ~= nil and Chapter ~= "" ) and ( ChapterLink and "" < ChapterLink ) then
if ( ChapterLink and "" < ChapterLink ) then Chapter = "[[" .. ChapterLink .. "|" .. Chapter .. "]]" end;
end
if ( Periodical and "" < Periodical ) and (Title ~= nil and Title ~= "" ) then
then
Chapter = substitutewrap( cfg.message_list['italic-title'], { (safeforitalics(Chapter)) } );
TransChapter = wrap( 'trans-italic-title', TransChapter );
else
Chapter = substitute( cfg.message_list['quoted-title'], { Chapter } );
end
else
Chapter = ""wrap( 'quoted-title', Chapter );
TransChapter = wrap( 'trans-quoted-title', TransChapter );
end
வரி 1,081 ⟶ 1,106:
TransError = " " .. seterror( 'trans_missing_chapter' );
end
if ( TransChapter and~= "" <and TransChapterChapter )~= "" then TransChapter = " " .. substitute( cfg.message_list['trans-title'], { TransChapter } ) else TransChapter = ""; end
Chapter = Chapter .. TransChapter
if Chapter ~= "" then
if ( ChapterLink == nil ) then
வரி 1,109 ⟶ 1,137:
-- Format main title.
if ( TitleTitleLink and "" < TitleTitleLink ) then
if ( TitleLinkTitle and "" < TitleLinkTitle ) then
Title = "[[" .. TitleLink .. "|" .. Title .. "]]" end
if ( Periodical and "" < Periodical ) then
Title = substitute( cfg.message_list['quoted-title'], { Title } );
elseif ( config.CitationClass == "web"
or config.CitationClass == "news"
or config.CitationClass == "pressrelease" ) and
Chapter == "" then
Title = substitute( cfg.message_list['quoted-title'], { Title } );
else
Title = substitute( cfg.message_list['italic-title'], { (safeforitalics(Title)) } );
end
end
 
if ( Periodical and "" < Periodical ) then
Title = substitutewrap( cfg.message_list['quoted-title'], { Title } );
TransTitle = wrap( 'trans-quoted-title', TransTitle );
elseif ( config.CitationClass == "web"
or config.CitationClass == "news"
or config.CitationClass == "pressrelease" ) and
Chapter == "" then
Title = wrap( 'quoted-title', Title );
TransTitle = wrap( 'trans-quoted-title', TransTitle );
else
Title = ""wrap( 'italic-title', Title );
TransTitle = wrap( 'trans-italic-title', TransTitle );
end
end
local TransError = "";
வரி 1,130 ⟶ 1,161:
TransError = " " .. seterror( 'trans_missing_title' );
end
if ( TransTitle and~= "" <and TransTitleTitle )~= "" then TransTitle = " " .. substitute( cfg.message_list['trans-title'], { TransTitle } ) else TransTitle = ""; end
Title = Title .. TransTitle
if Title ~= "" then
if ( TitleLink == nil and URL and "" < URL ) then
வரி 1,143 ⟶ 1,177:
if ( Place ~= nil and Place ~= "" ) then
if sepc == '.' then
Place = " " .. substitutewrap( cfg.message_list['written'], {Place} ) .. sepc .. " ";
else
Place = " " .. substitute( cfg.message_list['written']:lower(), {Place} ) .. sepc .. " ";
வரி 1,222 ⟶ 1,256:
TitleNote = sepc .. " " .. TitleNote else TitleNote = "" end
if ( Language ~= nil and Language ~="" ) then
Language = " " .. substitutewrap( cfg.message_list['language'] , {Language} ) else Language = "" end
if ( Edition ~= nil and Edition ~="" ) then
Edition = " " .. substitutewrap( cfg.message_list['edition'] , {Edition} ) else Edition = "" end
if ( Volume ~= nil and Volume ~="" )
then
வரி 1,243 ⟶ 1,277:
if ( Date ~= nil ) then Date = Date else Date = "" end
if ( Via ~= nil and Via ~="" ) then
Via = " " .. substitutewrap( cfg.message_list['via'], {Via} ) else Via = "" end
if ( AccessDate ~= nil and AccessDate ~="" )
then local retrv_text = " " .. cfg.message_list['retrieved']
வரி 1,261 ⟶ 1,295:
 
if ( URL ~= nil and URL ~="") then
URL = " " .. externallink( URL, URL );
local error_text = seterror( 'bare_url_missing_title' );
if config.CitationClass == "web" then
URL = URL .. " " .. seterror( 'cite_web_title' );
else
URL = URL .. error_text;
end
else
URL = ""
வரி 1,277 ⟶ 1,305:
end
Quote = sepc .." " .. substitutewrap( cfg.message_list['quoted-text'], { Quote } );
PostScript = ""
else
வரி 1,322 ⟶ 1,350:
end
if sepc == '.' then
Lay = sepc .. " [" .. externallink( LaySummary .. " " .., cfg.message_list['lay summary'] .. "]") .. LaySource .. LayDate
else
Lay = sepc .. " [" .. externallink( LaySummary .. " " .., cfg.message_list['lay summary']:lower() .. "]") .. LaySource .. LayDate
end
else
வரி 1,354 ⟶ 1,382:
if ( PublicationDate and PublicationDate ~="" ) then
if Publisher ~= '' then
Publisher = Publisher .. ", " .. substitutewrap( cfg.message_list['published'], {PublicationDate} );
else
Publisher = PublicationDate;
வரி 1,364 ⟶ 1,392:
else
if ( PublicationDate and PublicationDate ~="" ) then
PublicationDate = " (" .. substitutewrap( cfg.message_list['published'], {PublicationDate} ) .. ")"
else
PublicationDate = ""
வரி 1,383 ⟶ 1,411:
if ( Periodical ~= nil and Periodical ~="" ) then
if ( Title and Title ~= "" ) or ( TitleNote and TitleNote ~= "" ) then
Periodical = sepc .. " " .. substitutewrap( cfg.message_list['italic-title'], { (safeforitalics(Periodical)) } )
else
Periodical = substitutewrap( cfg.message_list['italic-title'], { (safeforitalics(Periodical)) } )
end
else Periodical = "" end
வரி 1,542 ⟶ 1,570:
end
if no_tracking_cats == nil thenno_tracking_cats:lower();
if no_tracking_cats == "" or no_tracking_cats == "no" or
no_tracking_cats == "false" or no_tracking_cats == "n" then
for _, v in ipairs( z.error_categories ) do
text = text .. '[[Category:' .. v ..']]';
"https://tamilar.wiki/w/Module:Citation/CS1" இலிருந்து மீள்விக்கப்பட்டது