Module:Citation/CS1/Configuration: Difference between revisions

synch from sandbox;
m>Trappist the monk
No edit summary
w>Trappist the monk
(synch from sandbox;)
Line 5: Line 5:
-- https://git.wikimedia.org/blob/mediawiki%2Fcore.git/69cd73811f7aadd093050dbf20ed70ef0b42a713/skins%2Fcommon%2FcommonElements.css#L199
-- https://git.wikimedia.org/blob/mediawiki%2Fcore.git/69cd73811f7aadd093050dbf20ed70ef0b42a713/skins%2Fcommon%2FcommonElements.css#L199
local code_style="color:inherit; border:inherit; padding:inherit;";
local code_style="color:inherit; border:inherit; padding:inherit;";


--[[--------------------------< U N C A T E G O R I Z E D _ N A M E S P A C E S >------------------------------
--[[--------------------------< U N C A T E G O R I Z E D _ N A M E S P A C E S >------------------------------
Line 14: Line 13:


]]
]]
local uncategorized_namespaces = { 'User', 'Talk', 'User_talk', 'Wikipedia_talk', 'File_talk', 'Template_talk',
local uncategorized_namespaces = { 'User', 'Talk', 'User_talk', 'Wikipedia_talk', 'File_talk', 'Template_talk', 'Help_talk', 'Category_talk', 'Portal_talk', 'Book_talk', 'Draft_talk', 'Education_Program_talk', 'Module_talk', 'MediaWiki_talk' };
'Help_talk', 'Category_talk', 'Portal_talk', 'Book_talk', 'Draft', 'Draft_talk', 'Education_Program_talk',
'Module_talk', 'MediaWiki_talk' };


local uncategorized_subpages = {'/[Ss]andbox', '/[Tt]estcases'}; -- list of Lua patterns found in page names of pages we should not categorize
local uncategorized_subpages = {'/[Ss]andbox', '/[Tt]estcases'}; -- list of Lua patterns found in page names of pages we should not categorize
Line 46: Line 43:
['inactive'] = 'inactive',
['inactive'] = 'inactive',
['inset'] = '$1 inset',
['inset'] = '$1 inset',
['interview'] = 'Interview with $1',
['interview'] = 'Interviewed by $1',
['lay summary'] = 'Lay summary',
['lay summary'] = 'Lay summary',
['newsgroup'] = '[[Usenet newsgroup|Newsgroup]]:&nbsp;$1',
['newsgroup'] = '[[Usenet newsgroup|Newsgroup]]:&nbsp;$1',
Line 156: Line 153:


['parameter'] = '<code style="'..code_style..'">&#124;$1=</code>',
['parameter'] = '<code style="'..code_style..'">&#124;$1=</code>',
['ps_cs1'] = '.'; -- cs1 style postscript (terminal) character
['ps_cs2'] = ''; -- cs2 style postscript (terminal) character (empty string)


['quoted-text'] = '<q>$1</q>', -- for wrapping |quote= content
['quoted-text'] = '<q>$1</q>', -- for wrapping |quote= content
['quoted-title'] = '"$1"',
['quoted-title'] = '"$1"',
['sep_cs1'] = '.', -- cs1 element separator
['sep_cs2'] = ',', -- cs2 separator
['sep_nl'] = ';', -- cs1|2 style name-list separator between authors is a semicolon
['sep_name'] = ', ', -- cs1|2 style last/first separator is <comma><space>
['sep_nl_vanc'] = ',', -- Vancouver style name-list separator between authors is a comma
['sep_name_vanc'] = ' ', -- Vancouver style last/first separator is a space


