La documentazione per questo modulo può essere creata in Modulo:Webarchive/data/man

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


--[[--------------------------< 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 = {
	archiveis = 'Category:Webarchive template archiveis links',
	error = 'Category:Webarchive template errors',
	other = 'Category:Webarchive template other archives',
	unknown = 'Category:Webarchive template unknown archives',
	warning = 'Category:Webarchive template warnings',
	wayback = 'Category:Webarchive template wayback links',
	webcite = 'Category:Webarchive template webcite links',
	}


--[[--------------------------< 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 = {
	at = 'at',
	atthe = 'at the',
	}


--[=[-------------------------< 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 indicates that the prefix is taken from prefixes.atthe
		false indicates that the prefix is taken from prefixes.at
		'text string' is used in lieu of the typical 'at' or 'at the' 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'] = {false, 'Archive.today', nil, 'archiveis', categories.archiveis},
	['archive.fo'] = {false, 'Archive.today', nil, 'archiveis', categories.archiveis},
	['archive.is'] = {false, 'Archive.today', nil, 'archiveis', categories.archiveis},
	['archive.li'] = {false, 'Archive.today', nil, 'archiveis', categories.archiveis},
	['archive.md'] = {false, 'Archive.today', nil, 'archiveis', categories.archiveis},
	['archive.org'] = {true, 'Wayback Machine', nil, 'wayback', categories.wayback},
	['archive.ph'] = {false, 'Archive.today', nil, 'archiveis', categories.archiveis},
	['archive.today'] = {false, 'Archive.today', nil, 'archiveis', categories.archiveis},
	['archive.vn'] = {false, 'Archive.today', nil, 'archiveis', categories.archiveis},
	['archive-it.org'] = {false, 'Archive-It', nil, 'archiveit'},
	['arquivo.pt'] = {true, nil, 'Archiviu Web Portoghese'},
	['bibalex.org'] = {false, 'Bibliotheca Alexandrina#Internet Archive partnership', 'Bibliotheca Alexandrina'},
	['collectionscanada'] = {true, 'Archiviu Web di u Guvernu Canadianu'},
	['europarchive.org'] = {true, 'Biblioteca Naziunale d’Irlanda'},
	['freezepage.com'] = {false, nil, 'Freezepage'},
	['haw.nsk'] = {true, 'Archiviu Web Croatu (HAW)'},
	['langzeitarchivierung.bib-bvb.de'] = {false, 'Biblioteca statale di Bavaria'},
	['loc.gov'] = {true, 'Biblioteca di u Cungressu'},
	['nationalarchives.gov.uk'] = {true, 'Archiviu web di u guvernu britannicu'},
	['nlb.gov.sg'] = {false, 'Archiviu Web Singapore'},
	['pandora.nla.gov.au'] = {false, 'Archiviu Pandora'},
	['parliament.uk'] = {true, 'Archiviu di u Web di u Parlamentu di u RU'},
	['perma.cc'] = {false, 'Perma.cc'},
	['perma-archives.cc'] = {false, 'Perma.cc'},
	['proni.gov'] = {true, 'Uffiziu di u Registru Publicu di l’Irlanda di u Nordu'},
	['screenshots.com'] = {false, nil, 'Screenshots'},
	['stanford.edu'] = {true, 'Biblioteche di l’Università di Stanford', 'Archiviu Web di Stanford'},
	['timetravel.mementoweb.org'] = {false, 'Prughjettu Memento'},
	['uni-lj.si'] = {true, nil, 'Archiviu Web Slovenu'},
	['veebiarhiiv.digar.ee'] = {true, nil, 'Archiviu Web Estonianu'},
	['vefsafn.is'] = {true, 'Biblioteca Naziunale è Universitaria di l’Islanda'},
	['webarchive.bac-lac.gc.ca'] = {false, 'Biblioteca è Archivi Canada'},
	['webarchive.loc.gov'] = {true, 'Biblioteca di u Cungressu', nil, 'locwebarchives', nil, 'Archivi Web'},
	['webarchive.org.uk'] = {true, 'Archiviu Web di u RU'},
	['webcache.googleusercontent.com'] = {false, nil, 'Google Cache'},
	['webcitation.org'] = {false, 'WebCite', nil, 'webcite', categories.webcite},
	['webharvest.gov'] = {true, 'L’Archivi Naziunali è l’Amministrazione di i Rècords'},
	['webrecorder.io'] = {false, 'webrecorder.io'},
	['wikiwix.com'] = {false, nil, 'Wikiwix'},
	['yorku.ca'] = {false, 'Biblioteche di l’Università di York', 'Biblioteca Digitale di l’Università di York'},
	}


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

for internationalzation

]]

local s_text = {
	addlarchives = 'Archivi supplementarii',
	addlpages = 'Pagine addiziale archivate annantu',							-- TODO why the &nbsp; there? replace with regular space?
	Archive_index = 'Indice di l’archiviu',
	Archived = 'Archiviu',
	archived = 'archiviu',
	archive = 'archiviu',
	Page = 'Pagine',
	}


--[[--------------------------< 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 = '[Errore di data]',													-- decodeWebciteDate, decodeWaybackDate, decodeArchiveisDate
	date_miss = '[Data mancatu]',												-- parseExtraArgs
	ts_short = '[A lunghezza di a data di a marca]',										-- decodeWaybackDate timestamp less than 8 digits
	ts_date = '[A data di a marca ùn hè micca valida]',										-- decodeWaybackDate timestamp not a valid date
	unknown_url = '[Errore : URL di archiviu scunnisciutu]',								-- serviceName
	unnamed_params = '[Paràmetri pusitivi ignorate]',

--warnings
	mismatch = '<sup>[Incapacità di data]</sup>',									-- webarchive
	ts_len = '<sup>[Larghezza di a marca]</sup>',									-- decodeWaybackDate, decodeArchiveisDate timestamp not 14 digits
	ts_cal = '<sup>[Calendario]</sup>',											-- decodeWaybackDate timestamp has trailing splat
	}


local crit_err_msgs = {															-- critical error messages
	conflicting = 'Conflictori |$1= è |$2=',
	empty = 'Empty url',
--	iabot1 = 'https://web.http',												-- TODO: these iabot bugs perportedly fixed; removing these causes lua script error
--	iabot2 = 'URL micca validu',														-- at Template:Webarchive/testcases/Production; resolve that before deleting these messages
	invalid_url = 'URL micca validu',
	ts_nan = 'Timestamp ùn hè micca un numeru',
	unknown = 'Problema scunnisciuta. Per piacè riferite nantu à a pagina di discussione di mudellu',
	}



--[[--------------------------< 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
	['Ghjinnaghju'] = 1, ['Febbraiu'] = 2, ['Marzu'] = 3, ['Aprile'] = 4, ['Maghju'] = 5, ['Ghjugnu'] = 6, ['Lugliu'] = 7, ['Aostu'] = 8, ['Sittembre'] = 9, ['Ottobre'] = 10, ['Nuvembre'] = 11, ['Dicembre'] = 12,
	['Ghji'] = 1, ['Feb'] = 2, ['Mar'] = 3, ['Apr'] = 4, ['Magh'] = 5, ['Ghju'] = 6, ['Lug'] = 7, ['Aos'] = 8, ['Sit'] = 9, ['Ott'] = 10, ['Nuv'] = 11, ['Dic'] = 12,
-- add local wiki month-names to number translation here
--	[''] = 1, [''] = 2, [''] = 3, [''] = 4, [''] = 5, [''] = 6, [''] = 7, [''] = 8, [''] = 9, [''] = 10, [''] = 11, [''] = 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'},
	['date'] = {'data', 'datum'},
	['title'] = {'titulu'},
	['nolink'] = {'senzaligame'},
	['format'] = {'furmatu'}
	}

local enum_params = {
	['url#'] = {'url#'},
	['date#'] = {'data#', 'datum#'},
	['title#'] = {'titulu#'},
	}

local format_vals = {															-- |format= accepts two values; add local language variants here
	['addlpages'] = {'aghjustatepagine'},
	['addlarchives'] = {'aghjunghjearchivi'},
	}


--[[--------------------------< 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,
	}