Module:Citation/CS1/Configuration

𨀈𬧐: 調向尋檢

Documentation for this module may be created at Module:Citation/CS1/Configuration/doc


local citation_config = {};

-- override <code>...</code> styling to remove color, border, and padding.  <code> css is specified here:
-- https://git.wikimedia.org/blob/mediawiki%2Fcore.git/69cd73811f7aadd093050dbf20ed70ef0b42a713/skins%2Fcommon%2FcommonElements.css#L199
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 >------------------------------

List of namespaces that should not be included in citation error categories.  Same as setting notracking = true by default

Note: Namespace names should use underscores instead of spaces.

]]
local uncategorized_namespaces = { 'Thành_viên', 'Thảo_luận', 'Thảo_luận_Thành_viên', 'Thảo_luận_Wikipedia', 'Thảo_luận_Tập_tin', 'Thảo_luận_Bản_mẫu',
	'Thảo_luận_Trợ_giúp', 'Thảo_luận_Thể_loại', 'Thảo_luận_Chủ_đề',
	'Thảo_luận_Mô_đun', 'Thảo_luận_MediaWiki' };

local uncategorized_subpages = {'/[Ss]andbox', '/[Tt]hử', '/[Tt]estcases', '/[Kk]iểm[_ ]thử'};		-- list of Lua patterns found in page names of pages we should not categorize

--[[--------------------------< M E S S A G E S >--------------------------------------------------------------

Translation table

The following contains fixed text that may be output as part of a citation.
This is separated from the main body to aid in future translations of this
module.

]]

local messages = {
  ['published'] = 'xuất bản $1',
  ['lay summary'] = 'Tóm lược dễ hiểu',
  ['retrieved'] = 'Truy cập $1',
  ['inactive'] = 'không tích cực',
  ['archived-dead'] = '$1 lưu trữ $2',
  ['archived-not-dead'] = 'Bản gốc $1 $2',
  ['archived-missing'] = 'Bản gốc$1 lưu trữ $2',
  ['archived'] = 'lưu trữ',
  ['original'] = 'Bản gốc',
  ['editor'] = 'biên tập',
  ['editors'] = 'biên tập', 
  ['edition'] = '(ấn bản $1)', 
  ['episode'] = 'Tập $1',
  ['season'] = 'Mùa $1', 
  ['series'] = 'Loạt $1',
  ['cartography'] = '$1 thiết kế bản đồ',
  ['section'] = '§ $1',
  ['sections'] = '§§ $1',
  ['inset'] = 'Bản đồ lồng $1',
  ['written'] = 'Soạn tại $1',
  ['in'] = 'Trong',
  ['et al'] = 'và đồng nghiệp',
  
  ['subscription'] = '<span style="font-size:0.95em; font-size:90%; color:#555">(cần đăng ký mua (<span title="Các nguồn gốc không nhất thiết phải có sẵn trực tuyến. Các nguồn gốc trực tuyến không nhất thiết phải có sẵn miễn phí. Trang Web này có thể yêu cầu đăng ký mua quyền truy cập." style="border-bottom:1px dotted;cursor:help">trợ giúp</span>))</span>' ..
  	'[[Thể loại:Trang chứa liên kết với nội dung chỉ dành cho người đăng ký mua]]', 

  ['registration']='<span style="font-size:0.95em; font-size:90%; color:#555">(cần đăng ký (<span title="Các nguồn gốc không nhất thiết phải có sẵn trực tuyến. Các nguồn gốc trực tuyến không nhất thiết phải có sẵn miễn phí. Trang Web này có thể yêu cầu đăng nhập." style="border-bottom:1px dotted;cursor:help">trợ giúp</span>))</span>' ..
  	'[[Thể loại:Trang có nguồn tham khảo cần đăng ký]]',
  
  ['language'] = '(bằng tiếng $1)', 
  ['via'] = " &ndash; qua $1",
  ['event'] = 'Sự kiện xảy ra vào lúc',
  ['minutes'] = 'phút',

  ['parameter-separator'] = ', ',
  ['parameter-final-separator'] = ', và ',
  ['parameter-pair-separator'] = ' và ',

  -- Determines the location of the help page
  ['help page link'] = ':en:Help:CS1 errors',
  ['help page label'] = 'trợ giúp',
  
  -- Internal errors (should only occur if configuration is bad)
  ['undefined_error'] = 'Xuất hiện lỗi bất ngờ',
  ['unknown_manual_ID'] = 'Chế độ ID thủ công không rõ',
  ['unknown_ID_mode'] = 'Chế độ ID không rõ',
  ['unknown_argument_map'] = 'Ánh xạ đối số không được định rõ cho biến số này',
  ['bare_url_no_origin'] = 'Đã tìm thấy URL thô nhưng phần chỉ nguồn gốc là vô giá trị (nil) hoặc trống',
}

