Module:Citation/CS1/Configuration: Difference between revisions

Jump to navigation Jump to search
bump pmc;
m (1 revision imported)
(bump pmc;)
Line 44:
['interview'] = 'Interviewed by $1',
['lay summary'] = 'Lay summary',
['mismatch'] = '<code class="cs1-code">&#124;$1=</code> / <code class="cs1-code">&#124;$2=</code> mismatch', -- $1 is year param name; $2 is date param name
['newsgroup'] = '[[Usenet newsgroup|Newsgroup]]:&nbsp;$1',
-- ['nodatenotitle'] = 'n.d.No title', -- for |title=(()) and (in the future for) |datetitle=none|n.d.|nd
['notitle'] = 'No title', -- for |title=(()) and (in the future) |title=none
['original'] = 'the original',
['origdate'] = ' [$1]',
Line 244:
'article-format', 'section-format'};
['ChapterURL'] = {'chapter-url', 'contribution-url', 'entry-url', 'article-url',
'section-url', 'chapterurl', 'contributionurl', 'sectionurl'}, -- Used by InternetArchiveBot
['ChapterUrlAccess'] = {'chapter-url-access', 'contribution-url-access',
'entry-url-access', 'article-url-access', 'section-url-access'}, -- Used by InternetArchiveBot
Line 251:
['Conference'] = {'conference', 'event'},
['ConferenceFormat'] = 'conference-format',
['ConferenceURL'] = {'conference-url', 'conferenceurl'}, -- Used by InternetArchiveBot
['Date'] = {'date', 'air-date', 'airdate'}, -- air-date and airdate for cite episode and cite serial only
['Degree'] = 'degree',
Line 271:
['Issue'] = {'issue', 'number'},
['Language'] = {'language', 'lang'},
['LayDate'] = {'lay-date', 'laydate'},
['LayFormat'] = 'lay-format',
['LaySource'] = {'lay-source', 'laysource'},
['LayURL'] = {'lay-url', 'layurl'}, -- Used by InternetArchiveBot
['MailingList'] = {'mailing-list', 'mailinglist'}, -- cite mailing list only
['Map'] = 'map', -- cite map only
Line 282:
['Minutes'] = 'minutes',
['Mode'] = 'mode',
['NameListStyle'] = {'name-list-style', 'name-list-format'},
['Network'] = 'network',
['Newsgroup'] = 'newsgroup', -- cite newsgroup only
Line 314:
['Series'] = {'series', 'version'},
['SeriesLink'] = {'series-link', 'serieslink'},
['SeriesNumber'] = {'series-number', 'series-no', 'seriesno'},
['Sheet'] = 'sheet', -- cite map only
['Sheets'] = 'sheets', -- cite map only
['Station'] = 'station',
['Time'] = 'time',
['TimeCaption'] = {'time-caption', 'timecaption'},
['Title'] = 'title', -- Used by InternetArchiveBot
['TitleLink'] = {'title-link', 'episode-link', 'titlelink', 'episodelink'}, -- Used by InternetArchiveBot
['TitleNote'] = 'department',
['TitleType'] = {'type', 'medium'},
Line 410:
end
end
 
 
--[[-----------< S P E C I A L C A S E T R A N S L A T I O N S >------------
Line 427 ⟶ 428:
['TranslatorList'] = 'translators list',
-- Lua patterns to match pseudo-titles used by InternetArchiveBot and others as placeholder for unknown |title= value
['authors'] = 'authors', -- used to assemble maintenance category names
['contributors'] = 'contributors', -- translation of these names plus translation of the base maintenance category names in maint_cats{} table below
['editors'] = 'editors', -- must match the names of the actual categories
['interviewers'] = 'interviewers', -- this group of translations used by get_display_names()
['translators'] = 'translators',
 
-- Lua patterns to match pseudo-titles used by Internet Archive bot and others as placeholder for unknown |title= value
['archived_copy'] = { -- used with CS1 maint: Archive[d] copy as title
['en'] = '^archived?%s+copy$', -- for English; translators: keep this because templates imported from en.wiki
Line 439 ⟶ 434:
},
 
-- Lua patterns to match generic titles; usually created by bots ofor reference filling tools
-- translators: replace ['local'] = nil with lowercase translation only when bots or tools create generic titles in your language
['generic_titles'] = {
-- patterns in this table should be lowercase only
-- leave ['local'] nil except when there is a matching generic title in your language
-- generic titles must be lowercase
{['en'] = {'^wayback%s+machine$', false}, ['local'] = nil},
-- boolean 'true' for plain-text searches; 'false' for pattern searches
{['en'] = {'are you a robot', true}, ['local'] = nil},
{['en'] = {'hugedomains.com^wayback%s+machine$', truefalse}, ['local'] = nil},
{['en'] = {'^[%(%[{<]?noare +title[>}%]%)]?$you a robot', falsetrue}, ['local'] = nil},
{['en'] = {'page not foundhugedomains.com', true}, ['local'] = nil},
{['en'] = {'subscribe^[%(%[{<]?no to read+title[>}%]%)]?$', truefalse}, ['local'] = nil},
{['en'] = {'^[%(%[{<]?unknown[>}%]%)]?$page not found', falsetrue}, ['local'] = nil},
{['en'] = {'websitesubscribe isto for saleread', true}, ['local'] = nil},
{['en'] = {'^404[%(%[{<]?unknown[>}%]%)]?$', truefalse}, ['local'] = nil},
{['en'] = {'website is for sale', true}, ['local'] = nil},
{['en'] = {'^404', true}, ['local'] = nil},
{['en'] = {'internet archive wayback machine', true}, ['local'] = nil},
{['en'] = {'log into facebook', true}, ['local'] = nil},
{['en'] = {'redirecting...', true}, ['local'] = nil},
{['en'] = {'webcite query result', true}, ['local'] = nil},
{['en'] = {'wikiwix\'s cache', true}, ['local'] = nil},
}
}
Line 470 ⟶ 472:
which became part of ISO 8601 in 2019. See '§Sub-year groupings'. The standard
defines various divisions using numbers 21-41. CS1|2 only supports generic seasons.
EDTF does support the distinction between north and south hemisperehemisphere seasons
but CS1|2 has no way to make that distinction.
 
Line 560 ⟶ 562:
local templates_not_using_page = {'audio-visual', 'episode', 'mailinglist', 'newsgroup', 'podcast', 'serial', 'sign', 'speech'}
 
 
--[[
 
Patterns for finding extra text in |volume=, |issue=, |page=, |pages=
 
]]
 
local vol_iss_pg_patterns = {
good_ppattern = '^P[^%.PpGg]', -- OK to begin with uppercase P: P7 (page 7 of section P), but not p123 (page 123); TODO: this allows 'Pages' which it should not
bad_ppatterns = { -- patterns for |page= and |pages=
'^[Pp][PpGg]?%.?[ %d]',
'^[Pp]ages?',
'^[Pp]gs.?',
},
vpatterns = { -- patterns for |volume=
'^volumes?',
'^vols?[%.:=]?'
},
ipatterns = { -- patterns for |issue=
'^issues?',
'^iss[%.:=]?',
'^numbers?',
'^nos?%A', -- don't match 'november' or 'nostradamus'
'^nr[%.:=]?',
'^n[%.:= ]' -- might be a valid issue without separator (space char is sep char here)
}
}
 
--[[--------------------------< K E Y W O R D S >-------------------------------
Line 609 ⟶ 638:
['ymd'] = {'ymd'}, -- |df=
['ymd-all'] = {'ymd-all'}, -- |df=
-- ['yMd'] = {'yMd'}, -- |df=; not supported at en.wiki
-- ['yMd-all'] = {'yMd-all'}, -- |df=; not supported at en.wiki
}
 
Line 682 ⟶ 711:
['contribution'] = make_keywords_list ({keywords.afterword, keywords.foreword, keywords.introduction, keywords.preface}),
['df'] = make_keywords_list ({keywords.dmy, keywords['dmy-all'], keywords.mdy, keywords['mdy-all'], keywords.ymd, keywords['ymd-all']}),
-- ['df'] = make_keywords_list ({keywords.dmy, keywords['dmy-all'], keywords.mdy, keywords['mdy-all'], keywords.ymd, keywords['ymd-all'], keywords.yMd, keywords['yMd-all']}), -- not supported at en.wiki
['mode'] = make_keywords_list ({keywords.cs1, keywords.cs2}),
['name-list-style'] = make_keywords_list ({keywords.amp, keywords['and'], keywords.vanc}),
Line 719 ⟶ 748:
 
]]
 
