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

உள்ளடக்கம் நீக்கப்பட்டது உள்ளடக்கம் சேர்க்கப்பட்டது
sync from sandbox;
imported>Info-farmer
en:Module:Citation/CS1/Identifiers இலிருந்து திருத்தங்கள் இறக்குமதி செய்யப்பட்டன
 
(4 பயனர்களால் செய்யப்பட்ட 6 இடைப்பட்ட திருத்தங்கள் காட்டப்படவில்லை.)
வரிசை 554:
local handler = options.handler;
local err_flag;
 
local function is_extended_free (registrant, suffix) -- local function to check those few registrants that are mixed; identifiable by the doi suffix <incipit>
if cfg.extended_registrants_t[registrant] then -- if this registrant has known free-to-read extentions
for _, incipit in ipairs (cfg.extended_registrants_t[registrant]) do -- loop through the registrant's incipits
if mw.ustring.find (suffix, '^' .. incipit) then -- if found
return true;
end
end
end
end
 
local text;
வரி 580 ⟶ 590:
end
 
local suffix;
local registrant, suffix = mw.ustring.match (id, '^10%.([^/]+)/([^%s–]-[^%.,])$'); -- registrant and suffix set when DOI has the proper basic form
 
local registrant_err_patterns = { -- these patterns are for code ranges that are not supported
'^[^1-3]%d%d%d%d%.%d+$', -- 5 digits with subcode (0xxxx, 40000+); accepts: 10000–39999
'^[^1-67]%d%d%d%d$', -- 5 digits without subcode (0xxxx, 60000+); accepts: 10000–69999
'^[^1-9]%d%d%d%.%d+$', -- 4 digits with subcode (0xxx); accepts: 1000–9999
'^[^1-9]%d%d%d$', -- 4 digits without subcode (0xxx); accepts: 1000–9999
வரி 611 ⟶ 622:
if err_flag then
options.coins_list_t['DOI'] = nil; -- when error, unset so not included in COinS
else
if not access and (cfg.known_free_doi_registrants_t[registrant] or is_extended_free (registrant, suffix)) then -- |doi-access=free not set and <registrant> is known to be free
set_message ('maint_doi_unflagged_free'); -- set a maint cat
end
end
வரி 1,043 ⟶ 1,058:
 
local patterns = {
'%d%d%d%d%d%d%d%d$', -- simple 8-digit identifier; these should be relatively rare
'^10%.1101/(20%d%d)%.(%d%d)%.(%d%d)%.%d%d%d%d%d%d%d%dv%d+$', -- y.m.d. date + 8-digit identifier + version (2020-01-01 and later)
'^10%.1101/(20%d%d)%.(%d%d)%.(%d%d)%.%d%d%d%d%d%d%d%d$', -- y.m.d. date + 8-digit identifier (2020-01-01 and later)
வரி 1,048 ⟶ 1,064:
for _, pattern in ipairs (patterns) do -- spin through the patterns looking for a match
local y, m, d =if id:match (pattern); -- attempt to get year, month and date from the identifierthen
local y, m, d = id:match (pattern); -- found a match, attempt to get year, month and date from the identifier
 
if m then -- m is nil when noid is the 8-digit matchform
if not is_valid_rxiv_date (y, m, d, 'mb') then -- validate the encoded date; 'mb' for medrxiv limit
break; -- date fail; break out early so we don't unset the err_msg_flagerror message
end
end
err_msg_flag = nil; -- we found a match so unset the error message
break; -- and done
end
end err_msg_flag = nil; -- we<err_msg_flag> foundremains aset matchhere andwhen dateno is valid so unset the err_msg_flagmatch
break; -- and done
end -- err_msg flag remains set here when no match
 
if err_msg_flag then
வரி 1,128 ⟶ 1,146:
elseif id:match('^%d+$') then -- no prefix
number = id; -- get the number
if 10tonumber < number:len(id) > handler.id_limit then
number = nil; -- constrainunset towhen 1 to 10 digits; change this whenid OCLCvalue issuesexceeds 11-digitthe numberslimit
end
end
"https://tamilar.wiki/w/Module:Citation/CS1/Identifiers" இலிருந்து மீள்விக்கப்பட்டது