--[[--------------------------< P R E S E N T A T I O N >------------------------------------------------------

Fixed presentation markup.  Originally part of citation_config.messages it has been moved into its own, more semantically
correct place.

]]
local presentation = 
	{
	-- Error output
	-- .error class is specified at https://git.wikimedia.org/blob/mediawiki%2Fcore.git/9553bd02a5595da05c184f7521721fb1b79b3935/skins%2Fcommon%2Fshared.css#L538
	-- .citation-comment class is specified at Help:CS1_errors#Controlling_error_message_display
	['hidden-error'] = '<span style="display:none;font-size:100%" class="error citation-comment">$1</span>',
	['visible-error'] = '<span style="font-size:100%" class="error citation-comment">$1</span>',

	['accessdate'] = '<span class="reference-accessdate">$1$2</span>',			-- to allow editors to hide accessdate using personal css

	['bdi'] = '<bdi$1>$2</bdi>',												-- bidirectional isolation used with |script-title= and the like

	['format'] = ' <span style="font-size:85%;">($1)</span>',					-- for |format=, |chapter-format=, etc

	['italic-title'] = "''$1''",

	['kern-left'] = '<span style="padding-left:0.2em;">$1</span>$2',			-- spacing to use when title contains leading single or double quote mark
	['kern-right'] = '$1<span style="padding-right:0.2em;">$2</span>',			-- spacing to use when title contains trailing single or double quote mark

	['nowrap1'] = '<span class="nowrap">$1</span>',								-- for nowrapping an item: <span ...>yyyy-mm-dd</span>
	['nowrap2'] = '<span class="nowrap">$1</span> $2',							-- for nowrapping portions of an item: <span ...>dd mmmm</span> yyyy (note white space)
	
	['parameter'] = '<code style="'..code_style..'">&#124;$1=</code>',

	['quoted-text'] = '<q>$1</q>',												-- for wrapping |quote= content
	['quoted-title'] = '“$1”',

	['trans-italic-title'] = "&#91;''$1''&#93;",
	['trans-quoted-title'] = "&#91;$1&#93;",
	}

--[[--------------------------< A L I A S E S >----------------------------------------------------------------

Aliases table for commonly passed parameters

]]