local invisible_defs = {
del = '\127', -- used to distinguish between stripmarker and del char
zwj = '\226\128\141', -- used with capture because zwj may be allowed
}
 
local invisible_chars = {
{'replacement', '\239\191\189'}, -- U+FFFD, EF BF BD
{'zero width joiner', '\226\128\141('.. invisible_defs.zwj .. ')'}, -- U+200D, E2 80 8D; capture because zwj may be allowed
{'zero width space', '\226\128\139'}, -- U+200B, E2 80 8B
{'hair space', '\226\128\138'}, -- U+200A, E2 80 8A
Line 731 ⟶ 765:
{'carriage return', '\013'}, -- U+000D (CR), 0D
{'stripmarker', stripmarkers.any}, -- stripmarker; may or may not be an error; capture returns the stripmaker type
{'delete', '\127('.. invisible_defs.del .. ')'}, -- U+007F (DEL), 7F; must be done after stripmarker test; capture to distinguish isolated del chars not part of stripmarker
{'C0 control', '[\000-\008\011\012\014-\031]'}, -- U+0000–U+001F (NULL–US), 00–1F (except HT, LF, CR (09, 0A, 0D))
{'C1 control', '[\194\128-\194\159]'}, -- U+0080–U+009F (XXX–APC), C2 80 – C2 9F
-- {'Specials', '[\239\191\185-\239\191\191]'}, -- U+FFF9-U+FFFF, EF BF B9 – EF BF BF
-- {'Private use area', '[\238\128\128-\239\163\191]'}, -- U+E000–U+F8FF, EE 80 80 – EF A3 BF
-- {'Supplementary Private Use Area-A', '[\243\176\128\128-\243\191\191\189]'}, -- U+F0000–U+FFFFD, F3 B0 80 80 – F3 BF BF BD
-- {'Supplementary Private Use Area-B', '[\244\128\128\128-\244\143\191\189]'}, -- U+100000–U+10FFFD, F4 80 80 80 – F4 8F BF BD
}
 
