--[[--------------------------< C O N F I G U R A T I O N >----------------------------------------------------

global configuration settings

]]

local config = {
	maxurls = 10,																-- Max number of URLs allowed. 
	tname = 'Webarchive',														-- name of calling template. Change if template rename.
	verifydates = true,															-- See documentation. Set false to disable.
	default_df = 'dmy',															-- must be set with one of: 'mdy', 'dmy', 'iso', 'ymd'
	}


--[[--------------------------< 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.

Note: Namespace names should use underscores instead of spaces.

]]

local uncategorized_namespaces = {												-- same list as specified at [[Module:Citation/CS1/Configuration]]
	['User']=true, ['Talk']=true, ['User_talk']=true, ['Wikipedia_talk']=true, ['File_talk']=true,
	['Template_talk']=true, ['Help_talk']=true, ['Category_talk']=true, ['Portal_talk']=true,
	['Book_talk']=true, ['Draft_talk']=true, ['Education_Program_talk']=true, ['Module_talk']=true,
	['MediaWiki_talk']=true,
	}

local uncategorized_subpages = {'/[Ss]andbox', '/[Tt]estcases'};				-- list of Lua patterns found in page names of pages we should not categorize

local excepted_pages = {														-- these pages will be categorized if set true; set to nil to disable
	['Module talk:Webarchive/testcases'] = true,								-- test cases pages used during development
	['Template:Webarchive/testcases/Production'] = true,
	}


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

this is a table of all categories supported by Module:Webarchive

]]

local categories = {
	wayback = 'Kategoria:Faqe me adresa nga Wayback Machine që përdorin stampën e arkivës së rrjetit',
	archiveis = 'Kategoria:Faqe me adresa nga Archive.is që përdorin stampën e arkivës së rrjetit',
	webcite = 'Kategoria:Faqe me adresa nga WebCite që përdorin stampën e arkivës së rrjetit',
	other = 'Kategoria:Faqe me adresa që përdorin stampën e arkivës së rrjetit nga arkiva jo aq të njohura',
	unknown = 'Kategoria:Faqe me adresa që përdorin stampën e arkivës së rrjetit nga arkiva të panjohura',
	warning = 'Kategoria:Faqe me adresa që përdorin stampën e arkivës së rrjetit me probleme',
	error = 'Kategoria:Faqe me adresa që përdorin stampën e arkivës së rrjetit me gabime',
	}


--[[--------------------------< P R E F I X E S >--------------------------------------------------------------

used only with serviceName(), this table holds the two generic tail-text prefixes specified by services['<service name>'][1]

]]

local prefixes = {
	[true] = 'tek',
	[false] = 'te',
	}


--[=[-------------------------< S E R V I C E S >--------------------------------------------------------------

this is a table of tables for archive services.  Each service table has:
	[1]=prefix; may be boolean true or false, or text string where:
		true means the prefix "tek" is being used
		false means the prefix "te" is being used
		'text string' is used in lieu of the typical 'tek' or 'te' prefix
	[2]=wikilink target article that describes the service; set to nil if not used
	[3]=wikilink label; the label in [[target|label]]; set to nil if not used; when there is not article ([2] is nil) use this to name the service; see wikiwix in the table
	[4]=service ID; set to nil if not used
	[5]=tracking category key from the categories table; set to nil if not used
	[6]=postfix; text string to be appended at the end of the tail string - see webarchive.loc.gov in the table

]=]