local aliases = {
	['AccessDate'] = {'access-date', 'accessdate', 'ngày truy cập', 'ngày truy nhập'},
	['Agency'] = {'agency', 'thông tấn xã', 'hãng thông tấn', 'hãng tin tức'},
	['AirDate'] = {'air-date', 'airdate', 'ngày phát'},
	['ArchiveDate'] = {'archive-date', 'archivedate', 'ngày lưu trữ'},
	['ArchiveFormat'] = {'archive-format', 'định dạng lưu trữ'},
	['ArchiveURL'] = {'archive-url', 'archiveurl', 'url lưu trữ'},
	['ASINTLD'] = {'ASIN-TLD', 'asin-tld', 'TLD ASIN', 'tên miền cấp cao nhất ASIN'},
	['At'] = 'at',
	['Authors'] = {'authors', 'people', 'host', 'credits', 'các tác giả', 'xướng ngôn viên'},
	['AuthorFormat'] = {'author-format', 'authorformat', 'định dạng tác giả'},						-- deprecated in favor of NameListFormat;
	['AuthorSeparator'] = {'author-separator', 'phân tách tác giả'},									-- deprecated
	['AuthorNameSeparator'] = {'author-name-separator', 'phân tách tên tác giả'},							-- deprecated
	['Began'] = {'began', 'khởi chiếu'},														-- cite episode and cite series
	['BookTitle'] = {'book-title', 'booktitle', 'tên sách'},
	['Callsign'] = {'call-sign', 'callsign', 'tên hiệu'},									-- chú thích phỏng vấn
	['Cartography'] = {'cartography', 'thiết kế bản đồ'},
	['Chapter'] = {'chapter', 'contribution', 'entry', 'article', 'section', 'chương', 'mục'},
	['ChapterFormat'] = {'chapter-format', 'contribution-format', 'section-format', 'định dạng chương', 'định dạng mục'};
	['ChapterLink'] = {'chapter-link', 'chapterlink', 'lk chương', 'liên kết chương'},							-- deprecated; remove after 1 January 2015?
	['ChapterURL'] = {'chapter-url', 'chapterurl', 'contribution-url', 'contributionurl', 'section-url', 'sectionurl', 'url chương'},
	['City'] = {'city', 'thành phố'},															-- cite interview
	['Class'] = {'class', 'lớp'},
        ['Collaboration'] = {'collaboration', 'cộng tác'},													-- cite arxiv and arxiv identifiers
	['Coauthors'] = {'coauthors', 'coauthor', 'đồng tác giả'},									-- coauthor and coauthors are deprecated; remove after 1 January 2015?
	['Cointerviewers'] = {'cointerviewers', 'đồng phỏng vấn'},		-- cite interview
	['Conference'] = {'conference', 'event', 'hội nghị', 'sự kiện'},
	['ConferenceFormat'] = {'conference-format', 'event-format', 'định dạng hội nghị', 'định dạng sự kiện'},
	['ConferenceURL'] = {'conference-url', 'conferenceurl', 'event-url', 'eventurl', 'url hội nghị', 'địa chỉ hội nghị', 'url sự kiện', 'địa chỉ sự kiện'},
	['Date'] = {'date', 'air-date', 'airdate', 'ngày tháng', 'ngày', 'ngày phát'},
	['DeadURL'] = {'dead-url', 'deadurl', 'url hư', 'url hỏng', 'địa chỉ hư', 'địa chỉ hỏng'},
	['Degree'] = {'degree', 'học vị'},
	['DisplayAuthors'] = {'display-authors', 'displayauthors', 'số tác giả'},
	['DisplayEditors'] = {'display-editors', 'displayeditors', 'số biên tập viên', 'số biên tập'},
	['Docket'] = {'docket', 'sổ hiệu'},
	['DoiBroken'] = {'doi-broken', 'doi-broken-date', 'doi-inactive-date', 'doi_brokendate', 'doi_inactivedate', 'ngày hư DOI', 'DOI hư', 'DOI hỏng'},
	['Edition'] = {'edition', 'ấn bản', 'bản thứ', 'lần in'},
	['Editors'] = {'editors', 'các biên tập viên'},
	['EditorFormat'] = {'editor-format', 'editorformat', "định dạng biên tập viên", "định dạng biên tập"},						-- deprecated in favor of NameListFormat;
	['EditorSeparator'] = {'editor-separator', 'phân tách biên tập viên', 'phân tách biên tập'},									-- deprecated
	['EditorNameSeparator'] = {'editor-name-separator', 'phân tách tên biên tập viên', 'phân tách tên biên tập'},							-- deprecated
	['Embargo'] = {'embargo', 'cấm vận'},
	['Encyclopedia'] = {'encyclopedia', 'encyclopaedia', 'bách khoa toàn thư', 'bách khoa thư', 'từ điển bách khoa'},						-- this one only used by citation
	['Ended'] = {'ended', 'kết thúc'},														-- cite episode and cite series
	['Episode'] = {'episode', 'phần', 'tập'},													-- cite serial only TODO: make available to cite episode?
	['Format'] = {'format', 'định dạng'},
	['ID'] = {'id', 'ID', 'mã số', 'docket', 'số ghi án'},
	['IgnoreISBN'] = {'ignore-isbn-error', 'ignoreisbnerror', 'bỏ qua lỗi ISBN'},
	['Inset'] = {'inset', 'bản đồ lồng'},
	['Issue'] = {'issue', 'number', 'số'},
	['Language'] = {'language', 'in', 'ngôn ngữ', 'lang'},
	['LastAuthorAmp'] = {'last-author-amp', 'lastauthoramp', 'và tác giả cuối'},
	['LayDate'] = {'lay-date', 'laydate', 'ngày tóm lược'},
	['LayFormat'] = {'lay-format', 'định dạng tóm lược'},
	['LaySource'] = {'lay-source', 'laysource', 'nguồn tóm lược'},
	['LayURL'] = {'lay-url', 'lay-summary', 'layurl', 'laysummary', 'tóm lược dễ hiểu', 'url dễ hiểu'},
	['MailingList'] = {'mailinglist', 'mailing-list', 'danh sách thư'},							-- cite mailing list only
	['Map'] = {'map', 'bản đồ'},															-- cite map only
	['MapFormat'] = {'map-format', 'định dạng bản đồ'},												-- cite map only
	['MapURL'] = {'mapurl', 'map-url', 'url bản đồ'},											-- cite map only
	['MessageID'] = {'message-id', 'ID thông điệp'},
	['Minutes'] = {'minutes', 'phút'},
	['Mode'] = {'mode', 'chế độ'},
	['Month'] = {'month', 'tháng'},														-- deprecated; remove after 1 January 2015?
	['NameListFormat'] = {'name-list-format', 'author-format', 'authorformat', 'editor-format', 'editorformat', 'định dạng danh sách tên', 'định dạng tác giả', 'định dạng biên tập viên'},
	['NameSeparator'] = {'name-separator', 'phân tách tên'},										-- deprecated
	['Network'] = {'network', 'mạng'},
	['NoPP'] = {'no-pp', 'nopp', 'không trang'},
	['NoTracking'] = {'template-doc-demo', 'template doc demo', 'no-cat', 'nocat', 
		'no-tracking', 'notracking'},
	['OrigYear'] = {'orig-year', 'origyear', 'năm gốc'},
	['Others'] = {'others', 'interviewer', 'interviewers', 'nguời khác', 'người phỏng vấn'},
	['Page'] = {'p', 'page', 'trang', 'tr'},
	['Pages'] = {'pp', 'pages', 'các trang'},
	['Periodical'] = {'journal', 'tạp chí', 'newspaper', 'báo', 'magazine', 'work', 'tác phẩm', 'công trình',
		'website',  'periodical', 'encyclopedia', 'encyclopaedia', 'bách khoa toàn thư',
	    'bách khoa thư', 'từ điển bách khoa', 'dictionary', 'từ điển', 'tự điển'},
	['Place'] = {'place', 'location', 'nơi', 'city', 'thành phố', 'vị trí', 'địa điểm'},
	['PPrefix'] = {'p-prefix', 'PPrefix', 'tiền tố trang'},
	['PPPrefix'] = {'pp-prefix', 'PPPrefix', 'tiền tố các trang'},
	['Program'] = {'program', 'chương trình'},													-- cite interview
	['PostScript'] = {'postscript', 'tái bút'},
	['PublicationDate'] = {'publicationdate', 'publication-date', 'ngày xuất bản'},
	['PublicationPlace'] = {'publication-place', 'publicationplace', 'nơi xuất bản', 'thành phố xuất bản'},
	['PublisherName'] = {'publisher', 'distributor', 'institution', 'newsgroup', 'nhà xuất bản', 'nxb', 'nhà phân phối', 'học viện', 'nhóm tin', 'nhóm tin tức'},
	['Quote'] = {'quote', 'quotation', 'trích dẫn'},
	['Ref'] = {'ref', 'Ref', 'tham khảo'},
	['RegistrationRequired'] = {'registration', 'đăng ký', 'đăng kí'},
	['Scale'] = {'scale', 'tỷ lệ', 'tỉ lệ'},
	['ScriptTitle'] = {'script-title', 'tiêu đề chữ khác'},
	['Section'] = 'section',
	['Season'] = {'season', 'mùa'},
	['Sections'] = 'sections',													-- cite map only
	['Separator'] = {'separator', 'phân tách'},												-- deprecated in favor of Mode
	['Series'] = {'series', 'version', 'đợt', 'loạt'},
	['SeriesSeparator'] = {'series-separator', 'phân tách đợt', 'phân tách loạt'},
	['SeriesLink'] = {'series-link', 'serieslink', 'lk loạt', 'liên kết loạt'},
	['SeriesNumber'] = {'series-number', 'series-no', 'seriesnumber', 'seriesno', 'số loạt'},
	['Sheet'] = {'sheet', 'tờ'},														-- cite map only
	['Sheets'] = {'sheets', 'các tờ'},														-- cite map only
	['Station'] = {'station', 'kênh', 'đài'},
	['SubscriptionRequired'] = {'subscription', 'đăng ký', 'đăng kí', 'đăng nhập', 'trả tiền', 'mua'},
	['Time'] = {'time', 'thời gian', 'thì giờ'},
	['TimeCaption'] = {'time-caption', 'timecaption', 'chú thích thời gian', 'chú thích thì giờ'},
	['Title'] = {'title', 'tựa đề', 'tiêu đề', 'tên bài'},
	['TitleLink'] = {'title-link', 'episode-link', 'titlelink', 'episodelink', 'lk tựa đề', 'liên kết tựa đề',
	    'lk tiêu đề', 'liên kết tiêu đề', 'lk tên bài', 'liên kết tên bài',
	    'lk phần', 'liên kết phần'},
	['TitleNote'] = {'department', 'tờ'},
	['TitleType'] = {'type', 'medium', 'kiểu', 'phương tiện'},
	['TransChapter'] = {'trans-chapter', 'trans_chapter', 'dịch chương'},
	['TransMap'] = {'trans-map', 'dịch bản đồ'},													-- cite map only
	['Transcript'] = {'transcript', 'bản sao'},
	['TranscriptFormat'] = {'transcript-format', 'định dạng bản sao'},
	['TranscriptURL'] = {'transcript-url', 'transcripturl', 'lk bản sao', 'liên kết bản sao'},
	['TransTitle'] = {'trans-title', 'trans_title', 'dịch tựa đề', 'dịch tiêu đề', 'dịch tên bài'},
	['URL'] = {'url', 'URL', 'địa chỉ'},
	['Vauthors'] = 'vauthors',
	['Veditors'] = 'veditors',
	['Via'] = {'via', 'qua'},
	['Volume'] = {'volume', 'cuốn', 'vol'},
	['Year'] = {'year', 'năm'},

	['AuthorList-First'] = {"first#", "given#", "author-first#", "author#-first", "tên #"},
	['AuthorList-Last'] = {"last#", "author#", "surname#", "author-last#", "author#-last", "subject#", "Author#", "họ #", "tác giả #"},
	['AuthorList-Link'] = {"authorlink#", "author-link#", "author#-link", "subjectlink#", "author#link", "subject-link#", "subject#-link", "subject#link", "lk tác giả #"},
	['AuthorList-Mask'] = {"author-mask#", "authormask#", "author#mask", "author#-mask"},
	
	['EditorList-First'] = {"editor-first#", "editor#-first", "editor-given#", "editor#-given", "EditorGiven#", "tên biên tập #", "tên biên tập viên #"},
	['EditorList-Last'] = {"editor#", "editor-last#", "editor#-last", "editor-surname#", "editor#-surname", "EditorSurname#", "Editor#", "họ biên tập #", "họ biên tập viên #"},
	['EditorList-Link'] = {"editor-link#", "editor#-link", "editorlink#", "editor#link", "lk biên tập #", "liên kết biên tập #", "lk biên tập viên #", "liên kết biên tập viên #"},
	['EditorList-Mask'] = {"editor-mask#", "editor#-mask", "editormask#", "editor#mask"},
}

