Module:Citation/CS1/Configuration: Difference between revisions
ProjectHerzl>Nthep change line 1754 parameter to true to hide ISBN/ date compatibility issues. See Help talk:Citation Style 1#ISBN / Date incompatibility and Wikipedia:Administrators' noticeboard/Incidents#Template edit incorrectly creating error cat with 25000+ entries needs reverting |
m 1 revision imported |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 142: | Line 142: | ||
['warning_msg_e'] = '<span style="color:#d33">One or more <code style="color: inherit; background: inherit; border: none; padding: inherit;">{{$1}}</code> templates have errors</span>; messages may be hidden ([[Help:CS1_errors#Controlling_error_message_display|help]]).'; -- $1 is template link | ['warning_msg_e'] = '<span style="color:#d33">One or more <code style="color: inherit; background: inherit; border: none; padding: inherit;">{{$1}}</code> templates have errors</span>; messages may be hidden ([[Help:CS1_errors#Controlling_error_message_display|help]]).'; -- $1 is template link | ||
['warning_msg_m'] = '<span style="color:# | ['warning_msg_m'] = '<span style="color:#085">One or more <code style="color: inherit; background: inherit; border: none; padding: inherit;">{{$1}}</code> templates have maintenance messages</span>; messages may be hidden ([[Help:CS1_errors#Controlling_error_message_display|help]]).'; -- $1 is template link | ||
} | } | ||
Line 463: | Line 463: | ||
local punct_skip = {}; | local punct_skip = {}; | ||
local url_skip = {}; | local url_skip = {}; | ||
--[[--------------------------< U R L _ A C C E S S _ M A P >-------------------------------------------------- | |||
this table used by the wikipedia library url test, has_twl_url(), which automatically sets a url-access parameter | |||
to 'subscription' when it discovers a wikipedia library url in any of the url-holding paramters used as keys in | |||
this table. | |||
translators: if your wiki uses parameter names for these url-holding parameters and their matching -access parameters, | |||
add your wiki's parameters to this list. Leave the English parameters in place. | |||
TODO: is there a better way to do this? | |||
]] | |||
local url_access_map_t = { | |||
['chapter-url'] = 'chapter-url-access', | |||
['contribution-url'] = 'contribution-url-access', | |||
['entry-url'] = 'entry-url-access', | |||
['article-url'] = 'article-url-access', | |||
['section-url'] = 'section-url-access', | |||
['map-url'] = 'map-url-access', | |||
['mapurl'] = 'map-url-access', | |||
['url'] = 'url-access', | |||
['URL'] = 'url-access' | |||
} | |||
Line 580: | Line 606: | ||
{['en'] = {'super.?user', false}, ['local'] = nil}, | {['en'] = {'super.?user', false}, ['local'] = nil}, | ||
{['en'] = {'%f['..is_Latn..'][Uu]ser%f[^'..is_Latn..']', false}, ['local'] = nil}, | {['en'] = {'%f['..is_Latn..'][Uu]ser%f[^'..is_Latn..']', false}, ['local'] = nil}, | ||
{['en'] = {'updated', true}, ['local'] = nil}, | |||
{['en'] = {'verfasser', true}, ['local'] = nil}, | {['en'] = {'verfasser', true}, ['local'] = nil}, | ||
} | } | ||
Line 1,062: | Line 1,089: | ||
-- list of emoji that use a zwj character (U+200D) to combine with another emoji | -- list of emoji that use a zwj character (U+200D) to combine with another emoji | ||
-- from: https://unicode.org/Public/emoji/ | -- from: https://unicode.org/Public/emoji/17.0/emoji-zwj-sequences.txt; version: 17.0; 2025-01-08 | ||
-- table created by: [[:en:Module:Make emoji zwj table]] | -- table created by: [[:en:Module:Make emoji zwj table]] | ||
local emoji_t = { -- indexes are decimal forms of the hex values in U+xxxx | local emoji_t = { -- indexes are decimal forms of the hex values in U+xxxx | ||
Line 1,089: | Line 1,116: | ||
[127979] = true, -- U+1F3EB 🏫 school | [127979] = true, -- U+1F3EB 🏫 school | ||
[127981] = true, -- U+1F3ED 🏭 factory | [127981] = true, -- U+1F3ED 🏭 factory | ||
[128048] = true, -- U+1F430 🐰 rabbit face | |||
[128102] = true, -- U+1F466 👦 boy | [128102] = true, -- U+1F466 👦 boy | ||
[128103] = true, -- U+1F467 👧 girl | [128103] = true, -- U+1F467 👧 girl | ||
Line 1,118: | Line 1,146: | ||
[129489] = true, -- U+1F9D1 🧑 adult | [129489] = true, -- U+1F9D1 🧑 adult | ||
[129490] = true, -- U+1F9D2 🧒 child | [129490] = true, -- U+1F9D2 🧒 child | ||
[129648] = true, -- U+1FA70 🩰 ballet shoes | |||
[129657] = true, -- U+1FA79 🩹 adhesive bandage | [129657] = true, -- U+1FA79 🩹 adhesive bandage | ||
[129775] = true, -- U+1FAEF fight cloud | |||
[129778] = true, -- U+1FAF2 🫲 leftwards hand | [129778] = true, -- U+1FAF2 🫲 leftwards hand | ||
} | } | ||
Line 1,164: | Line 1,194: | ||
local script_lang_codes = { | local script_lang_codes = { | ||
'ab', 'am', 'ar', 'az', 'be', 'bg', 'bn', 'bo', 'bs', 'ce', 'chr', 'dv', 'dz', | 'ab', 'am', 'ar', 'az', 'be', 'bg', 'bn', 'bo', 'bs', 'ce', 'chr', 'cu', | ||
'dv', 'dz', 'el', 'fa', 'grc', 'gu', 'he', 'hi', 'hy', 'ja', 'ka', 'kk', | |||
'km', 'kn', 'ko', 'ku', 'ky', 'lo', 'mk', 'ml', 'mn', 'mni', 'mr', 'my', | |||
'ne', 'or', 'ota', 'pa', 'ps', 'ru', 'sd', 'si', 'sr', 'syc', 'ta', 'te', | |||
'tg', 'th', 'ti', 'tkr', 'tt', 'ug', 'uk', 'ur', 'uz', 'yi', 'yue', 'zh', | |||
'zgh' | |||
}; | }; | ||
Line 1,294: | Line 1,325: | ||
'5315', '5316', '5317', '5318', '5319', '5320', '5321', '5334', '5402', '5409', '5410', '5411', '5412', | '5315', '5316', '5317', '5318', '5319', '5320', '5321', '5334', '5402', '5409', '5410', '5411', '5412', | ||
'5492', '5493', '5494', '5495', '5496', '5497', '5498', '5499', '5500', '5501', '5527', '5528', '5662', | '5492', '5493', '5494', '5495', '5496', '5497', '5498', '5499', '5500', '5501', '5527', '5528', '5662', | ||
'6064', '6219', '7167', '7217', '7287', '7482', '7490', '7554', '7717', '7759', '7766', '11131', '11569', '11647', | '6064', '6219', '7167', '7217', '7287', '7482', '7490', '7554', '7717', '7759', '7766', '9778', '11131', '11569', '11647', | ||
'11648', '12688', '12703', '12715', '12942', '12998', '13105', '14256', '14293', '14303', '15215', '15347', '15412', '15560', '16995', | '11648', '12688', '12703', '12715', '12942', '12998', '13105', '14256', '14293', '14303', '15215', '15347', '15412', '15560', '16995', | ||
'17645', '18637', '19080', '19173', '20944', '21037', '21468', '21767', '22261', '22323', '22459', '24105', '24196', '24966', | '17645', '18637', '19080', '19173', '20944', '21037', '21468', '21767', '22261', '22323', '22459', '24105', '24196', '24966', | ||
Line 1,308: | Line 1,339: | ||
local extended_registrants_t = { -- known free registrants identifiable by the doi suffix incipit | local extended_registrants_t = { -- known free registrants identifiable by the doi suffix incipit | ||
['1002'] = {'aelm', 'leap'}, -- Advanced Electronic Materials, Learned Publishing | ['1002'] = {'aelm', 'leap'}, -- Advanced Electronic Materials, Learned Publishing | ||
['1016'] = {'j.heliyon', 'j.nlp', 'j.proche'}, | ['1016'] = {'j.heliyon', 'j.nlp', 'j.patter', 'j.proche'}, -- Heliyon, Natural Language Processing, Patterns, Procedia Chemistry | ||
['1017'] = {'nlp'}, -- Natural Language Processing Journal | ['1017'] = {'nlp'}, -- Natural Language Processing Journal | ||
['1046'] = {'j.1365-8711', 'j.1365-246x'}, -- MNRAS, GJI | ['1046'] = {'j.1365-8711', 'j.1365-246x'}, -- MNRAS, GJI | ||
Line 1,316: | Line 1,347: | ||
['1210'] = {'jendso','jcemcr'}, -- Journal of the Endocrine Society, JCEM Case Reports | ['1210'] = {'jendso','jcemcr'}, -- Journal of the Endocrine Society, JCEM Case Reports | ||
['4171'] = {'dm','mag'}, -- Documenta Mathematica, EMS Magazine | ['4171'] = {'dm','mag'}, -- Documenta Mathematica, EMS Magazine | ||
['11158'] = {'saasp'}, -- Systematic and Applied Acarology Special Publications | |||
['11646'] = {'megataxa', 'mesozoic'}, -- Megataxa, Mesozoic | |||
['14231'] = {'ag'}, -- Algebraic Geometry | ['14231'] = {'ag'}, -- Algebraic Geometry | ||
['22073'] = {'pja'}, -- Persian Journal of Acarology | |||
['35249'] = {'rche'}, -- Revista Chilena de Entomología | |||
['37520'] = {'fi'}, -- Fossil Imprint | |||
['53562'] = {'ajcb'} -- Asian Journal of Conservation Biology | |||
} | } | ||
Line 1,995: | Line 2,032: | ||
anchor = 'location', | anchor = 'location', | ||
category = 'CS1 maint: location', | category = 'CS1 maint: location', | ||
hidden = true, | |||
}, | |||
maint_missing_class = { | |||
message = nil, | |||
anchor = 'missing_class', | |||
category = 'CS1 maint: missing class', | |||
hidden = true, | hidden = true, | ||
}, | }, | ||
Line 2,031: | Line 2,074: | ||
anchor = 'overridden', | anchor = 'overridden', | ||
category = 'CS1 maint: overridden setting', | category = 'CS1 maint: overridden setting', | ||
hidden = true, | |||
}, | |||
maint_page_art_num = { | |||
message = nil, | |||
anchor = 'page_art_num', | |||
category = 'CS1 maint: article number as page number', | |||
hidden = true, | hidden = true, | ||
}, | }, | ||
Line 2,121: | Line 2,170: | ||
local id_limits_data_load_fail = false; -- flag; assume that we will be successful when loading json id limit tabular data | local id_limits_data_load_fail = false; -- flag; assume that we will be successful when loading json id limit tabular data | ||
local tab_data_t = mw.ext.data.get ('CS1/Identifier limits.tab') | local tab_data_t = mw.ext.data.get ('CS1/Identifier limits.tab'); -- attempt to load the tabular data from commons into <tab_data_t> | ||
if false == tab_data_t then -- undocumented 'feature': mw.ext.data.get() sometimes returns false | if false == tab_data_t then -- undocumented 'feature': mw.ext.data.get() sometimes returns false | ||
id_limits_data_load_fail = true; -- set the flag so that Module:Citation/CS1 can create an unannotated maint category | id_limits_data_load_fail = true; -- set the flag so that Module:Citation/CS1 can create an unannotated maint category | ||
else | else | ||
for _, limit_t in ipairs (tab_data_t) do | for _, limit_t in ipairs (tab_data_t.data) do -- overwrite default <load_fail_limit> values from the data table in the tabular data | ||
id_limits_data_t[limit_t[1]] = limit_t[2]; -- <limit[1]> is identifier; <limit[2]> is upper limit for that identifier | id_limits_data_t[limit_t[1]] = limit_t[2]; -- <limit[1]> is identifier; <limit[2]> is upper limit for that identifier | ||
end | end | ||
Line 2,534: | Line 2,583: | ||
vol_iss_pg_patterns = vol_iss_pg_patterns, | vol_iss_pg_patterns = vol_iss_pg_patterns, | ||
single_letter_2nd_lvl_domains_t = single_letter_2nd_lvl_domains_t, | single_letter_2nd_lvl_domains_t = single_letter_2nd_lvl_domains_t, | ||
url_access_map_t = url_access_map_t, | |||
inter_wiki_map = inter_wiki_map, | inter_wiki_map = inter_wiki_map, |