Module:Citation/CS1/Configuration and Module:Citation/CS1/Configuration/sandbox: Difference between pages
Appearance
(Difference between pages)
Content deleted Content added
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 |
No edit summary |
||
Line 1: | Line 1: | ||
--[[ |
|||
History of changes since last sync: 2025-04-12 |
|||
2025-04-23: add script-lang tkr; |
|||
2025-04-27: change maint warning message in preveiw box from #3a3 to #085 to match cs1|2 maint message color; |
|||
2025-05-01: tweak tabular data fetch; see Help_talk:Citation_Style_1#Lua_error%3F |
|||
2025-05-10: maint cat to track {{cite journal}} templates misusing |page= for |article-number=; see Help_talk:Citation_Style_1#|page=_same_value_as_last_n-digits_of_|doi= |
|||
2025-05-26: add 10.1016/j.patter to free DOI prefix recognition (Patterns) |
|||
2025-06-07: maint cat for post 2007 arxiv format without |class=; see Help_talk:Citation_Style_1#Category%3ACS1_maint%3A_missing_class_%3F |
|||
2025-06-11: add 'updated' as bad author name; see Help_talk:Citation_Style_1#Author_check |
|||
]] |
|||
local lang_obj = mw.language.getContentLanguage(); -- make a language object for the local language; used here for languages and dates |
local lang_obj = mw.language.getContentLanguage(); -- make a language object for the local language; used here for languages and dates |
||
Line 142: | Line 156: | ||
['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 580: | Line 594: | ||
{['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,167: | Line 1,182: | ||
'el', 'fa', 'grc', 'gu', 'he', 'hi', 'hy', 'ja', 'ka', 'kk', 'km', 'kn', 'ko', |
'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', |
'ku', 'ky', 'lo', 'mk', 'ml', 'mn', 'mni', 'mr', 'my', 'ne', 'or', 'ota', |
||
'pa', 'ps', 'ru', 'sd', 'si', 'sr', 'syc', 'ta', 'te', 'tg', 'th', 'ti', ' |
'pa', 'ps', 'ru', 'sd', 'si', 'sr', 'syc', 'ta', 'te', 'tg', 'th', 'ti', 'tkr', |
||
'ug', 'uk', 'ur', 'uz', 'yi', 'yue', 'zh', 'zgh' |
'tt', 'ug', 'uk', 'ur', 'uz', 'yi', 'yue', 'zh', 'zgh' |
||
}; |
}; |
||
Line 1,308: | Line 1,323: | ||
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,995: | Line 2,010: | ||
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,052: | ||
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,148: | ||
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 |