--[[--------------------------< D E F A U L T S >--------------------------------------------------------------

-- Default parameter values

]]

local defaults = {
	['DeadURL'] = 'yes',
	['PPrefix'] = "tr.&nbsp;",
	['PPPrefix'] = "tr.&nbsp;",
}

--[[--------------------------< V O L U M E ,  I S S U E ,  P A G E S >----------------------------------------

These tables hold cite class values (from the template invocation) and identify those templates that support
|volume=, |issue=, and |page(s)= parameters.  Cite conference and cite map require further qualification which
is handled in the main module.

]]

local templates_using_volume = {'citation', 'audio-visual', 'book', 'conference', 'encyclopaedia', 'interview', 'journal', 'magazine', 'map', 'news', 'report', 'techreport'}
local templates_using_issue = {'citation', 'conference', 'episode', 'interview', 'journal', 'magazine', 'map', 'news'}
local templates_not_using_page = {'audio-visual', 'episode', 'mailinglist', 'newsgroup', 'podcast', 'serial', 'sign', 'speech'}



--[[--------------------------< K E Y W O R D S >--------------------------------------------------------------

This table holds keywords for those parameters that have defined sets of acceptible keywords.

]]

local keywords = {
	['yes_true_y'] = {'yes', 'true', 'y'},										-- ignore-isbn-error, last-author-amp, no-tracking, nopp, registration, subscription
	['deadurl'] = {'yes', 'true', 'y', 'no', 'unfit', 'usurped'},
	['mode'] = {'cs1', 'cs2'},
	['name-list-format'] = {'vanc'},
	['contribution'] = {'afterword', 'foreword', 'introduction', 'preface'},	-- generic contribution titles that are rendered unquoted in the 'chapter' position
	['date-format'] = {'dmy', 'dmy-all', 'mdy', 'mdy-all', 'ymd', 'ymd-all'}
}


