Jump to content

Module:Citation/CS1/Configuration and Module:Citation/CS1/Configuration/sandbox: Difference between pages

(Difference between pages)
Content deleted Content added
synch from sandbox;
 
m Removed protection from "Module:Citation/CS1/Configuration/sandbox"
 
Line 1: Line 1:
--[[
History of changes since last sync: 2025-08-30
2025-09-02: Add 10.1093/pnasnexus to free DOI prefix recognition (PNAS Nexus)
2025-09-11: Add 10.53347 to free DOI recognition (Radiopedia)
2025-09-21: i18n fixes; see Help_talk:Citation_Style_1#i18n:_Translatable_texts_from_Module:Citation/CS1
2025-10-01: Add 10.1016/j.animal to free DOI recognition (Animal)
2025-10-01: 10.1109/oa and 10.1109/oj to free DOI recognition (IEEE Open Access..., IEEE Open Journal...)
]]


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 69: Line 79:
['archived-dead'] = 'Archived from $1 on $2',
['archived-dead'] = 'Archived from $1 on $2',
['archived-live'] = '$1 from the original on $2',
['archived-live'] = '$1 from the original on $2',
['archived-unfit'] = 'Archived from the original on ',
['archived-unfit'] = 'Archived from the original on ',
['archived'] = 'Archived',
['archived'] = 'Archived',
['by'] = 'By', -- contributions to authored works: introduction, foreword, afterword
['by'] = 'By', -- contributions to authored works: introduction, foreword, afterword
Line 79: Line 89:
['et al'] = 'et al.',
['et al'] = 'et al.',
['in'] = 'In', -- edited works
['in'] = 'In', -- edited works
['inactive'] = 'inactive',
['inactive'] = 'inactive',
['inset'] = '$1 inset',
['inset'] = '$1 inset',
['interview'] = 'Interviewed by $1',
['interview'] = 'Interviewed by $1',
invisible_1 = '$1 $2', -- $1 stripmarker name; $2 is text from <invisible_chars[1]>
invisible_2 = '$1 character', -- $1 character name from <invisible_chars[1]>
['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
['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',
['newsgroup'] = '[[Usenet newsgroup|Newsgroup]]:&nbsp;$1',
Line 96: Line 108:
['translated'] = 'Translated by $1',
['translated'] = 'Translated by $1',
['type'] = ' ($1)', -- for titletype
['type'] = ' ($1)', -- for titletype

wikidata = 'Wikidata', -- these used for interwikilinked author/editor/... names
wikipedia = 'Wikipedia',
wikisource = 'Wikisource',

['written'] = 'Written at $1',
['written'] = 'Written at $1',


Line 123: Line 140:
['via'] = " &ndash; via $1",
['via'] = " &ndash; via $1",
['event'] = 'Event occurs at',
['event'] = 'Event occurs at',
['minutes'] = 'minutes in',
['minutes'] = 'minutes in',
-- Determines the location of the help page
-- Determines the location of the help page
Line 153: Line 170:
the canonical template name may. These names are used in warning_msg_e and warning_msg_m to create links to the
the canonical template name may. These names are used in warning_msg_e and warning_msg_m to create links to the
template's documentation when an article is displayed in preview mode.
template's documentation when an article is displayed in preview mode.

Most cs1|2 template |CitationClass= values at en.wiki match their canonical template names so are not listed here.


]]
]]


local citation_class_map_t = { -- TODO: if kept, these and all other config.CitationClass 'names' require some sort of i18n
local citation_class_map_t = { -- TODO:
arxiv = 'cite arXiv', -- as the source for known_templates_t and citation_classes_t
['arxiv'] = 'arXiv',
['audio-visual'] = 'AV media',
['audio-visual'] = 'AV media',
['AV-media-notes'] = 'AV media notes',
['AV-media-notes'] = 'AV media notes',
['biorxiv'] = 'bioRxiv',
biorxiv = 'bioRxiv',
['citeseerx'] = 'CiteSeerX',
= '',
['encyclopaedia'] = 'encyclopedia',
= '',
['mailinglist'] = 'mailing list',
= ' ',
['medrxiv'] = 'medRxiv',
= '',
['pressrelease'] = 'press release',
= ' ',
['ssrn'] = 'SSRN',
= '',
['techreport'] = 'tech report',
= ' ',
interview = 'cite interview',
journal = 'cite journal',
magazine = 'cite magazine',
mailinglist = 'cite mailing list',
map = 'cite map',
medrxiv = 'cite medRxiv',
news = 'cite news',
newsgroup = 'cite newsgroup',
podcast = 'cite podcast',
pressrelease = 'cite press release',
report = 'cite report',
serial = 'cite serial',
sign = 'cite sign',
speech = 'cite speech',
ssrn = 'cite SSRN',
techreport = 'cite tech report',
thesis = 'cite thesis',
web = 'cite web',
}
}


