Module:Citation/CS1/Configuration: Difference between revisions
name changes, additional translations, and tweaks to bare url error
m>Dragons flight (sync to sandbox, error cat suppression by namespace, merge cite_web_title to bare_url, translation styling, reveal several errors) |
m>Dragons flight (name changes, additional translations, and tweaks to bare url error) |
||
Line 16: | Line 16: | ||
module. | module. | ||
]] | ]] | ||
citation_config. | citation_config.messages = { | ||
['published'] = 'published $1', | ['published'] = 'published $1', | ||
['lay summary'] = 'Lay summary', | ['lay summary'] = 'Lay summary', | ||
Line 33: | Line 33: | ||
['series'] = 'series', | ['series'] = 'series', | ||
['written'] = 'Written at $1', | ['written'] = 'Written at $1', | ||
['in'] = 'In', | |||
['et al'] = 'et al.', | ['et al'] = 'et al.', | ||
['subscription'] = '<span style="font-size:0.95em; font-size:90%; color:#555">(subscription required)</span>', | ['subscription'] = '<span style="font-size:0.95em; font-size:90%; color:#555">(subscription required)</span>', | ||
Line 45: | Line 46: | ||
['trans-italic-title'] = "[''$1'']", | ['trans-italic-title'] = "[''$1'']", | ||
['quoted-text'] = '"$1"', | ['quoted-text'] = '"$1"', | ||
['parameter'] = '<code>|$1=</code>', | |||
['parameter-separator'] = ', ', | |||
['parameter-final-separator'] = ', and ', | |||
['parameter-pair-separator'] = ' and ', | |||
-- Error output | -- Error output | ||
['hidden-error'] = '<span style="display:none;font-size:100%" class="error citation-comment">$1</span>', | ['hidden-error'] = '<span style="display:none;font-size:100%" class="error citation-comment">$1</span>', | ||
Line 58: | Line 64: | ||
['unknown_manual_ID'] = 'Unrecognized manual ID mode', | ['unknown_manual_ID'] = 'Unrecognized manual ID mode', | ||
['unknown_ID_mode'] = 'Unrecognized ID mode', | ['unknown_ID_mode'] = 'Unrecognized ID mode', | ||
['unknown_argument_map'] = 'Argument map not defined for this variable' | ['unknown_argument_map'] = 'Argument map not defined for this variable', | ||
['bare_url_no_origin'] = 'Bare url found but origin indicator is nil or empty', | |||
} | } | ||
-- | -- Aliases table for commonly passed parameters | ||
citation_config.aliases = { | |||
citation_config. | |||
['AccessDate'] = 'accessdate', | ['AccessDate'] = 'accessdate', | ||
['Agency'] = 'agency', | ['Agency'] = 'agency', | ||
Line 103: | Line 108: | ||
['LayDate'] = 'laydate', | ['LayDate'] = 'laydate', | ||
['LaySource'] = 'laysource', | ['LaySource'] = 'laysource', | ||
[' | ['LayURL'] = {'layurl', 'laysummary'}, | ||
['Minutes'] = 'minutes', | ['Minutes'] = 'minutes', | ||
['Month'] = 'month', | ['Month'] = 'month', | ||
Line 169: | Line 174: | ||
} | } | ||
-- | -- Default parameter values | ||
Default parameter values | citation_config.defaults = { | ||
citation_config. | |||
['DeadURL'] = 'yes', | ['DeadURL'] = 'yes', | ||
['PostScript'] = '.', | ['PostScript'] = '.', | ||
Line 195: | Line 198: | ||
citation_config.error_conditions = { | citation_config.error_conditions = { | ||
accessdate_missing_url = { | accessdate_missing_url = { | ||
message = '<code> | message = '<code>|accessdate=</code> requires <code>|url=</code>', | ||
anchor = 'accessdate_missing_url', | anchor = 'accessdate_missing_url', | ||
category = 'Pages using citations with accessdate and no URL', | category = 'Pages using citations with accessdate and no URL', | ||
hidden = true }, | hidden = true }, | ||
archive_missing_date = { | archive_missing_date = { | ||
message = '<code> | message = '<code>|archiveurl=</code> requires <code>|archivedate=</code>', | ||
anchor = 'archive_missing_date', | anchor = 'archive_missing_date', | ||
category = 'Pages with archiveurl citation errors', | category = 'Pages with archiveurl citation errors', | ||
hidden = false }, | hidden = false }, | ||
archive_missing_url = { | archive_missing_url = { | ||
message = '<code> | message = '<code>|archiveurl=</code> requires <code>|url=</code>', | ||
anchor = 'archive_missing_url', | anchor = 'archive_missing_url', | ||
category = 'Pages with archiveurl citation errors', | category = 'Pages with archiveurl citation errors', | ||
hidden = false }, | hidden = false }, | ||
bad_doi = { | bad_doi = { | ||
message = 'Check <code> | message = 'Check <code>|doi=</code> value', | ||
anchor = 'bad_doi', | anchor = 'bad_doi', | ||
category = 'Pages with DOI errors', | category = 'Pages with DOI errors', | ||
hidden = false }, | hidden = false }, | ||
bad_isbn = { | bad_isbn = { | ||
message = 'Check <code> | message = 'Check <code>|isbn=</code> value', | ||
anchor = 'bad_isbn', | anchor = 'bad_isbn', | ||
category = 'Pages with ISBN errors', | category = 'Pages with ISBN errors', | ||
hidden = false }, | hidden = false }, | ||
bad_ol = { | bad_ol = { | ||
message = 'Check <code> | message = 'Check <code>|ol=</code> value', | ||
anchor = 'bad_ol', | anchor = 'bad_ol', | ||
category = 'Pages with OL errors', | category = 'Pages with OL errors', | ||
hidden = false }, | hidden = false }, | ||
bad_url = { | bad_url = { | ||
message = 'Check <code> | message = 'Check <code>|url=</code> scheme', | ||
anchor = 'bad_url', | anchor = 'bad_url', | ||
category = 'Pages with URL errors', | category = 'Pages with URL errors', | ||
hidden = false }, | hidden = false }, | ||
bare_url_missing_title = { | bare_url_missing_title = { | ||
message = ' | message = '$1 missing title', | ||
anchor = 'bare_url_missing_title', | anchor = 'bare_url_missing_title', | ||
category = 'Pages with citations having bare URLs', | category = 'Pages with citations having bare URLs', | ||
hidden = false }, | hidden = false }, | ||
citation_missing_title = { | citation_missing_title = { | ||
message = 'Missing or empty <code> | message = 'Missing or empty <code>|title=</code>', | ||
anchor = 'citation_missing_title', | anchor = 'citation_missing_title', | ||
category = 'Pages with citations lacking titles', | category = 'Pages with citations lacking titles', | ||
hidden = false }, | hidden = false }, | ||
cite_web_url = { | cite_web_url = { | ||
message = 'Missing or empty <code> | message = 'Missing or empty <code>|url=</code>', | ||
anchor = 'cite_web_url', | anchor = 'cite_web_url', | ||
category = 'Pages using web citations with no URL', | category = 'Pages using web citations with no URL', | ||
Line 250: | Line 253: | ||
hidden = false }, | hidden = false }, | ||
extra_pages = { | extra_pages = { | ||
message = 'Extra <code> | message = 'Extra <code>|pages=</code> or <code>|at=</code>', | ||
anchor = 'extra_pages', | anchor = 'extra_pages', | ||
category = 'Pages with citations using conflicting page specifications', | category = 'Pages with citations using conflicting page specifications', | ||
hidden = false }, | hidden = false }, | ||
format_missing_url = { | format_missing_url = { | ||
message = '<code> | message = '<code>|format=</code> requires <code>|url=</code>', | ||
anchor = 'format_missing_url', | anchor = 'format_missing_url', | ||
category = 'Pages using citations with format and no URL', | category = 'Pages using citations with format and no URL', | ||
hidden = true }, | hidden = true }, | ||
implict_etal_author = { | implict_etal_author = { | ||
message = '<code> | message = '<code>|displayauthors=</code> suggested', | ||
anchor = 'displayauthors', | anchor = 'displayauthors', | ||
category = 'Pages using citations with old-style implicit et al.', | category = 'Pages using citations with old-style implicit et al.', | ||
hidden = true }, | hidden = true }, | ||
implict_etal_editor = { | implict_etal_editor = { | ||
message = '<code> | message = '<code>|displayeditors=</code> suggested', | ||
anchor = 'displayeditors', | anchor = 'displayeditors', | ||
category = 'Pages using citations with old-style implicit et al.', | category = 'Pages using citations with old-style implicit et al.', | ||
hidden = true }, | hidden = true }, | ||
parameter_ignored = { | parameter_ignored = { | ||
message = 'Unknown parameter <code> | message = 'Unknown parameter <code>|$1=</code> ignored', | ||
anchor = 'parameter_ignored', | anchor = 'parameter_ignored', | ||
category = 'Pages with citations using unsupported parameters', | category = 'Pages with citations using unsupported parameters', | ||
hidden = false }, | hidden = false }, | ||
parameter_ignored_suggest = { | parameter_ignored_suggest = { | ||
message = 'Unknown parameter <code> | message = 'Unknown parameter <code>|$1=</code> ignored (<code>|$2=</code> suggested)', | ||
anchor = 'parameter_ignored_suggest', | anchor = 'parameter_ignored_suggest', | ||
category = 'Pages with citations using unsupported parameters', | category = 'Pages with citations using unsupported parameters', | ||
Line 290: | Line 293: | ||
hidden = false }, | hidden = false }, | ||
trans_missing_chapter = { | trans_missing_chapter = { | ||
message = '<code> | message = '<code>|trans-chapter=</code> requires <code>|chapter=</code>', | ||
anchor = 'trans_missing_chapter', | anchor = 'trans_missing_chapter', | ||
category = 'Pages with citations using translated terms without the original', | category = 'Pages with citations using translated terms without the original', | ||
hidden = false }, | hidden = false }, | ||
trans_missing_title = { | trans_missing_title = { | ||
message = '<code> | message = '<code>|trans-title=</code> requires <code>|title=</code>', | ||
anchor = 'trans_missing_title', | anchor = 'trans_missing_title', | ||
category = 'Pages with citations using translated terms without the original', | category = 'Pages with citations using translated terms without the original', |