['trans-italic-title'] = "&#91;''$1''&#93;",
['trans-italic-title'] = "&#91;''$1''&#93;",
Line 185: Line 192:
['Cartography'] = 'cartography',
['Cartography'] = 'cartography',
['Chapter'] = {'chapter', 'contribution', 'entry', 'article', 'section'},
['Chapter'] = {'chapter', 'contribution', 'entry', 'article', 'section'},
['ChapterFormat'] = {'chapter-format', 'contribution-format', 'section-format'};
['ChapterFormat'] = {'chapter-format', 'contribution-format', 'entry-format', 'article-format', 'section-format'};
['ChapterURL'] = {'chapter-url', 'chapterurl', 'contribution-url', 'contributionurl', 'section-url', 'sectionurl'},
['ChapterURL'] = {'chapter-url', 'chapterurl', 'contribution-url', 'contributionurl', 'entry-url', 'article-url', 'section-url', 'sectionurl'},
['ChapterUrlAccess'] = 'chapter-url-access',
['ChapterUrlAccess'] = {'chapter-url-access', 'contribution-url-access', 'entry-url-access', 'article-url-access', 'section-url-access'},
['Class'] = 'class', -- cite arxiv and arxiv identifiers
['Class'] = 'class', -- cite arxiv and arxiv identifiers
['Collaboration'] = 'collaboration',
['Collaboration'] = 'collaboration',
Line 213: Line 220:
['Issue'] = {'issue', 'number'},
['Issue'] = {'issue', 'number'},
['Interviewers'] = 'interviewers',
['Interviewers'] = 'interviewers',
['Language'] = {'language', 'in'},
['Language'] = {'language', 'in', 'lang'},
['LastAuthorAmp'] = {'last-author-amp', 'lastauthoramp'},
['LastAuthorAmp'] = {'last-author-amp', 'lastauthoramp'},
['LayDate'] = {'lay-date', 'laydate'},
['LayDate'] = {'lay-date', 'laydate'},
Line 371: Line 378:
},
},
['local_digits'] = {['0'] = '0', ['1'] = '1', ['2'] = '2', ['3'] = '3', ['4'] = '4', ['5'] = '5', ['6'] = '6', ['7'] = '7', ['8'] = '8', ['9'] = '9'}; -- used to convert local language digits to Western 0-9
['local_digits'] = {['0'] = '0', ['1'] = '1', ['2'] = '2', ['3'] = '3', ['4'] = '4', ['5'] = '5', ['6'] = '6', ['7'] = '7', ['8'] = '8', ['9'] = '9'}; -- used to convert local language digits to Western 0-9
['xlate_digits'] = {};
}
}
for ld, ed in pairs (date_names.local_digits) do -- make a digit translation table for simple date translation from en to local language using local_digits table
date_names.xlate_digits [ed] = ld; -- en digit becomes index with local digit as the value
end




Line 476: Line 488:


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]';
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]';