Line 511: Line 544:
local is_Latn = 'A-Za-z\195\128-\195\150\195\152-\195\182\195\184-\198\191\199\132-\201\143\225\184\128-\225\187\191';
local is_Latn = 'A-Za-z\195\128-\195\150\195\152-\195\182\195\184-\198\191\199\132-\201\143\225\184\128-\225\187\191';
local special_case_translation = {
local special_case_translation = {
author = 'author',
editor = 'editor',
name_list_params = '$1-name-list parameters', -- $1 is 'author' or 'editor'; used with err_redundant_parameters

['AuthorList'] = 'authors list', -- used to assemble maintenance category names
['AuthorList'] = 'authors list', -- used to assemble maintenance category names
['ContributorList'] = 'contributors list', -- translation of these names plus translation of the base maintenance category names in maint_cats{} table below
['ContributorList'] = 'contributors list', -- translation of these names plus translation of the base maintenance category names in maint_cats{} table below
Line 1,329: Line 1,366:
'17645', '18637', '19080', '19173', '20944', '21037', '21468', '21767', '22261', '22323', '22459', '24105', '24196', '24966',
'17645', '18637', '19080', '19173', '20944', '21037', '21468', '21767', '22261', '22323', '22459', '24105', '24196', '24966',
'26775', '30845', '32545', '35711', '35712', '35713', '35995', '36648', '37126', '37532', '37871', '47128',
'26775', '30845', '32545', '35711', '35712', '35713', '35995', '36648', '37126', '37532', '37871', '47128',
'47622', '47959', '52437', '52975', '53288', '54081', '54947', '55667', '55914', '57009', '58647', '59081',
'47622', '47959', '52437', '52975', '53288', '54081', '54947', '55667', '55914', '57009', '58647', '59081',
}) do
}) do
registrants_t[v] = true; -- build a k/v table of known free-to-read doi registrants
registrants_t[v] = true; -- build a k/v table of known free-to-read doi registrants
Line 1,339: Line 1,376:
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.patter', 'j.proche'}, -- Heliyon, Natural Language Processing, Patterns, Procedia Chemistry
['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
['1093'] = {'mnras', 'mnrasl', 'gji', 'rasti'}, -- MNRAS, MNRAS Letters, GJI, RASTI
['1093'] = {'mnras', 'mnrasl', 'gji', 'rasti'}, -- MNRAS, MNRAS Letters, GJI, RASTI
['1099'] = {'acmi', 'mic', '00221287', 'mgen'}, -- Access Microbiology, Microbiology, Journal of General Microbiology, Microbial Genomics
['1099'] = {'acmi', 'mic', '00221287', 'mgen'}, -- Access Microbiology, Microbiology, Journal of General Microbiology, Microbial Genomics
['1109'] = {'oa', 'oj'}, -- IEEE Open Access..., IEEE Open Journal...
['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
Line 1,371: Line 1,409:
['char'] = 'invalid character', -- |isbn=, |sbn=
['char'] = 'invalid character', -- |isbn=, |sbn=
['check'] = 'checksum', -- |isbn=, |sbn=
['check'] = 'checksum', -- |isbn=, |sbn=
empty_str = '(empty string)', -- empty unknown parameter check when cite has |=
['flag'] = 'flag', -- |archive-url=
['flag'] = 'flag', -- |archive-url=
['form'] = 'invalid form', -- |isbn=, |sbn=
['form'] = 'invalid form', -- |isbn=, |sbn=