change line 1754 parameter to true to hide ISBN/ date compatibility issues. See Help talk:Citation Style 1 and Wikipedia:Administrators' noticeboard/Incidents
細 (1版 をインポートしました) |
bsd>Nthep (change line 1754 parameter to true to hide ISBN/ date compatibility issues. See Help talk:Citation Style 1 and Wikipedia:Administrators' noticeboard/Incidents) |
||
| 1,250行目: | 1,250行目: | ||
['tracked-param'] = 'CS1 tracked parameter: $1', -- $1 is base (enumerators removed) parameter name | ['tracked-param'] = 'CS1 tracked parameter: $1', -- $1 is base (enumerators removed) parameter name | ||
['unfit'] = 'CS1: unfit URL', -- |url-status=unfit or |url-status=usurped; used to be a maint cat | ['unfit'] = 'CS1: unfit URL', -- |url-status=unfit or |url-status=usurped; used to be a maint cat | ||
['vanc-accept'] = 'CS1:Vancouver names with accept markup', -- for |vauthors=/|veditors= with accept-as-written markup | |||
['year-range-abbreviated'] = 'CS1: abbreviated year range', -- probably temporary cat to identify scope of |date=, |year= values using YYYY–YY form | ['year-range-abbreviated'] = 'CS1: abbreviated year range', -- probably temporary cat to identify scope of |date=, |year= values using YYYY–YY form | ||
} | } | ||
| 1,306行目: | 1,307行目: | ||
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 | ||
['1016'] = {'j.heliyon', 'j.proche'}, | ['1002'] = {'aelm', 'leap'}, -- Advanced Electronic Materials, Learned Publishing | ||
['1016'] = {'j.heliyon', 'j.nlp', 'j.proche'}, -- Heliyon, Natural Language Processing, Procedia Chemistry | |||
['1017'] = {'nlp'}, -- Natural Language Processing Journal | |||
['1046'] = {'j.1365-8711', 'j.1365-246x'}, -- MNRAS, GJI | ['1046'] = {'j.1365-8711', 'j.1365-246x'}, -- MNRAS, GJI | ||
['1093'] = {'mnras', 'mnrasl', 'gji', 'rasti'}, -- MNRAS, MNRAS Letters, GJI, RASTI | ['1093'] = {'mnras', 'mnrasl', 'gji', 'rasti'}, -- MNRAS, MNRAS Letters, GJI, RASTI | ||
| 1,312行目: | 1,315行目: | ||
['1111'] = {'j.1365-2966', 'j.1745-3933', 'j.1365-246X'}, -- MNRAS, MNRAS Letters, GJI | ['1111'] = {'j.1365-2966', 'j.1745-3933', 'j.1365-246X'}, -- MNRAS, MNRAS Letters, GJI | ||
['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 | |||
['14231'] = {'ag'}, -- Algebraic Geometry | |||
} | } | ||
| 1,742行目: | 1,747行目: | ||
category = 'CS1 errors: generic title', | category = 'CS1 errors: generic title', | ||
hidden = false, | hidden = false, | ||
}, | |||
err_invalid_isbn_date = { | |||
message = 'ISBN / Date incompatibility', | |||
anchor = 'invalid_isbn_date', | |||
category = 'CS1 errors: ISBN date', | |||
hidden = true | |||
}, | }, | ||
err_invalid_param_val = { | err_invalid_param_val = { | ||
| 1,801行目: | 1,812行目: | ||
anchor = 'param_has_ext_link', | anchor = 'param_has_ext_link', | ||
category = 'CS1 errors: external links', | category = 'CS1 errors: external links', | ||
hidden = false | |||
}, | |||
err_param_has_twl_url = { | |||
message = 'Wikipedia Library link in <code class="cs1-code">$1</code>', -- $1 is parameter name | |||
anchor = 'param_has_twl_url', | |||
category = 'CS1 errors: URL', | |||
hidden = false | hidden = false | ||
}, | }, | ||
| 2,032行目: | 2,049行目: | ||
anchor = 'postscript', | anchor = 'postscript', | ||
category = 'CS1 maint: postscript', | category = 'CS1 maint: postscript', | ||
hidden = true, | |||
}, | |||
maint_publisher_location = { | |||
message = nil, | |||
anchor = 'publisher_location', | |||
category = 'CS1 maint: publisher location', | |||
hidden = true, | hidden = true, | ||
}, | }, | ||
| 2,079行目: | 2,102行目: | ||
The values from <id_limits_data_t> are used to set handle.id_limit. | The values from <id_limits_data_t> are used to set handle.id_limit. | ||
From 2025-02-21, MediaWiki is broken. Use this link to edit the tablular data file: | |||
https://commons.wikimedia.org/w/index.php?title=Data:CS1/Identifier_limits.tab&action=edit | |||
See Phab:T389105 | |||
]] | ]] | ||
local load_fail_limit = 99999999999; | local id_limits_data_t = {}; | ||
local use_commons_data = true; -- set to false if your wiki does not have access to mediawiki commons; then, | |||
if false == use_commons_data then -- update this table from https://commons.wikimedia.org/wiki/Data:CS1/Identifier_limits.tab; last update: 2025-02-21 | |||
id_limits_data_t = {['OCLC'] = 10450000000, ['OSTI'] = 23010000, ['PMC'] = 11900000, ['PMID'] = 40400000, ['RFC'] = 9300, ['SSRN'] = 5200000, ['S2CID'] = 276000000}; -- this table must be maintained locally | |||
else -- here for wikis that do have access to mediawiki commons | |||
local load_fail_limit = 99999999999; -- very high number to avoid error messages on load failure | |||
id_limits_data_t = {['OCLC'] = load_fail_limit, ['OSTI'] = load_fail_limit, ['PMC'] = load_fail_limit, ['PMID'] = load_fail_limit, ['RFC'] = load_fail_limit, ['SSRN'] = load_fail_limit, ['S2CID'] = load_fail_limit}; | |||
local tab_data_t = mw.ext.data.get ('CS1/Identifier limits.tab').data; | local id_limits_data_load_fail = false; -- flag; assume that we will be successful when loading json id limit tabular data | ||
if false == tab_data_t then | |||
local tab_data_t = mw.ext.data.get ('CS1/Identifier limits.tab').data; -- attempt to load the json limit data from commons into <tab_data_t> | |||
else | 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 | |||
else | |||
for _, limit_t in ipairs (tab_data_t) do -- overwrite default <load_fail_limit> values | |||
id_limits_data_t[limit_t[1]] = limit_t[2]; -- <limit[1]> is identifier; <limit[2]> is upper limit for that identifier | |||
end | |||
end | end | ||
end | end | ||