--[[--------------------------< L A N G U A G E S >------------------------------------------------------------
--[[--------------------------< L A N G U A G E S >------------------------------------------------------------
Line 490: Line 503:
};
};


--[[--------------------------< L A N G U A G E  R E M A P P I N G >------------------------------------------
These tables hold language information that is different (correct) from MediaWiki's definitions
]]
local lang_code_remap = { -- used for |language= and |script-title= / |script-chapter=
['bh'] = 'Bihari', -- MediaWiki uses 'bh' as a subdomain name for Bhojpuri wWikipedia: bh.wikipedia.org
['bn'] = 'Bengali', -- MediaWiki returns Bangla
['cnr'] = 'Montenegrin', -- 'new' 639 code that MediaWiki does not yet understand
}
local lang_name_remap = { -- used for |language=
['bangla'] = {'Bengali', 'bn'}, -- MediaWiki returns Bangla (the endonym) but we want Bengali (the exonym); here we remap
['bengali'] = {'Bengali', 'bn'}, -- MediaWiki doesn't use exonym so here we provide correct language name and 639-1 code
['bihari'] = {'Bihari', 'bh'}, -- MediaWiki replaces 'Bihari' with 'Bhojpuri' so 'Bihari' cannot be found
['bhojpuri'] = {'Bhojpuri', 'bho'}, -- MediaWiki uses 'bh' as a subdomain name for Bhojpuri wWikipedia: bh.wikipedia.org
['montenegrin'] = {'Montenegrin', 'cnr'}, -- 'new' 639 code that MediaWiki does not yet understand
}


--[[--------------------------< M A I N T E N A N C E _ C A T E G O R I E S >----------------------------------
--[[--------------------------< M A I N T E N A N C E _ C A T E G O R I E S >----------------------------------
Line 743: Line 776:
hidden = true },
hidden = true },
contributor_ignored = {
contributor_ignored = {
message = '<code style="'..code_style..'">&#124;contributor=</code> ignored</code>',
message = '<code style="'..code_style..'">&#124;contributor=</code> ignored',
anchor = 'contributor_ignored',
anchor = 'contributor_ignored',
category = 'CS1 errors: contributor',
category = 'CS1 errors: contributor',
Line 842: Line 875:
parameters: a list of parameter aliases for this identifier
parameters: a list of parameter aliases for this identifier
link: Wikipedia article name
link: Wikipedia article name
q: wikidata q number for the identifier
label: the alternate name to apply to link
label: the alternate name to apply to link
mode: 'manual' when there is a specific function in the code to handle the identifier;
mode: 'manual' when there is a specific function in the code to handle the identifier;
Line 863: Line 897:
parameters = {'arxiv', 'eprint'},
parameters = {'arxiv', 'eprint'},
link = 'arXiv',
link = 'arXiv',
q = 'Q118398',
label = 'arXiv',
label = 'arXiv',
mode = 'manual',
mode = 'manual',
Line 874: Line 909:
parameters = { 'asin', 'ASIN' },
parameters = { 'asin', 'ASIN' },
link = 'Amazon Standard Identification Number',
link = 'Amazon Standard Identification Number',
q = 'Q1753278',
label = 'ASIN',
label = 'ASIN',
mode = 'manual',
mode = 'manual',
Line 884: Line 920:
parameters = {'bibcode'},
parameters = {'bibcode'},
link = 'Bibcode',
link = 'Bibcode',
q = 'Q25754',
label = 'Bibcode',
label = 'Bibcode',
mode = 'manual',
mode = 'manual',
Line 895: Line 932:
parameters = {'biorxiv'},
parameters = {'biorxiv'},
link = 'bioRxiv',
link = 'bioRxiv',
q = 'Q19835482',
label = 'bioRxiv',
label = 'bioRxiv',
mode = 'manual',
mode = 'manual',
Line 906: Line 944:
parameters = {'citeseerx'},
parameters = {'citeseerx'},
link = 'CiteSeerX',
link = 'CiteSeerX',
q = 'Q2715061',
label = 'CiteSeerX',
label = 'CiteSeerX',
mode = 'manual', -- manual for custom validation of the "doi"
mode = 'manual', -- manual for custom validation of the "doi"
Line 917: Line 956:
parameters = { 'doi', 'DOI' },
parameters = { 'doi', 'DOI' },
link = 'Digital object identifier',
link = 'Digital object identifier',
q = 'Q25670',
label = 'doi',
label = 'doi',
mode = 'manual',
mode = 'manual',
Line 928: Line 968:
parameters = {'eissn', 'EISSN'},
parameters = {'eissn', 'EISSN'},
link = 'International_Standard_Serial_Number#Electronic_ISSN',
link = 'International_Standard_Serial_Number#Electronic_ISSN',
q = 'Q46339674',
label = 'eISSN',
label = 'eISSN',
mode = 'manual',
mode = 'manual',
Line 938: Line 979:
parameters = { 'hdl', 'HDL' },
parameters = { 'hdl', 'HDL' },
link = 'Handle System',
link = 'Handle System',
q = 'Q3126718',
label = 'hdl',
label = 'hdl',
mode = 'manual',
mode = 'manual',
Line 949: Line 991:
parameters = {'isbn', 'ISBN', 'isbn13', 'ISBN13'},
parameters = {'isbn', 'ISBN', 'isbn13', 'ISBN13'},
link = 'International Standard Book Number',
link = 'International Standard Book Number',
q = 'Q33057',
label = 'ISBN',
label = 'ISBN',
mode = 'manual',
mode = 'manual',
Line 958: Line 1,001:
parameters = {'ismn', 'ISMN'},
parameters = {'ismn', 'ISMN'},
link = 'International Standard Music Number',
link = 'International Standard Music Number',
q = 'Q1666938',
label = 'ISMN',
label = 'ISMN',
mode = 'manual',
mode = 'manual',
Line 967: Line 1,011:
parameters = {'issn', 'ISSN'},
parameters = {'issn', 'ISSN'},
link = 'International Standard Serial Number',
link = 'International Standard Serial Number',
q = 'Q131276',
label = 'ISSN',
label = 'ISSN',
mode = 'manual',
mode = 'manual',
Line 977: Line 1,022:
parameters = {'jfm', 'JFM'},
parameters = {'jfm', 'JFM'},
link = 'Jahrbuch über die Fortschritte der Mathematik',
link = 'Jahrbuch über die Fortschritte der Mathematik',
q = '',
label = 'JFM',
label = 'JFM',
mode = 'manual',
mode = 'manual',
Line 987: Line 1,033:
parameters = {'jstor', 'JSTOR'},
parameters = {'jstor', 'JSTOR'},
link = 'JSTOR',
link = 'JSTOR',
q = 'Q1420342',
label = 'JSTOR',
label = 'JSTOR',
mode = 'external',
mode = 'external',
Line 998: Line 1,045:
parameters = {'LCCN', 'lccn'},
parameters = {'LCCN', 'lccn'},
link = 'Library of Congress Control Number',
link = 'Library of Congress Control Number',
q = 'Q620946',
label = 'LCCN',
label = 'LCCN',
mode = 'manual',
mode = 'manual',
Line 1,008: Line 1,056:
parameters = {'MR', 'mr'},
parameters = {'MR', 'mr'},
link = 'Mathematical Reviews',
link = 'Mathematical Reviews',
q = 'Q211172',
label = 'MR',
label = 'MR',
mode = 'manual',
mode = 'manual',
Line 1,018: Line 1,067:
parameters = {'OCLC', 'oclc'},
parameters = {'OCLC', 'oclc'},
link = 'OCLC',
link = 'OCLC',
q = 'Q190593',
label = 'OCLC',
label = 'OCLC',
mode = 'manual',
mode = 'manual',
Line 1,028: Line 1,078:
parameters = { 'ol', 'OL' },
parameters = { 'ol', 'OL' },
link = 'Open Library',
link = 'Open Library',
q = 'Q1201876',
label = 'OL',
label = 'OL',
mode = 'manual',
mode = 'manual',
Line 1,039: Line 1,090:
parameters = {'OSTI', 'osti'},
parameters = {'OSTI', 'osti'},
link = 'Office of Scientific and Technical Information',
link = 'Office of Scientific and Technical Information',
q = 'Q2015776',
label = 'OSTI',
label = 'OSTI',
mode = 'external',
mode = 'external',
Line 1,050: Line 1,102:
parameters = {'PMC', 'pmc'},
parameters = {'PMC', 'pmc'},
link = 'PubMed Central',
link = 'PubMed Central',
q = 'Q229883',
label = 'PMC',
label = 'PMC',
mode = 'manual',
mode = 'manual',
Line 1,062: Line 1,115:
parameters = {'PMID', 'pmid'},
parameters = {'PMID', 'pmid'},
link = 'PubMed Identifier',
link = 'PubMed Identifier',
q = '',
label = 'PMID',
label = 'PMID',
mode = 'manual',
mode = 'manual',
Line 1,072: Line 1,126:
parameters = {'RFC', 'rfc'},
parameters = {'RFC', 'rfc'},
link = 'Request for Comments',
link = 'Request for Comments',
q = 'Q212971',
label = 'RFC',
label = 'RFC',
mode = 'external',
mode = 'external',
Line 1,083: Line 1,138:
parameters = {'SSRN', 'ssrn'},
parameters = {'SSRN', 'ssrn'},
link = 'Social Science Research Network',
link = 'Social Science Research Network',
q = 'Q7550801',
label = 'SSRN',
label = 'SSRN',
mode = 'manual',
mode = 'manual',
Line 1,094: Line 1,150:
parameters = {'message-id'},
parameters = {'message-id'},
link = 'Usenet',
link = 'Usenet',
q = 'Q193162',
label = 'Usenet:',
label = 'Usenet:',
mode = 'manual',
mode = 'manual',
Line 1,104: Line 1,161:
parameters = {'ZBL', 'zbl'},
parameters = {'ZBL', 'zbl'},
link = 'Zentralblatt MATH',
link = 'Zentralblatt MATH',
q = 'Q190269',
label = 'Zbl',
label = 'Zbl',
mode = 'manual',
mode = 'manual',
Line 1,130: Line 1,188:
prop_cats = prop_cats,
prop_cats = prop_cats,
script_lang_codes = script_lang_codes,
script_lang_codes = script_lang_codes,
lang_code_remap = lang_code_remap,
lang_name_remap = lang_name_remap,
title_types = title_types,
title_types = title_types,
uncategorized_namespaces = uncategorized_namespaces,
uncategorized_namespaces = uncategorized_namespaces,
Anonymous user