Line 760 ⟶ 794:
Myanmar extended B A9E0-A9FF - https://unicode.org/charts/PDF/UA9E0.pdf
the pattern is used by has_invisible_chars() and coins_cleanup()
 
TODO: find a better place for this?
]]
 
local indic_script = '[\224\164\128-\224\181\191\224\163\160-\224\183\191\225\128\128-\225\130\159\234\167\160-\234\167\191\234\169\160-\234\169\191]';
 
-- list of emoji that use zwj character (U+200D) to combine with another emoji
 
local emoji = { -- indexes are decimal forms of the hex values in U+xxxx
[127752] = true, -- U+1F308 🌈 rainbow
[127806] = true, -- U+1F33E 🌾 ear of rice
[127859] = true, -- U+1F373 🍳 cooking
[127891] = true, -- U+1F393 🎓 graduation cap
[127908] = true, -- U+1F3A4 🎤 microphone
[127912] = true, -- U+1F3A8 🎨 artist palette
[127979] = true, -- U+1F3EB 🏫 school
[127981] = true, -- U+1F3ED 🏭 factory
[128102] = true, -- U+1F466 👦 boy
[128103] = true, -- U+1F467 👧 girl
[128104] = true, -- U+1F468 👨 man
[128105] = true, -- U+1F469 👩 woman
[128139] = true, -- U+1F48B 💋 kiss mark
[128187] = true, -- U+1F4BB 💻 personal computer
[128188] = true, -- U+1F4BC 💼 brief case
[128295] = true, -- U+1F527 🔧 wrench
[128300] = true, -- U+1F52C 🔬 microscope
[128488] = true, -- U+1F5E8 🗨 left speech bubble
[128640] = true, -- U+1F680 🚀 rocket
[128658] = true, -- U+1F692 🚒 fire engine
[129309] = true, -- U+1F91D 🤝 handshake
[129455] = true, -- U+1F9AF 🦯 probing cane
[129456] = true, -- U+1F9B0 🦰 emoji component red hair
[129457] = true, -- U+1F9B1 🦱 emoji component curly hair
[129458] = true, -- U+1F9B2 🦲 emoji component bald
[129459] = true, -- U+1F9B3 🦳 emoji component white hair
[129466] = true, -- U+1F9BA 🦺 safety vest
[129468] = true, -- U+1F9BC 🦼 motorized wheelchair
[129469] = true, -- U+1F9BD 🦽 manual wheelchair
[129489] = true, -- U+1F9D1 🧑 adult
[9760] = true, -- U+2620 ☠ skull and crossbones
[9792] = true, -- U+2640 ♀ female sign
[9794] = true, -- U+2642 ♂ male sign
[9877] = true, -- U+2695 ⚕ staff of aesculapius
[9878] = true, -- U+2696 ⚖ scales
[9992] = true, -- U+2708 ✈ airplane
[10084] = true, -- U+2764 ❤ heavy black heart
}
 
 
Line 853 ⟶ 926:
['kölsch'] = {'Kölsch', 'ksh'}, -- use IANA/ISO 639 preferred name
['ripuarian'] = {'Ripuarian', 'mis-x-ripuar'}, -- group of dialects; no code in MediaWiki or in IANA/ISO 639
-- ['siksika'] = {'Siksika', 'bla'}, -- MediaWiki/IANA/ISO 639 preferred name: Siksika
['taiwanese hokkien'] = {'Taiwanese Hokkien', 'nan-TW'}, -- make room for MediaWiki/IANA/ISO 639 nan: Min Nan Chinese
['tosk albanian'] = {'Tosk Albanian', 'als'}, -- MediaWiki replaces 'Tosk Albanian' with 'Alemannisch' so 'Tosk Albanian' cannot be found
Line 984 ⟶ 1,056:
anchor = 'arxiv_missing',
category = 'CS1 errors: arXiv', -- same as bad arxiv
hidden = false
},
err_asintld_missing_asin = {
message = '<code class="cs1-code">&#124;$1=</code> requires <code class="cs1-code">&#124;asin=</code>', -- $1 is parameter name
anchor = 'asintld_missing_asin',
category = 'CS1 errors: ASIN TLD',
hidden = false
},
Line 996 ⟶ 1,074:
anchor = 'bad_asin',
category ='CS1 errors: ASIN',
hidden = false
},
err_bad_asin_tld = {
message = 'Check <code class="cs1-code">&#124;asin-tld=</code> value',
anchor = 'bad_asin_tld',
category ='CS1 errors: ASIN TLD',
hidden = false
},
Line 1,215 ⟶ 1,299:
},
err_disp_name = {
message = 'Invalid <code class="cs1-code">&#124;display-$1=$2</code>', -- $1 is 'authors',parameter 'contributors',name; 'editors',$2 'interviewers',is 'translators';the getsassigned value from special_case_translation table
anchor = 'disp_name',
category = 'CS1 errors: display-names',
Line 1,224 ⟶ 1,308:
anchor = 'doibroken_missing_doi',
category = 'CS1 errors: DOI',
hidden = false
},
err_embargo_missing_pmc = {
message = '<code class="cs1-code">&#124;$1=</code> requires <code class="cs1-code">&#124;pmc=</code>', -- $1 is parameter name
anchor = 'embargo_missing_pmc',
category = 'CS1 errors: PMC embargo',
hidden = false
},
Line 1,244 ⟶ 1,334:
hidden = false,
},
err_extra_text_issue = {
err_extra_text_pages = { -- TODO make message dependent on triggering parameter i.e. p/pp/page/pages?
message = '<code class="cs1-code">&#124;page(s)$1=</code> has extra text', -- $1 is parameter name
anchor = 'extra_text_issue',
category = 'CS1 errors: extra text: issue',
hidden = false,
},
err_extra_text_pages = {
message = '<code class="cs1-code">&#124;$1=</code> has extra text', -- $1 is parameter name
anchor = 'extra_text_pages',
category = 'CS1 errors: extra text: pages',
hidden = false,
},
err_extra_text_volume = {
message = '<code class="cs1-code">&#124;$1=</code> has extra text', -- $1 is parameter name
anchor = 'extra_text_volume',
category = 'CS1 errors: extra text: volume',
hidden = true,
},
err_first_missing_last = {
Line 1,347 ⟶ 1,449:
},
err_trans_missing_title = {
message = '<code class="cs1-code">&#124;trans-$1=</code> requires <code class="cs1-code">&#124;$1=</code> or <code class="cs1-code">&#124;script-$1=</code>', -- $1 is base parameter name
anchor = 'trans_missing_title',
category = 'CS1 errors: translated title',
Line 1,359 ⟶ 1,461:
},
err_vancouver = {
message = 'Vancouver style error: $1 in name $2', -- $1 is error detail, $2 is the nth name
anchor = 'vancouver',
category = 'CS1 errors: Vancouver style',
Line 1,378 ⟶ 1,480:
 
]]
maint_asin = {
message = nil,
anchor = 'ASIN',
category = 'CS1 maint: ASIN uses ISBN',
hidden = true,
},
maint_archived_copy = {
message = nil,
Line 1,412 ⟶ 1,508:
anchor = 'date_year',
category = 'CS1 maint: date and year',
hidden = true,
},
maint_discouraged = {
message = nil,
anchor = 'discouraged',
category = 'CS1 maint: discouraged parameter',
hidden = true,
},
Line 1,467 ⟶ 1,569:
category = 'CS1 maint: location',
hidden = true,
},
maint_mr_format = {
message = nil,
Line 1,473 ⟶ 1,575:
category = 'CS1 maint: MR format',
hidden = true,
},
maint_mult_names = {
message = nil,
Line 1,492 ⟶ 1,594:
hidden = true,
},
maint_others_avm = {
message = nil,
anchor = 'others_avm',
category = 'CS1 maint: others in cite AV media (notes)',
hidden = true,
},
maint_pmc_embargo = {
message = nil,
Line 1,504 ⟶ 1,612:
hidden = true,
},
maint_postscript = {
message = nil,
anchor = 'postscript',
category = 'CS1 maint: postscript',
hidden = true,
},
maint_ref_duplicates_default = {
message = nil,
anchor = 'ref_default',
category = 'CS1 maint: ref duplicates default',
hidden = true,
},
maint_ref_harv = {
message = nil,
Line 1,555 ⟶ 1,675:
encode: true if URI should be percent-encoded; otherwise false
COinS: identifier link or keyword for use in COinS:
for identifiers registered at info-uri.info use: info:.... where '...' is the appropriate identifier label
for identifiers that have COinS keywords, use the keyword: rft.isbn, rft.issn, rft.eissn
for |asin= and |ol=, which require assembly, use the keyword: url
for others make a URL using the value in prefix/suffix and #label, use the keyword: pre (not checked; any text other than 'info' or 'rft' works here)
for others make a URL using the value in prefix/suffix and #label, use the keyword: pre (not checked; any text other than 'info', 'rft', or 'url' works here)
set to nil to leave the identifier out of the COinS
separator: character or text between label and the identifier in the rendered citation
Line 1,587 ⟶ 1,708:
label = 'ASIN',
prefix = '//www.amazon.',
COinS = 'url',
COinS = nil, -- no COinS for this id (TODO: needs thinking on implementation because |asin-tld=)
separator = '&nbsp;',
encode = false;
Line 1,679 ⟶ 1,800:
label = 'ISMN',
prefix = '', -- not currently used;
COinS = 'nil', -- nil because we can't use pre or rft or info:
separator = '&nbsp;',
},
Line 1,748 ⟶ 1,869:
encode = true,
separator = '&nbsp;',
id_limit = 9999999999, -- 10-digits
},
['OL'] = {
Line 1,757 ⟶ 1,878:
label = 'OL',
prefix = '//openlibrary.org/',
COinS = 'url',
COinS = nil, -- no COinS for this id (TODO: needs thinking on implementation because /authors/books/works/OL)
separator = '&nbsp;',
encode = true,
Line 1,786 ⟶ 1,907:
encode = true,
separator = '&nbsp;',
id_limit = 80000008300000,
access = 'free', -- free to read
},
Line 1,799 ⟶ 1,920:
encode = false,
separator = '&nbsp;',
id_limit = 3370000034400000,
},
['RFC'] = {
Line 1,893 ⟶ 2,014:
stripmarkers=stripmarkers,
invisible_chars = invisible_chars,
invisible_defs = invisible_defs,
indic_script = indic_script,
emoji = emoji,
local_lang_cat_enable = local_lang_cat_enable,
maint_cats = maint_cats,
Line 1,910 ⟶ 2,033:
templates_using_issue = templates_using_issue,
templates_not_using_page = templates_not_using_page,
vol_iss_pg_patterns = vol_iss_pg_patterns,
inter_wiki_map = inter_wiki_map,
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu