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= |
|||
]] |
|||
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 153: | ||
['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 1,167: | Line 1,178: | ||
'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 2,031: | Line 2,042: | ||
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,138: | ||
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 |