మాడ్యూల్:Citation/CS1/Identifiers: కూర్పుల మధ్య తేడాలు

Content deleted Content added
చి Arjunaraoc (చర్చ) చేసిన మార్పులను Chaduvari చివరి కూర్పు వరకు తిప్పికొట్టారు.
ట్యాగు: రోల్‌బ్యాక్
sync from sandbox;
పంక్తి 21:
 
for wikis that do not have mw.wikibase installed, returns nil
 
The call to mw.wikibase.getEntity() bumps the expensive parser function count
 
]]
Line 34 ⟶ 32:
local this_wiki_code = cfg.this_wiki_code; -- wikipedia subdomain; 'en' for en.wikipedia.org
 
wd_article = mw.wikibase.getEntitygetSitelink (q):getSitelink, (this_wiki_code .. 'wiki'); -- fetch article title from wd; nil when no title available at this wiki; bumps expensive parser function count
 
if wd_article then
Line 514 ⟶ 512:
registrant_err_patterns = { -- these patterns are for code ranges that are not supported
'^[^1-3]%d%d%d%d%.%d%d*$', -- 5 digits with subcode (0xxxx, 40000+); accecpts: 10000–39999
'^[^1-34]%d%d%d%d$', -- 5 digits without subcode (0xxxx, 40000+); accecpts: 10000–3999910000–49999
'^[^1-9]%d%d%d%.%d%d*$', -- 4 digits with subcode (0xxx); accecpts: 1000–9999
'^[^1-9]%d%d%d$', -- 4 digits without subcode (0xxx); accecpts: 1000–9999
Line 705 ⟶ 703:
-- prefix=handler.prefix, id=id_copy, separator=handler.separator, encode=handler.encode})
local label_link = (cfg.use_identifier_redirects and is_set (handler.redirect) and handler.redirect) or wd_article or handler.link; -- because no place to link to yet
text = table.concat (
 
text = table.concat ( }); -- because no place to link to yet
{
make_wikilink (handler.linklabel_link, handler.label),
handler.separator,
id_copy
});
}); -- because no place to link to yet
 
if false == valid_ismn then
పంక్తి 997:
 
local function pmc(id, embargo)
local test_limit = cfg.id_limits.pmc; -- update this value as PMCs approach
local handler = cfg.id_handlers['PMC'];
local err_cat = ''; -- presume that PMC is valid
Line 1,013 ⟶ 1,012:
if is_set (id_num) then -- id_num has a value so test it
id_num = tonumber(id_num); -- convert id_num to a number for range testing
if 1 > id_num or test_limithandler.id_limit < id_num then -- if PMC is outside test limit boundaries
err_cat = ' ' .. set_error( 'bad_pmc' ); -- set an error message
else
Line 1,047 ⟶ 1,046:
 
local function pmid(id)
local test_limit = cfg.id_limits.pmid; -- update this value as PMIDs approach
local handler = cfg.id_handlers['PMID'];
local err_cat = ''; -- presume that PMID is valid
Line 1,055 ⟶ 1,053:
else -- PMID is only digits
local id_num = tonumber(id); -- convert id to a number for range testing
if 1 > id_num or test_limithandler.id_limit < id_num then -- if PMID is outside test limit boundaries
err_cat = ' ' .. set_error( 'bad_pmid' ); -- set an error message
end
Line 1,076 ⟶ 1,074:
 
local function s2cid (id, access)
local test_limit = cfg.id_limits.s2cid; -- update this value as S2CIDs approach
local handler = cfg.id_handlers['S2CID'];
local err_cat = ''; -- presume that S2CID is valid
Line 1,082 ⟶ 1,079:
local text;
id_num = id:match ('^[1-9]%d+*$'); -- id must be all digits; must not begin with 0; no open access flag
 
if is_set (id_num) then -- id_num has a value so test it
id_num = tonumber(id_num); -- convert id_num to a number for range testing
if test_limithandler.id_limit < id_num then -- if S2CID is outside test limit boundaries
err_cat = ' ' .. set_error( 'bad_s2cid' ); -- set an error message
end
Line 1,140 ⟶ 1,137:
 
local function ssrn (id)
local test_limit = cfg.id_limits.ssrn; -- update this value as SSRNs approach
local handler = cfg.id_handlers['SSRN'];
local err_cat = ''; -- presume that SSRN is valid
Line 1,150 ⟶ 1,146:
if is_set (id_num) then -- id_num has a value so test it
id_num = tonumber(id_num); -- convert id_num to a number for range testing
if 100 > id_num or test_limithandler.id_limit < id_num then -- if SSRN is outside test limit boundaries
err_cat = ' ' .. set_error( 'bad_ssrn' ); -- set an error message
end
"https://te.wikipedia.org/wiki/మాడ్యూల్:Citation/CS1/Identifiers" నుండి వెలికితీశారు