local services = {
	['archive.ec'] = {[1] = true, [2] = nil, [3] = 'Archive.today', [4] = 'archiveis', [5] = categories.archiveis, [6] = nil},
	['archive.fo'] = {[1] = true, [2] = nil, [3] = 'Archive.today', [4] = 'archiveis', [5] = categories.archiveis, [6] = nil},
	['archive.is'] = {[1] = true, [2] = nil, [3] = 'Archive.today', [4] = 'archiveis', [5] = categories.archiveis, [6] = nil},
	['archive.li'] = {[1] = true, [2] = nil, [3] = 'Archive.today', [4] = 'archiveis', [5] = categories.archiveis, [6] = nil},
	['archive.md'] = {[1] = true, [2] = nil, [3] = 'Archive.today', [4] = 'archiveis', [5] = categories.archiveis, [6] = nil},
	['archive.org'] = {[1] = true, [2] = nil, [3] = 'Wayback Machine', [4] = 'wayback', [5] = categories.wayback, [6] = nil},
	['archive.ph'] = {[1] = true, [2] = nil, [3] = 'Archive.today', [4] = 'archiveis', [5] = categories.archiveis, [6] = nil},
	['archive.today'] = {[1] = true, [2] = nil, [3] = 'Archive.today', [4] = 'archiveis', [5] = categories.archiveis, [6] = nil},
	['archive.vn'] = {[1] = true, [2] = nil, [3] = 'Archive.today', [4] = 'archiveis', [5] = categories.archiveis, [6] = nil},
	['archive-it.org'] = {[1] = true, [2] = nil, [3] = 'Archive-It', [4] = 'archiveit', [5] = nil, [6] = nil},
	['arquivo.pt'] = {[1] = true, [2] = nil, [3] = 'Portuguese Web Archive', [4] = nil, [5] = nil, [6] = nil},
	['bibalex.org'] = {[1] = false, [2] = nil, [3] = 'Bibliotheca Alexandrina', [4] = nil, [5] = nil, [6] = nil},
	['collectionscanada'] = {[1] = false, [2] = nil, [3] = 'Canadian Government Web Archive', [4] = nil, [5] = nil, [6] = nil},
	['europarchive.org'] = {[1] = false, [2] = nil, [3] = 'National Library of Ireland', [4] = nil, [5] = nil, [6] = nil},
	['freezepage.com'] = {[1] = false, [2] = nil, [3] = 'Freezepage', [4] = nil, [5] = nil, [6] = nil},
	['haw.nsk'] = {[1] = false, [2] = nil, [3] = 'Croatian Web Archive (HAW)', [4] = nil, [5] = nil, [6] = nil},
	['langzeitarchivierung.bib-bvb.de'] = {[1] = false, [2] = nil, [3] = 'Bavarian State Library', [4] = nil, [5] = nil, [6] = nil},
	['loc.gov'] = {[1] = false, [2] = nil, [3] = 'Library of Congress', [4] = nil, [5] = nil, [6] = nil},
	['nationalarchives.gov.uk'] = {[1] = false, [2] = nil, [3] = 'UK Government Web Archive', [4] = nil, [5] = nil, [6] = nil},
	['nlb.gov.sg'] = {[1] = false, [2] = nil, [3] = 'Web Archive Singapore', [4] = nil, [5] = nil, [6] = nil},
	['pandora.nla.gov.au'] = {[1] = false, [2] = nil, [3] = 'Pandora Archive', [4] = nil, [5] = nil, [6] = nil},
	['parliament.uk'] = {[1] = false, [2] = nil, [3] = 'UK Parliament\'s Web Archive', [4] = nil, [5] = nil, [6] = nil},
	['perma.cc'] = {[1] = false, [2] = nil, [3] = 'Perma.cc', [4] = nil, [5] = nil, [6] = nil},
	['perma-archives.cc'] = {[1] = false, [2] = nil, [3] = 'Perma.cc', [4] = nil, [5] = nil, [6] = nil},
	['proni.gov'] = {[1] = false, [2] = nil, [3] = 'Public Record Office of Northern Ireland', [4] = nil, [5] = nil, [6] = nil},
	['screenshots.com'] = {[1] = false, [2] = nil, [3] = 'Screenshots', [4] = nil, [5] = nil, [6] = nil},
	['stanford.edu'] = {[1] = false, [2] = nil, [3] = 'Stanford Web Archive', [4] = nil, [5] = nil, [6] = nil},
	['timetravel.mementoweb.org'] = {[1] = false, [2] = nil, [3] = 'Memento Project', [4] = nil, [5] = nil, [6] = nil},
	['uni-lj.si'] = {[1] = true, [2] = nil, [3] = 'Slovenian Web Archive', [4] = nil, [5] = nil, [6] = nil},
	['veebiarhiiv.digar.ee'] = {[1] = false, [2] = nil, [3] = 'Estonian Web Archive', [4] = nil, [5] = nil, [6] = nil},
	['vefsafn.is'] = {[1] = false, [2] = nil, [3] = 'National and University Library of Iceland', [4] = nil, [5] = nil, [6] = nil},
	['webarchive.bac-lac.gc.ca'] = {[1] = true, [2] = nil, [3] = 'Library and Archives Canada', [4] = nil, [5] = nil, [6] = nil},
	['webarchive.loc.gov'] = {[1] = true, [2] = nil, [3] = 'Library of Congress', [4] = 'locwebarchives', [5] = nil, [6] = 'Web Archives'},
	['webarchive.org.uk'] = {[1] = true, [2] = nil, [3] = 'UK Web Archive', [4] = nil, [5] = nil, [6] = nil},
	['webcache.googleusercontent.com'] = {[1] = true, [2] = nil, [3] = 'Google Cache', [4] = nil, [5] = nil, [6] = nil},
	['webcitation.org'] = {[1] = true, [2] = nil, [3] = 'webcite', [4] = categories.webcite, [5] = nil, [6] = nil},
	['webharvest.gov'] = {[1] = true, [2] = nil, [3] = 'National Archives and Records Administration', [4] = nil, [5] = nil, [6] = nil},
	['webrecorder.io'] = {[1] = true, [2] = nil, [3] = 'webrecorder.io', [4] = nil, [5] = nil, [6] = nil},
	['wikiwix.com'] = {[1] = true, [2] = nil, [3] = 'Wikiwix', [4] = nil, [5] = nil, [6] = nil},
	['yorku.ca'] = {[1] = false, [2] = nil, [3] = 'York University Digital Library', [4] = nil, [5] = nil, [6] = nil},
	}


