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 )
return "";▼
if message_key == 'italic-title' or
message_key == 'trans-italic-title' then
str = safeforitalics( str );
end
வரி 89 ⟶ 101:
function errorcomment( content, hidden )
if hidden then
return
else
return
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
etal = true;
break;
வரி 474 ⟶ 488:
one = string.rep("—",n)
else
one = mask;
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
local result = table.concat(text, sep) -- construct list▼
end
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
no_tracking_cats = "true";
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
end
▲ then
TransChapter = wrap( 'trans-italic-title', TransChapter );
▲ else
▲ end
else
Chapter =
TransChapter = wrap( 'trans-quoted-title', TransChapter );
end
வரி 1,081 ⟶ 1,106:
TransError = " " .. seterror( 'trans_missing_chapter' );
end
▲ if
Chapter = Chapter .. TransChapter
if Chapter ~= "" then
if ( ChapterLink == nil ) then
வரி 1,109 ⟶ 1,137:
-- Format main title.
if (
if (
Title = "[[" .. TitleLink .. "|" .. Title .. "]]"
▲ 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
end
end
if ( Periodical and "" < Periodical ) then
TransTitle = wrap( 'trans-quoted-title', TransTitle );
or config.CitationClass == "news"
Chapter == "" then
Title = wrap( 'quoted-title', Title );
TransTitle = wrap( 'trans-quoted-title', TransTitle );
else
Title =
TransTitle = wrap( 'trans-italic-title', TransTitle );
▲ end
end
local TransError = "";
வரி 1,130 ⟶ 1,161:
TransError = " " .. seterror( 'trans_missing_title' );
end
▲ if
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 = " " ..
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 = " " ..
if ( Edition ~= nil and Edition ~="" ) then
Edition = " " ..
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 = " " ..
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(
▲ if config.CitationClass == "web" then
▲ URL = URL .. error_text;
▲ end
else
URL = ""
வரி 1,277 ⟶ 1,305:
end
Quote = sepc .." " ..
PostScript = ""
else
வரி 1,322 ⟶ 1,350:
end
if sepc == '.' then
Lay = sepc .. "
else
Lay = sepc .. "
end
else
வரி 1,354 ⟶ 1,382:
if ( PublicationDate and PublicationDate ~="" ) then
if Publisher ~= '' then
Publisher = Publisher .. ", " ..
else
Publisher = PublicationDate;
வரி 1,364 ⟶ 1,392:
else
if ( PublicationDate and PublicationDate ~="" ) then
PublicationDate = " (" ..
else
PublicationDate = ""
வரி 1,383 ⟶ 1,411:
if ( Periodical ~= nil and Periodical ~="" ) then
if ( Title and Title ~= "" ) or ( TitleNote and TitleNote ~= "" ) then
Periodical = sepc .. " " ..
else
Periodical =
end
else Periodical = "" end
வரி 1,542 ⟶ 1,570:
end
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 ..']]';
| |||