--[[--------------------------< I N V I S I B L E _ C H A R A C T E R S >--------------------------------------

This table holds non-printing or invisible characters indexed either by name or by Unicode group. Values are decimal
representations of UTF-8 codes.  The table is organized as a table of tables because the lua pairs keyword returns
table data in an arbitrary order.  Here, we want to process the table from top to bottom because the entries at
the top of the table are also found in the ranges specified by the entries at the bottom of the table.

This list contains patterns for templates like {{'}} which isn't an error but transcludes characters that are
invisible.  These kinds of patterns must be recognized by the functions that use this list.

Also here is a pattern that recognizes stripmarkers that begin and end with the delete characters.  The nowiki
stripmarker is not an error but some others are because the parameter values that include them become part of the
template's metadata before stripmarker replacement.

]]

local invisible_chars = {
	{'replacement', '\239\191\189'},											-- U+FFFD, EF BF BD
--	{'apostrophe', '&zwj;\226\128\138\039\226\128\139'},						-- apostrophe template: &zwj; hair space ' zero-width space; not an error
	{'apostrophe', '\226\128\138\039\226\128\139'},								-- apostrophe template: hair space ' zero-width space; (as of 2015-12-11) not an error
	{'zero width joiner', '\226\128\141'},										-- U+200D, E2 80 8D
	{'zero width space', '\226\128\139'},										-- U+200B, E2 80 8B
	{'hair space', '\226\128\138'},												-- U+200A, E2 80 8A
	{'soft hyphen', '\194\173'},												-- U+00AD, C2 AD
	{'horizontal tab', '\009'},													-- U+0009 (HT), 09
	{'line feed', '\010'},														-- U+000A (LF), 0A
	{'carriage return', '\013'},												-- U+000D (CR), 0D
--	{'nowiki stripmarker', '\127UNIQ%-%-nowiki%-[%a%d]+%-QINU\127'},			-- nowiki stripmarker; not an error
	{'stripmarker', '\127UNIQ%-%-(%a+)%-[%a%d]+%-QINU\127'},					-- stripmarker; may or may not be an error; capture returns the stripmaker type
	{'delete', '\127'},															-- U+007F (DEL), 7F; must be done after stripmarker test
	{'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
}

--[[--------------------------< M A I N T E N A N C E _ C A T E G O R I E S >----------------------------------

Here we name maintenance categories to be used in maintenance messages.

]]

local maint_cats = {
	['ASIN'] = 'Bảo trì CS1: ASIN sử dụng ISBN',
	['date_year'] = 'Bảo trì CS1: Ngày và năm',
	['disp_auth_ed'] = 'Bảo trì CS1: display-$1',									-- $1 is authors or editors
	['embargo'] = 'Bảo trì CS1: Lệnh cấm vận PMC đã hết hạn',
	['vietnamese'] = 'Bảo trì CS1: Định rõ tiếng Việt',
	['etal'] = 'Bảo trì CS1: Định rõ "và đồng nghiệp"',
	['extra_text'] = 'Bảo trì CS1: Văn bản dư',
	['unknown_lang'] = 'Bảo trì CS1: Ngôn ngữ không rõ',
	['untitled'] = 'Bảo trì CS1: Tạp chí không tên',
	}

--[[--------------------------< P R O P E R T I E S _ C A T E G O R I E S >------------------------------------

Here we name properties categories

]]

local prop_cats = {
	['foreign_lang_source'] = 'Nguồn CS1 tiếng $1 ($2)',					-- |language= categories; $1 is language name, $2 is ISO639-1 code
	['script'] = 'Nguồn CS1 có hệ thống viết khác',							-- when language specified by |script-title=xx: doesn't have its own category
	['script_with_name'] = 'Nguồn CS1 có chữ $1 ($2)',					-- |script-title=xx: has matching category; $1 is language name, $2 is ISO639-1 code
	}



--[[--------------------------< T I T L E _ T Y P E S >--------------------------------------------------------

Here we map a template's CitationClass to TitleType

]]

local title_types = {
	['AV-media-notes'] = 'Chú thích phương tiện',
	['DVD-notes'] = 'Chú thích phương tiện',
	['mailinglist'] = 'Danh sách thư',
	['map'] = 'Bản đồ',
	['podcast'] = 'Podcast',
	['pressrelease'] = 'Thông cáo báo chí',
	['report'] = 'Bản báo cáo',
	['techreport'] = 'Bản báo cáo kỹ thuật',
	['thesis'] = 'Luận văn',
	}

--[=[--------------------------< E R R O R _ C O N D I T I O N S >----------------------------------------------

Error condition table

The following contains a list of IDs for various error conditions defined in the 
code.  For each ID, we specify a text message to display, an error category to
include, and whether the error message should be wrapped as a hidden comment.

Anchor changes require identical changes to matching anchor in [[en:Help:CS1 errors]].

]=]

local error_conditions = {
	accessdate_missing_url = {
		message = '<code style="'..code_style..'">&#124;|ngày truy cập=</code> cần <code style="'..code_style..'">&#124;url=</code>',
		anchor = 'accessdate_missing_url',
		category = 'Trang có chú thích thiếu ngày truy cập và URL',
		hidden = true },
	archive_missing_date = {
		message = '<code style="'..code_style..'">&#124;url lưu trữ=</code> cần <code style="'..code_style..'">&#124;ngày lưu trữ=</code>',
		anchor = 'archive_missing_date',
		category = 'Trang có lỗi chú thích URL lưu trữ',
		hidden = false },
	archive_missing_url = {
		message = '<code style="'..code_style..'">&#124;url lưu trữ=</code> cần <code style="'..code_style..'">&#124;url=</code>',
		anchor = 'archive_missing_url',
		category = 'Trang có lỗi chú thích URL lưu trữ',
		hidden = false },
	arxiv_missing = {
		message = 'Cần <code style="'..code_style..'">&#124;arxiv=</code>',
		anchor = 'arxiv_missing',
		category = 'Lỗi CS1: arXiv',											-- same as bad arxiv
		hidden = false },
	arxiv_params_not_supported = {
		message = 'Tham số không được hỗ trợ trong {{[[Bản mẫu:Chú thích arXiv|chú thích arXiv]]}}',
		anchor = 'arxiv_params_not_supported',
		category = 'Lỗi CS1: arXiv',											-- same as bad arxiv
		hidden = false },
	bad_arxiv = {
		message = 'Kiểm tra giá trị <code style="'..code_style..'">&#124;arxiv=</code>',
		anchor = 'bad_arxiv',
		category = 'Lỗi CS1: arXiv',
		hidden = false },
	bad_asin = {
		message = 'Kiểm tra giá trị <code style="'..code_style..'">&#124;asin=</code>',
		anchor = 'bad_asin',
		category ='Lỗi CS1: ASIN',
		hidden = false },
	bad_authorlink = {
		message = 'Kiểm tra giá trị <code style="'..code_style..'">&#124;lk tác giả=</code>',
		anchor = 'bad_authorlink',
		category = 'Lỗi CS1: lk tác giả',
		hidden = false },
	bad_date = {
		message = 'Kiểm tra giá trị ngày tháng trong: <code style="'..code_style..'">$1</code>',
		anchor = 'bad_date',
		category = 'Lỗi CS1: ngày tháng',
		hidden = false },
	bad_doi = {
		message = 'Kiểm tra giá trị <code style="'..code_style..'">&#124;doi=</code>',
		anchor = 'bad_doi',
		category = 'Trang có lỗi DOI',
		hidden = false },
	bad_isbn = {
		message = 'Kiểm tra giá trị <code style="'..code_style..'">&#124;isbn=</code>',
		anchor = 'bad_isbn',
		category = 'Trang có lỗi ISBN',
		hidden = false },
	bad_ismn = {
		message = 'Kiểm tra giá trị <code style="'..code_style..'">&#124;ismn=</code>',
		anchor = 'bad_ismn',
		category = 'Lỗi CS1: ISMN',
		hidden = false },
	bad_issn = {
		message = 'Kiểm tra giá trị <code style="'..code_style..'">&#124;issn=</code>',
		anchor = 'bad_issn',
		category = 'Lỗi CS1: ISSN',
		hidden = false },
	bad_lccn = {
		message = 'Kiểm tra giá trị <code style="'..code_style..'">&#124;lccn=</code>',
		anchor = 'bad_lccn',
		category = 'Lỗi CS1: LCCN',
		hidden = false },
	bad_message_id = {
		message = 'Kiểm tra giá trị <code style="'..code_style..'">&#124;message-id=</code>',
		anchor = 'bad_message_id',
		category = 'Lỗi CS1: message-id',
		hidden = false },
	bad_ol = {
		message = 'Kiểm tra giá trị <code style="'..code_style..'">&#124;ol=</code>',
		anchor = 'bad_ol',
		category = 'Trang có lỗi OL',
		hidden = false },
	bad_pmc = {
		message = 'Kiểm tra giá trị <code style="'..code_style..'">&#124;pmc=</code>',
		anchor = 'bad_pmc',
		category = 'Lỗi CS1: PMC',
		hidden = false },
	bad_pmid = {
		message = 'Kiểm tra giá trị <code style="'..code_style..'">&#124;pmid=</code>',
		anchor = 'bad_pmid',
		category = 'Lỗi CS1: PMID',
		hidden = false },
	bad_url = {
		message = 'Kiểm tra giao thức <code style="'..code_style..'">&#124;url=</code>',
		anchor = 'bad_url',
		category = 'Trang có lỗi URL',
		hidden = false },
	bare_url_missing_title = {
		message = '$1 bị thiếu',
		anchor = 'bare_url_missing_title',
		category = 'Trang có URL không tên trong chú thích',
		hidden = false },
	chapter_ignored = {
		message = '<code style="'..code_style..'">&#124;chương=</code> bị bỏ qua',
		anchor = 'chapter_ignored',
		category = 'Lỗi CS1: chương bị bỏ qua',
		hidden = false },
	citation_missing_title = {
		message = '<code style="'..code_style..'">&#124;tựa đề=</code> trống hay bị thiếu',
		anchor = 'citation_missing_title',
		category = 'Trang có chú thích thiếu tựa đề',
		hidden = false },
	cite_web_url = {															-- this error applies to cite web and to cite podcast
		message = '<code style="'..code_style..'">&#124;url=</code> trống hay bị thiếu',
		anchor = 'cite_web_url',
		category = 'Trang có chú thích Web thiếu URL',
		hidden = true },
	coauthors_missing_author = {
		message = '<code style="'..code_style..'">&#124;đồng tác giả=</code> cần <code style="'..code_style..'">&#124;tác giả=</code>',
		anchor = 'coauthors_missing_author',
		category = 'Lỗi CS1: đồng tác giả không có tác giả',
		hidden = false },
	deprecated_params = {
		message = 'Chú thích sử dụng tham số <code style="'..code_style..'">&#124;$1=</code> bị phản đối',
		anchor = 'deprecated_params',
		category = '張𣎏參數注釋被反對',
		hidden = true },
	empty_citation = {
		message = 'Chú thích trống',
		anchor = 'empty_citation',
		category = 'Trang có chú thích trống',
		hidden = false },
	extra_pages = {
		message = '<code style="'..code_style..'">&#124;các trang=</code> hay <code style="'..code_style..'">&#124;at=</code> dư',
		anchor = 'extra_pages',
		category = 'Trang có chú thích định rõ trang mâu thuẫn',
		hidden = false },
	first_missing_last = {
		message = '<code style="'..code_style..'">&#124;tên $2=</code> thiếu <code style="'..code_style..'">&#124;họ $2=</code> trong $1',
		anchor = 'first_missing_last',
		category = 'CS1 errors: missing author or editor',
		hidden = false },
	format_missing_url = {
		message = '<code style="'..code_style..'">&#124;định dạng=</code> cần <code style="'..code_style..'">&#124;url=</code>',
		anchor = 'format_missing_url',
		category = 'Trang có chú thích có định dạng mà không có URL',
		hidden = true },
	implict_etal_editor = {
		message = 'Gợi ý <code style="'..code_style..'">&#124;số biên tập viên=</code>',
		anchor = 'displayeditors',
		category = 'Trang có đồng nghiệp ẩn kiểu cũ trong chú thích',
		hidden = true },
	invalid_param_val = {
		message = '<code style="'..code_style..'">&#124;$1=$2</code> không hợp lệ',
		anchor = 'invalid_param_val',
		category = 'Lỗi CS1: giá trị tham số không hợp lệ',
		hidden = false },
	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 = {
		message = 'Đã bỏ qua tham số không rõ <code style="'..code_style..'">&#124;$1=</code>',
		anchor = 'parameter_ignored',
		category = 'Trang có tham số chú thích không rõ',
		hidden = false },
	parameter_ignored_suggest = {
		message = 'Đã bỏ qua tham số không rõ <code style="'..code_style..'">&#124;$1=</code> (gợi ý <code style="'..code_style..'">&#124;$2=</code>)',
		anchor = 'parameter_ignored_suggest',
		category = 'Trang có tham số chú thích không rõ',
		hidden = false },
	redundant_parameters = {
		message = 'Đã định rõ hơn một tham số trong $1',
		anchor = 'redundant_parameters',
		category = 'Trang có tham số chú thích dư',
		hidden = false },
	text_ignored = {
		message = 'Đã bỏ qua văn bản “$1”',
		anchor = 'text_ignored',
		category = 'Trang có tham số chú thích không tên',
		hidden = false },
	trans_missing_chapter = {
		message = '<code style="'..code_style..'">&#124;dịch chương=</code> cần <code style="'..code_style..'">&#124;chương=</code>',
		anchor = 'trans_missing_chapter',
		category = 'Trang có chú thích thiếu tên nguyên ngữ',
		hidden = false },
	trans_missing_title = {
		message = '<code style="'..code_style..'">&#124;dịch tựa đề=</code> cần <code style="'..code_style..'">&#124;tựa đề=</code>',
		anchor = 'trans_missing_title',
		category = 'Trang có chú thích thiếu tên nguyên ngữ',
		hidden = false },
	vancouver = {
		message = 'Lỗi văn phong Vancouver',
		anchor = 'vancouver',
		category = 'Lỗi CS1: văn phong Vancouver',
		hidden = false },
	wikilink_in_url = {
		message = 'Tựa đề URL chứa liên kết wiki',
		anchor = 'wikilink_in_url',
		category = 'Trang có tựa đề URL chứa liên kết wiki trong chú thích',
		hidden = false },
}

--[[--------------------------< I D _ H A N D L E R S >--------------------------------------------------------

The following contains a list of values for various defined identifiers.  For each identifier we specify a
variety of information necessary to properly render the identifier in the citation.

	parameters: a list of parameter aliases for this identifier
	link: Wikipedia article name
	label: the alternate name to apply to link
	mode: 	'manual' when there is a specific function in the code to handle the identifier;
			'external' for identifiers that link outside of Wikipedia;
	prefix: the first part of a url that will be concatenated with a second part which usually contains the identifier
	encode: true if uri should be percent encoded; otherwise false
	COinS: into rft.id
	separator: character or text between label and the identifier in the rendered citation
]]

local id_handlers = {
	['ARXIV'] = {
		parameters = {'arxiv', 'ARXIV', 'eprint'}, 
		link = 'arXiv',
		label = 'arXiv',
		mode = 'manual',
		prefix = '//arxiv.org/abs/', 						-- protocol relative tested 2013-09-04
		encode = false,
		COinS = 'info:arxiv',
		separator = ':',
	},
	['ASIN'] = {
		parameters = { 'asin', 'ASIN' },
		link = 'Mã số định danh chuẩn Amazon',
		label = 'ASIN',
		mode = 'manual',
		COinS = 'info:asin',
		separator = '&nbsp;',
		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'] = {
		parameters = { 'doi', 'DOI' },
		link = 'DOI',
		label = 'doi',
		mode = 'manual',
		prefix = '//dx.doi.org/',
		COinS = 'info:doi',
		separator = ':',
		encode = true,
	},
	['ISBN'] = {
		parameters = {'isbn', 'ISBN', 'isbn13', 'ISBN13'}, 
		link = 'ISBN',
		label = 'ISBN',
		mode = 'manual',
		prefix = 'Đặc biệt:Nguồn sách/',
		COinS = 'rft.isbn',
		separator = '&nbsp;',
	},
	['ISMN'] = {
		parameters = {'ismn', 'ISMN'}, 
		link = 'International Standard Music Number',
		label = 'ISMN',
		mode = 'manual',
		prefix = '',															-- not currently used; 
		COinS = 'info:ismn',
		separator = '&nbsp;',
	},
	['ISSN'] = {
		parameters = {'issn', 'ISSN'}, 
		link = 'ISSN',
		label = 'ISSN',
		mode = 'manual',
		prefix = '//www.worldcat.org/issn/',
		COinS = 'rft.issn',
		encode = false,
		separator = '&nbsp;',
	},
	['JFM'] = {
		parameters = {'jfm', 'JFM'}, 
		link = 'Zentralblatt MATH',
		label = 'JFM',
		mode = 'external',
		prefix = '//zbmath.org/?format=complete&q=an:',
		COinS = 'rft.jfm',
		encode = true,
		separator = '&nbsp;',
	},
	['JSTOR'] = {
		parameters = {'jstor', 'JSTOR'}, 
		link = 'JSTOR',
		label = 'JSTOR',
		mode = 'external',
		prefix = '//www.jstor.org/stable/', 				-- protocol relative tested 2013-09-04
		COinS = 'rft.jstor',
		encode = false,
		separator = '&nbsp;',
	},
	['LCCN'] = {
		parameters = {'LCCN', 'lccn'}, 
		link = 'Số kiểm soát của Thư viện Quốc hội Mỹ',
		label = 'LCCN',
		mode = 'manual',
		prefix = 'http://lccn.loc.gov/',
		COinS = 'rft.lccn',
		encode = false,
		separator = '&nbsp;',
	},
	['MR'] = {
		parameters = {'MR', 'mr'}, 
		link = 'Mathematical Reviews',
		label = 'MR',
		mode = 'external',
		prefix = '//www.ams.org/mathscinet-getitem?mr=', 	-- protocol relative tested 2013-09-04
		COinS = 'rft.mr',
		encode = true,
		separator = '&nbsp;',
	},
	['OCLC'] = {
		parameters = {'OCLC', 'oclc'}, 
		link = 'OCLC',
		label = 'OCLC',
		mode = 'external',
		prefix = '//www.worldcat.org/oclc/',
		COinS = 'info:oclcnum',
		encode = true,
		separator = '&nbsp;',
	},
	['OL'] = {
		parameters = { 'ol', 'OL' },
		link = 'Open Library',
		label = 'OL',
		mode = 'manual',
		COinS = 'info:olnum',
		separator = '&nbsp;',
		endode = true,
	},
	['OSTI'] = {
		parameters = {'OSTI', 'osti'}, 
		link = 'Văn phòng Thông tin Khoa học và Kỹ thuật',
		label = 'OSTI',
		mode = 'external',
		prefix = '//www.osti.gov/energycitations/product.biblio.jsp?osti_id=',	-- protocol relative tested 2013-09-04
		COinS = 'info:osti',
		encode = true,
		separator = '&nbsp;',
	},
	['PMC'] = {
		parameters = {'PMC', 'pmc'}, 
		link = 'PubMed Central',
		label = 'PMC',
		mode = 'manual',									-- changed to support unlinking of PMC identifier when article is embargoed
		prefix = '//www.ncbi.nlm.nih.gov/pmc/articles/PMC',
		suffix = " ",
		COinS = 'info:pmc',
		encode = true,
		separator = '&nbsp;',
	},
	['PMID'] = {
		parameters = {'PMID', 'pmid'}, 
		link = 'Định danh PubMed',
		label = 'PMID',
		mode = 'manual',									-- changed from external manual to support PMID validation
		prefix = '//www.ncbi.nlm.nih.gov/pubmed/',
		COinS = 'info:pmid',
		encode = false,
		separator = '&nbsp;',
	},
	['RFC'] = {
		parameters = {'RFC', 'rfc'}, 
		link = 'RFC',
		label = 'RFC',
		mode = 'external',
		prefix = '//tools.ietf.org/html/rfc',
		COinS = 'info:rfc',
		encode = false,
		separator = '&nbsp;',
	},
	['SSRN'] = {
		parameters = {'SSRN', 'ssrn'}, 
		link = 'Mạng Nghiên cứu Khoa học Xã hội',
		label = 'SSRN',
		mode = 'external',
		prefix = '//ssrn.com/abstract=', 					-- protocol relative tested 2013-09-04
		COinS = 'info:ssrn',
		encode = true,
		separator = '&nbsp;',
	},
	['USENETID'] = {
		parameters = {'message-id'},
		link = 'Usenet',
		label = 'Usenet:',
		mode = 'manual',
		prefix = 'news:',
		encode = false,
		COinS = 'info:usenet',
		separator = '&nbsp;',
	},
	['ZBL'] = {
		parameters = {'ZBL', 'zbl'}, 
		link = 'Zentralblatt MATH',
		label = 'Zbl',
		mode = 'external',
		prefix = '//zbmath.org/?format=complete&q=an:',
		COinS = 'info:zbl',
		encode = true,
		separator = '&nbsp;',
	},
}

return 	{
	aliases = aliases,
	defaults = defaults,
	error_conditions = error_conditions,
	id_handlers = id_handlers,
	maint_cats = maint_cats,
	messages = messages,
	presentation = presentation,
	prop_cats = prop_cats,
	title_types = title_types,
	uncategorized_namespaces = uncategorized_namespaces,
	uncategorized_subpages = uncategorized_subpages,
	}