--[[--------------------------< S T A T I C   T E X T >--------------------------------------------------------

for internationalzation

]]

local s_text = {
	addlarchives = 'Arkiva të tjera',
	addlpages = 'Faqe të tjera të arkivuara më',
	Archive_index = 'Indeksi i arkivës',
	Archived = 'Arkivuar',
	archived = 'arkivuar',
	archive = 'arkiva',
	Page = 'Faqe',
	}


--[[--------------------------< E R R _ W A R N _ M S G S >----------------------------------------------------

these tables hold error and warning message text

]]

local err_warn_msgs = {
	date_err = '[Gabim me datën]',													-- decodeWebciteDate, decodeWaybackDate, decodeArchiveisDate
	date_miss = '[Mungon data]',												-- parseExtraArgs
	ts_short = '[Gjatësi e vogël e stampës kohore]',										-- decodeWaybackDate timestamp less than 8 digits
	ts_date = '[Stampa kohore e pavlefshme]',										-- decodeWaybackDate timestamp not a valid date
	unknown_url = '[Gabim: Adresë arkivi e panjohur]',								-- serviceName
	unnamed_params = '[Janë injoruar parametrat pozicional]',

--warnings
	mismatch = '<sup>[Mospërputhje datash]</sup>',									-- webarchive
	ts_len = '<sup>[Gjatësia e stampës kohore është e pasaktë]</sup>',									-- decodeWaybackDate, decodeArchiveisDate timestamp not 14 digits
	ts_cal = '<sup>[Pamje kalendarike]</sup>',											-- decodeWaybackDate timestamp has trailing splat
	}


