模块:Citation/CS1/Configuration:修订间差异

imported>Liangent
无编辑摘要
imported>Liangent
无编辑摘要
第1行: 第1行:
citation_config = {};
citation_config = {};


-- override <code>...</code> styling to remove color, border, and padding.  <code> css is specified here:
-- override <code style="'..code_style..'">...</code> styling to remove color, border, and padding.  <code style="'..code_style..'"> css is specified here:
-- 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;";
第235行: 第235行:
citation_config.error_conditions = {
citation_config.error_conditions = {
accessdate_missing_url = {
accessdate_missing_url = {
message = '使用<code>&#124;accessdate=</code>需要含有<code>&#124;url=</code>',
message = '使用<code style="'..code_style..'">&#124;accessdate=</code>需要含有<code style="'..code_style..'">&#124;url=</code>',
anchor = 'accessdate_missing_url',
anchor = 'accessdate_missing_url',
category = '含有访问日期但无网址的引用的页面',
category = '含有访问日期但无网址的引用的页面',
hidden = true },
hidden = true },
archive_missing_date = {
archive_missing_date = {
message = '使用<code>&#124;archiveurl=</code>需要含有<code>&#124;archivedate=</code>',
message = '使用<code style="'..code_style..'">&#124;archiveurl=</code>需要含有<code style="'..code_style..'">&#124;archivedate=</code>',
anchor = 'archive_missing_date',
anchor = 'archive_missing_date',
category = '含有存档网址错误的引用的页面‎',
category = '含有存档网址错误的引用的页面‎',
hidden = false },
hidden = false },
archive_missing_url = {
archive_missing_url = {
message = '使用<code>&#124;archiveurl=</code>需要含有<code>&#124;url=</code>',
message = '使用<code style="'..code_style..'">&#124;archiveurl=</code>需要含有<code style="'..code_style..'">&#124;url=</code>',
anchor = 'archive_missing_url',
anchor = 'archive_missing_url',
category = '含有存档网址错误的引用的页面‎',
category = '含有存档网址错误的引用的页面‎',
hidden = false },
hidden = false },
bad_arxiv = {
message = 'Check <code style="'..code_style..'">&#124;arxiv=</code> value',
anchor = 'bad_arxiv',
category = 'CS1 errors: arXiv',
hidden = false },
bad_authorlink = {
message = 'Check <code style="'..code_style..'">&#124;authorlink=</code> value',
anchor = 'bad_authorlink',
category = 'CS1 errors: authorlink',
hidden = false },
bad_date = {
message = 'Check date values in: <code style="'..code_style..'">$1</code>',
anchor = 'bad_date',
category = 'CS1 errors: dates',
hidden = true },
bad_doi = {
bad_doi = {
message = '请检查<code>&#124;doi=</code>值',
message = '请检查<code style="'..code_style..'">&#124;doi=</code>值',
anchor = 'bad_doi',
anchor = 'bad_doi',
category = '含有DOI错误的引用的页面',
category = '含有DOI错误的引用的页面',
hidden = false },
hidden = false },
bad_isbn = {
bad_isbn = {
message = '请检查<code>&#124;isbn=</code>值',
message = '请检查<code style="'..code_style..'">&#124;isbn=</code>值',
anchor = 'bad_isbn',
anchor = 'bad_isbn',
category = '含有ISBN错误的引用的页面',
category = '含有ISBN错误的引用的页面',
hidden = false },
bad_issn = {
message = 'Check <code style="'..code_style..'">&#124;issn=</code> value',
anchor = 'bad_issn',
category = 'CS1 errors: ISSN',
hidden = false },
bad_lccn = {
message = 'Check <code style="'..code_style..'">&#124;lccn=</code> value',
anchor = 'bad_lccn',
category = 'CS1 errors: LCCN',
hidden = false },
hidden = false },
bad_ol = {
bad_ol = {
message = '请检查<code>&#124;ol=</code>值',
message = '请检查<code style="'..code_style..'">&#124;ol=</code>值',
anchor = 'bad_ol',
anchor = 'bad_ol',
category = '含有OL错误的引用的页面',
category = '含有OL错误的引用的页面',
hidden = false },
bad_pmc = {
message = 'Check <code style="'..code_style..'">&#124;pmc=</code> value',
anchor = 'bad_pmc',
category = 'CS1 errors: PMC',
hidden = false },
bad_pmid = {
message = 'Check <code style="'..code_style..'">&#124;pmid=</code> value',
anchor = 'bad_pmid',
category = 'CS1 errors: PMID',
hidden = false },
hidden = false },
bad_url = {
bad_url = {
message = '请检查<code>&#124;url=</code>格式',
message = '请检查<code style="'..code_style..'">&#124;url=</code>格式',
anchor = 'bad_url',
anchor = 'bad_url',
category = '含有网址格式错误的引用的页面',
category = '含有网址格式错误的引用的页面',
第275行: 第310行:
hidden = false },
hidden = false },
citation_missing_title = {
citation_missing_title = {
message = '缺少或<code>&#124;title=</code>为空',
message = '缺少或<code style="'..code_style..'">&#124;title=</code>为空',
anchor = 'citation_missing_title',
anchor = 'citation_missing_title',
category = '含有缺少标题的引用的页面‎',
category = '含有缺少标题的引用的页面‎',
hidden = false },
hidden = false },
cite_web_url = {
cite_web_url = { -- this error applies to cite web and to cite podcast
message = '缺少或<code>&#124;url=</code>为空',
message = '缺少或<code style="'..code_style..'">&#124;url=</code>为空',
anchor = 'cite_web_url',
anchor = 'cite_web_url',
category = '含有缺少网址的网站引用的页面‎',
category = '含有缺少网址的网站引用的页面‎',
hidden = true },
coauthors_missing_author = {
message = '<code style="'..code_style..'">&#124;coauthors=</code> requires <code style="'..code_style..'">&#124;author=</code>',
anchor = 'coauthors_missing_author',
category = 'CS1 errors: coauthors without author',
hidden = false },
deprecated_params = {
message = 'Cite uses deprecated parameters',
anchor = 'deprecated_params',
category = 'Pages containing cite templates with deprecated parameters',
hidden = true },
hidden = true },
empty_citation = {
empty_citation = {
第290行: 第335行:
hidden = false },
hidden = false },
extra_pages = {
extra_pages = {
message = '<code>&#124;pages=</code>或<code>&#124;at=</code>多余',
message = '<code style="'..code_style..'">&#124;pages=</code>或<code style="'..code_style..'">&#124;at=</code>多余',
anchor = 'extra_pages',
anchor = 'extra_pages',
category = '含有页码指定冲突的引用的页面‎',
category = '含有页码指定冲突的引用的页面‎',
hidden = false },
first_missing_last = {
message = '<code style="'..code_style..'">&#124;first$2=</code> missing <code style="'..code_style..'">&#124;last$2=</code> in $1',
anchor = 'first_missing_last',
category = 'CS1 errors: missing author or editor',
hidden = false },
hidden = false },
format_missing_url = {
format_missing_url = {
message = '使用<code>&#124;format=</code>需要含有<code>&#124;url=</code>',
message = '使用<code style="'..code_style..'">&#124;format=</code>需要含有<code style="'..code_style..'">&#124;url=</code>',
anchor = 'format_missing_url',
anchor = 'format_missing_url',
category = '含有网络文件格式但无网址的引用的页面‎',
category = '含有网络文件格式但无网址的引用的页面‎',
hidden = true },
hidden = true },
implict_etal_author = {
implict_etal_author = {
message = '建议使用<code>&#124;displayauthors=</code>',
message = '建议使用<code style="'..code_style..'">&#124;displayauthors=</code>',
anchor = 'displayauthors',
anchor = 'displayauthors',
category = '含有旧式缩略标签的引用的页面‎',
category = '含有旧式缩略标签的引用的页面‎',
hidden = true },
hidden = true },
implict_etal_editor = {
implict_etal_editor = {
message = '建议使用<code>&#124;displayeditors=</code>',
message = '建议使用<code style="'..code_style..'">&#124;displayeditors=</code>',
anchor = 'displayeditors',
anchor = 'displayeditors',
category = '含有旧式缩略标签的引用的页面‎',
category = '含有旧式缩略标签的引用的页面 in editors‎',
hidden = true },
hidden = true },
missing_name = {
message = 'Missing <code style="'..code_style..'">&#124;last$2=</code> in $1',
anchor = 'missing_name',
category = 'CS1 errors: missing author or editor',
hidden = false },
parameter_ignored = {
parameter_ignored = {
message = '已忽略未知参数<code>&#124;$1=</code>',
message = '已忽略未知参数<code style="'..code_style..'">&#124;$1=</code>',
anchor = 'parameter_ignored',
anchor = 'parameter_ignored',
category = '含有未知参数的引用的页面',
category = '含有未知参数的引用的页面',
hidden = false },
hidden = false },
parameter_ignored_suggest = {
parameter_ignored_suggest = {
message = '已忽略未知参数<code>&#124;$1=</code>(建议使用<code>&#124;$2=</code>)',
message = '已忽略未知参数<code style="'..code_style..'">&#124;$1=</code>(建议使用<code style="'..code_style..'">&#124;$2=</code>)',
anchor = 'parameter_ignored_suggest',
anchor = 'parameter_ignored_suggest',
category = '含有未知参数的引用的页面',
category = '含有未知参数的引用的页面',
第330行: 第385行:
hidden = false },
hidden = false },
trans_missing_chapter = {
trans_missing_chapter = {
message = '使用<code>&#124;trans-chapter=</code>需要含有<code>&#124;chapter=</code>',
message = '使用<code style="'..code_style..'">&#124;trans-chapter=</code>需要含有<code style="'..code_style..'">&#124;chapter=</code>',
anchor = 'trans_missing_chapter',
anchor = 'trans_missing_chapter',
category = '含有不带原名的译名的引用的页面',
category = '含有不带原名的译名的引用的页面',
hidden = false },
hidden = false },
trans_missing_title = {
trans_missing_title = {
message = '使用<code>&#124;trans-title=</code>需要含有<code>&#124;title=</code>',
message = '使用<code style="'..code_style..'">&#124;trans-title=</code>需要含有<code style="'..code_style..'">&#124;title=</code>',
anchor = 'trans_missing_title',
anchor = 'trans_missing_title',
category = '含有不带原名的译名的引用的页面',
category = '含有不带原名的译名的引用的页面',
第347行: 第402行:


citation_config.id_handlers = {
citation_config.id_handlers = {
['ARXIV'] = {
parameters = {'arxiv', 'ARXIV'},
link = 'arXiv',
label = 'arXiv',
mode = 'external',
prefix = '//arxiv.org/abs/',                                            -- protocol relative tested 2013-09-04
encode = false,
COinS = 'info:arxiv',
separator = ':',
},
['ASIN'] = {
['ASIN'] = {
parameters = { 'asin', 'ASIN' },    
parameters = { 'asin', 'ASIN' },    
第355行: 第420行:
separator = '&nbsp;',
separator = '&nbsp;',
encode = false;
encode = false;
},
['BIBCODE'] = {
parameters = {'bibcode', 'BIBCODE'},
link = 'Bibcode',
label = 'Bibcode',
mode = 'external',
prefix = 'http://adsabs.harvard.edu/abs/',
encode = false,
COinS = 'info:bibcode',
separator = ':',
},
},
['DOI'] = {
['DOI'] = {
第365行: 第440行:
separator = ':',
separator = ':',
encode = true,
encode = true,
},
['OL'] = {
parameters = { 'ol', 'OL' },
link = '开放图书馆',
label = 'OL',
mode = 'manual',
COinS = 'info:olnum',
separator = '&nbsp;',
endode = true,
},
['ARXIV'] = {
parameters = {'arxiv', 'ARXIV'},
link = 'arXiv',
label = 'arXiv',
mode = 'external',
prefix = 'http://arxiv.org/abs/',
encode = false,
COinS = 'info:arxiv',
separator = ':',
},
['BIBCODE'] = {
parameters = {'bibcode', 'BIBCODE'},
link = 'Bibcode',
label = 'Bibcode',
mode = 'external',
prefix = 'http://adsabs.harvard.edu/abs/',
encode = false,
COinS = 'info:bibcode',
separator = ':',
},
},
['ISBN'] = {
['ISBN'] = {
第408行: 第454行:
link = '国际标准连续出版物号',
link = '国际标准连续出版物号',
label = 'ISSN',
label = 'ISSN',
mode = 'external',
mode = 'manual',
prefix = '//www.worldcat.org/issn/',
prefix = '//www.worldcat.org/issn/',
COinS = 'rft.issn',
COinS = 'rft.issn',
第429行: 第475行:
label = 'JSTOR',
label = 'JSTOR',
mode = 'external',
mode = 'external',
prefix = 'http://www.jstor.org/stable/',
prefix = '//www.jstor.org/stable/',                             -- protocol relative tested 2013-09-04
COinS = 'rft.jstor',
COinS = 'rft.jstor',
encode = true,
encode = true,
第438行: 第484行:
link = '美国国会图书馆控制码',
link = '美国国会图书馆控制码',
label = 'LCCN',
label = 'LCCN',
mode = 'external',
mode = 'manual',
prefix = 'http://lccn.loc.gov/',
prefix = 'http://lccn.loc.gov/',
COinS = 'rft.lccn',
COinS = 'rft.lccn',
第449行: 第495行:
label = 'MR',
label = 'MR',
mode = 'external',
mode = 'external',
prefix = 'http://www.ams.org/mathscinet-getitem?mr=',
prefix = '//www.ams.org/mathscinet-getitem?mr=',       -- protocol relative tested 2013-09-04
COinS = 'rft.mr',
COinS = 'rft.mr',
encode = true,
encode = true,
第463行: 第509行:
encode = true,
encode = true,
separator = '&nbsp;',
separator = '&nbsp;',
},
['OL'] = {
parameters = { 'ol', 'OL' },
link = '开放图书馆',
label = 'OL',
mode = 'manual',
COinS = 'info:olnum',
separator = '&nbsp;',
endode = true,
},
},
['OSTI'] = {
['OSTI'] = {
第469行: 第524行:
label = 'OSTI',
label = 'OSTI',
mode = 'external',
mode = 'external',
prefix = 'http://www.osti.gov/energycitations/product.biblio.jsp?osti_id=',
prefix = '//www.osti.gov/energycitations/product.biblio.jsp?osti_id=', -- protocol relative tested 2013-09-04
COinS = 'info:osti',
COinS = 'info:osti',
encode = true,
encode = true,
第478行: 第533行:
link = '公共医学中心',
link = '公共医学中心',
label = 'PMC',
label = 'PMC',
mode = 'external',
mode = 'manual',                                                                       -- changed to support unlinking of PMC identifier when article is embargoed
prefix = '//www.ncbi.nlm.nih.gov/pmc/articles/PMC',
prefix = '//www.ncbi.nlm.nih.gov/pmc/articles/PMC',
suffix = " ",
suffix = " ",
第489行: 第544行:
link = '公共医学识别码',
link = '公共医学识别码',
label = 'PMID',
label = 'PMID',
mode = 'external',
mode = 'manual',                                                                       -- changed from external manual to support PMID validation
prefix = '//www.ncbi.nlm.nih.gov/pubmed/',
prefix = '//www.ncbi.nlm.nih.gov/pubmed/',
COinS = 'info:pmid',
COinS = 'info:pmid',
第510行: 第565行:
label = 'SSRN',
label = 'SSRN',
mode = 'external',
mode = 'external',
prefix = 'http://ssrn.com/abstract=',
prefix = '//ssrn.com/abstract=',                                       -- protocol relative tested 2013-09-04
COinS = 'info:ssrn',
COinS = 'info:ssrn',
encode = true,
encode = true,
separator = '&nbsp;',
separator = '&nbsp;',
},
},
['ZBL'] = {
--[[ Hide unfinished cite newsgroup code so that long delayed update can take place
['USENETID'] = {
parameters = {'id', 'ID'},
link = 'Usenet',
label = 'Usenet:',
mode = 'external',
prefix = 'news:',
encode = false,
COinS = 'info:usenet',
separator = '&nbsp;',
},
]] ['ZBL'] = {
parameters = {'ZBL', 'zbl'},  
parameters = {'ZBL', 'zbl'},  
link = 'Zentralblatt MATH',
link = 'Zentralblatt MATH',