local crit_err_msgs = {															-- critical error messages
	conflicting = 'Konflikt mes |$1= dhe |$2=',
	empty = 'Mungon adresa e arkivimit',
	invalid_url = 'Adresa arkivimit është e pavlefshme',
	ts_nan = 'Stampa kohore nuk është numër',
	unknown = 'Problem i panjohur. Ju lutemi ta raportoni në faqen e diskutimeve të artikullit.',
	}



--[[--------------------------< D A T E   I N T E R N A T I O N A L I Z A T I O N >----------------------------

these tables hold data that is used when converting date formats from non-English languages (because mw.language.getContentLanguage:formatDate()
doesn't understand non-English month names)

]]

local month_num = {																-- retain English language names even though they may not be strictly required on the local wiki
	['January'] = 1, ['February'] = 2, ['March'] = 3, ['April'] = 4, ['May'] = 5, ['June'] = 6, ['July'] = 7, ['August'] = 8, ['September'] = 9, ['October'] = 10, ['November'] = 11, ['December'] = 12,
	['Jan'] = 1, ['Feb'] = 2, ['Mar'] = 3, ['Apr'] = 4, ['May'] = 5, ['Jun'] = 6, ['Jul'] = 7, ['Aug'] = 8, ['Sep'] = 9, ['Oct'] = 10, ['Nov'] = 11, ['Dec'] = 12,
-- add local wiki month-names to number translation here
	['janar'] = 1, ['shkurt'] = 2, ['mars'] = 3, ['prill'] = 4, ['maj'] = 5, ['qershor'] = 6, ['korrik'] = 7, ['gusht'] = 8, ['shtator'] = 9, ['tetor'] = 10, ['nëntor'] = 11, ['dhjetor'] = 12,
	};

																				-- when the local wiki uses non-western digits in dates, local wiki digits must be
																				-- translated to western digits; lua only understands western digits
local digits = {																-- use this table to aid translation
--	[''] = 0, [''] = 1, [''] = 2, [''] = 3, [''] = 4, [''] = 5, [''] = 6, [''] = 7, [''] = 8, [''] = 9,	-- fill these table indexes with local digits
	enable = false																-- set to true to enable local-digit to western-digit translation
	};


--[[--------------------------< P A R A M E T E R   I N T E R N A T I O N A L I Z A T I O N >------------------

this table holds tables of parameter names and their non-English aliases.  In the enum_params table '#' is a single
character placeholder for 1 or more digit characters

parameter names in this table shall be lowercase
]]

local params = {
	['url'] = {'url', 'adresa'},
	['date'] = {'date', 'datum', 'data'},
	['title'] = {'title', 'titel', 'titulli'},
	['nolink'] = {'nolink', 'mungonlidhja'},
	['format'] = {'format', 'formatimi'}
	}

local enum_params = {
	['url#'] = {'url#', 'adresa#'},
	['date#'] = {'date#', 'datum#', 'data#'},
	['title#'] = {'title#', 'titel#', 'titulli#'},
	}

local format_vals = {															-- |format= accepts two values; add local language variants here
	['addlpages'] = {'addlpages', 'faqetëtjera', 'faqetetjera'},
	['addlarchives'] = {'addlarchives', 'arkivatëtjera', 'arkivatetjera'},
	}


--[[--------------------------< E X P O R T E D   T A B L E S >------------------------------------------------
]]

return {
	categories = categories,
	config = config,
	crit_err_msgs = crit_err_msgs,
	digits = digits,
	enum_params = enum_params,
	err_warn_msgs = err_warn_msgs,
	excepted_pages = excepted_pages,
	format_vals = format_vals,
	month_num = month_num,
	params = params,
	prefixes = prefixes,
	services = services,
	s_text = s_text,
	uncategorized_namespaces = uncategorized_namespaces,
	uncategorized_subpages = uncategorized_subpages,
	}