Module:Author

La bibliothèque libre.

La documentation pour ce module peut être créée à Module:Author/Documentation

-- Module:Author or Author3

local p = {}
local AT = p
_G["CA"] = p
local Interprojet = require "Module:Interprojet"

--[ [ Module:Author
p.modules_versions = { -- Modules dependencies. Dependencias del módulo. Dépendances du module.
	versionName = "Author", versionNumber = "3.02", versionDate = "2015-11-28 00:30",
	selector = " Author MathRoman ControlArgs ", -- Asked submodules versions
	all_versions = " AT,Author,Author3 * MathRoman,MathRoman,MathRoman2 * CA,ControlArgs,ControlArgs1 ",
}
--] ]

--[[ Module:Author3
p.modules_versions = { -- Modules dependencies. Dependencias del módulo. Dépendances du module.
	versionName = "Author3", versionNumber = "3.02", versionDate = "2015-11-27 00:27",
	selector = " Author3 MathRoman2 ControlArgs1 ", -- Asked submodules versions
	all_versions = " AT,Author,Author3 * MathRoman,MathRoman,MathRoman2 * CA,ControlArgs,ControlArgs1 ",
}
--]]

p.ModuleNS = mw.site.namespaces.Module.name .. ":"
CA = require(p.ModuleNS .. "ControlArgs1") -- ControlArgs requires also all the submodules and manage all versions

p.versions = {}
p.versions.vn = p.modules_versions
local versions = p.versions
CA = CA.modules_binder(p, p.modules_versions) -- local CA : Activate the right versions of all submodules
local AT = p

if not CA then CA = require( p.ModuleNS .. "ControlArgs1" ) end -- DEBUG
-- if not MathRoman then MathRoman = require( p.ModuleNS .. "MathRoman" ) end -- DEBUG
if not MathRoman then MathRoman = require( p.ModuleNS .. "MathRoman2" ) end -- DEBUG

-- local Time = require "Time" -- to convert wikidata date-time ISO 8601
-- local Datum = require "Datum" -- to convert wikidata date-time to needed format

--[[ Todo in Module:Author3

-- Todo: P734 = familyname = family name: surname or last name of a person
-- Todo: P735 = given name: first name or another given name of this person.
-- Todo: P734 = familyname = repair autorities with familyname 2015-09-30

	-- Todo: for developper
-- Todo: relecture ControlArgs/Author : module code in english
-- Todo: _old functions names to delete
-- Todo: search all DEBUG words and correct these parts
-- Todo: verif all tests, by developper and other users
-- Todo: Vérifier tous les tests unitaires, par tous, pour oublier moins de cas.
-- Todo: bug "\n* any texte" disturb next dropbox from module. Is it a bug ? --
-- Todo: Tester toutes les notices d'autorités, by developper and other users
-- Todo: debug for stable interprojet with Tpt
-- Todo: for wikidata dates, see : https://fr.wikipedia.org/wiki/Discussion_Projet:Scribunto#P585
-- Todo: for wikidata dates, see fr.wikipedia : Module:Date, Module:Datetest, Module:Date complexe,
-- Todo: mw.title.compare( a, b ) -- Returns -1, 0, or 1 to indicate whether the title a is less than, equal to, or greater than title b
-- Todo: mw.title.compare( a, b ) -- which compare : length or alphabetic ?
-- Todo: Quand on crée un nouvel auteur avec le formulaire automatique, mettre le copyright 70 ans au lieu de 50 ans ?
-- Todo: finaliser interprojet stable avec Tpt
-- Todo: finaliser l'intégration de microformat avec Tpt
-- Todo: source de chaque argument à modifier dans interact_args = "inter", a afficher en couleurs.
-- Todo ? gener_oldargs Could report uses of some args and help to adapt wiki_selectors 03/10/2015


	-- Todo: for all users
-- Todo: List all existing arguments with synonyms, needed, datas, autorities or no, alphabetic sort. in edit mode.
-- Todo: For unknown args select the nearest between all known args.
-- Todo: Attention a la migration Auteur3 pour : catégories, description, initiale
-- Todo: description from subvalues in wikidata Authors header


-- Todo: sortkey_txt alert only if name number > 2 : Pour l'initiale et la clé de tri, vérifier la proposition du modèle seulement si le titre comporte plus de 2 noms.
-- Todo ? Faut-il une "Catégorie:Domaine public en 2014" ? depuis 2 ans ? depuis 1 ans ? dans 1 an ? "Auteurs récents en domaine public" ?
-- Todo ? Proposer "notice" pour 1 seule et "notices" pour plusieurs. En mode et en option.
-- Todo ? gener_oldargs(args_final) -- Could report use of some args and help to adapt wiki_selectors 25/09/2015.
-- Todo ? avec le formulaire automatique, le droit par défaut est : 50 ans (canadien) - mettre 70 ans par défaut
-- Todo ? Reformuler : "Cet auteur est dans le domaine public dans tous les pays pour lesquels le copyright a une durée de vie de "X" ans ou moins après la mort de l'auteur." avec la liste des licences concernees.
-- Todo ? garder ou supprimer « Auteurs par pays : », « Auteurs par pseudo » ?
-- Todo ? gadget auteurForm pour qu’il propose des suggestions. Des oppositions ? Tpt (d) 10 juin 2011
-- Todo: documenter : Si l'on veut annuler les authorities pour ISNI, on peut dans le modèle déclarer ISNI = | (sans valeur)
-- Todo ? Documenter docolor, dans la documentation de Module:Auteur et Modèle:Auteur, à verifier et re-activer ?
-- Todo ? Dans le calcul des époques et siècles, il y a une ambiguité depuis longtemps : le libelé des siècles est "Naissance en 1876" alors que les époques sont basées sur l'âge de publication à partir de 20 ans. A la transition entre siècles et époques il y a un flou.
-- Todo ? Catégories de groupes d’années depuis les derniers 100 ans ?

-- Done ? droits d'auteur, dans les box renvoyer vers l'aide.
-- Done ? droits d'auteur, ajouter l'aide DP 1923 + DP-EU + DP-US
-- Done ? catégories Catégorie:Auteur écrivant en "nom de la langue"
-- Done ? Adapter les erreurs et catégories de maintenance aux besoins.
-- Done ? un argument, epoch = époque = 1234, définie par une année, pour les auteurs qui ne correspondent pas au siècle automatique.
-- Done ? proposer multiple_selection pour description = distinctions + functions + occupations de wikidata
-- Done ? Pour les cas difficiles de SCAN_gallica il y a un argument galliname, non testé.
-- Done ? if none autority, missing autority, generate err and cat. err_author_without_authority, cat_author_without_authority.
-- Done ? sortkey : default value and verify message CA.msg_add("msg_auto_val_warning", CA.user_translations[key], val)
-- Done ? initiales automatiques trop difficiles (premiere lettre du dernier mot) et message attention
-- Done ? epoch = époque, pour forcer une époque en donnant une année
-- Done ? autorités : limite la liste des autorités selon la langue du wiki.
-- Done ? authorities non coupees par un retour a la ligne. Le style est en place mais les navigateurs ne l'interprètent pas encore.
-- Done ? mentionner la date estimée de fin des droits d'auteur rights_limit  — Verdy_p (d) 18 février 2014 à 02:23 ?
-- Done ? Constantes de durée de vie : life_constants_of_module, categorise_death_for_n_years
-- Done ? Constantes de durée de vie : Catégoriser depuis 100 ans. Un auteur écrit a 20 ans, 5 ans avant sa mort. vie maximale 120 ans.
-- Done ? Certaines catégories sont étranges. « Auteurs par pays : », « Auteurs par pseudo », etc. Est-ce que ce serait possible de mettre à jour ce modèle pour le faire correspondre aux catégories qui existent déjà ? Marc (d) 3 avril 2013 à 10:49 (UTC)
-- Done ? Auteurs morts pour la France‎ (15 P) Catégorie:Auteurs morts pour la France, rights_values_box_mpf = "Mort pour la France"

-- Done: group multiple selectors in begin of i18n translations as wiki_selectors -- wop
-- Done: -- wiki_selectors actives à documenter -- wop
	authorities_selector		= "5, VIAF, BNF, SUDOC, ISNI, LCCN, ARC, WORLDCAT, NLA, PND, GKD", -- wop
	rights_values				= "none,no,cn,50,us,70,mpf", -- wop
	region_values				= 'other,china,india,century', -- wop
	distinctions_selector		= '2,nobel,price,president,deputy', -- wop
	functions_selector			= '2,president', -- ,deputy', -- wop
	occupations_selector		= '2,biographer', -- ,politician', -- wop
	sex_values					= 'male,female', -- wop
-- Done: selected_autorities_title par "-" pour « donnée dans l'article sinon rien » ou "+" pour « utiliser la valeur WD »
-- Done: selected_autorities_title https://fr.wikipedia.org/wiki/Discussion_Projet:Infobox/Lua#Priorité des sources de données
-- Done: remplacer les deux puces par les icônes respectives des projets Wikipédia et Wikiquote. Cela les mettrait plus en valeur. Faager 13 juillet 2009

-- Done: Catégorie : cat_author_without_authority= "Auteurs sans notices d’Autorité",
-- Done: Tite-Live (Q2039), format de dates : (59 av. J.-C. - 17) P569 = date of birth = 59 BCE, P570 = date of death = 17
-- Done: Anciens arguments obsolètes selon wikisource Modèle:Auteur/Documentation le 05/01/2014. p.gener_oldargs(args_final)

--	Wikidata Properties of person to use or ask:
-- Done ? P106 = occupations = personnalité politique, autobiographe, avocat
-- Done ? P39 = functions = président de l'Afrique du Sud, député à l'Assemblée nationale sud-africaine
-- Done ? P21 = sex_values = 'male,female', to category, Catégorie:Femmes auteurs, -- wop. Wikidata Property
-- Done ? P103 = native language = language that a person learned natively : if different of nationality, to categories
-- Done ? P1412 = languages spoken or published = langue parlée = anglais, to categories
-- Done ? pour les personnes : combiner les arguments langue native P103 et langues parlés P1412 ?
-- Todo ? P166 = distinctions = Prix Jawaharlal Nehru, prix Nobel de la paix, et 30 autres
-- Todo ? P27 = country of citizenship = nationality = pays de nationalité = "Afrique du Sud"  en "Afrique"
-- Todo ? dans wikidata, Description = property Pxxx ?
-- Todo ? mettre le nom de famille en petite capitale ? Il faut avoir nom et prenom séparés et on les a rarement.
-- Todo ? icone livre bleu pour fac-similés : Fichier:Logo arte.jpg VIGNERON 15 juillet 2009
-- Todo ? Catégorie:Auteurs morts pour la France, rights_values_box_mpf
-- Todo ? dans wikidata, demander la propriété, "type de droits" = property Pxxx ? = rights_values = "none,cn,us,mpf", -- wop

-- Unused: P19 = place of birth = the most specific known (e.g. city instead of country, or hospital instead of city)
-- Unused: P20 = place of death = the most specific known (e.g. city instead of country, or hospital instead of city)
-- Unused: P155 = follows = précédé par = Frederik de Klerk, The immediately prior item in some series of which the subject is part. Use P1365 (replaces)
-- Unused: P1816 = National Portrait Gallery (London) person identifier (P1816)

--	Wikidata properties of Works to use or ask:
-- Todo ? Demander à wikidata un champ "type de droit d'auteur" ? voir P275. en marquant "domaine public" comme en Q15677329
-- Todo ? P275 = license = license under which this copyrighted work is released, pour logiciels. Quelques œuvres l'utilisent en marquant "domaine public" (ex: Q15677329), mais l'appliquer aux différentes déclinaisons de PD à la Commons n'a pas l'air habituel. Surtout que cette notion n'est pas absolue, mais dépend des pays. Peut-être en utilisant des qualificateurs ? --LBE (d) 1 juin 2014 à 16:55 (UTC)
-- Todo ? P364 = work, original language = language in which a work was originally created
-- Demander à wikidata un champ "date d'une oeuvre" ? voir P577.
-- Done: P577 = work, publication date = date or point in time a work is first published or released = "date d'une oeuvre"
-- Todo ? Signaler pour chaque oeuvre le debut probable du domaine public, les elements sur lesquels il est basé, les limites du calcul.

------ ToDoc
-- ToDoc: Dans les box de droits d'auteur, renvoyer vers l'aide des droits.
-- ToDoc: group multiple selectors in begin of i18n translations as wiki_selectors -- wop
-- ToDoc: grouper les valeurs multiples : arg_values / key_values / delay_values -- wop
-- ToDoc: insérer des doc1 : list_wiki_selectors_title / selected_autorities_title / options_from_mode_title -- wop
		selected_autorities_title		= CA.dropdown_func(1, "selected_autorities_title", p.list_selected_authorities),
		list_wiki_selectors_title		= CA.dropdown_func(1, "list_wiki_selectors_title", p.list_wiki_selectors),
		list_all_categories_title		= CA.dropdown_func(1, "list_all_categories_title", p.list_all_categories),
		list_all_errors_title			= CA.dropdown_func(1, "list_all_errors_title", p.list_all_errors),
-- ToDoc: internal life constants
		CA.constants.categorise_death_for_n_years = 100 -- normal = 100
		CA.constants.author_writing_after_birth = 20 -- normal = 20
		CA.constants.author_writing_before_death = 5 -- normal = 5
		CA.constants.author_lifetime_limit = 120 -- normal = 120
-- ToDoc: Documenter toutes les propriétés de wikidata utilisées ou éventuelles, dans la documentation de Module:Auteur3 et Modèle:Auteur3.
-- ToDoc: Documenter les divers sélecteurs : authorities_selector, distinctions_selector, functions_selector, occupations_selector, rights_values, region_values
		-- sélecteur = "BNF, WORLDCAT, +2, VIAF, LCCN, 3, GKD" Sélectionner les premières, puis 2 de plus parmi les suivantes, puis 3 en tout au maximum, puis GKD si possible.
-- ToDoc: Documenter toutes les erreurs détectables :
		list_all_errors_title			= CA.dropdown_func(1, "list_wiki_selectors_title", p.list_all_errors),
-- ToDoc: Documenter toutes les autorités disponibles :
		authorities_notices_test_title	= CA.dropdown_func(1, "authorities_notices_test_title", AT.authorities_notices_test),
-- ToDoc: Adapter les erreurs et catégories de maintenance aux besoins : special, interne, utilisateur.
-- ToDoc: Gestion des versions.
-- ToDoc: Grouper les aspects module international centralisable à la fin.
-- ToDoc: 4 fonctions d'interfaces : normal, notice, edit, tests

-- ToDoc: un argument, epoch = époque = 1234, définie par une année, pour les auteurs qui ne correspondent pas au siècle automatique.
-- ToDoc: if none autority, missing autority, generate err and cat. err_author_without_authority, cat_author_without_authority.
-- ToDoc: Catégorie:Auteurs sans notices d’Autorité.
-- ToDoc : Selection de authorities : limiter le nombre par un maxi. trier les authorities dans l'ordre prefere pour un wiki. Ne demander a wikidata que les authorities necessaires ?
-- ToDoc : Selection des authorities par arguments traduits dans chaque wiki.
-- ToDoc : notices multiples : traiter toutes les notices multiples. Voir Johnny Hallyday wikidata ISNI.

-- ToDoc : mode et/ou option "notice" pour les authorities choisies par les arguments ?
-- ToDoc : mode et/ou option "notices" selectors pour les authorities venant de wikidata ?
-- ToDoc : wiki_selectors Pous les arguments à valeurs multiples, les traductions doivent être dans le même ordre dans toutes les langues.

------ ToDoc ?  Catégories pour auteurs : Qui les utilise et pour quoi ? Répondons clairement :
	* Les lecteurs, les copistes ou les administrateurs ?
	* Pour repérer les auteurs qui arrivent en fin de droits et permettent de nouvelles publications ?
	* Pour repérer les auteurs dont les informations ne sont pas complètes ou pas assez précises par rapport à leur époque ?
	* Pour repérer les pages d'auteurs contenant des erreurs d'utilisation des modèles ?
	* Pour repérer les modèles contenant des erreurs interne de codage ?
	* Pour chercher des auteurs ou des œuvres à corriger ou à importer ?
	* Pour les intégrer automatiquement à la description, si elle est absente ?
	* Pour le plaisir de classer ? Tout classer parfaitement est impossible parce le monde est infiniment complexe.

------ Documentation de module :
	-- docum : Ce module doit porter le même nom dans toutes les langues, le code etant identique.
	-- Interactions entre parametres et docum (exemples : titre = prenom+nom, l'initiale vient du nom)
	-- docum : need="0" not necessary argument, need="1" necessary from argument, need="2" necessary from argument or module interaction
	-- docum : couleurs des origines des arguments en edit
	-- docum : <code>module</code>
	-- docum : Lors de la création d'une page d'auteur, établir le lien wikisource avec wikidata.
	-- docum : Le modèle definissait les années incertaines par plusieurs paramètres.
	-- docum : Le module reconnait l'année dans le texte libre du paramètre.
	-- docum : http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual
	-- docum perso : aller a une ligne de code en edit https://test2.wikipedia.org/w/index.php?title=Module:Auteur&action=edit#mw-ce-l3399
	-- docum : Assistance internationale : un administrateur peut assister un wiki inconnu en selectionner une langue qu'il connait pour lire les messages et noms d'arguments. Demander une evolution pour connaitre la langue de l'utilisateur ( bug NNNN ).

-- Not Todo: Ier siecle categorie cat_epoch_century_BCE -- categories do not support exponants
-- Not Todo: icone plume pour auteur : Farm-Fresh_draw_calligraphic.png, icone 2 livres pour les oeuvres : Nuvola_apps_bookcase_2.svg.
-- Not Todo: icone plume pour auteur : Meme apparence pour toutes les autorites = perte d'infos
-- Not Todo: lien "Auteurs M" avec infobulle "Auteurs dont l'initiale est M". Trop difficile ou impossible.

------ Todo later:
	-- Todo : task T00000 Convert any module as centralisable, see ControlArgs/documentation.
	-- Todo : Plus tard : stabiliser ControlArgs et Author, par des testframework, pour des modules centralisés
	-- Todo : Plus tard : stabiliser ControlArgs et Author, https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Test_cases
	-- Todo : Proposer à d'autres wikisources ? Discussion_modèle:Auteur3
	--		je peux aider pour le traduire en breton et l’intégrer sur la Wikisource brittophone. VIGNERON 22 juin 2014
	-- Todo : Proposer à d'autres wikisources ? refusé en italien, ils en ont déjà un en LUA. Alex brollo 5 juillet 2014
	-- Todo ? intégrer MathRoman ou séparer MathRoman+Epoque dans un nouveau module ?
	-- Todo ? require "Time" and require "Datum" -- to convert wikidata date-time in ISO 8601 format
	-- Todo ? test view testable of wikidata time properties, CA.testable_lister CA.TimeTest birth P569 require "Datum"
	-- Todo ? Non dans wikisource : etendre les notices d'authorities aux bâtiments, particules atomiques, voir wp:Discussion modèle:Autorité‎‎ 15/08/2014.
	-- Todo ? Pour les œuvres : combiner les arguments langue originale P364 et toutes langues d'œuvres P407 ?
	-- Todo ? Faut-il demander à wikidata un champ "type de droit d'auteur" ?
	-- Todo ? Utiliser les notices dans le Modèle:Document.

	-- voir aussi https://www.mediawiki.org/wiki/Module:Auteur
	-- voir aussi https://www.mediawiki.org/wiki/Module:Unitest_Scribunto
	-- voir aussi https://www.mediawiki.org/wiki/Module:Documentation/config
	-- voir aussi https://en.wikipedia.org/wiki/Module:ScribuntoUnit
	-- voir aussi https://en.wikipedia.org/wiki/Module:UnitTests

------	Maniphest tasks, example link : https://phabricator.wikimedia.org/T41610
	T85419 User groups should be exposed to Scribunto
	T49930 Allow accessing data from an item not connected to the current page - arbitrary access (tracking)
	T52329 We need a common repository for Scribunto modules and templates
	T85412 The formatPropertyValues needs an option to format data from date-time, angle or geographic coordinates
	T48160 Lua: Allow using labels in mw.wikibase.entity.formatPropertyValues
	T41610 Scribunto should support global module invocations
	T53660 Detect the edit state to adapt help messages to user errors
	T67507 It should be possible to get entity id from page title
	T59656 Special:ItemDisambiguation ranking
	T68051 Get the user language to help to maintain a module or a template
	T75460 [Story] Make Lua functions default to the user's language on multilingual wikis
	T87764 Bugs related to time datatype
	T63958 Use existing $dateFormats to format dates on Wikidata
	T00001 Todo task : Convert any module as centralisable, see ControlArgs/documentation.
	T00002 Todo task : Get the own module name and last record date-time from each module,
		like mw.title.new( "Module:Foo" ).REVISIONTIMESTAMP = {{REVISIONTIMESTAMP}}
		To help to manage submodules and their versions without errors:
		A module which ask a submodule musts rightly ask a submodule, even when they are renamed or copied in other versions.
		A module able to manage several versions of submodules needs to report their versions to guide a user to manage these versions.

--	Todo: Maniphest tasks :
--	Todo: Maniphest T99674 Decide on internal representation of (Gregorian and Julian) dates with negative years
To distinguish time-zone we can keep the char "T", and for geographic position, replace "T" with "G".
Our numeration is based on positions of digits, with significant zéros on the right for empty powers of ten. We cannot trunc the zeros after the left significant part.
About the century question, this is a good use of the "after" parameter: "Give me painters from 1200, along 100 years".

---------------------------------------------------------------------------------
	relecture {{Auteur3}} : module code in english (while docs are not) Guerrit : https://gerrit.wikimedia.org/r/95407
---------------------------------------------------------------------------------

--]]

local annotations = {}
annotations["lastname"] = "fn" -- familyname
annotations["firstname"] = "n"
annotations["description"] = "label"
annotations["birthyear"] = "bday"
annotations["deathyear"] = "dday"

local microformat = function(data)
	if data ~= " cette instruction desactive microformat pour debug. " then return "" end
	local text = {}
	local style = "display:none; speak:none;"
	for n,v in pairs(data) do
		local class = annotations[n]
		local datum = mw.text.tag({name="span", contents=v, params={id=n,class=class}})
		table.insert(text, datum)
	end
	return mw.text.tag({name="div", contents=table.concat(text), params={id="ws-data", class="vcard ws-noexport", style=style}})
end -- local microformat = function(data)

------------------------------------------------------------
-- Interface from the module to the template
-- Interface du module pour le modèle
------------------------------------------------------------

-- CA.nowyear = tonumber(os.date("%Y") ) -- local now_date = os.date("%Y-%m-%d %H:%M:%S")

CA.constants = CA.constants or {}
-- Categorize the year of death for 100 years
-- Clasificar el año que murió hace 100 años
-- Catégoriser l'année de décès depuis 100 ans
CA.constants.categorise_death_for_n_years = 100 -- normal = 100
-- Start writing an author after birth
-- Comience a escribir un autor después de su nacimiento
-- Début d'écriture d'un auteur après la naissance
CA.constants.author_writing_after_birth = 20 -- normal = 20
-- Finished writing a writer before his death
-- Terminó escribiendo un escritor antes de su muerte
-- Fin d'écriture d'un auteur avant son décès
CA.constants.author_writing_before_death = 5 -- normal = 5
-- Limit of normal life
-- Límite de la vida normal
-- Limite de durée de vie normale
CA.constants.author_lifetime_limit = 120 -- normal = 120
-- Limit of normal time writing of an author
-- Límite de tiempo normal de escribir de un autor
-- Limite normale de durée d'écriture d'un auteur
CA.constants.author_mean_lifetime = 85 -- normal = 85
-- Limit of normal time writing of an author
-- Límite de tiempo normal de escribir de un autor
-- Limite normale de durée d'écriture d'un auteur
CA.constants.author_writing_time_limit = CA.constants.author_lifetime_limit - CA.constants.author_writing_after_birth - CA.constants.author_writing_before_death

-- Translation in i18n tables. Tables de traductions i18n.
p.i18n = {}
p.i18n.en = { -- English translations of arguments, categories and messages :

	-- wiki_selectors -- wop function p.list_wiki_selectors(t)
	authorities_selector		= "5, VIAF, BNF, SUDOC, ISNI, LCCN, ARC, WORLDCAT, NLA, PND, GKD", -- wop
	rights_values				= "none,no,cn,50,us,70,mpf", -- wop
	region_values				= 'other,china,india,century', -- wop
	distinctions_selector		= '2,nobel,price,president,deputy', -- wop
	functions_selector			= '2,president', -- ,deputy', -- wop
	occupations_selector		= '2,biographer', -- ,politician', -- wop
	sex_values					= 'male,female', -- wop
	life_constants_of_module	= "Life constants in this module:",
	categorise_death_for_n_years= "Categorize the year of death for <b>%1 years</b>.",
	author_writing_after_birth	= "An author start writing <b>%1 years</b> after birth.",
	author_writing_before_death	= "An author writes until <b>1% years</b> before his death.",
	author_lifetime_limit		= "The maximum lifetime is <b>%1 years</b>.",
	author_mean_lifetime		= "The mean lifetime is <b>%1 years</b>.",
	
	-- ControlArgs and basic arguments
	[1]							= "1",
	["1"]						= "1",
	["1_descr"]					= "Argument of position 1.",
	[2]							= "2",
	["2"]						= "2",
	["2_descr"]					= "Argument of position 2.",
	mode						= "mode",
	mode_descr					= "Module operation mode.",
	allversions					= "allversions",
	allversions_descr			= "All versions of sub-modules.",
	selectversions				= "selectversions",
	selectversions_descr		= "Selection of the versions of the submodules.",
	userlang					= "userlang",
	userlang_descr				= "Select the user language from argument.",
	wikilang					= "wikilang",
	wikilang_descr				= "Select the wiki language from argument.",
	
	-- Names and descriptions of arguments
	needed_to_verify			= "(required, to be checked)",
	list_needed_arguments		= "List of needed arguments:",
	list_all_other_arguments	= "List of other arguments:",
	list_all_authorities		= "List of bases of authorities:",
	list_all_system_arguments	= "List of system arguments:",
	entityid					= 'id',
	entityid_descr				= "Identifier of Wikidata data, such as <code>Q535</code> for Victor Hugo.",
	entityid2					= 'entityid',
	entityid2_descr				= "Identifier of Wikidata data, such as <code>Q535</code> for Victor Hugo.",
	title						= 'title',
	title_descr					= "Page title, automatic.",
	label						= 'label',
	label_descr					= "Part of the title of the page, automatic.",
	sitelink					= 'sitelink',
	sitelink_descr				= "Part of the title of the page, automatic.",
	namespace					= 'espace',
	namespace_descr				= "Name of the space where is the page, automatic.",
	category					= 'Category',
	category_descr				= "Name of the space Category.",
	doc1key						= 'doc1key',
	doc1key_descr				= 'Identifier of the documentation to produce in mode doc1.',
--	commonscat					= 'commonscat',
--	commonscat_descr			= 'commonscat',
	
	-- ModuleAuthor template arguments
	familyname					= 'lastname',
	familyname_descr			= "Family name. Helps to correct the sort key category.",
	firstname					= 'firstnames',
	firstname_descr				= "First names. Helps to correct the sort key category.",
	firstname2					= 'firstnames',
	firstname2_descr			= "First names. Helps to correct the sort key category.",
	galliname					= 'galliname',
	galliname_descr				= "Special partial name for Gallica autority of author.",
	initial						= 'initial',
	initial_descr				= "Initial to correct the category of author.",
	pseudonym					= 'pseudonym',
	pseudonym_descr				= 'Pseudonym of the author.',
	sex							= 'sex',
	sex_descr					= "Sex of the author.",
	sortkey						= 'sortkey',
	sortkey_descr				= "Sort key for the original author-initial.",
	sortkey2					= 'sortkey',
	sortkey2_descr				= "Sort key for the category Author-initial.",
	sortkey_txt					= 'sortkey_txt',
	sortkey_txt_descr			= 'Display of sortkey, automatic.',
	sortkey_txt_descr			= 'Visualización de clave de ordenación, automática.',
	sortkey_txt_descr			= 'Affichage de clef de tri, automatique.',
	sortkey_test				= 'sortkey_test',
	sortkey_test_descr			= 'Display of sortkey, automatic.',
	sortkey_test_descr			= 'Visualización de clave de ordenación, automática.',
	sortkey_test_descr			= 'Affichage de clef de tri, automatique.',
	image						= 'image',
	image_descr					= "Image of the author.",
	birthyear					= 'birthyear',
	birthyear_descr				= "Year of birth.",
	birth						= 'birth',
	birth_descr					= "Year of birth.",
	birthcentury				= 'birthcentury',
	birthcentury_descr			= "The author's birth century.",
--	birthuncertain				= 'birthuncertain',
	precededby					= "preceded by",
	precededby_descr			= "Preceded in his function by...",
	preceded_by					= ", successor to %1",

	region						= 'region', -- argument with verified multiple values
	region_descr				= 'Region to determine the ancient periods.',
	year_epoch					= 'epoch',
	year_epoch_descr			= 'Year to determine an epoch or a century.',
	deathyear					= 'deathyear',
	deathyear_descr				= "Year of death.",
	death						= 'death',
	death_descr					= "Year of death.",
	deathcentury				= 'deathcentury',
	deathcentury_descr			= "Century of the author's death.",
--	deathuncertain				= 'deathuncertain',
	description					= 'description',
	description_descr			= "Author's description, to clarify whether the automatic description does not fit.",

	multi_selector_description	= "Multiple selectors for description: %1",
	authorities_arg				= 'authorities',
	authorities_arg_descr		= "Selection of authors authorities.",
	distinctions				= 'distinctions',
	distinctions_descr			= "Distinctions awarded to author.",
	functions					= 'functions',
	functions_descr				= "Important functions exercised by the author.",
	occupations					= 'occupations',
	occupations_descr			= "Author occupations.",

	genre						= 'genre',
	genre_descr					= "Literary genre of the author.",
	language					= 'language',
	language_descr				= 'Native language of the author.',
	languages					= 'languages',
	languages_descr				= 'Other languages of the author.',
--	nationality					= 'nationality',
	prize						= 'prize',
	prize_descr					= "Excellence Award given to the author.",
	wikipedia					= 'wikipedia',
	wikipedia_descr				= 'Title of the page in wikipedia.',
	wikiquote					= 'wikiquote',
	wikiquote_descr				= 'Title of the page in wikiquote.',
	commons						= 'commons',
	commons_descr				= 'Title of the page in commons.',
	indexpages					= 'indexpages',
	indexpages_descr			= 'indexpages in Wikisource.',

	rights						= 'rights', -- argument with verified multiple values
	rights_descr				= "Necessary copyrights type: 70,50,mpf,non.",
	rights_limit_txt			= 'rights=%1',
	err_undefined_rights		= 'Copyrights for the author are not defined.',
	rights_values_box_70		= "DP-EU-Author",
	rights_values_cat_70		= "Author in public domain in USA",
	rights_values_txt_70		= "[[File:Info icon 001.svg|left|48px|link=]]Some works of the author may be in the [[w:en:Public domain (IP) | Public domain]] to [[w:en:Copyright in the United States | US]], but subject to copyright in some countries, especially in Europe. Downloads are done under [[Aide:Droit_d%E2%80%99auteur|your responsibility]].",
	rights_values_box_50		= "DP-CN-Author",
	rights_values_cat_50		= "Author in public domain in Canada",
	rights_values_txt_50		= "[[File:Info icon 001.svg|left|48px|link=]]Works by this author may be in the [[w:en:Public domain (IP) | Public domain]] to [[w:en:Copyright to Canada | Canada]], but subject to copyright in some countries, including in Europe and in [[w:en:Copyright in the United States | US]]. Downloads are done under [[Aide:Droit_d%E2%80%99auteur|your responsibility]].",
	rights_values_box_mpf		= "Death for France",
	rights_values_cat_mpf		= "Author death for France",
	rights_values_txt_mpf		= "[[File:Info icon 001.svg|left|48px|link=]] This author is declared « [[w:en:Death to France | Death to France]] » by the French government. Consequently, his copyrights are extended by 30 years, and his works are not in the public domain in France. Downloads are done under [[Aide:Droit_d%E2%80%99auteur|your responsibility]].",
	rights_values_box_none		= "DP-Public-Author",
	rights_values_cat_none		= "Author in public domain",
	rights_values_txt_none		= "[[Image:PD-icon.svg|64px|Domaine public]] This author has renounced its rights ('' copyright '') or his rights have expired. His works are part of the [[w:en:Public domain in intellectual property law | public domain]] and are freely distributable and / or modified.",
	rights_values_cat_unknown	= "Unknown author rights",
	rights_values_box_unknown	= "Unknown author rights",
	rights_values_txt_unknown	= "[[File:Info icon 001.svg|left|48px|link=]] The copyrights of the author are not defined. His works are perhaps still under copyright in some countries, particularly in Europe and in [[w:en:Copyright in the United States | US]].	Downloads are done under [[Aide:Droit_d%E2%80%99auteur|your responsibility]].",
	new_public_rights_authors	= "Recent public domain authors",
	
	-- oldargs selon wikisource Modèle:Auteur/Documentation le 05/01/2014
--	birth_text					= 'birthText',
--	death_text					= 'deathText',
--	birth_type					= 'birthType',
--	death_type					= 'deathType',
--	birth_link					= 'birthLink',
--	death_link					= 'deathLink',
--	birth_link2					= 'birthLink2',
--	death_link2					= 'deathLink2',

	-- Scans and Authorities
	author_scans_text			= 'Scans and authorities',
	author_Notices				= 'Authorities',
	entityid					= 'entityid',
	entityid2					= 'id',
	ARC							= 'ARC',
	ARC_descr					= 'Authority: Internet Archive.',
	ARCgeo						= 'ARCgeo',
	ARCgeo_descr				= 'Authority: Internet Archive.',
	ARCid						= 'ARCid',
	ARCid_descr					= 'Authority: Internet Archive.',
	ARCitem						= 'ARCitem',
	ARCitem_descr				= 'Authority: Internet Archive.',
	ARCorg						= 'ARCorg',
	ARCorg_descr				= 'Authority: Internet Archive.',
	ARCsub						= 'ARCsub',
	ARCsub_descr				= 'Authority: Internet Archive.',
	ARCHIVE						= 'ARCHIVE',
	ARCHIVE_descr				= 'Authority: Internet Archive.',
	ARCHIVEbook					= 'ARCHIVEbook',
	ARCHIVEbook_descr			= 'Authority: Internet Archive.',
	BNF							= 'BNF',
	BNF_descr					= 'Authority: Bibliothèque nationale de France.',
	BNFbook						= 'BNFbook',
	BNFbook_descr				= 'Authority: Bibliothèque nationale de France.',
	CANTIC						= 'CANTIC',
	CANTIC_descr				= 'Authority: Name and Title Authority File of Catalonia.',
	DNB							= 'DNB',
	DNB_descr					= 'Authority: German National Library.',
	
	GKD							= 'GKD',
	GKD_descr					= 'Authority: Integrated Authority File.',
	GKD_V1						= 'GKD_V1',
	GKD_V1_descr				= 'Authority: Integrated Authority File.',
	GND							= 'GND',
	GND_descr					= 'Authority: Integrated Authority File.',
	
	IA							= 'IA',
	IA_descr					= 'Authority: Internet Archive.',
	IBL							= 'IBL',
	IBL_descr					= 'Authority: Inquiry-based learning.',
	IBLid						= 'IBLid',
	IBLid_descr					= 'Authority: Inquiry-based learning.',
	IBLbook						= 'IBLbook',
	IBLbook_descr				= 'Authority: Inquiry-based learning.',
	IMDb						= 'IMDb',
	IMDb_descr					= 'Authority: Internet Movie Database.',
	ISBN						= 'ISBN',
	ISBN_descr					= 'Authority: International Standard Book Number.',
	ISFDB						= 'ISFDB',
	ISFDB_descr					= 'Authority: Internet Speculative Fiction Database.',
	ISFDBid						= 'ISFDBid',
	ISFDBid_descr				= 'Authority: Internet Speculative Fiction Database.',
	ISFDBpub					= 'ISFDBpub',
	ISFDBpub_descr				= 'Authority: Internet Speculative Fiction Database.',
	ISFDBtitle					= 'ISFDBtitle',
	ISFDBtitle_descr			= 'Authority: Internet Speculative Fiction Database.',
	ISNI						= 'ISNI',
	ISNI_descr					= 'Authority: International Standard Name Identifier.',
	LCCN						= 'LCCN',
	LCCN_descr					= 'Authority: Library of Congress Control Number.',
	LCCNid						= 'LCCNid',
	LCCNid_descr				= 'Authority: Library of Congress Control Number.',

	NDL							= 'NDL',
	NDL_descr					= 'Authority: Neue deutsche literatur.',
	NKC							= 'NKC',
	NKC_descr					= 'Authority: National Library of the Czech Republic.',
	NLA							= 'NLA',
	NLA_descr					= 'Authority: National Language Promotion Department of Pakistan.',
	OCLC						= 'OCLC',
	OCLC_descr					= 'Authority: Online Computer Library Center.',
	OL							= 'OL',
	OL_descr					= 'Authority: Open Library.',
	OLbook						= 'OLbook',
	OLbook_descr				= 'Authority: Open Library.',
	
	PND							= 'PND',
	PND_descr					= 'Authority: Personennamendatei.',
	SELIBR						= 'SELIBR',
	SELIBR_descr				= 'Authority: National Library of Sweden.', --  Bibliothèque royale (Suède)
	SUDOC						= 'SUDOC',
	SUDOC_descr					= 'Authority: Système universitaire de documentation.',
	SWD							= 'SWD',
	SWD_descr					= 'Authority: Schlagwortnormdatei.',
	ULAN						= 'ULAN',
	ULAN_descr					= 'Authority: Union List of Artist Names.',
	VIAF						= 'VIAF',
	VIAF_descr					= "Authority: Virtual International Authority File.",
	WORLDCAT					= 'Worldcat',
	WORLDCAT_descr				= "Authority: WorldCat.",
	WORLDCATbook				= 'WORLDCATbook',
	WORLDCATbook_descr			= "Authority: WorldCat.",
	WORLDCATch					= 'WORLDCATch',
	WORLDCATch_descr			= "Authority: WorldCat.",
	WORLDCATid					= 'WORLDCATid',
	WORLDCATid_descr			= "Authority: WorldCat.",

	-- Categories and Various messages
	authors_authors				= "Authors",
	authors_initial_cat			= "Authors-%1",
	authors_initiale_txt		= "Authors&nbsp;%1",
	authors_initiale_pop		= "Authors with initial %1",
	box_links_indexpages		= "Facsimile",
	box_links_biography			= "Biography",
	box_links_wikiquote			= "Quotes",
	box_links_commons			= "Media",
	entityid_txt				= "Datas", -- Structured datas
	authors_birthyear			= 'Born in %1',
	authors_deathyear			= 'Death in %1',
	authors_birth_century		= "Born in %1..",
	authors_death_century		= "Death in %1..",
	list_limit_levelmaxi		= "Structure limit levelmaxi=%1",
	list_limit_maxn				= "Structure limit maxn=%1",
	limit_cat_birth_death		= 'Limit the years of categories "Births in" and "Death in".',
	cat_female_authors			= "Women authors",
	cat_male_authors			= "Men authors",
	cat_group_languages			= "Authors %1", -- writing in 
	cat_epoch_china_antiquity	= "Author of Chinese antiquity",
	cat_epoch_china_springs		= "Author of Springs and Autumns",
	cat_epoch_china_empires		= "Author of Chinese empires",
--	cat_epoch_indian_indus		= "Author of Indus civilisation",
--	cat_epoch_indian_muslim		= "Author of Indo-Muslim period",
	cat_epoch_indian_antiquity	= "Author of Indian antiquity",
	cat_epoch_indian_classic	= "Author of classic Indian period",
	cat_epoch_indian_middle_age = "Author of classic Indian Middle Age",
	cat_epoch_antiquity			= "Author of antiquity",
	cat_epoch_middle_age		= "Author of Middle Ages",
	cat_epoch_century_CE		= "Author in the %1th century",
	cat_epoch_century_BCE		= "Author in the %1th century B.C.",
	cat_epoch_century_CE_1		= "Author in the %1st century‎",
	cat_epoch_century_BCE_1		= "Author in the %1st century B.C.",
	-- BCE = Before Common Era = «BC». AEC = Antes de la Era Común = «a. C.». AEC = Avant l'ère commune = «av. J.-C.»
	century_CE					= "%1<sup>th</sup> century",
	century_BCE					= "%1<sup>th</sup> century B.C.",
	century_CE_1				= "%1<sup>st</sup> century",
	century_BCE_1				= "%1<sup>st</sup> century B.C.",
	year_BCE					= "%1 B.C.",

	-- Error messages and categories
	-- These messages should also include those of module(s) called.
	all_versions_text			= "Versions warning: '''%1''', list: %2, normal: %3.",
	err_one_number_argument		= "Error: In parameter '''%1''', enter a single number between -5000 and now.",
	err_assist_user_param		= "User support for checking the settings:",
	err_module_error			= "Module error",
	err_auto_val_unknown		= "Internal Error: Unknown automatic argument: %1 = '''%2'''.",
	err_no_known_arguments		= "Module without known arguments table.",
	err_unknown_auto_arg		= "Internal Error: Unknown automatic argument : %1 = '''%2'''.",
	err_args_values				= "Abnormal value of the argument '''%1 = %2''' (%3)",
	msg_delete_docbox			= "This documentation/support must be removed before recording.<br/>Remove all modes to return to normal mode.",
	msg_automatic_argument		= "Verify the automatic argument '''%1'''.",
	msg_auto_val_warning		= "Verify the automatic argument: %1 = '''%2'''.",
	--
	err_vague_year				= "Uncertain year.",
	err_death_before_birth		= "Error: death '''%1''' is before birth '''%2'''.",
	err_death_before_birth_cat	= "Author death is before birth.",
	err_life_too_long			= "Life is too long from %1 to %2.",
	err_life_too_long_cat		= "Life of author is too long",

	date_to_part_format			= " dd yyyy mmmm",
	date_to_part_call_err		= "Internal Error: Abnormal calling arguments in date '''%1''', '''%2'''.",
	date_to_part_call_cat		= "Module with internal error",
	date_to_part_err_not_found	= "Internal Error: No part found in date '''%1''', '''%2'''.",

	err_vague_epoch				= "Uncertain times.",
	err_unknown_epoch_cat		= "Unknown epoch",
	err_year_in_roman_number	= "Ambiguity: the year '''%1''' is in roman numerals. Do you want define a century ?",
	err_roman2int				= "Error in roman number in argument %1 = '''%2''' ; %3 %4. ",
	err_notices_properties		= "Internal Error: An authority record is undefined : %1.",
	err_notices_properties_cat	= "Internal Error: One or more authority record is undefined.",
	err_author_without_authority= "Error: Author without authority",
	cat_author_without_authority= "Authors without authority",
	err_deprecated_authority	= "This base of authority, %1, is old and should be avoided.",

	docbox_namespace_valid		= "Help Mod-ule Project Template",
	docbox_namespace_stop		= "Aut-eur Ma-in Page",
	docbox_namespace_error		= "Auteur Main Page",
	docbox_namespace_error_cat	= "Module with usage error",
	docbox_namespace_error_err	= "<b>Return to normal mode</b> before you save the page, by removing all modes, because the documentation panel is prohibited in the space '''%1:'''.",

	-- These messages are used to CA = ControlArgs module and are copied here.
	c							= 'c',
	c_descr						= 'Options to add with mode options.',
	options						= 'options',
	options_descr				= 'Options to add with mode options.',
	err_error_list_header		= "User support about parameters:",
	err_unknown_argument		= "Error: parameter '''%1''' is unknown in this template. Check the name or flag this gap.",
	err_nearest_argument		= "Error: the known argument '''%1''' is it the one you need ?",
	err_value_re_defined		= "Error: the value of the argument '''%1''' is already defined. Choose only one value of a single synonym.",
	err_need_value				= "Error: This argument is required but absent : '''%1'''. Should define it.",
	err_none_value				= "Error: No argument has been defined.",
	err_too_unnamed_arguments	= "Error: Too many unnamed arguments ( '''%1''' ).",
	err_internal_notice_wsid	= "Internal Error: Notify the developer that the internal argument '''%1''' is unknown in the records.",
	err_notice_link				= "Error: bad notice for '''%1'''.",
	err_notice_link_cat			= "Module with bad notice",
	list_limit_levelmaxi		= "List limit levelmaxi=%1",
	list_limit_max_n			= "List limit max_n=%1",
	err_module_miss_i18n_cat	= "Module missing i18n translation",

	-- These texts are used to title some tests.
	list_wiki_selectors_title		= "List of this wiki selectors:",
	list_all_categories_title		= "List of all eventual categories of this wiki:",
	list_all_errors_title			= "List all detectable errors of this wiki:",
	selected_autorities_title		= "List of selected authorities",
	multiple_values_tests_title		= "Test of multiple values arguments",
	authorities_notices_test_title	= "Test all authorities notices",
	authorities_notices_test_deprec = "Test all know authority notices, some are deprecated (in grey)",
	authorities_select_test_title	= "Selecting Wikidata authorities",
	authorities_select_test_header	= "Argument from Wikidata, Selector, Arguments from template, Selected arguments",
	multiple_selection_test_title	= "Multiple selection test",
	multiple_selection_test_header	= "Options,Selector,To select,Selected",
	multiple_selection_test_select	= "2,nobel,president,deputy,price",
	firstname_familyname_test_title	= "Test of name, first name and sort key",
	firstname_familyname_test_header= "Title received, Label received, Firstname received, Familyname received, Initiale received, Final initial, Final sortkey, test details",
	options_from_mode_title			= "Test options from mode",
	copyright_box_test_title		= "Test of copyrights info boxes",
	author_rights_test_title		= "Test of authors copyrights",
	author_rights_test_header		= "birthyear, deathyear, rightype, rightuse, copyright box, start of rights. category and error",
	unique_century_life_test_title	= "Single century of an author",
	year_to_epoch_test_title		= "Centuries and epochs from years",
	century_to_epoch_test_title		= "Centuries according from Centuries",
	events_epochs_test_title		= "Events and epochs",
	roman_to_digital_test_title		= "Test from roman to digital numbers",
	digital_to_roman_test_title		= "Test from digital to roman numbers",

} -- p.i18n.en

p.i18n.es = { -- Traducciones al español de los argumentos, categorías y mensajes:

	-- wiki_selectors -- wop
	authorities_selector		= "5, VIAF, BNF, SUDOC, ISNI, LCCN, ARC, WORLDCAT, NLA, PND, GKD", -- wop
	rights_values				= "none,nada,cn,50,us,70,mpf", -- wop
	region_values				= 'otros,china,india,siglo', -- wop
	distinctions_selector		= '2,nobel,precio,presidente,diputado', -- wop
	functions_selector			= '2,presidente', -- ,diputado', -- wop
	occupations_selector		= '2,biógrafo', -- ,política', -- wop
	sex_values					= 'hombre,mujer', -- wop
	life_constants_of_module	= "Constantes de la vida en este módulo:",
	categorise_death_for_n_years= "Clasificar año de la muerte de <b>%1 años</b>",
	author_writing_after_birth	= "Un autor comienza a escribir <b>%1 años</b> después del nacimiento.",
	author_writing_before_death	= "Un autor escrito de hasta <b>1% años</b> anterior a su muerte.",
	author_lifetime_limit		= "El tiempo de vida máximo es <b>%1 años</b>.",
	author_mean_lifetime		= "El tiempo de vida medio es <b>%1 years</b>.",

	-- to debug for arg 1, arg 2 :
	[1]							= "1",
	["1"]						= "1",
	["1_descr"]					= "Argumento de posición 1.",
	[2]							= "2",
	["2"]						= "2",
	["2_descr"]					= "Argumento de posición 2.",
	mode						= "modo",
	mode_descr					= "Modo de operación del módulo.",
	allversions					= "allversions",
	allversions_descr			= "Todas las versiones de submódulos.",
	selectversions				= "selectversions",
	selectversions_descr		= "Selección de versiones de submódulos.",
	userlang					= "userlang",
	userlang_descr				= "Seleccionar el idioma del usuario de argumento.",
	wikilang					= "wikilang",
	wikilang_descr				= "Seleccionar el idioma del wiki de argumento.",
	
	-- Nombres y descripciones de los argumentos
	needed_to_verify			= "(obligatorio, se debe comprobar)",
	list_needed_arguments		= "Lista de argumentos necesarios:",
	list_all_other_arguments	= "Lista de otros argumentos:",
	list_all_authorities		= "Lista de bases de las autoridades:",
	list_all_system_arguments	= "Lista de argumentos del sistema:",
	entityid					= 'id',
	entityid_descr				= "Nombre de los datos Wikidata, como <code>Q535</code> para Victor Hugo.",
	entityid2					= 'entityid',
	entityid2_descr				= "Nombre de los datos Wikidata, como <code>Q535</code> para Victor Hugo.",
	title						= 'title',
	title_descr					= "Título de la página, automático.",
	label						= 'label',
	label_descr					= "Parte del título de la página, automática.",
	sitelink					= 'sitelink',
	sitelink_descr				= "Parte del título de la página, automática.",
	namespace					= 'espace',
	namespace_descr				= "Nombre del espacio donde la página, automático.",
	category					= 'Categoría',
	category_descr				= "Nombre del espacio Categoría.",
	doc1key						= 'doc1key',
	doc1key_descr				= 'Identificación de la documentación para producir en modo doc1.',
--	commonscat					= 'commonscat',
--	commonscat_descr			= 'commonscat',

	-- ModuleAuthor argumentos de plantilla
	familyname					= 'nombre',
	familyname_descr			= "Nombre. Ayuda a corregir la clave de ordenación de la categoría.",
	firstname					= 'primeros',
	firstname_descr				= "Primeros. Ayuda a corregir la clave de ordenación de la categoría.",
	firstname2					= 'primeros',
	firstname2_descr			= "Primeros, Ayuda a corregir la clave de ordenación de la categoría.",
	galliname					= 'apellidoGalli',
	galliname_descr				= "Nombre parcial Especial para Gallica autoridad del autor.",
	initial						= 'inicial',
	initial_descr				= "Inicial para corregir la categoría del autor.",
	pseudonym					= 'apodo',
	pseudonym_descr				= 'Seudónimo del autor.',
	title						= 'titulo',
	title_descr					= "Título de la página, automático.",
	sex							= 'sexo',
	sex_descr					= "Sexo del autor.",
	sortkey						= 'clave',
	sortkey_descr				= "Ordenar clave para la clase de derechos de autor inicial.",
	sortkey2					= 'clave',
	sortkey2_descr				= "Ordenar clave para la categoría de Autor-inicial.",
	sortkey_txt					= 'sortkey_txt',
	sortkey_txt_descr			= 'Visualización de clave de ordenación, automática.',
	sortkey_test				= 'sortkey_test',
	sortkey_test_descr			= 'Visualización de clave de ordenación, automática.',
	image						= 'imagen',
	image_descr					= "Imagen del autor.",
	birthyear					= 'anoNacimiento',
	birthyear_descr				= "Año de nacimiento.",
	birth						= 'nacimiento',
	birth_descr					= "Año de nacimiento.",
	birthcentury				= 'sigloNacimiento',
	birthcentury_descr			= "Siglo del nacimiento del autor.",
--	birthuncertain				= 'nacimientoIncierto',
	precededby					= "precedido por",
	precededby_descr			= "Precedido en su función por...",
	preceded_by					= ", era el sucesor de %1",

	region						= 'region',
	region_descr				= 'Región para determinar los tiempos antiguos.',
	year_epoch					= 'epoca', -- año época
	year_epoch_descr			= 'Año para determinar un tiempo o un siglo.',
	deathyear					= 'anoMuerte',
	deathyear_descr				= "Año de la muerte.",
	death						= 'muerte',
	death_descr					= "Año de la muerte.",
	deathcentury				= 'sigloMuerte',
	deathcentury_descr			= "Siglo de la muerte del autor.",
--	deathuncertain				= 'muerteIncierto',
	description					= 'descripcion',
	description_descr			= "Descripción del autor, para aclarar si la descripción automática no encaja.",

	multi_selector_description	= "Selectores múltiple para la descripción: %1",
	authorities_arg				= 'registros',
	authorities_arg_descr		= "Selección de las autoridades de los autores.",
	distinctions				= 'distincións',
	distinctions_descr			= "Honores otorgados al autor.",
	functions					= 'funcións',
	functions_descr				= "Las funciones importantes realizadas por el autor.",
	occupations					= 'ocupacións',
	occupations_descr			= "Las ocupacións del autor.",

	genre						= 'tipo',
	genre_descr					= "Género literario de le autor.",
	language					= 'lengua',
	language_descr				= "Lengua materna del autor.",
	languages					= 'lenguas',
	languages_descr				= 'Otros idiomas del autor.',
--	nationality					= 'pais',
	prize						= 'premio',
	prize_descr					= "Premio de Excelencia dado al autor.",
	wikipedia					= 'wikipedia',
	wikipedia_descr				= 'Título de la página en wikipedia.',
	wikiquote					= 'wikiquote',
	wikiquote_descr				= 'Título de la página en wikiquote.',
	commons						= 'commons',
	commons_descr				= 'Título de la página en commons.',
	indexpages					= 'indexpages',
	indexpages_descr			= 'indexpages en Wikisource.',

	rights						= 'derechos',
	rights_descr				= "Tipo de derechos de autor necesario: 70,50,mpf,non.",
	rights_limit_txt			= 'derechos=%1',
	err_undefined_rights		= 'Los derechos de autor no están definidos.',
	rights_values_box_70		= "DP-EU-Autore",
	rights_values_cat_70		= "Autores en el dominio público en los Estados Unidos",
	rights_values_txt_70		= "[[File:Info icon 001.svg|left|48px|link=]]Algunas obras del autor pueden estar en la [[w:es:Dominio público (IP) | Dominio público]] a [[w:es: Derechos de Autor en los Estados Unidos | Estados Unidos]], pero sujeto a derechos de autor en algunos países, especialmente en Europa. La descarga se realiza bajo [[Aide:Droit_d%E2%80%99auteur|su responsabilidad]].",
	rights_values_box_50		= "DP-CN-Autore",
	rights_values_cat_50		= "Autore en el dominio público en Canada",
	rights_values_txt_50		= "[[File:Info icon 001.svg|left|48px|link=]]Obras de este autor pueden estar en la [[w:es:Dominio público (IP) | Dominio público]] a [[w:es:Copyright a Canadá | Canadá]], pero sujeto a derechos de autor en algunos países, incluyendo en Europa y en el [[w: Derechos de Autor en los Estados Unidos | Estados Unidos]]. La descarga se realiza bajo [[Aide:Droit_d%E2%80%99auteur|su responsabilidad]].",
	rights_values_box_mpf		= "Muerte hacia Francia",
	rights_values_cat_mpf		= "Autore muerte hacia Francia", -- Modèle:Auteur Mort pour la France
	rights_values_txt_mpf		= '[[File:Info icon 001.svg|left|48px|link=]]Este autor es declaró « [[w:es:Muerte hacia Francia | hacia Francia hacia Francia]] » por el gobierno francés. En consecuencia, su derecho de autor se extiende por 30 años, y sus obras están en el dominio público en Francia. La descarga se realiza bajo [[Aide:Droit_d%E2%80%99auteur|su responsabilidad]].',
	rights_values_box_none		= "DP-Public-Autore",
	rights_values_cat_none		= "Autore en el dominio público", -- Modèle:Domaine public Auteur
	rights_values_txt_none		= "[[Image:PD-icon.svg|64px|Domaine public]] Este autor ha renunciado a sus derechos ('' copyright '') o sus derechos han expirado. Sus obras forman parte del [[w: dominio público en la legislación de propiedad intelectual | dominio público]] y son de libre disposición y / o modificado.",
	rights_values_cat_unknown	= "Derechos de autor desconocido",
	rights_values_box_unknown	= "Derechos de autor desconocido",
	rights_values_txt_unknown	= '[[File:Info icon 001.svg|left|48px|link=]] Los derechos de autor no están definidos. Sus obras son quizás todavía bajo copyright en algunos países, especialmente en Europa y en el [[w:es: Derechos de Autor en los Estados Unidos | Estados Unidos]]. La descarga se realiza bajo [[Aide:Droit_d%E2%80%99auteur|su responsabilidad]].',
	new_public_rights_authors	= "Recientes autores de dominio público",
	
	-- oldargs selon wikisource Modèle:Auteur/Documentation le 05/01/2014
--	birth_text					= 'textNacido',
--	death_text					= 'textMuerto',
--	birth_type					= 'nacimientoTipo',
--	death_type					= 'muertoTipo',
--	birth_link					= 'enlaceNacimiento',
--	death_link					= 'enlaceMuerto',
--	birth_link2					= 'enlace2Nacimiento',
--	death_link2					= 'enlace2Muerto',

	-- Scans y Autoridades
	author_scans_text			= 'Escanea y autoridades',
	author_Notices				= 'Avisos',
	ARC							= 'ARC',
	ARC_descr					= 'Autoridad: Internet Archive.',
	ARCgeo						= 'ARCgeo',
	ARCgeo_descr				= 'Autoridad: Internet Archive.',
	ARCid						= 'ARCid',
	ARCid_descr					= 'Autoridad: Internet Archive.',
	ARCitem						= 'ARCitem',
	ARCitem_descr				= 'Autoridad: Internet Archive.',
	ARCorg						= 'ARCorg',
	ARCorg_descr				= 'Autoridad: Internet Archive.',
	ARCsub						= 'ARCsub',
	ARCsub_descr				= 'Autoridad: Internet Archive.',
	ARCHIVE						= 'ARCHIVE',
	ARCHIVE_descr				= 'Autoridad: Internet Archive.',
	ARCHIVEbook					= 'ARCHIVEbook',
	ARCHIVEbook_descr			= 'Autoridad: Internet Archive.',
	BNF							= 'BNF',
	BNF_descr					= 'Autoridad: Biblioteca Nacional de Francia.',
	BNFbook						= 'BNFbook',
	BNFbook_descr				= 'Autoridad: Biblioteca Nacional de Francia.',
	CANTIC						= 'CANTIC',
	CANTIC_descr				= 'Autoridad: Catálogo de autoridades de nombres y títulos de Cataluña.',
	DNB							= 'DNB',
	DNB_descr					= 'Autoridad: Biblioteca Nacional de Alemania.',

	GKD							= 'GKD',
	GKD_descr					= 'Autoridad: Gemeinsame Normdatei.',
	GKD_V1						= 'GKD_V1',
	GKD_V1_descr				= 'Autoridad: Gemeinsame Normdatei.',
	GND							= 'GND',
	GND_descr					= 'Autoridad: Gemeinsame Normdatei.',
	
	IA							= 'IA',
	IA_descr					= 'Autoridad: Internet Archive.',
	IBL							= 'IBL',
	IBL_descr					= 'Autoridad: Enseñanza reflexiva.',
	IBLid						= 'IBLid',
	IBLid_descr					= 'Autoridad: Enseñanza reflexiva.',
	IBLbook						= 'IBLbook',
	IBLbook_descr				= 'Autoridad: Enseñanza reflexiva.',
	IMDb						= 'IMDb',
	IMDb_descr					= 'Autoridad: Internet Movie Database.',
	ISBN						= 'ISBN',
	ISBN_descr					= 'Autoridad: International Standard Book Number.',
	
	ISFDB						= 'ISFDB',
	ISFDB_descr					= 'Autoridad: Internet Speculative Fiction Database.',
	ISFDBid						= 'ISFDBid',
	ISFDBid_descr				= 'Autoridad: Internet Speculative Fiction Database.',
	ISFDBpub					= 'ISFDBpub',
	ISFDBpub_descr				= 'Autoridad: Internet Speculative Fiction Database.',
	ISFDBtitle					= 'ISFDBtitle',
	ISFDBtitle_descr			= 'Autoridad: Internet Speculative Fiction Database.',
	
	ISNI						= 'ISNI',
	ISNI_descr					= 'Autoridad: International Standard Name Identifier.',
	LCCN						= 'LCCN',
	LCCN_descr					= 'Autoridad: Library of Congress Control Number.',
	LCCNid						= 'LCCNid',
	LCCNid_descr				= 'Autoridad: Library of Congress Control Number.',

	NDL							= 'NDL',
	NDL_descr					= 'Autoridad: Neue deutsche literatur.',
	NKC							= 'NKC',
	NKC_descr					= 'Autoridad: National Library of the Czech Republic.',
	NLA							= 'NLA',
	NLA_descr					= 'Autoridad: National Language Promotion Department of Pakistan.',
	OCLC						= 'OCLC',
	OCLC_descr					= 'Autoridad: Online Computer Library Center.',
	OL							= 'OL',
	OL_descr					= 'Autoridad: Open Library.',
	OLbook						= 'OLbook',
	OLbook_descr				= 'Autoridad: Open Library.',
	PND							= 'PND',
	PND_descr					= 'Autoridad: Personennamendatei.',
	SELIBR						= 'SELIBR',
	SELIBR_descr				= 'Autoridad: National Library of Sweden.', --  Bibliothèque royale (Suède)
	SUDOC						= 'SUDOC',
	SUDOC_descr					= 'Autoridad: Système universitaire de documentation.',
	SWD							= 'SWD',
	SWD_descr					= 'Autoridad: Schlagwortnormdatei.',
	ULAN						= 'ULAN',
	ULAN_descr					= 'Autoridad: Union List of Artist Names.',
	VIAF						= 'VIAF',
	VIAF_descr					= "Autoridad: Fichero de Autoridades Virtual Internacional.",
	WORLDCAT					= 'Worldcat',
	WORLDCAT_descr				= "Autoridad: WorldCat.",
	WORLDCATbook				= 'WORLDCATbook',
	WORLDCATbook_descr			= "Autoridad: WorldCat.",
	WORLDCATch					= 'WORLDCATch',
	WORLDCATch_descr			= "Autoridad: WorldCat.",
	WORLDCATid					= 'WORLDCATid',
	WORLDCATid_descr			= "Autoridad: WorldCat.",

	-- Categorías y Varios mensajes
	-- Estos mensajes deben incluir también los de módulo(s) llamado.
	authors_authors				= "Autores",
	authors_initial_cat			= "Autores-%1",
	authors_initiale_txt		= "Autores&nbsp;%1",
	authors_initiale_pop		= "Autores con inicial %1",
	box_links_indexpages		= "Facsímil",
	box_links_biography			= "Biografía",
	box_links_wikiquote			= "Quotes",
	box_links_commons			= "Media",
	entityid_txt				= "Datos", -- Estructurado datos
	authors_birthyear			= 'Nacido en el año %1',
	authors_deathyear			= 'Muerte en %1',
	authors_birth_century		= "Nacido en el año %1..",
	authors_death_century		= "Muerte en %1..",
	list_limit_levelmaxi		= "Limite de la estructura levelmaxi=%1",
	list_limit_maxn				= "Limite de la estructura maxn=%1",
	limit_cat_birth_death		= 'Limite los años de las categorías "Nacimientos en" y "Muerte en".',
	cat_female_authors			= "Mujeres autores",
	cat_male_authors			= "Men autores",
	cat_group_languages			= "Autores %1", -- que escriben en 
	cat_epoch_china_antiquity	= "Autor de la antigüedad china",
	cat_epoch_china_springs		= "Autor de Primaveras y Otoños",
	cat_epoch_china_empires		= "Autor de los Imperios chinos",
--	cat_epoch_indian_indus		= "Autor de la civilización del Indo",
--	cat_epoch_indian_muslim		= "Autor de el período indo-musulmán",
	cat_epoch_indian_antiquity	= "Autor de la antigüedad india",
	cat_epoch_indian_classic	= "Autor del período clásico de la India",
	cat_epoch_indian_middle_age = "Autor de la Edad Media de la India",
	cat_epoch_antiquity			= "Autor de la antigüedad",
	cat_epoch_middle_age		= "Autor de la Edad Media",
	cat_epoch_century_CE		= "Autor de el siglo del día 1%",
	cat_epoch_century_BCE		= "Autor de el siglo a. C. día 1%",
	cat_epoch_century_CE_1		= "Autor de el siglo del día 1%‎a", -- categories do not support exponants
	cat_epoch_century_BCE_1		= "Autor de el siglo a. C. día 1%a", -- categories do not support exponants
	-- BCE = Before Common Era = «BC». AEC = Antes de la Era Común = «a. C.». AEC = Avant l'ère commune = «av. J.-C.»
	century_CE					= "%1 siglo",
	century_BCE					= "%1 siglo a. C.",
	century_CE_1				= "%1<sup>a</sup> siglo",
	century_BCE_1				= "%1<sup>a</sup> siglo a. C.",
	year_BCE					= "%1 a. C.",

	-- Los mensajes de error y categorías
	-- Estos mensajes deben incluir también los de módulo(s) llamado.
	all_versions_text			= "Versiones aviso: '''%1''', lista: 2%, normal: 3%.",
	err_one_number_argument		= "Error: En el parámetro '''%1''', ingrese un número único entre -5000 y ahora.",
	err_assist_user_param		= "Apoyo a los usuarios para comprobar los ajustes:",
	err_module_error			= "Module error",
	err_auto_val_unknown		= "Error interno: Argumento desconocido automático: %1 = '''%2'''.",
	err_no_known_arguments		= "Módulo sin argumentos tabla conocida.",
	err_unknown_auto_arg		= "Error interno: Argumento desconocido automático : %1 = '''%2'''.",
	err_args_values				= "Valor anormal del argumento '''%1 = %2''' (%3)",
	msg_delete_docbox			= "Esta documentación/apoyo debe ser removido antes de grabar.<br/>Retire todos los modos para volver al modo normal.",
	msg_automatic_argument		= "Verificar el argumento automático '''%1'''.",
	msg_auto_val_warning		= "Verifique el argumento automático: %1 = '''%2'''.",
	--
	err_vague_year				= "Año incierto.",
	err_death_before_birth		= "Error: muerte '''%1''' antes del nacimiento '''%2'''.",
	err_death_before_birth_cat	= "Autor muerte antes del nacimiento.",
	err_life_too_long			= "La vida es demasiado largo de %1 a %2.",
	err_life_too_long_cat		= "Vida del autor es demasiado largo",

	date_to_part_format			= " dd mmmm yyyy",
	date_to_part_call_err		= "Error interno: Argumentos de llamadas anormales en la fecha '''%1''', '''%2'''.",
	date_to_part_call_cat		= "Módulo con error interno",
	date_to_part_err_not_found	= "Error interno: No parte encontrado en la fecha '''%1''', '''%2'''.",

	err_vague_epoch				= "Épocas inciertas.",
	err_unknown_epoch_cat		= "Desconocido período",
	err_year_in_roman_number	= "Ambigüedad: el año '''%1''' es en números romanos ¿Qué quieres definir un siglo?",
	err_roman2int				= "Error en el número romano en el argumento %1 = '''%2''' ; %3 %4. ",
	err_notices_properties		= "Error interno: Un registro de autoridad no está definido: %1.",
	err_notices_properties_cat	= "Error interno: Uno o más registro de autoridad no está definido.",
	err_author_without_authority= "Error: Autore sin registros de autoridad",
	cat_author_without_authority= "Autores sin registros de autoridad",
	err_deprecated_authority	= "Esta base de autoridad, %1, es viejo y debe ser evitado.",

	docbox_namespace_valid		= "Help Mod-ule Project Template",
	docbox_namespace_stop		= "Aut-eur Ma-in Page",
	docbox_namespace_error		= "Auteur Main Page",
	docbox_namespace_error_cat	= "Módulo con error del uso",
	docbox_namespace_error_err	= "<b>Volver a modo normal</b> antes de guardar la página, al eliminar todos los modos, porque el panel de la documentación está prohibida en el espacio '''%1:'''.",

	-- Estos mensajes se utilizan para módulo Cargs = ControlAgrs, y se copian aquí.
	c							= 'c',
	c_descr						= 'Opciones para agregar con opciones de modo.',
	options						= 'options',
	options_descr				= 'Opciones para agregar con opciones de modo.',
	err_error_list_header		= "Asistencia en los parámetros del modelo en:",
	err_unknown_argument		= "Error: El parámetro '''%1''' es desconocido en este modelo. Compruebe el nombre o marca esta brecha.",
	err_nearest_argument		= "Error: la '''%1''' argumento conocido es el que necesita?",
	err_value_re_defined		= "Error: el valor del argumento '''%1''' ya se ha definido. Elegir sólo un valor de un solo sinónimo.",
	err_need_value				= "Error: Este argumento es necesario pero ausente : '''%1'''. Debe definir.",
	err_none_value				= "Error: Ningún argumento ha sido definido.",
	err_too_unnamed_arguments	= "Error: Demasiados argumentos sin nombre ( '''%1''' ).",
	err_internal_notice_wsid	= "Error interno: Notificar al promotor que el argumento interno '''%1''' es desconocida en los registros.",
	err_notice_link				= "Error: mala nota por '''%1'''.",
	err_notice_link_cat			= "Módulo con mala nota",
	list_limit_levelmaxi		= "Límite de la lista levelmaxi=%1",
	list_limit_max_n			= "Límite de la lista max_n=%1",
	err_module_miss_i18n_cat	= "Módulo faltante traducción i18n",

	-- Estos textos se utilizan para titular algunas pruebas.
	list_wiki_selectors_title		= "Lista de las selectores de este wiki:",
	list_all_categories_title		= "Lista de todas las posibles categorías de esta wiki:",
	list_all_errors_title			= "Lista de todos los errores detectables de este wiki:",
	selected_autorities_title		= "Lista de autoridades seleccionados",
	multiple_values_tests_title		= "Prueba de múltiples valores argumentos",
	authorities_notices_test_title	= "Prueba todas las autoridades avisos",
	authorities_notices_test_deprec = "Pruebe todos sabemos avisos de autoridad, algunos están en desuso (en gris)",
	authorities_select_test_title	= "Selección autoridades Wikidata",
	authorities_select_test_header	= "Argumentos de Wikidata, Selector, Argumentos de modelo, Argumentos seleccionados",
	multiple_selection_test_title	= "Prueba de selección múltiple",
	multiple_selection_test_header	= "Opciones,Selector,Para seleccionar,Seleccionadas",
	multiple_selection_test_select	= "2,nobel,presidente,diputado,precio",
	firstname_familyname_test_title	= "Prueba de nombre, apellido y clave de ordenación",
	firstname_familyname_test_header= "Título recibida, Etiqueta recibida, Apellido recibido, Nombre recibido, Initiale recibida, Initiale final, clave de ordenación final, detalle de prueba",
	options_from_mode_title			= "Prueba de opciones de modo",
	copyright_box_test_title		= "Prueba de cajas de detalles de copyright",
	author_rights_test_title		= "Prueba de los derechos de copyright de los autores",
	author_rights_test_header		= "año de nacimiento, año de la muerte, tipo de derecha, derecha utilizado, plantilla de derechos. categoría y error",
	unique_century_life_test_title	= "Siglo único del autor",
	year_to_epoch_test_title		= "siglos y épocas de año",
	century_to_epoch_test_title		= "Siglos según de siglos",
	events_epochs_test_title		= "Eventos y épocas",
	roman_to_digital_test_title		= "Prueba de números romanos a números decimales",
	digital_to_roman_test_title		= "Prueba de números decimales a números romanos",

} -- p.i18n.es

p.i18n.fr = { -- Traductions en francais des arguments, catégories et messages :

	-- wiki_selectors -- wop
	authorities_selector		= "5, VIAF, BNF, SUDOC, ISNI, LCCN, ARC, WORLDCAT, NLA, PND, GKD", -- wop
	rights_values				= "none,non,cn,50,us,70,mpf", -- wop
	region_values				= "autre,chine,inde,siècle", -- wop
	distinctions_selector		= '2,nobel,président,député,prix', -- wop
	functions_selector			= '2,président', -- ,député', -- wop
	occupations_selector			= '2,biographe', -- ,politique', -- wop
	sex_values					= 'homme,femme', -- wop
	life_constants_of_module	= "Constantes de durée de vie dans ce module:",
	categorise_death_for_n_years= "Catégoriser l'année de décès depuis <b>%1 ans</b>.",
	author_writing_after_birth	= "Un auteur commence à écrire <b>%1 ans</b> après sa naissance.",
	author_writing_before_death	= "Un auteur écrit jusqu'à <b>%1 ans</b> avant sa mort.",
	author_lifetime_limit		= "La durée de vie maximale est de <b>%1 ans</b>.",
	author_mean_lifetime		= "La durée de vie moyenne est de <b>%1 years</b>.",

	-- to debug for arg 1, arg 2 :
	[1]							= "1",
	["1"]						= "1",
	["1_descr"]					= "Argument de position 1.",
	[2]							= "2",
	["2"]						= "2",
	["2_descr"]					= "Argument de position 2.",
	mode						= "mode",
	mode_descr					= "Mode de fonctionnement du module.",
	allversions					= "allversions",
	allversions_descr			= "Toutes les versions des sous-modules.",
	selectversions				= "selectversions",
	selectversions_descr		= "Sélection des versions des sous-modules.",
	userlang					= "userlang",
	userlang_descr				= "Sélectionnez la langue de l'utilisateur à partir de l'argument.",
	wikilang					= "wikilang",
	wikilang_descr				= "Sélectionnez la langue du wiki à partir de l'argument.",
	
	-- Noms et descriptions des arguments
	needed_to_verify			= "(obligatoire, à vérifier)",
	list_needed_arguments		= "Liste des arguments nécessaires :",
	list_all_other_arguments	= "Liste des autres arguments :",
	list_all_authorities		= "Liste des bases d'autorités :",
	list_all_system_arguments	= "Liste des arguments du système :",
	entityid					= 'id',
	entityid_descr				= "Identifiant des données de wikidata, comme <code>Q535</code> pour Victor Hugo.",
	entityid2					= 'entityid',
	entityid2_descr				= "Identifiant des données de wikidata, comme <code>Q535</code> pour Victor Hugo.",
	title						= 'title',
	title_descr					= "Titre de la page, automatique.",
	label						= 'label',
	label_descr					= "Partie du titre de la page, automatique.",
	sitelink					= 'sitelink',
	sitelink_descr				= "Partie du titre de la page, automatique.",
	namespace					= 'espace',
	namespace_descr				= "Nom de l'espace où est la page, automatique.",
	category					= 'Catégorie',
	category_descr				= "Nom de l'espace Catégorie.",
	doc1key						= 'doc1key',
	doc1key_descr				= 'Identifiant de la documentation à produire en mode doc1.',
--	commonscat					= 'commonscat',
--	commonscat_descr			= 'commonscat',

	-- ModuleAuthor arguments du modèle
	familyname					= 'nom',
	familyname_descr			= "Nom. Aide à corriger la clé de tri de la catégorie.",
	firstname					= 'prénoms',
	firstname_descr				= "Prénoms. Aide à corriger la clé de tri de la catégorie.",
	firstname2					= 'prenoms',
	firstname2_descr			= "Prénoms. Aide à corriger la clé de tri de la catégorie.",
	galliname					= 'prenomGalli',
	galliname_descr				= "Nom partiel spécial de l'autorité d'auteur Gallica.",
	initial						= 'initiale',
	initial_descr				= "Initiale pour corriger la catégorie d'auteur.",
	pseudonym					= 'pseudo',
	pseudonym_descr				= "Pseudonyme de l'auteur.",
	title						= 'titre',
	title_descr					= "Titre de la page, automatique.",
	sex							= 'sexe',
	sex_descr					= "Sexe de l'auteur.",
	sortkey						= 'clé',
	sortkey_descr				= "Clé de tri pour la catégorie d'auteur-initiale.",
	sortkey2					= 'cle',
	sortkey2_descr				= "Clé de tri pour la catégorie d'Auteur-initiale.",
	sortkey_txt					= 'sortkey_txt',
	sortkey_txt_descr			= 'Affichage de clef de tri, automatique.',
	sortkey_test				= 'sortkey_test',
	sortkey_test_descr			= 'Affichage de clef de tri, automatique.',
	image						= 'image',
	image_descr					= "Image de l'auteur.",
	birthyear					= 'anneeNaissance',
	birthyear_descr				= "Année de naissance",
	birth						= 'naissance',
	birth_descr					= "Année de naissance",
	birthcentury				= 'siecleNaissance',
	birthcentury_descr			= "Siecle de naissance de l'auteur.",
--	birthuncertain				= 'incertitudeNaissance',
	precededby					= "précédé par",
	precededby_descr			= "Précédé dans sa fonction par...",
	preceded_by					= ", a succédé à  %1",

	region						= 'région',
	region_descr				= 'Région pour déterminer les époques anciennes.',
	year_epoch					= 'époque',
	year_epoch_descr			= 'Année pour déterminer une époque ou un siècle.',
	deathyear					= 'anneeDeces',
	deathyear_descr				= "Année de décès",
	death						= 'décès',
	death_descr					= "Année de décès",
	deathcentury				= 'siecleDeces',
	deathcentury_descr			= "Siècle de décès de l'auteur.",
--	deathuncertain				= 'incertitudeDeces',
	description					= 'description',
	description_descr			= "Description de l'auteur, à préciser si la description automatique ne convient pas",

	multi_selector_description	= "Sélecteurs multiples pour description : %1",
	authorities_arg				= 'autorités',
	authorities_arg_descr		= "Sélection d'autorités d'auteurs.",
	distinctions				= 'distinctions',
	distinctions_descr			= "Distinctions décernées à l'auteur.",
	functions					= 'fonctions',
	functions_descr				= "Fonctions importantes exercées par l'auteur.",
	occupations					= 'métiers',
	occupations_descr			= "Professions de l'auteur.",

	genre						= 'genre',
	genre_descr					= "Genre littéraire de l'auteur.",
	language					= 'langue',
	language_descr				= "Langue maternelle de l'auteur.",
	languages					= 'langues',
	languages_descr				= "Autres langues de l'auteur.",
--	nationality					= 'pays',
	prize						= 'prix',
	prize_descr					= "Prix d’excellence accordé à l'auteur.",
	wikipedia					= 'wikipedia',
	wikipedia_descr				= 'Titre de la page dans wikipedia.',
	wikiquote					= 'wikiquote',
	wikiquote_descr				= 'Titre de la page dans wikiquote.',
	commons						= 'commons',
	commons_descr				= 'Titre de la page dans commons.',
	indexpages					= 'indexpages',
	indexpages_descr			= 'indexpages dans Wikisource.',
	--
	rights						= 'droits',
	rights_descr				= "Type de droits d'auteur nécessaire parmi : 70,50,mpf,non.",
	rights_limit_txt			= 'droits=%1',
	err_undefined_rights		= "Les droits de l'auteur ne sont pas définis.",
	rights_values_box_70		= "DP-EU-Auteur",
	rights_values_cat_70		= "Auteurs dans le domaine public aux États-Unis",
	rights_values_txt_70		= "[[File:Info icon 001.svg|left|48px|link=]]Certaines œuvres de cet auteur peuvent être dans le [[w:fr:Domaine public (propriété intellectuelle)|domaine public]] aux [[w:fr:Copyright aux États-Unis|États-Unis]], mais encore soumises aux droits d’auteur dans certains pays, notamment en Europe. Les téléchargements sont faits sous [[Aide:Droit_d%E2%80%99auteur|votre responsabilité]].",
	rights_values_box_50		= "DP-CN-Auteur",
	rights_values_cat_50		= "Auteurs dans le domaine public au Canada",
	rights_values_txt_50		= "[[File:Info icon 001.svg|left|48px|link=]]Les œuvres de cet auteur peuvent être dans le [[w:Domaine public (propriété intellectuelle)|domaine public]] au [[w:Copyright aux Canada|Canada]], mais encore soumises aux droits d’auteur dans certains pays, notamment en Europe et aux [[w:Copyright aux États-Unis|États-Unis]]. Les téléchargements sont faits sous [[Aide:Droit_d%E2%80%99auteur|votre responsabilité]].",
	rights_values_box_mpf		= "Mort pour la France",
	rights_values_cat_mpf		= "Auteurs morts pour la France‎", -- Modèle:Auteur Mort pour la France
	rights_values_txt_mpf		= "[[File:Info icon 001.svg|left|48px|link=]]Cet auteur est déclaré « [[w:fr:Mort pour la France|Mort pour la France]] » par le gouvernement français. En conséquence, ses droits d’auteur sont prolongés de 30 ans, et ses œuvres ne sont pas dans le domaine public en France. Les téléchargements sont faits sous [[Aide:Droit_d%E2%80%99auteur|votre responsabilité]].",
	rights_values_box_none		= "DP-Public-Auteur",
	rights_values_cat_none		= "Auteurs dans le domaine public", -- Modèle:Domaine public Auteur
	rights_values_txt_none		= "[[Image:PD-icon.svg|64px|Domaine public]] Cet auteur a renoncé à ses droits (''copyright''), ou ses droits ont expiré. Ses œuvres font partie du [[w:Domaine public, en droit de la propriété intellectuelle|domaine public]] et sont donc librement diffusable et/ou modifiable.",
	rights_values_cat_unknown	= "Droits d'auteur inconnus",
	rights_values_box_unknown	= "Droits d'auteur inconnus",
	rights_values_txt_unknown	= "[[File:Info icon 001.svg|left|48px|link=]] Les droits d’auteur de cet auteur ne sont pas définis. Ses œuvres sont peut-être encore soumises aux droits d’auteur dans certains pays, notamment en Europe ou aux [[w:fr:Copyright aux États-Unis|États-Unis]]. Les téléchargements sont faits sous [[Aide:Droit_d%E2%80%99auteur|votre responsabilité]].",
	new_public_rights_authors	= "Auteurs récents en domaine public",
	
	-- oldargs par selon wikisource Modèle:Auteur/Documentation le 05/01/2014
--	birth_text					= 'texteNaissance',
--	death_text					= 'texteDeces',
--	birth_type					= 'typeNaissance',
--	death_type					= 'typeDeces',
--	birth_link					= 'lienNaissance',
--	death_link					= 'lienDeces',
--	birth_link2					= 'liaisonNaissance',
--	death_link2					= 'liaisonDeces',

	-- Scans et Autorités
	author_scans_text			= 'Scans et Autorités',
	author_Notices				= 'Autorités', -- search BNF
	ARC							= 'ARC',
	ARC_descr					= 'Autorité : Internet Archive.',
	ARCgeo						= 'ARCgeo',
	ARCgeo_descr				= 'Autorité : Internet Archive.',
	ARCid						= 'ARCid',
	ARCid_descr					= 'Autorité : Internet Archive.',
	ARCitem						= 'ARCitem',
	ARCitem_descr				= 'Autorité : Internet Archive.',
	ARCorg						= 'ARCorg',
	ARCorg_descr				= 'Autorité : Internet Archive.',
	ARCsub						= 'ARCsub',
	ARCsub_descr				= 'Autorité : Internet Archive.',
	ARCHIVE						= 'ARCHIVE',
	ARCHIVE_descr				= 'Autorité : Internet Archive.',
	ARCHIVEbook					= 'ARCHIVEbook',
	ARCHIVEbook_descr			= 'Autorité : Internet Archive.',
	BNF							= 'BNF',
	BNF_descr					= 'Autorité : Bibliothèque nationale de France.',
	BNFbook						= 'BNFbook',
	BNFbook_descr				= 'Autorité : Bibliothèque nationale de France.',
	CANTIC						= 'CANTIC',
	CANTIC_descr				= "Autorité: Catalogue d'autorités des noms et des titres de la Catalogne.",
	DNB							= 'DNB',
	DNB_descr					= 'Autorité : Bibliothèque nationale allemande.',

	GKD							= 'GKD',
	GKD_descr					= 'Autorité : Gemeinsame Normdatei.',
	GKD_V1						= 'GKD_V1',
	GKD_V1_descr				= 'Autorité : Gemeinsame Normdatei.',
	GND							= 'GND',
	GND_descr					= 'Autorité : Gemeinsame Normdatei.',
	
	IA							= 'IA',
	IA_descr					= 'Autorité : Internet Archive.',
	IBL							= 'IBL',  
	IBL_descr					= 'Autorité : Inquiry-based learning.',
	IBLid						= 'IBLid',
	IBLid_descr					= 'Autorité : Inquiry-based learning.',
	IBLbook						= 'IBLbook',
	IBLbook_descr				= 'Autorité : Inquiry-based learning.',
	IMDb						= 'IMDb',
	IMDb_descr					= 'Autorité : Internet Movie Database.',
	
	ISBN						= 'ISBN',
	ISBN_descr					= 'Autorité : International Standard Book Number.',
	ISFDB						= 'ISFDB',
	ISFDB_descr					= 'Autorité : Internet Speculative Fiction Database.',
	ISFDBid						= 'ISFDBid',
	ISFDBid_descr				= 'Autorité : Internet Speculative Fiction Database.',
	ISFDBpub					= 'ISFDBpub',
	ISFDBpub_descr				= 'Autorité : Internet Speculative Fiction Database.',
	ISFDBtitle					= 'ISFDBtitle',
	ISFDBtitle_descr			= 'Autorité : Internet Speculative Fiction Database.',
	
	ISNI						= 'ISNI',
	ISNI_descr					= 'Autoridad: International Standard Name Identifier.',
	LCCN						= 'LCCN',
	LCCN_descr					= 'Autorité : Numéro de contrôle de la Bibliothèque du Congrès.',
	LCCNid						= 'LCCNid',
	LCCNid_descr				= 'Autorité : Numéro de contrôle de la Bibliothèque du Congrès.',
	
	NDL							= 'NDL',
	NDL_descr					= 'Autorité : Neue deutsche literatur.',
	NKC							= 'NKC',
	NKC_descr					= 'Autorité : National Library of the Czech Republic.',
	NLA							= 'NLA',
	NLA_descr					= 'Autorité : National Language Promotion Department of Pakistan.',
	OCLC						= 'OCLC',
	OCLC_descr					= 'Autorité : Online Computer Library Center.',
	OL							= 'OL',
	OL_descr					= 'Autorité : Open Library.',
	OLbook						= 'OLbook',
	OLbook_descr				= 'Autorité : Open Library.',
	PND							= 'PND',
	PND_descr					= 'Autorité : Personennamendatei.',
	SELIBR						= 'SELIBR',
	SELIBR_descr				= 'Autorité : Bibliothèque royale de Suède.', -- National Library of Sweden'
	SUDOC						= 'SUDOC',
	SUDOC_descr					= 'Autorité : Système universitaire de documentation.',
	SWD							= 'SWD',
	SWD_descr					= 'Autorité : Schlagwortnormdatei.',
	ULAN						= 'ULAN',
	ULAN_descr					= 'Autorité : Union List of Artist Names.',
	VIAF						= 'VIAF',
	VIAF_descr					= "Autorité : Fichier d'autorité international virtuel.",
	WORLDCAT					= 'Worldcat',
	WORLDCAT_descr				= "Autorité : WorldCat.",
	WORLDCATbook				= 'WORLDCATbook',
	WORLDCATbook_descr			= "Autorité : WorldCat.",
	WORLDCATch					= 'WORLDCATch',
	WORLDCATch_descr			= "Autorité : WorldCat.",
	WORLDCATid					= 'WORLDCATid',
	WORLDCATid_descr			= "Autorité : WorldCat.",

	-- Catégories et Messages divers
	-- Ces messages doivent aussi intégrer ceux du (ou des) module(s) appelé(s).
	authors_authors				= "Auteurs",
	authors_initial_cat			= "Auteurs-%1",
	authors_initiale_txt		= "Auteurs %1",
	authors_initiale_pop		= "Auteurs à initiale %1",
	box_links_indexpages		= "Fac-similés",
	box_links_biography			= "Biographie",
	box_links_wikiquote			= "Citations",
	box_links_commons			= "Médias",
	entityid_txt				= "Données", -- Données structurées
	authors_birthyear			= 'Naissance en %1',
	authors_deathyear			= 'Décès en %1',
	authors_birth_century		= "Naissance en %1..",
	authors_death_century		= "Décès en %1..",
	list_limit_levelmaxi		= "Limite de la structure levelmaxi=%1",
	list_limit_maxn				= "Limite de la structure maxn=%1",
	limit_cat_birth_death		= 'Limite les années des catégories "Naissance en" et "Décès en".',
	cat_female_authors			= "Femmes auteurs",
	cat_male_authors			= "Men authors",
	cat_group_languages			= "Auteurs %1", -- écrivant en 
	cat_epoch_china_antiquity	= "Auteurs de l'antiquité chinoise",
	cat_epoch_china_springs		= "Auteurs des Printemps et Automnes",
	cat_epoch_china_empires		= "Auteurs des Empires chinois",
--	cat_epoch_indian_indus		= "Auteurs de la civilisation de l'Indus",
--	cat_epoch_indian_muslim		= "Auteurs de la période indo-musulmane",
	cat_epoch_indian_antiquity	= "Auteurs de l'antiquité indienne",
	cat_epoch_indian_classic	= "Auteurs de la période classique indienne",
	cat_epoch_indian_middle_age = "Auteurs du moyen-âge indien",
	cat_epoch_antiquity			= "Auteurs de l’Antiquité",
	cat_epoch_middle_age		= "Auteurs du Moyen Âge",
	cat_epoch_century_CE		= "Auteurs du %1e siècle‎", -- <sup>ème</sup> forbiden in category
	cat_epoch_century_BCE		= "Auteurs du %1e siècle av. J.-C.",
	cat_epoch_century_CE_1		= "Auteurs du %1er siècle‎", -- categories do not support exponants
	cat_epoch_century_BCE_1		= "Auteurs du %1er siècle av. J.-C.", -- categories do not support exponants
	-- BCE = Before Common Era = «BC». AEC = Antes de la Era Común = «a. C.». AEC = Avant l'ère commune = «av. J.-C.»
	century_CE					= "%1<sup>ème</sup> siècle",
	century_BCE					= "%1<sup>ème</sup> siècle av. J.-C.",
	century_CE_1				= "%1<sup>er</sup> siècle",
	century_BCE_1				= "%1<sup>er</sup> siècle av. J.-C.",
	year_BCE					= "%1 av. J.-C.",

	-- Messages d'erreurs et catégories
	-- Ces messages doivent aussi intégrer ceux du (ou des) module(s) appelé(s).
	all_versions_text			= "Versions avertissement: '''%1''', liste: %2, normal: %3.",
	err_one_number_argument		= "Erreur : Dans le paramètre '''%1''', entrer un seul nombre entre -5000 et maintenant.",
	err_assist_user_param		= "Assistance à l'utilisateur pour la vérification des paramètres :",
	err_module_error			= "Module avec erreur",
	err_auto_val_unknown		= "Erreur interne: Argument automatique inconnu : %1 = '''%2'''.",
	err_no_known_arguments		= "Module sans table d'arguments connus.",
	err_unknown_auto_arg		= "Erreur interne : Argument automatique inconnu : %1 = '''%2'''.",
	err_args_values				= "Valeur anormale de l'argument '''%1 = %2''' (%3)",
	msg_delete_docbox			= "Cette documentation/assistance doit être supprimée avant d'enregistrer.<br/>Supprimez tous les modes pour revenir en mode normal.",
	msg_automatic_argument		= "Vérifiez l'argument automatique '''%1'''.",
	msg_auto_val_warning		= "Vérifiez l'argument automatique : %1 = '''%2'''.",
	--
	err_vague_year				= "Année incertaine.",
	err_death_before_birth		= "Erreur : le décès '''%1''' est avant la naissance '''%2'''.",
	err_death_before_birth_cat	= "Erreur : le décès est avant la naissance.",
	err_life_too_long			= "Durée de vie trop longue de %1 à %2.",
	err_life_too_long_cat		= "Durée de vie de l'auteur trop longue",
	err_module_miss_i18n_cat	= "Module avec erreur interne",

	date_to_part_format			= " dd mmmm yyyy",
	date_to_part_call_err		= "Erreur interne : argument d'appel anormal dans la date '''%1''', '''%2'''.",
	date_to_part_call_cat		= "Module avec erreur interne",
	date_to_part_err_not_found	= "Erreur interne : Partie non trouvée dans la date '''%1''', '''%2'''.",

	err_vague_epoch				= "Époque incertaine.",
	err_unknown_epoch_cat		= "Époque inconnue",
	err_year_in_roman_number	= "Ambigüité : l'année '''%1''' est en nombres romains. Voulez-vous définir un siècle ?",
	err_roman2int				= "Erreur de nombre romain dans l'argument %1 = '''%2''' ; %3 %4. ",
	err_notices_properties		= "Erreur interne: Une notice d'autorité n'est pas définie : %1.",
	err_notices_properties_cat	= "Module avec erreur interne",
	err_author_without_authority= "Erreur : Auteur sans notices d’autorité",
	cat_author_without_authority= "Auteurs sans notices d’Autorité",
	err_deprecated_authority	= "Cette base d'autorité, %1, est ancienne et à éviter.",

	docbox_namespace_valid		= "Help Mod-ule Project Template",
	docbox_namespace_stop		= "Aut-eur Ma-in Page",
	docbox_namespace_error		= "Auteur Main Page",
	docbox_namespace_error_cat	= "Module avec erreur d'utilisation",
	docbox_namespace_error_err	= "<b>Revenez en mode normal</b> avant de sauver la page, en supprimant tous les modes, car le panneau de documentation est interdit dans l'espace '''%1:'''.",

	-- Ces messages servent au module CA = ControlAgrs, et sont copiés ici.
	c							= 'c',
	c_descr						= 'Options à ajouter aux options de mode.',
	options						= 'options',
	options_descr				= 'Options à ajouter aux options de mode.',
	err_error_list_header		= "Assistance sur les paramètres de ce modèle :",
	err_unknown_argument		= "Erreur : Le paramètre '''%1''' est inconnu dans ce modèle. Vérifier ce nom ou signaler ce manque.",
	err_nearest_argument		= "Erreur: L'argument connu '''%1''' est-il celui que vous voulez ?",
	err_value_re_defined		= "Erreur : La valeur de l'argument '''%1''' est déjà définie. Choisir une seule valeur d'un seul synonyme.",
	err_need_value				= "Erreur : Cet argument est nécessaire mais absent : '''%1'''. Il faut le définir.",
	err_none_value				= "Erreur : Aucun argument n'a été défini.",
	err_too_unnamed_arguments	= "Erreur : Trop de paramètres non nommés ( '''%1''' ).",
	err_internal_notice_wsid	= "Erreur interne : Signalez au developpeur que l'argument interne '''%1''' est inconnu dans les autorités.",
	err_notice_link				= "Erreur : mauvaise notice pour '''%1'''.",
	err_notice_link_cat			= "Module avec erreur interne",
	list_limit_levelmaxi		= "Limite de liste levelmaxi=%1",
	list_limit_max_n			= "Limite de liste max_n=%1",
	err_module_miss_i18n_cat	= "Module manquant de traduction i18n",

	-- Ces textes sont utilisés pour titrer des tests.
	list_wiki_selectors_title		= "Liste des sélecteurs de ce wiki :",
	list_all_categories_title		= "Liste de toutes les catégories éventuelles de ce wiki :",
	list_all_errors_title			= "Liste de toutes les erreurs détectables de ce wiki :",
	selected_autorities_title		= "Liste des autorités sélectionnées",
	multiple_values_tests_title		= "Test des arguments à valeurs multiples",
	authorities_notices_test_title	= "Tester toutes les notices d'autorités",
	authorities_notices_test_deprec = "Tester toutes les notices d'autorités, certaines sont obsolètes (en gris)",
	authorities_select_test_title	= "Sélection des autorités de wikidata",
	authorities_select_test_header	= "Arguments de Wikidata,Sélecteur,Arguments du modèle,Arguments sélectionnés",
	multiple_selection_test_title	= "Test de sélection multiple",
	multiple_selection_test_header	= "Options,Sélecteur,À sélectionner,Sélectionnés",
	multiple_selection_test_select	= "2,nobel,président,député,prix",
	firstname_familyname_test_title	= "Test de nom, prénom et clé de tri",
	firstname_familyname_test_header= "Titre reçu, Label reçu, Prénom reçu, Nom reçu, Initiale reçue, Initiale finale, sortkey final, détails du test",
	options_from_mode_title			= "Test des options de mode",
	copyright_box_test_title		= "Test de boîtes d'informations de copyright",
	author_rights_test_title		= "Test des droits de copyright d'auteurs",
	author_rights_test_header		= "année de naissance, année de décès, type de droit, droit utilisé, modèle de droit d'auteur, début de copyright. catégorie et erreur",
	unique_century_life_test_title	= "Siècle unique d'un auteur",
	year_to_epoch_test_title		= "Siècles et époques selon les années",
	century_to_epoch_test_title		= "Siècles et époques selon les siècles",
	events_epochs_test_title		= "Événements et époques",
	roman_to_digital_test_title		= "Test des nombres romains en nombres décimaux",
	digital_to_roman_test_title		= "Test des nombres décimaux en nombres romains",

} -- p.i18n.fr

------------------------------------------------------------
-- i18n end
------------------------------------------------------------

------------------------------------------------------------
-- MArgms object table start
------------------------------------------------------------
-- Special arguments to modify the fonctions and outputs of this module.
-- Argumentos spéciaux vierta modificadoras le fonctionnement et les salidas de módulo ce.
-- Arguments spéciaux pour modifier le fonctionnement et les sorties de ce module.

p.args_known_default = {

	[1] =			{keyword = "mode", typ = "sys", need = 0, syn = 2, },
	["1"] =			{keyword = "mode", typ = "sys", need = 0, syn = 2, },

	[2] =			{keyword = "mode", typ = "sys", need = 0, syn = 2, },
	["2"] =			{keyword = "mode", typ = "sys", need = 0, syn = 2, },

	mode =			{keyword = "mode", typ = "dat", need = 0, syn = 1, },

	c =				{keyword = "c", typ = "dat", need = 0, syn = 1, },

	options =		{keyword = "c", typ = "dat", need = 0, syn = 2, },

--	debug =			{keyword = "debug", typ = "sys", need = 0, },

	-- The userlang argument permits at administrate in his own langage (errors, messages, catégories, tests) to help a wiki in any language.
	-- El userlang argumento permisos en administrador en su propia langage (errores, mensajes, categorías, pruebas) para ayudar a un wiki en cualquier idioma.
	-- L'argument userlang permet à un administrateur dans son propre langage (erreurs, messages, catégories, tests) d'aider un wiki dans ne importe quelle langue.
	userlang =		{keyword = "userlang", typ = "dat", need = 0, },

	-- The wikilang argument permits to verify in one unique wiki that a module can well adapt itself to any wiki language.
	-- Los argumento wikilang permisos para verificar en una wiki único que un módulo puede así adaptarse a cualquier idioma de wiki.
	-- L'argument wikilang permet de vérifier dans un wiki unique qu'un module peut s'adapter à n'importe quelle langue de wiki.
	wikilang =		{keyword = "wikilang", typ = "dat", need = 0, },

	-- Management of sub-modules versions
	allversions =	{keyword = "allversions", typ = "dat", need = 0, },

	-- Management of sub-modules versions
	selectversions ={keyword = "selectversions", typ = "dat", need = 0, },

	-- All arguments have a keyword parameter identical to the registration name, except synonyms.
	-- Todos los argumentos tienen un parámetro keyword idéntica a la denominación registrada, a menos sinónimos.
	-- Tous les arguments ont un paramètre keyword identique au nom d'enregistrement, sauf les synonymes.

	-- arguments managed only by program, not read from template

	label =			{keyword = "label", typ = "sys", need = 0, prop = "label" },

	sitelink =		{keyword = "sitelink" , typ = "sys", need = 0, prop = "sitelink"},

	familyname =	{keyword = "familyname", typ = "dat", need = 0, prop = "P734", },
	-- P734 = family name: surname or last name of a person

--	lastname =		{keyword = "familyname", typ = "dat", need = 0, prop = "label", syn = 2, },

	firstname =		{keyword = "firstname", typ = "dat", need = 0, prop = "P735", },
	-- P735 = given name: first name or another given name of this person.

	firstname2 =	{keyword = "firstname", typ = "dat", syn = 2, need = 0, prop = "P735", },
	-- P735 = given name: first name or another given name of this person.

	galliname =		{keyword = "galliname", typ = "dat", need = 0, },

	initial =		{keyword = "initial", typ = "dat", need = 2, },

	pseudonym =		{keyword = "pseudonym", typ = "ctr", need = 0, },

	title =			{keyword = "title", typ = "sys", need = 0, },

	sex =			{keyword = "sex", typ = "dat", need = 0, prop = "P21",
		arg_values = "sex_values", key_values = "male,female", }, -- wop

	sortkey =		{keyword = "sortkey", typ = "dat", need = 2, },

	sortkey2 =		{keyword = "sortkey", typ = "dat", need = 2, syn = 2, },
	
	sortkey_txt =	{keyword = "sortkey_txt", typ = "sys", need = 0, },

	sortkey_test =	{keyword = "sortkey_test", typ = "sys", need = 0, },

	image =			{keyword = "image", typ = "dat", need = 0, prop = "P18", },

	birthyear =		{keyword = "birthyear", typ = "dat", need = 0, prop = "P569", format = "year", },

	birth =			{keyword = "birthyear", typ = "dat", need = 0, prop = "P569", format = "year", syn = 2, },

	birthcentury =	{keyword = "birthcentury", typ = "dat", need = 0, },

--	birthuncertain ={keyword = "birthuncertain", typ = "dat", need = 0, },

	precededby	=	{keyword = "precededby", typ = "dat", need = 0, prop = "P155", }, -- P155 = précédé par = Frederik de Klerk

	region =		{keyword = "region", typ = "dat", need = 0,
		arg_values = "region_values", key_values = "other,china,india,century" }, -- wop

	year_epoch =	{keyword = "year_epoch", typ = "dat", need = 0, },

	deathyear =		{keyword = "deathyear", typ = "dat", need = 0, prop = "P570", format = "year", },

	death =			{keyword = "deathyear", typ = "dat", need = 0, prop = "P570", format = "year", syn = 2, },

	deathcentury =	{keyword = "deathcentury", typ = "dat", need = 0, },

--	deathuncertain ={keyword = "deathuncertain", typ = "dat", need = 0, },

	description =	{keyword = "description", typ = "dat", need = 0, prop = "description", },

	distinctions =	{eyword = "distinctions", typ = "dat", need = 0, prop = "P166", },

	functions =		{keyword = "functions", typ = "dat", need = 0, prop = "P39", },

	occupations =	{keyword = "occupations", typ = "dat", need = 0, prop = "P106", },

	genre =			{keyword = "genre", typ = "dat", need = 0, },

	language =		{keyword = "language", typ = "dat", need = 0, prop = "P103", }, -- native language

	languages =		{keyword = "languages", typ = "dat", need = 0, prop = "P1412", }, -- other languages

--	nationality =	{keyword = "nationality", typ = "dat", need = 0, prop = "P27", }, -- country of citizenship

	prize =			{keyword = "prize", typ = "dat", need = 0, },

	wikipedia =		{keyword = "wikipedia", typ = "dat", need = 0, },

	wikiquote =		{keyword = "wikiquote", typ = "dat", need = 0, },

	commons =		{keyword = "commons", typ = "dat", need = 0, },

	authorities_arg = {keyword = "authorities", typ = "dat", need = 0, },

	indexpages =	{keyword = "indexpages", typ = "dat", need = 0, }, -- IndexPages

	doc1key =		{keyword = "doc1key" , typ = "dat", need = 0, },

	entityid =		{keyword = "entityid" , typ = "dat", need = 0, prop = "entityid"},

	entityid2 =		{keyword = "entityid" , typ = "dat", need = 0, prop = "entityid", syn = 2, },

	rights =		{keyword = "rights", typ = "dat", need = 2, 
		arg_values = "rights_values", key_values = "no,none,cn,50,us,70,mpf", -- wop
		delay_values = "0,0,50,50,70,70,95", arg_uses = "none,none,cn,cn,us,us,mpf" }, -- wop

--	commonscat =	{keyword = "commonscat", typ = "sys", need = 0, },

	namespace =		{keyword = "namespace", typ = "sys", need = 0, },

	category =		{keyword = "category", typ = "sys", need = 0, },

-- Obsolete old arguments from fr.wikisource.org Modèle:Auteur/Documentation le 05/01/2014
-- obsoleto viejos argumentos de fr.wikisource.org Modèle:Auteur/Documentation le 05/01/2014
-- Obsolète anciens arguments selon fr.wikisource.org Modèle:Auteur/Documentation le 05/01/2014
-- Fait : Anciens arguments obsolètes selon wikisource Modèle:Auteur/Documentation le 05/01/2014.
-- Cherchés dans tous les auteurs de fr.wikisource.org mais trouvés dans aucun le 09/02/2014.

--	birth_text =	{keyword = "birth_text", typ = "oldargs", need = 0, },

--	death_text =	{keyword = "death_text", typ = "oldargs", need = 0, },

--	birth_type =	{keyword = "birth_type", typ = "oldargs", need = 0, },

--	death_type =	{keyword = "death_type", typ = "oldargs", need = 0, },

--	birth_link =	{keyword = "birth_link", typ = "oldargs", need = 0, },

--	death_link =	{keyword = "death_link", typ = "oldargs", need = 0, },

--	birth_link2 =	{keyword = "birth_link2", typ = "oldargs", need = 0, },

--	death_link2 =	{keyword = "death_link2", typ = "oldargs", need = 0, },

	------------------------------------------------------------
	-- Table de authorities de notoriétés pour auteurs livres et autres
	------------------------------------------------------------
	-- The arguments for authority records are treated separately
	-- Les arguments pour les notices d'autorités sont traités à part

--	Module:Autorité -- indentifiants plus supportés, isDepreciated = true, deprecated = 1,
--	or parentArgs.ARC ARCid ARCitem ARCHIVE ARCorg ARCsub ARCgeo IBL IBLid IBLbook ISBN
--	ISFDB ISFDBid ISFDBtitle ISFDBpub LCCNid LCCNbook LT OCLC OCLC OL WORLDCATID ~= nil

	-- autorities selector defined by argument, see authorities_selector
	authorities_arg =	{keyword = "authorities_arg", typ = "dat", need = 0, },
	--	https://en.wikipedia.org/wiki/List_of_national_and_state_libraries

	ARC =			{typ = "not", need = 0, deprecated = 1,
		keyword = "ARC", base_base = "ARC", base_id = "ARC", not_type = "Author",
		base_test = "7097752", -- Nelson Mandela
		base_name = "National Archives and Records Administration",
		not_link = "http://arcweb.archives.gov/arc/action/ExternalPersonIdSearch?id=REF_1", },

	ARCgeo =		{typ = "not", need = 0, deprecated = 1,
		keyword = "ARC", base_base = "ARC", base_id = "ARCgeo", not_type = "Geo",
		base_test = "7097752", -- Nelson Mandela
		base_name = "National Archives and Records Administration",
		not_link = "http://arcweb.archives.gov/arc/action/ExecuteRelatedGeographicalSearch?id=REF_1", },

	ARCid =			{typ = "not", need = 0, deprecated = 1,
		keyword = "ARCid", base_base = "ARC", base_id = "ARCid", not_type = "Author",
		base_test = "R457-J-44", -- ARCid = "R457-J-44"
		base_name = "National Archives and Records Administration",
		not_link = "http://arcweb.archives.gov/arc/action/ExternalPersonIdSearch?id=REF_1", },

	ARCitem =		{typ = "not", need = 0, deprecated = 1,
		keyword = "ARCitem", base_base = "ARC", base_id = "ARCitem", not_type = "Book",
		base_test = "7097752", -- Nelson Mandela OK
		base_name = "National Archives and Records Administration",
		not_link = "http://arcweb.archives.gov/arc/action/ExternalIdSearch?id=REF_1", },

	ARCorg =		{typ = "not", need = 0, deprecated = 1,
		keyword = "ARCorg", base_base = "ARC", base_id = "ARCorg", not_type = "Org",
		base_test = "7097752", -- Nelson Mandela
		base_name = "National Archives and Records Administration",
		not_link = "http://arcweb.archives.gov/arc/action/ExecuteRelatedOrganizationSearch?id=REF_1", },

	ARCsub =		{typ = "not", need = 0, deprecated = 1,
		keyword = "ARCsub", base_base = "ARC", base_id = "ARCsub", not_type = "Subject",
		base_test = "7097752", -- Nelson Mandela
		base_name = "National Archives and Records Administration",
		not_link = "http://arcweb.archives.gov/arc/action/ExecuteRelatedTopicalSubjectsSearch?id=REF_1", },

	ARCHIVE =		{typ = "not", need = 0, deprecated = 1,
		keyword = "ARCHIVE", base_base = "ARC", base_id = "ARCHIVE", not_type = "Author",
		base_test = "1234",
		base_name = "National Archives and Records Administration",
		not_link = "http://www.archive.org/details/REF_1", },

	ARCHIVEbook =	{typ = "not", need = 0, 
		keyword = "ARCHIVEbook", base_base = "ARC", base_id = "ARCHIVEbook", not_type = "Book",
		base_test = "lesmisrable03hugouoft", -- Les misérables (Volume 3) - Hugo, Victor, 1802-1885 OK
		base_name = "National Archives and Records Administration",
		not_link = "http://archive.org/details/REF_1", },

	BNF			=	{typ = "not", need = 0, 
		keyword = "BNF", prop = "P268", base_base = "BNF", base_id = "BNF", not_type = "Author",
		base_test = "119067514", -- BNF = 11888266 = Alain Fournier
		base_name = "Bibliothèque nationale de France",
		not_link = "http://catalogue.bnf.fr/ark:/12148/cbREF_1", },

	CANTIC =		{typ = "not", need = 0, 
		keyword = "CANTIC", prop = "P1273", base_base = "CANTIC", base_id = "CANTIC", not_type = "Author",
		base_test = "12972/259446", -- pape Víctor III, 1027-1087
		base_name = "CANTIC", -- Catálogo de autoridades de nombres y títulos de Cataluña
		not_link = "http://cantic.bnc.cat/registres/marc/20692/1/REF_1", },
		-- http://cantic.bnc.cat/registres/fitxa/20692/1/12972/259446

	DNB =			{typ = "not", need = 0, 
		keyword = "DNB", base_base = "DNB", base_id = "DNB", not_type = "Author",
		base_test = "3684200072", -- , DNB = "3684200072"
		base_name = "Bibliothèque nationale allemande", -- Deutsche National Bibliothek
		not_link = "http://d-nb.info/gnd/REF_1", },

	GKD =			{typ = "not", need = 0, 
		keyword = "GKD", base_base = "GKD", base_id = "GKD", not_type = "Author",
		base_test = "71yhjey852", -- , GKD = "71yhjey852"
		base_name = "Bibliothèque nationale allemande",
		not_link = "http://d-nb.info/gnd/REF_1", },

	GKD_V1 =		{typ = "not", need = 0, 
		keyword = "GKD_V1", base_base = "GKD", base_id = "GKD-V1", not_type = "Author",
		base_test = "71yhjey852",
		base_name = "Bibliothèque nationale allemande",
		not_link = "http://d-nb.info/gnd/REF_1", },

	GND =			{typ = "not", need = 0, 
		keyword = "GND", prop = "P227", base_base = "GND", base_id = "GND", not_type = "Author",
		base_test = "118573624", -- Tite-Live
		base_name = "GND",
		not_link = "http://d-nb.info/gnd/REF_1", },

	IA =			{typ = "not", need = 0, 
		keyword = "IA", base_base = "IA", base_id = "IA", not_type = "Author",
		base_test = "1234",
		base_name = "Internet Archive",
		not_link = "http://www.archive.org/REF_1", },

	IBL =			{typ = "not", need = 0, deprecated = 1,
		keyword = "IBL", base_base = "IBL", base_id = "IBL", not_type = "Author",
		base_test = "1234",
		base_name = "Internet Book List", -- Pas de page fr, en redirige vers Base de données bibliographiques
		not_link = "http://www.iblist.com/authorREF_1.html", },

	IBLbook =		{typ = "not", need = 0, deprecated = 1,
		keyword = "IBLbook", base_base = "IBL", base_id = "IBLbook", not_type = "Book",
		base_test = "1234",
		base_name = "Internet Book List", -- Pas de page fr, en redirige vers Base de données bibliographiques
		not_link = "http://www.iblist.com/bookREF_1.html", },

	IBLid =			{typ = "not", need = 0, deprecated = 1,
		keyword = "IBLid", base_base = "IBL", base_id = "IBLid", not_type = "Author",
		base_test = "37581257954", -- , IBLid = "37581257954"
		base_name = "Internet Book List", -- Pas de page fr, en redirige vers Base de données bibliographiques
		not_link = "http://www.iblist.com/authorREF_1.html", },

	IMDb =			{typ = "not", need = 0, 
		keyword = "IMDb", base_base = "IMDb", base_id = "IMDb", not_type = "Author",
		base_test = "0002776", -- Johnny Hallyday
		base_name = "Internet Movie Data base",
		not_link = "http://www.imdb.com/name/nmREF_1/", },

	ISBN =			{typ = "not", need = 0, deprecated = 1,
		keyword = "ISBN", base_base = "ISBN", base_id = "ISBN", not_type = "Book",
		base_test = "2-7073-0549-9", -- L'apartheid, de Nelson Mandela
		base_name = "International Standard Book Number", },

	ISFDB =			{typ = "not", need = 0, deprecated = 1,
		keyword = "ISFDB", base_base = "ISFDB", base_id = "ISFDB", not_type = "Author",
		base_test = "1234",
		base_name = "Internet Speculative Fiction Database",
		not_link = "http://www.isfdb.org/cgi-bin/ea.cgi?REF_1", },

	ISFDBid =		{typ = "not", need = 0, deprecated = 1,
		keyword = "ISFDBid", base_base = "ISFDB", base_id = "ISFDBid", not_type = "Author",
		base_test = "1234",
		base_name = "Internet Speculative Fiction Database",
		not_link = "http://www.isfdb.org/cgi-bin/ea.cgi?REF_1", },

	ISFDBpub =		{typ = "not", need = 0, deprecated = 1,
		keyword = "ISFDBpub", base_base = "ISFDB", base_id = "ISFDBpub", not_type = "Book",
		base_test = "1234",
		base_name = "Internet Speculative Fiction Database",
		not_link = "http://www.isfdb.org/cgi-bin/pl.cgi?REF_1", },

	ISFDBtitle =	{typ = "not", need = 0, deprecated = 1,
		keyword = "ISFDBtitle", base_base = "ISFDB", base_id = "ISFDBtitle", not_type = "Book",
		base_test = "1234",
		base_name = "Internet Speculative Fiction Database",
		not_link = "http://www.isfdb.org/cgi-bin/title.cgi?REF_1", },

	ISNI =			{typ = "not", need = 0, 
		keyword = "ISNI", prop = "P213", base_base = "ISNI", base_id = "ISNI", not_type = "Author",
		base_test = "0000 0001 2144 7715",
		base_name = "International Standard Name Identifier",
		not_link = "http://isni-url.oclc.nl/isni/REF_1", },
--		not_link = "http://isni.oclc.nl/DB=1.2/SET=10/TTL=1/CMD?ACT=SRCHA&IKT=8006&SRT=&TRM=REF_1", },
--		http://isni-url.oclc.nl/isni/0000000122834055

	LCCN =			{typ = "not", need = 0, 
		keyword = "LCCN", prop = "P244", base_base = "LCCN", base_id = "LCCN", not_type = "Author",
		base_test = "n82212654", -- LCCN = n82212654 = Johnny Hallyday
		base_name = "Numéro de contrôle de la Bibliothèque du Congrès",
		not_link = "http://id.loc.gov/authorities/names/REF_1" },

	NDL =			{typ = "not", need = 0, 
		keyword = "NDL", base_base = "NDL", base_id = "NDL", not_type = "Author",
		base_name = "Neue deutsche literatur",
		keyword = "NDL", prop = "P349", },

	NKC =			{typ = "not", need = 0, 
		keyword = "NKC", base_base = "NKC", base_id = "NKC", not_type = "Author",
		base_name = "National Library of the Czech Republic",
		keyword = "NKC", prop = "P691", },

	NLA =			{typ = "not", need = 0, 
		keyword = "NLA", base_base = "NLA", base_id = "NLA", not_type = "Author",
		base_test = "35096649", -- NLA = 35096649 = Alain Fournier
		base_name = "Online Computer Library Center", -- National Language Promotion Department of Pakistan, Urdu is the national language of Pakistan
		not_link ="http://www.worldcat.org/oclc/REF_1", },

	OCLC =			{typ = "not", need = 0, deprecated = 1,
		keyword = "OCLC", base_base = "OCLC", base_id = "OCLC", not_type = "Author",
		base_test = "1234",
		base_name = "Online Computer Library Center",
		not_link ="http://www.worldcat.org/oclc/REF_1", },

	OL =			{typ = "not", need = 0, deprecated = 1,
		keyword = "OL", base_base = "OL", base_id = "OL", not_type = "Author",
		base_test = "1234",
		base_name = "Open Library",
		not_link ="http://www.worldcat.org/oclc/REF_1", },

	OLbook =			{typ = "not", need = 0, 
		keyword = "OLbook", base_base = "OL", base_id = "OLbook", not_type = "Book",
		base_test = "2707305499", -- L'apartheid, de Nelson Mandela
		base_name = "Open Library",
		not_link ="http://openlibrary.org/search?wtitle=&wauthor=&wtopic=&wisbn=REF_1&wpublisher=&wdescription=&ftokens=&_save=Chercher", },

	PND =			{typ = "not", need = 0, 
		keyword = "PND", base_base = "PND", base_id = "PND", not_type = "Author",
		base_test = "11850133X", -- PND = 11850133X = Alain Fournier
		base_name = "Personennamendatei",
		not_link ="http://d-nb.info/gnd/REF_1", },

	SELIBR =		{typ = "not", need = 0, 
		keyword = "SELIBR", base_base = "SELIBR", base_id = "SELIBR", not_type = "Author",
		base_test = "74042",
		base_name = "Bibliothèque royale (Suède)", -- "National Library of Sweden" "Personennamendatei",
		not_link ="http://libris.kb.se/auth/REF_1", },

	SUDOC =			{typ = "not", need = 0, 
		keyword = "SUDOC", base_base = "SUDOC", base_id = "SUDOC", not_type = "Author",
		base_test = "1234",
		base_name = "Système universitaire de documentation",
		not_link ="http://www.idref.fr/REF_1", },

	SWD =			{typ = "not", need = 0, 
		keyword = "SWD", base_base = "SWD", base_id = "SWD", not_type = "Author",
		base_test = "1234", -- debug text : de : Subject Headings Authority File, base allemande nom anglais
		base_name = "Schlagwortnormdatei",
		not_link ="http://d-nb.info/gnd/REF_1", },

	ULAN =			{typ = "not", need = 0, 
		keyword = "ULAN", base_base = "ULAN", base_id = "ULAN", not_type = "Author",
		base_test = "500198443",
		base_name = "Union List of Artist Names",
		not_link ="http://www.getty.edu/vow/ULANFullDisplay?find=&role=&nation=&subjectid=REF_1", },

	VIAF =			{typ = "not", need = 0, 
		keyword = "VIAF", prop = "P214", base_base = "VIAF", base_id = "VIAF", not_type = "Author",
		base_test = "34452139", -- VIAF = 34452139 = Alain Fournier -- VIAF = 7396281 = Arthur Rimbaud
		base_name = "Fichier d'autorité international virtuel",
		not_link ="http://viaf.org/viaf/REF_1", },

	WORLDCAT =		{typ = "not", need = 0, 
		keyword = "WORLDCAT", base_base = "WORLDCAT", base_id = "WORLDCAT", not_type = "",
		base_test = "35096649", --	Happy Gilmore OK
		base_name = "WorldCat", -- = http://www.worldcat.org/identities/lccn-n50-23101
		not_link ="http://www.worldcat.org/search?qt=worldcat_org_all&q=REF_1", },
		-- https://www.worldcat.org/identities/lccn-n79-015690/	   Livy = Tite-Live

	WORLDCATbook =	{typ = "not", need = 0, 
		keyword = "WORLDCATbook", base_base = "WORLDCAT", base_id = "WORLDCATbook", not_type = "Book",
		base_test = "2707305499", -- L'apartheid, de Nelson Mandela
		base_name = "WorldCat",
		not_link ="http://worldcat.org/search?q=REF_1&qt=owc_search", },

	WORLDCATch =	{typ = "not", need = 0, 
		keyword = "WORLDCATch", base_base = "WORLDCAT",base_id = "WORLDCATch", not_type = "",
		base_test = "35096649", -- William J. Clinton OK
		base_name = "WorldCat",
		not_link ="http://www.worldcat.org/search?q=REF_1&qt=owc_search", },

	WORLDCATid =	{typ = "not", need = 0, deprecated = 1,
		keyword = "WORLDCATid", base_base = "WORLDCAT", base_id = "WORLDCATid", not_type = "Author",
		base_test = "lccn-n50-23101", -- Alain-Fournier 1886-1914 OK
		base_name = "WorldCat",
		not_link ="http://www.worldcat.org/identities/REF_1", },

} -- p.args_known_default

function p.list_all_args(t, args_known) -- list_all_args_title = List of all arguments
	local t = t or "<br>* <b>List_all_args :</b> "
	if type(args_known) ~= "table" then args_known = CA.args_known end
	local descr, description = "", ""
	local args = mw.clone(args_known)
	local arglst = {}
	for key, elem in pairs(args) do
		elem.key = tostring(key)
		descr = key .. "_descr" -- key for description of an argument
		elem.description = CA.user_translations[descr] or "**missing translation**"
		elem.user_lang_key = CA.user_translations[elem.key] or "**missing translation**"
		elem.user_lang_keyword = CA.user_translations[elem.keyword] or "**missing translation**"
	--	elem.base_id = elem.base_id
	--	elem.base_base = elem.base_base
	--	elem.not_type = elem.not_type
		table.insert(arglst, elem)
	end -- insert in the arguments their own key
	table.sort(arglst, function (a, b) return (a.user_lang_key < b.user_lang_key) end ) -- alphabetic sort of translated arguments
	local gr_sys, gr_need, gr_other, gr_authority = {}, {}, {}, {}
	for i, elem in ipairs(arglst) do -- group arguments in some groups
		if elem.need == 1 or elem.need == 2 then table.insert(gr_need, elem)
		elseif elem.typ == "sys" then table.insert(gr_sys, elem)
		elseif elem.base_base then table.insert(gr_authority, elem)
		else table.insert(gr_other, elem) end
	end
	local needed = CA.small_caps_style(CA.str_vars("needed_to_verify"))
	local function list_group( group, needed )
		needed = needed or ""
		local t = ""
		for key, elem in pairs(group) do
			if elem.syn
			then t = t .. "<br>* <b>" .. tostring(elem.user_lang_key) .. "</b> => <b>" .. elem.user_lang_keyword .. "</b> : " .. needed .. " " .. tostring(elem.description) -- .. elem.lev_arg_txt
			else t = t .. "<br>* <b>" .. tostring(elem.user_lang_key) .. "</b> : " .. needed .. " " .. tostring(elem.description) end
		end
		return t
	end
	t = t .. "<br><br>* <b>" .. CA.str_vars("list_needed_arguments") .. "</b> " .. list_group( gr_need, needed )
	t = t .. "<br><br>* <b>" .. CA.str_vars("list_all_other_arguments") .. "</b> " .. list_group( gr_other )
	t = t .. "<br><br>* <b>" .. CA.str_vars("list_all_authorities") .. "</b> " .. list_group( gr_authority )
	t = t .. "<br><br>* <b>" .. CA.str_vars("list_all_system_arguments") .. "</b> " .. list_group( gr_sys )
	return t
end -- function p.list_all_args(t, args_known) -- list_all_args_title

------------------------------------------------------------
-- Manage options. Administrar opciones. Gérer les options.
------------------------------------------------------------

-- MArgms local catView = "" -- = ":" to display a category to document it rather than truly categorize

--	Options de maîtrise du fonctionnement de ce module
CA.invoke_options = " " -- options normales venant du modèle, normal options from template
--	options= en es fr params docview docmin docmax docdef docapres docline
--	local CA.mode_options = " " -- pas d'options de debug du module par edit
CA.mode_options = " " -- " unitest debug erron params docview no-box nocat docmin docmax docnotice docdef docline notices track " -- options de debug du module par edit

CA.args_wikidata = nil -- Table of the first complete import from wikidata
CA.args_selected = nil -- Table of imported arguments from wikidata after any selection
p.max_nearest_argument = 3 -- Limit of differences of arguments proposed to the user

------------------------------------------------------------
-- Petites fonctions utilitaires. Miscellaneous functions
------------------------------------------------------------

local function isDef(x) -- x is defined. x est défini
	return (type(x) == "string") and (x ~= "") and (x ~= " ") and (x ~= "nil")
end -- function isDef(x)

function wordstotable(txt, opt) -- convertit un texte en table de mots
	local t = ""
	local tab = {}
	local function inserer(ti)
		if ti ~= "" then table.insert(tab, ti.."") end
	end
	local xyz = string.gsub( txt, "(%S*%-*%S*)", inserer ) -- "(%w*%-*%'*%w*)", "(%S*%-*%S*)"
	for key, val in pairs(tab) do -- Pour tous les mots
		t = t .. " ( " .. tostring(key) .. " = " .. tostring(val) .. " ) "
	end
	t = "\n* wordstotable txt = " .. tostring(xyz) .. " " .. t
	return tab, t, opt
end -- function p.wordstotable(txt, opt)

------------------------------------------------------------
-- Données de wikidata par mw.wikibase
------------------------------------------------------------
-- {{authority control|TYP=p|GND=118620126|LCCN=n/50/66831|NDL=01229737|VIAF=95160848}}
-- http://www.mediawiki.org/wiki/Extension:WikibaseClient/Lua
-- https://www.wikidata.org/wiki/Wikidata:List_of_properties/all
-- https://www.wikidata.org/wiki/Wikidata:List_of_properties/Person
-- https://www.wikidata.org/wiki/Wikidata:List_of_properties/Works/fr
-- http://www.wikidata.org/wiki/Wikidata:Project_chat#Getting_a_subset_of_claims_for_an_entity
-- The props=claims API query retrieves ALL the claims stored for an entity.
-- {{Autorité}}
------------------------------------------------------------

------------------------------------------------------------
-- Manage and generate autority notices and scans
-- Gérer et générer les notices d'autorité et les scans
------------------------------------------------------------

function p.subst_string(input, find, replace)
	local L = string.len(find)
	local res = ""
	--	if (type(L) ~= "number") or (L == 0) then return "" end
	if L == 0 then return "" end
	local i = string.find(input, find)
	if i and (i > 0) then
		res = string.sub(input, 1, i-1) .. replace .. string.sub(input, i+L, -1)
	else return input end
	return res
end -- function p.subst_string(input, find, replace)

function p.split_by_char(input, split)
	if type(input) ~= "string" then return end
	if type(split) ~= "string" then return end
	local i, j, k, char, str, tbl = 0, 0, 0, "", "", {}
	local len = string.len(input)
	for i = 1, len do -- pour tous les caracteres de input
		char = string.sub(input, i, i)
		if char == split then -- a chaque coupure, stocker une partie en table
			k = k+1
			table.insert(tbl, str) -- tostring(k).."-"..
			j = 0
			str = ""
		else
			j = j+1
			str = str .. char
		end
	end
	k = k+1
	table.insert(tbl, str) -- tostring(k).."-"..
	return tbl
end -- function p.split_by_char(input, split)

function p.split_by_char_test()
	local t = "\n* Test '''split_by_char''' : "
	local test = { "debut", "un/deux", "1/23/4567", "abc//def", "/start/next/stop/", "fin", }
	local max = table.maxn(test)
	for N, str in ipairs( test) do
		tbl = p.split_by_char(str, "/")
		t = t .. CA.ta(str, table.concat(tbl, " , "))
	end -- tostring(N).."*"..refN
	return t
end -- function p.split_by_char_test()

function p.str_subst(txt, find, repl) -- in txt, replace find by repl
	-- Replace string.gsub( because :
	-- Erreur Lua dans Module:Author invalid capture index, in wt = string.gsub(wt, "REF_1", tostring(v1) )
	txt = tostring(txt)
	local i = string.find(txt, find)
	if i and (i > 1) then
		txt = string.sub(txt, 1, i-1) .. tostring(repl) .. string.sub(txt, i + string.len(find), -1)
	end
	return txt
end -- function p.str_subst(txt, find, repl)

function p.str_REF(wt_ref, v1, v2, v3)
	-- replace REF_1 to REF_3 by v1 to v3 in the translation of wt_ref, else in wt_ref
	wt_ref = tostring(wt_ref)
	local wt = ""
	if CA.wiki_translations and CA.wiki_translations[wt_ref]
		then wt = CA.wiki_translations[wt_ref] -- Utiliser wt_ref comme la reference d'un texte à traduire.
		else wt = wt_ref end -- Avant init de CA.wiki_translations utiliser wt_ref comme le texte lui-même
	if type(wt) ~= "string" then wt = wt_ref end -- Sinon utiliser wt_ref comme le texte lui-même.
	if v1 then wt = p.str_subst(wt, "REF_1", tostring(v1) ) end
	if v2 then wt = p.str_subst(wt, "REF_2", tostring(v2) ) end
	if v3 then wt = p.str_subst(wt, "REF_3", tostring(v3) ) end
	return wt
end -- function p.str_REF(wt_ref, v1, v2, v3)

-- Select authorities depending on the user language
function p.authorities_select(authorities_selector, args_wikidata, args_template, args_import, args_known)
	--	local args_selected, selected_autorities, authorities_from_args, x = p.authorities_select(authorities_selector, args_wikidata, args_template, args_import, args_known)
	-- The authorities notices selector come from the call, else from the "authorities" template argument, else from the user language or from the wiki language authorities_selector.
	if type(args_wikidata) ~= "table" then args_wikidata = CA.args_wikidata end
	if type(args_wikidata) ~= "table" then args_wikidata = {} end
	if type(args_import) ~= "table" then args_import = CA.args_import end
	if type(args_known) ~= "table" then args_known = CA.args_known end
	if type(args_template) ~= "table" then
		args_template = {}
		for key, argm in pairs(args_known) do
			if type(argm) == "table" and (argm.src == "args") then
				args_template[key] = args_import[key]
			end
		end
	end
--	authorities_selector = authorities_selector or CA.wiki_translations.authorities_selector or "6, VIAF, BNF, SUDOC, LCCN, ISNI, WORDCAT, NLA, PND, GKD, ARC" -- wop
	authorities_selector = authorities_selector or CA.args_import.authorities_arg or CA.wiki_translations.authorities_selector or "6, VIAF, BNF, SUDOC, LCCN, ISNI, WORDCAT, NLA, PND, GKD, ARC" -- wop
	--or CA.args_import.authorities_selector
	local authorities_from_data = {} -- selected autorities from wikidata
	local authorities_from_args = {} -- selected authority arguments defined by the template.
	local other_from_data = {} -- selected others from wikidata
	local other_from_args = {} -- Select arguments other than authorities.
	local selected_autorities = {} -- selected authorities.
	--
	for key, argm in pairs(args_known) do
		if type(argm) == "table" and (argm.typ == "not") then
			if (argm.src == "args")
			then authorities_from_args[key] = args_template[key]
			else authorities_from_data[key] = args_wikidata[key] end
		else
			if (argm.src == "args")
			then other_from_args[key] = args_template[key]
			else other_from_data[key] = args_wikidata[key] end
		end
	end
	local k, Nsel, N, maxi, pos = 0, 0, 1, 999, nil
	local selectors = mw.text.split(authorities_selector, ",", true)
	local reject_wikidata = false
	for i, authority in ipairs(selectors) do -- select authorities only following selectors
		if Nsel >= maxi then break end
		authority = mw.text.trim(authority)
		N = tonumber(authority)
		if authority == "+" then -- select all authorities from wikidata
			if type(args_known) == "table" and type(args_wikidata) == "table" then
				for key, val in pairs(args_wikidata) do
					if args_known[key] and (args_known[key].typ == "not") then
						Nsel = Nsel + 1
						selected_autorities[key] = val
					end
				end
			end
		elseif authority == "-" then -- minus sign rejects all
			reject_wikidata = true
		elseif N and N < 1 then -- minus sign rejects all
			reject_wikidata = true
		elseif N and (string.sub(authority, 1, 1) == "+") then -- select +N more authorities in nexts authorities
			maxi = Nsel + N
		elseif N then -- select N maximum total authorities with next authorities
			maxi = N
		else -- select real authorities from selectors and wikidata ( not - or + or +N or N )
			if args_wikidata[authority] then
				selected_autorities[authority] = args_wikidata[authority]
				Nsel = Nsel + 1
			end
		end
		--	t = t .. CA.tam(authority, authorities_from_data[authority]) .. tostring(Nsel) .. "/" .. tostring(N) .. "/" .. tostring(maxi) .. " - "
	end
	-- reject all authorities arguments from wikidata, if one authority = "-".
	if reject_wikidata then selected_autorities = {} end
	local args_selected = {} -- mw.clone(authorities_from_data) -- arguments cleaned, without rejected autorities
	for key, val in pairs(other_from_data) do args_selected[key] = val end -- args_import arguments without any authorities.
	for key, val in pairs(args_template) do args_selected[key] = val end -- args_import arguments without any authorities.
	for key, val in pairs(selected_autorities) do args_selected[key] = val end -- args_selected with selected authorities.
--	notices authorities_select always if CA.args_import.src == "arg" also in test1 select
	return args_selected, selected_autorities, authorities_from_args, t
--	CA.args_import, CA.args_selected, t = p.authorities_select()
end -- function p.authorities_select(authorities_selector, args_wikidata, args_import, args_known)

function p.authorities_select_test1(t, authorities_selector, args_wikidata, args_template, args_known)
--	local args_selected = mw.clone(authorities_from_args) -- selected autorities arguments, plus ...
--	function p.authorities_select(authorities_selector, args_wikidata, args_template, args_import, args_known)
	if type(args_wikidata) ~= "table" then args_wikidata = CA.args_wikidata end
	if type(args_wikidata) ~= "table" then args_wikidata = {} end
	if type(args_import) ~= "table" then args_import = CA.args_import end
	if type(args_known) ~= "table" then args_known = CA.args_known end
	if type(args_template) ~= "table" then
		args_template = {}
		for key, argm in pairs(args_known) do
			if type(argm) == "table" and (argm.src == "args") then
				args_template[key] = args_import[key]
			end
		end
	end
	authorities_selector = authorities_selector or CA.args_import.authorities_arg or CA.wiki_translations.authorities_selector or "6, VIAF, BNF, SUDOC, LCCN, ISNI, WORDCAT, NLA, PND, GKD, ARC" -- wop
	local args_selected, selected_autorities, authorities_from_args, x = p.authorities_select(authorities_selector, args_wikidata, args_template)
	local wd, ta, ts, cln = " ", " ", " ", " "
	for key, val in pairs(args_wikidata) do wd = wd .. " " .. key .. ", " end
	for key, val in pairs(args_template) do ta = ta .. " " .. key .. ", " end
	for key, val in pairs(selected_autorities) do ts = ts .. " " .. key .. ", " end
	for key, val in pairs(args_selected) do cln = cln .. " " .. key .. ", " end
	t = (t or "") .. CA.Tr() .. CA.Td(wd) .. CA.Td(authorities_selector) .. CA.Td(ta) .. CA.Td(cln)
	return t, args_selected, selected_autorities, authorities_from_args
end -- function p.authorities_select_test1(t, authorities_selector, args_wikidata, args_template)

function p.list_selected_authorities(t)
	local wd = CA.tab_fields(CA.args_wikidata)
	local ta = CA.tab_fields(p.args_template)
	local ts = CA.tab_fields(p.selected_autorities)
	local cln = CA.tab_fields(CA.args_selected)
	t = "\n* " .. (t or " '''Selected authorities: Autorités sélectionnées''' : ")
	t = t .. CA.Th() .. CA.Tc("Arguments de Wikidata") .. CA.Tc("Sélecteur") .. CA.Tc("Arguments du modèle" ) .. CA.Tc("Arguments sélectionnés")
	t = p.authorities_select_test1(t, p.authorities_selector, CA.args_wikidata, CA.args_template)
	t = t .. CA.Te()
	return t -- , CA.args_selected, p.selected_autorities, p.authorities_from_args
end -- function p.list_selected_authorities(t)

function p.authorities_select_test(t)
	local select = "3, VIAF, BNF, SUDOC, LCCN, ISNI"
	--	   sur fr, sont indispensables : VIAF, BNF, SUDOC + LCCN (référence internationale) + ISNI et Worldcat... les autres, seulement en cas de manque dans les autorités "de base"... Clin d'œil
	t = (t or "") .. "\n* '''authorities_select''' : "
	t = t .. "\n* Le premier test porte sur le cas de l'auteur actuel. "
	t = t .. "\n* Attention : Nommer les autorités comme leur variable et non comme leur traduction. Exemple : WORLDCAT et non Worldcat."
	t = t .. "\n* Les autorités définies par des arguments du modèle sont toujours sélectionnées."
	t = t .. "\n* Exemple de " .. CA.ta( "sélecteur", select )
	t = t .. "\n:: Sélectionner seulement les 3 premières autorités du sélecteur, parmi celles venant de wikidata. "
	t = t .. "\n* Autre exemple : sélecteur = '''+''' "
	t = t .. "\n:: Sélectionner toutes les autorités de wikidata. "
	t = t .. "\n* Autre exemple : sélecteur = '''-''' "
	t = t .. "\n:: Supprimer toutes les autorités de wikidata. Prioritaire sur '''+'''. "
	t = t .. "\n* Autre exemple : sélecteur = '''BNF, WORLDCAT, +2, VIAF, LCCN, 3, GKD''' "
	t = t .. "\n:: Sélectionner les premières, puis 2 de plus parmi les suivantes, puis 3 en tout au maximum, puis GKD si possible. "
	t = t .. "\n:: Dès qu'un nombre limité d'autorités est atteint, la sélection s'arrète. "
	t = t .. "\n:: Si un sélecteur '''+''' ou '''-''' est parmi d'autres il n'est exécuté qu'à son tour. "
--	t = t .. CA.Th() .. CA.Tc("Arguments de Wikidata") .. CA.Tc("Sélecteur") .. CA.Tc("Arguments du modèle" ) .. CA.Tc("Arguments sélectionnés") --	 .. CA.message_color(" ''' + arguments''' ")
	local head = mw.text.split( CA.str_vars("authorities_select_test_header") , ',')
	t = t .. CA.Th() .. CA.Tc(head[1]) .. CA.Tc(head[2]) .. CA.Tc(head[3]) .. CA.Tc(head[4])
	if CA.args_final and CA.args_final.authorities then
		t = p.authorities_select_test1( t, CA.args_final.authorities, CA.args_import )
	end
	-- function p.authorities_select(authorities_selector, args_wikidata, args_final, args_known)
	t = p.authorities_select_test1( t, "LCCN, ISNI, Worldcat", { WORLDCAT=1, GKD=1, LCCN=1,}, { VIAF=1, } )
	t = p.authorities_select_test1( t, select, { NLA=1, GKD=1, GKD=1, label=1, sitelink=1,}, {} )
	t = p.authorities_select_test1( t, select, { VIAF=1, BNF=1, SUDOC=1, LCCN=1, familyname=1, label=1,}, {} )
	t = p.authorities_select_test1( t, select, { VIAF=1, NLA=1, GKD=1, BNF=1, sitelink=1, familyname=1,}, { SWD=1, ULAN=1, epoch=1, mode="test", } )
	t = p.authorities_select_test1( t, select, { SUDOC=1, BNF=1, GKD=1, GKD=1, familyname=1, familyname=1,}, {} )
	t = p.authorities_select_test1( t, select, { VIAF=1, label=1, GKD=1, WORLDCAT=1, familyname=1, sitelink=1,}, { label=1, } )
	t = p.authorities_select_test1( t, "+", { VIAF=1, label=1, GKD=1, VIAF=1, familyname=1, sitelink=1,}, {} )
	t = p.authorities_select_test1( t, "LCCN, +, ISNI", { VIAF=1, label=1, GKD=1, LCCN=1, ISNI=1, BNF=1,}, {} )
	t = p.authorities_select_test1( t, "LCCN, -, +", { VIAF=1, label=1, LCCN=1, label=1,}, {} )
	t = p.authorities_select_test1( t, "LCCN, 0, +", { VIAF=1, label=1, LCCN=1, label=1,}, {} )
	t = p.authorities_select_test1( t, "LCCN, -2, +", { VIAF=1, label=1, LCCN=1, label=1,}, {} )
	t = p.authorities_select_test1( t, "VIAF, +2, SUDOC, LCCN", { VIAF=1, GKD=1, LCCN=1, ISNI=1, BNF=1,}, { ISNI, Worldcat, } )
	t = p.authorities_select_test1( t, "BNF, +4, VIAF, 3, GKD", { NLA=1, VIAF=1, GKD=1, LCCN=1, ISNI=1, BNF=1,}, {} )
	t = p.authorities_select_test1( t, "BNF, -, VIAF, 3, LCCN", { NLA=1, VIAF=1, LCCN=1, ISNI=1, BNF=1,}, { ULAN=1, title="Li", } )
	t = t .. CA.Te()
	return t
end -- function p.authorities_select_test( res, args_final)

function p.HTMLnotice(ref, noticeN, tag) -- Générer le wikitexte d'une notice
	-- exemple : notice("cb11888266r", noticeN)
	--	ARCitem = {base_base = "ARC", base_id = "ARCitem",	_space = "", base_test = "1234", not_type = "Book", ...
	if type(noticeN) ~= "table" then return "" end
	local base_id = noticeN.base_id
	local base_doc = noticeN.base_name
	local base_link = noticeN.not_link
	if type(base_id) ~= "string" then return "" end
	if type(noticeN.not_link) ~= "string" then return "" end
	if type(ref) ~= "string" or ref == "" then return "" end -- relire : declarer une erreur err_notice_missing_ref
	-- ne garder que le première reference si references multiples (voir Johnny Hallyday)
	-- Keep only the fisrt reference in case of multiple references (see Johnny Hallyday)
	local i = string.find( ref, ",")
	if i and (i > 1) then ref = string.sub(ref, 1, i-1) end
	-- = mw.text.trim( s, charset ) -- charset = "%t%r%n%f ". %s: represents all characters with General Category "Separator", plus tab, linefeed, carriage return, vertical tab, and form feed.
	local ref_link = string.gsub(ref, "%s", "") -- espace = space = %20
	local ref_link = mw.uri.encode(ref_link, "PATH") -- espace = space = %20
	local autority_alt_text = base_id .. " : " .. ref
	local wikipedia_name = noticeN.base_name
	local wikipedia_name_link = mw.uri.encode(wikipedia_name, "PATH") -- espace == %20
	local wikipedia_base_link = 'http://fr.wikipedia.org/wiki/' .. wikipedia_name_link
	local authority_icon_link = noticeN.not_link
	local wt = ""
	-- REF_1 = reference en un seul identifiant comme "cb11888266r"
	-- REF_1/REF_2 = reference en 2 parties comme "...worldcat_org_all&q=REF_1+REF_2"
	-- REF_1/REF_2/REF_3 = reference en 3 parties comme "http://id.loc.gov/.../REF_1REF_2REF_3"
	local v = mw.text.split(ref_link, "/", true) -- nobug
	-- LCCNid : allonger à 6 chiffres, avec des 0 à gauche, la partie 3 de "n/50/23101", soit 023101.
	--	v[3] = string.sub( "000001234" .. tostring(v[3]), -8, -1 ) --	-6, -1 )
	local authority_icon_link = p.str_REF(authority_icon_link, v[1], v[2], v[3])
	--
	local img = 'Farm-Fresh draw calligraphic.png'
	if noticeN.not_type == "Book" then img = 'Nuvola_apps_bookcase_2.svg' end
	-- exemple : wt = '<span style="margin-left:10px;" > &nbsp; * &nbsp; [' .. wikipedia_base_link .. ' ' .. base_id .. '] : [[File:' .. img .. '|22px|link=' .. authority_icon_link .. '|' .. autority_alt_text .. ']]</span>'
	if tag == "div" then -- align-self:flex-end; width=100%;
		wt = '<div style=" align-self:center; " > <span style=" text-wrap:none; margin-left:10px; " > [' .. wikipedia_base_link .. ' ' .. base_id .. ']&nbsp;[[File:' .. img .. '|22px|link=' .. authority_icon_link .. '|' .. autority_alt_text .. ']]&nbsp; </span> </div>'
	else --
--		wt = '<span style="color:#aaaa66;">•</span>[' .. authority_icon_link .. ' ' .. base_id .. '<small style="color:#0645ad;"> ' .. ref_link .. '</small>] '
		wt = '&nbsp; [' .. authority_icon_link .. ' ' .. base_id .. '<small style="color:#0645ad;"> &nbsp; [[w:' .. base_doc .. '|*]]</small>] &nbsp; '
	end
	return wt
end -- function p.HTMLnotice(ref, noticeN, tag)

--[[ example of autority notice definition
BNF =			{typ = "not", need = 0, 
	keyword = "BNF", prop = "P268", base_base = "BNF", base_id = "BNF", not_type = "Author",
	base_test = "119067514", -- BNF = 11888266 = Alain Fournier
	base_name = "Bibliothèque nationale de France",
	not_link = "http://catalogue.bnf.fr/ark:/12148/cbREF_1", },
--]]

-- Tester toutes les notices d'autorités indépendantes sur une personne, un livre ou autre.
-- Generate all know notices ARCid DNB GKD IBLid ...
function p.authorities_notices_test( res, args_known) -- 11 mars 15
	if type(args_known) ~= "table" then args_known = CA.args_known end
--	res = res or '\n\n* Test all know authority notices, some are deprecated (in grey): \n\n* '
	res = res or ('\n\n* ' .. CA.str_vars("authorities_notices_test_deprec") .. ': \n\n* ')
	local i, ntc, t = 1, "", ""
	for key, noticeN in pairs(args_known) do -- Pour toutes les notices connus
		t = p.HTMLnotice(noticeN.base_test, noticeN)
		if noticeN.deprecated == 1 then
			t = ' <span style=" background-color:#D0D0D0; "><small>(' .. t .. ')</small></span> '
		end
		res = res .. t
	end
	return res
end -- function p.authorities_notices_test( res, args_known)

-- Générer des notices d'autorités indépendantes sur une personne, un livre ou autre.
function p.form_notices(args_known, args_selected, tag)
	-- Generate notices ARCid DNB GKD IBLid ...
	if type(args_known) ~= "table" then args_known = CA.args_known end
	if type(args_selected) ~= "table" then args_selected = CA.args_selected end
	local wt, ref_trim, ref_split = "", "", nil
	--	wt = wt .. '<span style="margin-left:10px;" >*</span><span style="margin-left:10px;" >[http://fr.wikipedia.org/wiki/Bibliothèque%20nationale%20de%20France BNF test]</span> [[File:Farm-Fresh draw calligraphic.png|22px|link=http://catalogue.bnf.fr/ark:/12148/cb119067514|BNF test 119067514]] &nbsp;'
	for key, ref in pairs(args_selected) do -- Pour tous les paramètres connus
		key = tostring(key)
		if args_known[key] and (args_known[key]["typ"] == "not") then
			local ref_split = mw.text.split(ref, ",", true) -- nobug
			for i, ref_i in ipairs(ref_split) do
				ref_trim = mw.text.trim(ref_i)
				if ref_trim and ref_trim ~= "" and ref_trim ~= "-" then
					wt = wt .. p.HTMLnotice(ref_trim, args_known[key], tag)
				end
				if args_known[key]["deprecated"] == 1 then
					--	err_deprecated_authority	= "Cette base d'autorité, %1, est ancienne et à éviter.",
					CA.err_add("err_deprecated_authority", CA.user_translations[key])
				end
			end
		end
	end
	return wt
end -- function p.form_notices(args_known, args_selected, tag)

function p.toUTF8(t)
	-- convert a simple texte to UTF8 for URL
	-- base_name = "Bibliothèque d'autorité (Suède)"
	-- wikipedia_name = "Biblioth%%C3%%A8que%%20d%%27autorit%%C3%%A9%%20%%28Su%%C3%%A8de%%29"
	-- The default type, "QUERY", encodes spaces using '+' for use in query strings; "PATH" encodes spaces as %20; and "WIKI" encodes spaces as '_'.
	--
	if type(t) ~= "string" then return "" end
	--t = mw.uri.encode( t, "QUERY" )
	t = string.gsub(t, "%s", "%%20") -- espace == %20
	t = string.gsub(t, "'", "%%27") -- , == %27
	t = string.gsub(t, ",", "%%2C") -- , == %2C
	t = string.gsub(t, ":", "%%3A") -- : = %3A
	t = string.gsub(t, "%(", "%%%%28")
	t = string.gsub(t, "%)", "%%%%29")
	t = string.gsub(t, "é", "%%C3%%A9")
	t = string.gsub(t, "è", "%%C3%%A8")
	return t
end -- function p.toUTF8(t)

function p.scanNames(wt, site, args_final)
	-- wt = scanNames("http://gallic ... &q=-ws-name-+-ws-firstname-", md_data) -- replace names for scans
	-- anti errors
	if type(args_final) ~= "table" then args_final = CA.args_final end -- optional arguments
	local familyname = args_final.familyname or ""
	local firstname = args_final.firstname or ""
	local galliname = args_final.galliname or ""
	--	if galliname == "" then galliname = firstname end
	--	wt = mw.uri.encode(wt, "WIKI" ) -- The default type, "QUERY", encodes spaces using '+' for use in query strings; "PATH" encodes spaces as %20; and "WIKI" encodes spaces as '_'.
	-- replace names for scans
	wt = tostring(wt)
	firstname = mw.uri.encode(firstname, "QUERY" )
	wt = tostring(string.gsub(wt, "wsfirstname", firstname) ) -- "ws_firstname", firstname
	familyname = mw.uri.encode(familyname, "QUERY" )
	wt = tostring(string.gsub(wt, "wsfamilyname", familyname) )
	galliname = mw.uri.encode(galliname, "QUERY" )
	wt = tostring(string.gsub(wt, "wsfirstgall", galliname) )
	-- wt = p.toUTF8(wt)
	--	wt = mw.uri.encode(wt, "QUERY" ) -- The default type, "QUERY", encodes spaces using '+' for use in query strings; "PATH" encodes spaces as %20; and "WIKI" encodes spaces as '_'.
	-- str2 = str.gsub(/\s/,'')
	wt = "\n*[" .. wt .. " " .. site .. "] - - " -- .. '<br/>[' .. wt
	return wt
end -- function p.scanNames(wt, site, args_final)

function p.HTMLscans(args_final)
	-- à faire : i18n['fr']author_scans_text				= 'Scans fr : ', author_scans_text
	-- wt = scanNames("http://gallic ... &q=-ws-name-+-ws-firstname-") -- replace names for scans
	-- anti errors
	if type(args_final) ~= "table" then args_final = CA.args_final end -- optional arguments
	-- Generate scans to display
	local firstname, familyname, galliname = "x", "x", "x"
	local t = "" -- "HTMLscans "
	if type(args_final.firstname) == "string"
	--	then firstname = mw.uri.encode(args_final.firstname, "QUERY" )
		then firstname = string.gsub(args_final.firstname, "%s", "+")
		else firstname = "" end
	if type(args_final.familyname) == "string"
	--	then familyname = mw.uri.encode(args_final.familyname, "QUERY" )
		then familyname = string.gsub(args_final.familyname, "%s", "+")
	--		familyname = "Noël+Renée"
		else familyname = "" end
	if type(args_final.galliname) == "string"
	--	then galliname = mw.uri.encode(args_final.galliname, "QUERY" )
		then galliname = string.gsub(args_final.galliname, "%s", "+")
		else galliname = "" end
	local scans = "" -- CA.ta("firstname", firstname) .. CA.ta("familyname", familyname) .. CA.ta("galliname", galliname)
	local SCAN_gallica = "http://gallica.bnf.fr/Search?ArianeWireIndex=index&p=1&lang=FR&q=" .. familyname .. "+" .. firstname
	t = t .. " <span> &nbsp; [" .. SCAN_gallica .. " Gallica] </span>"
	local SCAN_europeana = "http://www.europeana.eu/portal/search.html?query=who:" .. firstname .. ",+" .. familyname .. "&rows=12"
	t = t .. " <span> &nbsp; [" .. SCAN_europeana .. " Europeana] </span>"
	local SCAN_google = "https://www.google.fr/search?q=inauthor%3A%22" .. firstname .. "+" .. familyname .. "%22&ie=utf-8&oe=utf-8&aq=t"
	t = t .. " <span> &nbsp; [" .. SCAN_google .. " Google] </span>"
	return t, SCAN_gallica, SCAN_europeana, SCAN_google
end -- function p.HTMLscans(args_final)

------------------------------------------------------------
-- Gérer les catégories. Manage categories. Administrar categorías.
------------------------------------------------------------

function p.gener_categories(args_final) -- Produire les catégories sans les activer
	if type(args_final) ~= "table" then args_final = CA.args_final end
	if args_final.initial then
		CA.cat_add("authors_initial_cat", args_final.initial)
	end
--	local keyword, keyval = CA.multiple_values("sex")
	local keyword, keyval = CA.multiple_values("sex", args_final.sex, args_final)
	if keyval == "female" then CA.cat_add("cat_female_authors") end -- sex_values = 'male,female'
--	if keyval == "male" then CA.cat_add("cat_male_authors") end -- sex_values = 'male,female'
--	local keyword, keyval, argval, rank = CA.multiple_values(argm, argvalue, args_final)
--	if CA.multiple_values("sex", args_final.sex) then CA.cat_add("cat_female_authors") end -- sex_values = 'male,female'
	CA.catGroup("%1", args_final.genre) -- |genre=Romanciers/Poètes/Auteurs de théatre
	CA.catGroup("cat_group_languages", args_final.language) -- |langue=français/italien de naissance
	CA.catGroup("cat_group_languages", args_final.languages) -- |langue=anglais/vietnamien autres langues
	-- if none autority, missing autority, generate err and cat. err_author_without_authority, cat_author_without_authority.
	-- To use only if Module:Author is alone in the page.
	local Nautorities = 0
	for key, args_kwn in pairs(CA.args_known) do
		if args_kwn and (args_kwn.typ == "not") then
		--	if args_final.key then
			Nautorities = Nautorities + 1 -- end
		end
	end
	if Nautorities == 0 then -- err and cat for missing Autority, in whole the autorities
		CA.err_add("err_author_without_authority", Nautorities)
		CA.cat_add("cat_author_without_authority", Nautorities)
	end
	return
end -- function p.gener_categories(args_final)

------------------------------------------------------------
-- Gérer et générer les droits d'auteurs, annotations, microformat
------------------------------------------------------------

function p.copyright_box(t, box, cat, txt, lang)
	-- convertir un simple texte en UTF8 pour URL
	-- base_name = "Bibliothèque d'autorité (Suède)"
	-- wikipedia_name = "Biblioth%%C3%%A8que%%20d%%27autorit%%C3%%A9%%20%%28Su%%C3%%A8de%%29"
	-- The default type, "QUERY", encodes spaces using '+' for use in query strings; "PATH" encodes spaces as %20; and "WIKI" encodes spaces as '_'.
	--[[
	<div style="position:relative;" >
	<div class="noprint" id="box-right" >
	<div style="float: right; padding: 10px; text-align: left; background-color: #F7F8FF; border: 1px solid #3300FF; width: 180px; margin: 1em;">
	<div style="float: left; padding-right: 5px;">[ [File:Info icon 001.svg|left|48px|link=] ]</div> {{{text|}}}
	</div></div></div>[ [Catégorie:Modèles d'avertissement] ]
	--]]
	local t_box = CA.str_vars(box)
	local t_cat = CA.str_vars(cat)
	local t_txt = CA.str_vars(txt)
	local t_lang = CA.str_vars(lang)
	local categ = CA.str_vars("category")
	lang = lang or CA.user_lang
	if lang and CA.i18n[lang] then
		i18n_lang = CA.i18n[lang]
		t_box = i18n_lang[box] or ""
		t_cat = i18n_lang[cat] or ""
		t_txt = i18n_lang[txt] or ""
	end
--	local t = (t or "") .. '<div style="" ><div	 >'
--	local t = (t or "") .. '<div  ><div class="noprint" id="box-right" >'
	local category_t = "[[" .. categ .. ":" .. t_cat .. "]]"
	local t = (t or "") -- default icon [[File:Info icon 001.svg|left|48px|link=]]
--	t = t .. '<div style="position:relative;" >'
--	t = t ..	'<div class="noprint" id="box-right" >'
	t = t .. '<div style="position:relative;" class="noprint" id="box-right" >'
	t = t ..		'<div style="float: right; padding: 10px; text-align: left; background-color: #F7F8FF; border: 1px solid #3300FF; width: 180px; margin: 1em;">'
--	t = t ..		'<div style="float: left; padding-right: 5px;">[[File:Info icon 001.svg|left|48px|link=]]</div>'
	t = t ..			t_txt
	t = t ..		'</div>'
--	t = t ..	'</div>'
	t = t .. '</div>'
	t = t .. category_t
	local infos = CA.ta("box", t_box) .. CA.ta("cat", t_cat) .. CA.ta("lang", lang) -- .. CA.ta("txt", t_txt)
	return t, infos, category_t
end -- function p.copyright_box(t, box, cat, txt, lang)

function p.copyright_box_test(t, box, cat, lang)
	local t, t1, t2, t3, t4, t5, t6 = (t or ""), "", "", "", "", "", ""
	local infos, in1, in2, in3, in4, in5, in6 = "", "", "", "", "", "", ""
	local boxes = ""
	CA.catView = ":"
	local function copyright_box_test1(t, box, cat, txt, lang)
	--	cat = "rights_values_cat_mpf" -- Catégorie:Auteurs morts pour la France
	--	box = "rights_values_box_mpf" -- Modèle:Morts pour la France
	--	txt = "rights_values_txt_mpf" -- Modèle:DP-CN-Auteur
		local t_box = CA.str_vars(box)
		local t_cat = CA.str_vars(cat)
		local t_txt = CA.str_vars(txt)
		local t_lang = CA.str_vars(lang)
		t, infos, category_t = p.copyright_box(t, box, cat, txt, lang)
		return t, infos
	end
	--
	t = t .. CA.Th() .. CA.Tc("en = English") .. CA.Tc("es = Español") .. CA.Tc("fr= Français")
	cat = "rights_values_cat_70" -- Catégorie:Auteurs dans le domaine public aux États-Unis
	box = "rights_values_box_70" -- Modèle:DP-EU-Auteur
	txt = "rights_values_txt_70" -- Modèle:DP-EU-Auteur
	t1, in1 = p.copyright_box(t, box, cat, txt, "en")
	t2, in2 = p.copyright_box(t, box, cat, txt, "es")
	t3, in3 = p.copyright_box(t, box, cat, txt, "fr")
	t = t .. CA.Tr() .. CA.Td(in1) .. CA.Td(in2) .. CA.Td(in3)
	boxes = boxes .. t1 .. t2 .. t3
	--
	cat = "rights_values_cat_50" -- Catégorie:Auteurs dans le domaine public au Canada
	box = "rights_values_box_50" -- Modèle:DP-CN-Auteur
	txt = "rights_values_txt_50" -- Modèle:DP-CN-Auteur
	t1, in1 = p.copyright_box(t, box, cat, txt, "en")
	t2, in2 = p.copyright_box(t, box, cat, txt, "es")
	t3, in3 = p.copyright_box(t, box, cat, txt, "fr")
	t = t .. CA.Tr() .. CA.Td(in1) .. CA.Td(in2) .. CA.Td(in3)
	boxes = boxes .. t1 .. t2 .. t3
	--
	cat = "rights_values_cat_mpf" -- Catégorie:Auteurs morts pour la France
	box = "rights_values_box_mpf" -- Modèle:Auteurs morts pour la France
	txt = "rights_values_txt_mpf" -- Modèle:DP-CN-Auteur
	t1, in1 = p.copyright_box(t, box, cat, txt, "en")
	t2, in2 = p.copyright_box(t, box, cat, txt, "es")
	t3, in3 = p.copyright_box(t, box, cat, txt, "fr")
	t = t .. CA.Tr() .. CA.Td(in1) .. CA.Td(in2) .. CA.Td(in3)
	boxes = boxes .. t1 .. t2 .. t3
	--
	cat = "rights_values_cat_none" -- Category:Author in public domain
	box = "rights_values_box_none" -- Modèle:Auteurs du domaine public
	txt = "rights_values_txt_none" -- Modèle:DP-CN-Auteur
	t1, in1 = p.copyright_box(t, box, cat, txt, "en")
	t2, in2 = p.copyright_box(t, box, cat, txt, "es")
	t3, in3 = p.copyright_box(t, box, cat, txt, "fr")
	t = t .. CA.Tr() .. CA.Td(in1) .. CA.Td(in2) .. CA.Td(in3)
	boxes = boxes .. t1 .. t2 .. t3
	t = t .. CA.Te()
--	t = t .. boxes -- DEBUG: keep this to verify all boxes if necessary.
	CA.options_to_catView()
	return t, infos, boxes
end -- function p.copyright_box_test(t, box, cat, lang)

function p.author_rights(args_final)
	-- wkt, ee = p.author_rights(args_final)
	if type(args_final) ~= "table" then args_final = CA.args_final end
	local rights, rights_time = nil
	if args_final and type(args_final.rightype) == "string" then rights = args_final.rightype end
	local deathyear = tonumber(args_final.deathyear) -- or CA.nowyear
	local birthyear = tonumber(args_final.birthyear)
	local err, txt, tst, wkt = "", "", "", ""
	local delaymax, delay, cat, box, key = 0, 0
	--
	-- Known rights types
--	local rights_values = CA.i18n.rights.key_values or '70,50,mpf,none' -- wop
--	keyword = "rights", arg_values = "rights_values", key_values = "no,none,cn,50,us,70,mpf", delay_values = "0,0,50,50,70,70,95" }, -- wop
--		keyword = "rights", arg_values = "rights_values", key_values = "no,none,cn,50,us,70,mpf", -- wop
--		delay_values = "0,0,50,50,70,70,95", arg_uses = "none,none,cn,cn,us,us,mpf" }, -- wop
--	local argm = args_known[argmt]
	if argm then
--		arg_values_local = CA.wiki_translations[argm.arg_values]	or "" -- example "no,nada,cn,50,us,70,mpf" in local language
--		key_values_refer = argm.key_values						or "" -- example "no,none,cn,50,us,70,mpf" in referal english -- wop
	end
	-- rights_values
	local rights_values = string.lower( CA.wiki_translations[CA.args_known.rights.arg_values] )
	if not CA.is_in(rights or "-", rights_values)
	then rights_values = string.lower( CA.args_known.rights.key_values ) end -- or "no,none,cn,50,us,70,mpf" -- wop
	local rights_tab = mw.text.split(rights_values, ',') -- table of names
	-- delay_values
	local delay_values = string.lower( CA.args_known.rights.delay_values ) -- or "0,0,50,50,70,70,95" -- wop
	local delay_tab = mw.text.split(delay_values, ',') -- table of values
	-- arg_uses
	local arg_uses = string.lower( CA.args_known.rights.arg_uses ) -- example arg_uses = "none,none,cn,cn,us,us,mpf" in referal english -- wop
	local uses_tab = mw.text.split(arg_uses, ',') -- table of uses
	local keyword, keyval, argval, rank = CA.multiple_values("rights", rights, args_final)
	local delay = tonumber( delay_tab[rank] )
	local use = uses_tab[rank]
	for i, key in ipairs(rights_tab) do
		local kw, kv, av, nn = CA.multiple_values("rightype", rights, args_final)
		local del = tonumber(delay_tab[i])
		if del and del > delaymax then delaymax = del end -- 'Auteur Mort pour la France'
	end
	args_final.delaymax = delaymax
	if rank > 0 then rights = keyval end
	if use then rights = use end
	rights_time = delaymax
	local rights_limit = 0
	if rights and deathyear then -- Compute actual rights type
		if rights == "none" then key = "none" -- Public domain if rightype = none
			rights_time = 0
		--	if deathyear and ( CA.nowyear < (deathyear + 0) ) then key = "mpf" end
		--	if deathyear and not ( CA.nowyear < (deathyear + 0) ) then key = "none" end
		elseif rights == "cn" then -- standard 50 years in Canada
			rights_time = 50
			if ( CA.nowyear < (deathyear + rights_time) ) then key = "cn" end
			if not ( CA.nowyear < (deathyear + rights_time) ) then key = "none" end
		elseif rights == "us" then -- standard 70 years in USA
			rights_time = 70
			if ( CA.nowyear < (deathyear + rights_time) ) then key = "us" end
			if not ( CA.nowyear < (deathyear + rights_time) ) then key = "none" end
		elseif rights == "mpf" then -- 'Auteur Mort pour la France'
			rights_time = 95
			if ( CA.nowyear < (deathyear + rights_time) ) then key = "mpf" end
			if not ( CA.nowyear < (deathyear + rights_time) ) then key = "none" end
		end
		rights_limit = deathyear + rights_time
	end
	if birthyear and ( (not rights) or (not deathyear) ) then
		-- if not deathyear or not rights type, then compute the first future rights_limit around all the rights types.
		local limit, delay, rightyear = 222, 222, CA.nowyear + CA.constants.author_mean_lifetime
		for i, del in ipairs(delay_tab) do -- 50,70,95 -- 2015 + 50 = 2065 -- 2015 + 95 = 2110
			local delay = tonumber(del)
		--	rightyear = CA.nowyear + limit -- 2015 + 50 = 2065
			
		--	limit = birthyear - CA.nowyear + CA.constants.author_mean_lifetime - CA.constants.author_writing_before_death -- test end writing
			limit = CA.constants.author_mean_lifetime - CA.constants.author_writing_before_death -- test end writing
			if delay and (delay >= 0) then limit = math.min( delay, limit ) ; rightyear = CA.nowyear + limit end
			
			limit = CA.constants.author_mean_lifetime/2 + 8 -- test middle writing birthyear - CA.nowyear +
			if delay and (delay >= 0) then limit = math.min( delay, limit ) ; rightyear = CA.nowyear + limit end
			
			limit = CA.constants.author_writing_after_birth -- test begin writing -- 20 birthyear - CA.nowyear +
			if delay and (delay >= 0) then limit = math.min( delay, limit ) ; rightyear = CA.nowyear + limit end
		
			--	CA.constants.categorise_death_for_n_years = 100 -- Start writing an author after birth
			--	CA.constants.author_writing_after_birth = 20 -- Finished writing a writer before his death
			--	CA.constants.author_writing_before_death = 5 -- Limit of normal life
			--	CA.constants.author_mean_lifetime = 85 -- Limit of normal time writing of an author
			--	CA.constants.author_lifetime_limit = 120 -- Limit of normal time writing of an author
			--	CA.constants.author_writing_time_limit = author_lifetime_limit - author_writing_after_birth - author_writing_before_death
		end
	--	rightyear = CA.nowyear + math.floor(delay) -- 2015 + 50 = 2065
		rights_limit = math.floor(rightyear) + 0
	end
	CA.args_final.rights_limit = rights_limit
	-- From here, one of rights or deathyear is unknown
	if not key and not rights and not deathyear then key = "unknown" end
	if not key and not deathyear and rights == "none" then key = "none" end
	if (not key) and deathyear and not rights then
		if deathyear < (CA.nowyear - delaymax) then key = "none" -- Public domain if out of delaymax
		else key = "unknown" end -- Unknown author rights if in delaymax
	end
	--
	if key == "none"  then -- Public domain
		cat = "rights_values_cat_none" -- Catégorie:Author in public domain
		box = "rights_values_box_none" -- Modèle:DP-Public-Author
		txt = "rights_values_txt_none" -- Public domain
	elseif key == "cn"	then -- Canada rights
		cat = "rights_values_cat_50" -- Catégorie:Auteurs dans le domaine public au Canada
		box = "rights_values_box_50" -- Modèle:DP-CN-Auteur
		txt = "rights_values_txt_50" -- Modèle:DP-CN-Auteur
	elseif key == "us"	then -- United States of America rights
		cat = "rights_values_cat_70" -- Catégorie:Auteurs dans le domaine public aux États-Unis
		box = "rights_values_box_70" -- Modèle:DP-EU-Auteur
		txt = "rights_values_txt_70" -- Modèle:DP-EU-Auteur
	elseif key == "mpf"	 then -- Morts pour la France rights
		cat = "rights_values_cat_mpf" -- Catégorie:Auteurs morts pour la France
		box = "rights_values_box_mpf" -- Modèle:Morts pour la France
		txt = "rights_values_txt_mpf" -- Modèle:DP-US-Auteur
	elseif key == "unknown" then -- Public domain if out of delaymax
		cat = "rights_values_cat_unknown" -- Category:Unknown author rights, Catégorie:Droits d'auteur inconnus
		box = "rights_values_box_unknown" -- Template:Unknown author rights, Modèle:Droits d'auteur inconnus
		txt = "rights_values_txt_unknown" -- Template:DP-X-Author, Modèle:DP-X-Auteur
	end
	--
	if deathyear and (key == "none") and ( CA.nowyear == (deathyear + rights_time) ) then
		err = err .. CA.cat_add("new_public_rights_authors") -- Categorize in "New Public domain" to help to manage works to publish
	end
	--
	if cat == "rights_values_cat_unknown" then
		err = err .. CA.err_add("err_undefined_rights") -- Undefined rights error
	end
	CA.cat_add(cat)
	local t, infos, category_t = p.copyright_box("", box, cat, txt, lang) -- form the box
	if box then wkt = t end
	--
	tst = "\n* author_rights: " -- trace of details for debug
	tst = tst .. CA.ta("deathyear", deathyear) .. CA.ta("args_final.rightype", args_final.rightype)
	tst = tst .. CA.ta("delay", delay) .. CA.ta("delaymax", delaymax) .. CA.ta("use", use)
	tst = tst .. CA.ta("argval", argval) .. CA.ta("keyval", keyval) .. CA.ta("rights", rights)
	tst = tst .. CA.ta("box", box) .. CA.ta("cat", cat) .. CA.ta("category_t", category_t)
	tst = tst .. CA.ta("rights_values", rights_values) .. CA.ta("rank", rank) .. CA.ta("delay_values", delay_values)
--	tst = tst .. CA.ta("keyword", keyword) .. CA.ta("rank", rank) .. CA.ta("options", options)
	tst = tst .. CA.ta("err", CA.error_color(err) )
	--
	args_final.rights_limit = rights_limit
--	args_final.details = tst
	args_final.copyright = box
	args_final.rightuse = use
	args_final.category_t = cat
--	args_final.tst = tst
--	args_final.wkt = wkt
	args_final.cats = args_final.cats or ""
	args_final.cats = args_final.cats .. (cat_t or "")
--	args_final.errs = args_final.errs or ""
--	args_final.errs = args_final.errs .. (err or "")
	return wkt, args_final, details
end -- function p.author_rights(args_final)

function p.author_rights_test(t, args_final, guide)
	local t = (t or "")
	CA.catView = ":"
	local function author_rights_test1(t, deathyear, rightype, birthyear, guide)
		local args = {}
		args.deathyear = deathyear ; args.birthyear = birthyear ; args.rightype = rightype
	--	cat = "rights_values_cat_mpf" -- Catégorie:Auteurs morts pour la France
	--	box = "rights_values_box_mpf" -- Modèle:Morts pour la France
	--	txt = "rights_values_txt_mpf" -- Modèle:DP-CN-Auteur
		t_cat = CA.str_vars(cat)
		local wkt, args = p.author_rights(args)
		t = t .. CA.Tr() .. CA.Td(args.birthyear) .. CA.Td(args.deathyear) .. CA.Td(args.rightype) .. CA.Td(args.rightuse) .. CA.Td(CA.str_vars(args.copyright))
		.. CA.Td(CA.str_vars("rights_limit_txt", args.rights_limit) .. ' ' .. CA.cat_add(args.category_t) ) -- .. ' ' .. args.errs)
		return t, args.deathyear, args.rightype, args.copyright, args.category, args.details
	end
	local deathyear, rightype, copyright, category, details = "", "", "", "", ""
	local nowyear = CA.nowyear
	local head = mw.text.split( CA.str_vars("author_rights_test_header") , ',')
	t = t .. CA.Th() .. CA.Tc(head[1]) .. CA.Tc(head[2]) .. CA.Tc(head[3]) .. CA.Tc(head[4]) .. CA.Tc(head[5] .. CA.Tc(head[6])) --
	t = author_rights_test1(t, nowyear-200, nil)
	t = author_rights_test1(t, nowyear-95, "mpf")
	t = author_rights_test1(t, nowyear-94, "mpf")
	t = author_rights_test1(t, nowyear-70, "70")
	t = author_rights_test1(t, nowyear-70, "us")
	t = author_rights_test1(t, nowyear-69, "70")
	t = author_rights_test1(t, nowyear-69, "us")
	t = author_rights_test1(t, nowyear-50, "50")
	t = author_rights_test1(t, nowyear-50, "cn")
	t = author_rights_test1(t, nowyear-49, "50")
	t = author_rights_test1(t, nowyear-49, "cn")
	t = author_rights_test1(t, nowyear-10, "none")
	t = author_rights_test1(t, nowyear-10, "non")
	t = author_rights_test1(t, nowyear-10, nil)
	t = author_rights_test1(t, nowyear-1, "none") -- new_public_rights_authors
	t = author_rights_test1(t, nowyear-0, "none") -- new_public_rights_authors
	t = author_rights_test1(t, nowyear+1, "none") -- new_public_rights_authors
	t = t .. CA.Tr() .. CA.Tc(head[1]) .. CA.Tc(head[2]) .. CA.Tc(head[3]) .. CA.Tc(head[4]) .. CA.Tc(head[5]) .. CA.Tc(head[6]) --
	t = author_rights_test1(t, nowyear-5, nil)
	t = author_rights_test1(t, nil, "none")
	t = author_rights_test1(t, nil, "non")
	t = author_rights_test1(t, nil, nil)
	t = author_rights_test1(t, nil, nil, nowyear-90)
	t = author_rights_test1(t, nil, nil, nowyear-70)
	t = author_rights_test1(t, nil, nil, nowyear-50)
	t = author_rights_test1(t, nil, nil, nowyear-30)
	t = author_rights_test1(t, nil, nil, nowyear-21)
	t = t .. CA.Te()
	CA.options_to_catView()
	return t, infos, boxes
end -- function p.author_rights_test(t, args_final, guide)

------------------------------------------------------------
-- Gérer et générer l'entête de page d'un auteur
-- Voir aussi les styles dans Mediawiki:commons.css, Utilisateur:Xyz/commons.css
------------------------------------------------------------

function p.pcall_int2roman(val, errs) -- DEBUG : MathRoman.int2roman() can fail without blocking page.
--	EBUG: Without this patch the MathRoman.int2roman() get the parser error "attempt to call field 'int2roman' ". Patched by Rical 2015-04-20.
--	local event_century_roman = ""
--	word, errx = MathRoman.int2roman(val, errs)
	-- See Maniphest T27845 Support loading wiki pages through mediaWiki.loader.load()
	-- DEBUG code:
	local success, word, errs = pcall(MathRoman.int2roman, val, errs) -- pcall or xpcall can run any function without blocking page.
	if success then return word, errs else return nil, errs end
end

function p.pcall_roman2int(word, errs) -- DEBUG : MathRoman.roman2int() can fail without blocking page.
--	DEBUG: Without this patch the MathRoman.int2roman() get the parser error "attempt to call field 'roman2int' ". Patched by Rical 2015-04-20.
--	val, errs = MathRoman.roman2int(word, errs)
	local success, val, errs = pcall(MathRoman.roman2int, word, errs) -- pcall or xpcall can run any function without blocking page.
	if success then return val, errs else return nil, errs end
end

-- Extract one number from a text, digital or roman
-- In the chain of calls : p.a_number() p.year_century() p.century_epoch() p.compute_midle_year_century() p.year_century_epoch_cats() p.events_epochs()
function p.a_number( ee, base_in)
	--	ee = p.a_number( ee, "digit") -- example
	local err, cat = "", ""
	local wkt, tst = "", ""
	ee.nbr_out = nil
	ee.nbr_txt = ""
	ee.nbr_in = ee.nbr_in or ""
	--
	-- La base du nombre (digit ou roman) est définie par ee.base_in puis par ee.base ici.
	-- Ensuite elle sera forcée par des valeurs d'années décimales trop grandes pour être des siècles.
	-- Ensuite elle sera forcée par des chiffres romains de siècle.
	-- voir aussi err_year_in_roman_number
	--
	-- Normalize abnormal values. Normaliser des valeurs anormales
	if base_in then ee.base_in = base_in end
	if ee.base_in then ee.base = ee.base_in end
	if ee.base ~= "roman" then ee.base = "digit" end -- default values. valeur par défaut
	local val, error_roman, argmt, argmX = nil, "", "", ""
	local an_tab = {} -- table of found numbers
-- Todo: Titus Livius (Q2039), format de dates : P569 = date of birth = 59 BCE, P570 = date of death = 17
	-- Search all roman numbers. Chercher tous les nombres romains.
	ee.digit_select = "[^MDCLXVIJ]"
	local numbers = string.gsub( " "..ee.nbr_in.." ", ee.digit_select, " " )
	local lst = wordstotable( numbers ) -- convertit un texte en table de mots
	for key, word in pairs(lst) do -- search eventual numbers
		val = nil
		if word then
			-- L'argument peut contenir un nombre décimal, un nombre romain ou les deux.
			-- On lit les deux pour traiter tous les cas plus tard.
		--	val, error_roman = MathRoman.roman2int(word, "	")
			val, error_roman = p.pcall_roman2int( word, "	") -- DEBUG : MathRoman.roman2int() can fail without blocking page.
		--	if val == 0 then val = nil end
			if not val then CA.err_add(error_roman) end
			if (val ~= nil) then
				ee.roman_txt = word -- il y a au moins un nombre roman parmi les mots
				table.insert( an_tab, val )
				ee.nbr_out = val
				ee.base = "roman"
				ee.numbers = numbers
				ee.nbr_txt = ee.roman_txt -- ee.nbr_txt ..
				ee.vague_txt = string.gsub( ee.nbr_in, ee.nbr_txt or "", "" )
				ee.vague_txt = string.gsub( ee.vague_txt, "[^%l%<%=%>]", "" )
				ee.vague_roman = isDef(ee.vague_txt)
				ee.error_roman = error_roman
				if ee.error_roman then
					CA.err_add("err_roman2int", ee.roman_txt, ee.nbr_out, ee.error_roman)
				end
			end
		end
	end
	-- Search all digital numbers. Chercher tous les nombres décimaux
	ee.digit_select = "[^%d]" -- "[^%d]"
	local numbers = string.gsub( " "..ee.nbr_in.." ", ee.digit_select, " " )
	local lst = wordstotable( numbers ) -- convertit un texte en table de mots " "..ee.nbr_in.." "
	for key, word in pairs(lst) do -- search eventual numbers
		val = nil
		if word then
			-- L'argument peut contenir un nombre décimal, un nombre romain ou les deux.
			-- On lit les deux pour traiter tous les cas plus tard.
			val = tonumber( word )
			if (val ~= nil) then
				ee.digit_txt = word -- il y a au moins un nombre décimal parmi les mots
				table.insert( an_tab, val )
				ee.nbr_out = val
				ee.base = "digit"
				ee.numbers = numbers
				ee.nbr_txt = ee.digit_txt
				-- Dans le texte d'entrée, sans le nombre trouvé, garder seulement les lettres et "<=>".
				-- In the input text, without the found number, keep only letters and "<=>"
				ee.vague_txt = string.gsub( ee.nbr_in, ee.nbr_txt or "", "" )
				ee.vague_txt = string.gsub( ee.vague_txt, "[^%l%<%=%>]", "" )
				ee.vague_digit = isDef(ee.vague_txt)
			end
		end
	end
	--
	ee.tabN = table.maxn( an_tab )
	if ee.tabN == 1 then -- verify the number is alone
		-- Si on a un nombre et un seul, on peut utiliser sa valeur
		-- Et on connait sa base par digit_txt ou roman_txt
		ee.nbr_out = an_tab[1]
	else -- erreur s'il n'y a pas de nombre ou s'il y en a plusieurs
		--	cat = cat .. CA.err_add("err_one_number_argument", tostring( ee[argname] ) )
		ee.nbr_out = nil
		ee.nbr_txt = nil
	end
	if ee.nbr_out then -- adjust for negative numbers, including romans
		local negatif = string.find( ee.nbr_in, "-" .. ee.nbr_txt )
		if negatif then
			ee.nbr_out = - ee.nbr_out
	--			ee.nbr_txt = ""
	--			if ee.digit_txt then ee.nbr_txt = ee.digit_txt end
			-- Pour les catégories CE, BCE ou Av. JC
	--			if ee.roman_txt then ee.nbr_txt = ee.nbr_txt .. ee.roman_txt end
		end
	end
	-- Chercher du texte significatif en plus du nombre
	-- Search for significant text in addition to the number
	tst =  "\n* a_number " -- tostring(tst) .. "\n* a_number "
	tst = tst .. CA.ta("nbr_in", ee.nbr_in) .. CA.ta("base_in", ee.base_in) .. CA.ta("base", ee.base)
	tst = tst .. CA.ta("nbr_out", ee.nbr_out) .. CA.ta("uncertain_txt", ee.vague_txt)
	--	tst = tst .. CA.ta("numbers", ee.numbers) -- .. CA.ta("argmX", argmX)
	tst = tst .. CA.ta("tabN", ee.tabN) .. CA.ta("nbr_txt", ee.nbr_txt)
	--	tst = tst .. CA.ta("digit_txt", ee.digit_txt) .. CA.ta("roman_txt", ee.roman_txt)
	--	tst = tst .. CA.ta("err", err) .. CA.ta("cat", cat)
	cat = cat or ""
	err = err or ""
	ee.cats = ee.cats or ""
	ee.errs = ee.errs or ""
--	ee.wkt = wkt or ""
--	ee.tst = tst or ""
	ee.cats = ee.cats .. cat
	ee.errs = ee.errs .. err
	return ee, ee.wkt
end -- function p.a_number( ee, base_in)

-- Convert a digital or roman number to a year or century
-- In the chain of calls : p.a_number() p.year_century() p.century_epoch() p.compute_midle_year_century() p.year_century_epoch_cats() p.events_epochs()
function p.year_century( ee )
	ee.cats = ee.cats or ""
	ee.errs = ee.errs or ""
	local err, cat = "", ""
	ee.nowyear = CA.nowyear
	-- Type of arguments
	if ee.birthcentury then ee.argname = "birthcentury" end
	if ee.birthyear	   then ee.argname = "birthyear" end -- keep year rather than century
	if ee.deathcentury then ee.argname = "deathcentury" end
	if ee.deathyear	   then ee.argname = "deathyear" end -- keep year rather than century
	if ee.birthyear or ee.birthcentury then ee.event = "birth" end
	if ee.deathyear or ee.deathcentury then ee.event = "death" end
	-- Pour un évènement, on utilise l'argument année plus précis, sinon le siècle.
	if ee.event == "birth" then
		ee.nbr_in = ee.birthyear or ee.birthcentury -- keep year rather than century
	elseif ee.event == "death" then
		ee.nbr_in = ee.deathyear or ee.deathcentury -- keep year rather than century
	else -- Pour un évènement indéterminé, on utilise plutôt le décès pour les droits d'auteur, sinon la naissance.
		ee.nbr_in = ee.deathyear or ee.birthyear or ee.deathcentury or ee.birthcentury
	end
	local ee = p.a_number( ee, "digit")
	-- The number is a priori a year.
	-- Le nombre est à priori une année.
	ee.century = nil
	ee.year = ee.nbr_out
	-- A roman number defines a century, and cancel the year.
	-- Un nombre romain définit un siecle, et annule l'année.
	--	if ee.base_in == "roman" then
	if ee.base == "roman" then
		ee.century = ee.nbr_out
		ee.year = nil
	end
	-- A number coming from a century argument defines a century.
	-- Un nombre qui vient d'un argument de siècle définit un siecle.
	if ee.argname == "birthcentury" or ee.argname == "deathcentury" then
		ee.century = ee.nbr_out
		ee.year = nil
	end
	-- A number too big or too small to be a century is a year.
	-- Un nombre trop grand ou trop petit pour être un siècle est une année.
	-- L'Antiquité européenne commence au IVe millénaire BCE
	-- La civilisation de l'Indus (5000 BCE – 1900 BCE).
	-- In 2013, keep a margin of one unit (year or century).
	-- En 2013, garder une marge d'une unité (année ou siècle).
	if ee.nbr_out then
		if ee.nbr_out < -75 or 25 < ee.nbr_out then
			ee.century = nil
			ee.year = ee.nbr_out
		end
	end
	--
	-- Consequences for a year :
	-- Conséquences pour une année :
	if ee.year then
		ee.vague_year = ee.vague_digit or ee.vague_roman
		if ee.event == "birth" then
			-- Auteur par défaut à partir de 20 ans
			ee.event_author = ee.year + CA.constants.author_writing_after_birth
		elseif ee.event == "death" then
			-- Auteur par défaut jusqu'à 5 ans avant le décès
			ee.event_author = ee.year - CA.constants.author_writing_before_death
	--	elseif ee.event == "epoch" then
			-- Epoch specialy defined
	--		ee.event_author = ee.year_epoch
		else
			ee.event_author = ee.year
		end
		-- year. anno. année.
		ee.event_yr = ee.event_author
		if ee.year_epoch then ee.event_yr = ee.year_epoch end -- year_epoch enforce epoch
		-- Assurer la continuité des années autour de 1 pour tous les calculs
--		if ee.event_yr and ee.event_yr < 1 then ee.event_yr = ee.event_yr + 1 end
		-- To debug here ? Shift century of 2 year for negative centuries.
		if ee.event_yr and ee.event_yr < 1 then ee.event_yr = ee.event_yr + 2 end
		-- Century from event year. Siglo de anno de evenement. Siècle selon l'annee de l'evenement.
		ee.event_century_abs = math.floor( math.abs(ee.event_yr - 1 ) / 100 ) + 1
		if ee.event_yr < 1 then
			ee.event_century = - ee.event_century_abs -- event negative century
		--	ee.event_century_roman = MathRoman.int2roman(ee.event_century_abs) -- MathRoman.int2roman() fails sometime.
			ee.event_century_roman = p.pcall_int2roman(ee.event_century_abs) -- DEBUG patch: MathRoman.int2roman() can fail without blocking page.
		else
		--	ee.event_century_roman = MathRoman.int2roman(ee.event_century_abs) -- MathRoman.int2roman() fails sometime.
			ee.event_century_roman = p.pcall_int2roman(ee.event_century_abs) -- DEBUG patch: MathRoman.int2roman() can fail without blocking page.
		end
	elseif ee.century then -- Without year, do not shift event. Sans annee, ne pas decaler l'evenement.
		ee.vague_cent = ee.vague_digit or ee.vague_roman
		-- Event century. Siglo de evenement. Siècle d'evenement.
		ee.event_century_abs = math.abs(ee.century)
		if ee.century < 1 then
			ee.event_century = - ee.event_century_abs -- event negative century
		--	ee.event_century_roman = MathRoman.int2roman(ee.event_century_abs) -- MathRoman.int2roman() fails sometime.
			ee.event_century_roman = p.pcall_int2roman(ee.event_century_abs) -- DEBUG patch: MathRoman.int2roman() can fail without blocking page.
		else -- ee.century_roman ?
			ee.event_century = ee.event_century_abs -- event positive century
		--	ee.event_century_roman = MathRoman.int2roman(ee.event_century_abs) -- MathRoman.int2roman() fails sometime.
			ee.event_century_roman = p.pcall_int2roman(ee.event_century_abs) -- DEBUG patch: MathRoman.int2roman() can fail without blocking page.
		end
	end
	--
	tst = "\n* year_century " -- tostring(tst) ..
	tst = tst .. CA.tam("event", ee.event) .. CA.tam("nbr_in", ee.nbr_in)
	tst = tst .. CA.tam("base", ee.base) -- .. CA.tam("base_in", ee.base_in)
	tst = tst .. CA.tam("year", ee.year) .. CA.tam("event_author", ee.event_author)
	tst = tst .. CA.tam("event_yr", ee.event_yr) .. CA.tam("century", ee.century)
	tst = tst .. CA.tam("event_ct", ee.event_ct) .. CA.tam("century_roman", ee.century_roman)
	tst = tst .. CA.tam("err", CA.error_color(err)) .. CA.tam("cat", cat)
	ee.wkt = tst
	ee.cats = ee.cats .. cat
	ee.errs = ee.errs .. err
	return ee, ee.wkt
end -- function p.year_century( ee )

-- ee.birthyear, ee.deathyear, ee.year_epoch
-- Computes the epoch from a year or a century, and the region
-- Calcule l'époque pour une année ou un siècle, et pour une région
-- In the chain of calls : p.a_number() p.year_century() p.century_epoch() p.compute_midle_year_century() p.year_century_epoch_cats() p.events_epochs()
function p.century_epoch(ee)
	--	ee, tst, cats = p.century_epoch( ee)
--	local err, cat = "", ""
	local epq, epoq, epoque = "", "", ""
	local val = ""
	local wkt = wkt or ""
	local cats = cats or ""
	local tst = tst or ""
	local errs = errs or ""
	local ee = p.year_century( ee, "digit") -- wkt, cats, xxx, errs,
	--
	-- Recherche des époques au niveau mondial, BCE = before christian era :
	--
	-- En Asie, l'Antiquité se termine à peu près vers l'an -200, avec la Dynastie Qin qui inaugure la période impériale en Chine et le début de la dynastie Chola en Inde.
	-- En Chine, la période des Printemps et Automnes s'étend de 770 à 453 BCE
	-- En Chine, la période des Royaumes combattants s'étend de 453 à 221 av. J.-C
	-- En Chine, la période de l'empire s'étend de 220 BCE à 1911.
	-- En Chine, la république commence en 1912.
	--
	-- En Inde, Des origines à l'Empire moghol (dynasties musulmanes venues de Perse et d'Afghanistan), dominant jusqu'au milieu du XVIIIe siècle. La période coloniale britannique (1750-1947), l'Empire britannique des Indes comprenant alors le Bangladesh et le Pakistan actuels, Depuis l'indépendance de l'Inde (1947-).
	-- En Inde, la civilisation de l'Indus (5000 BCE – 1900 BCE).
	-- En Inde, l'Antiquité finit vers l'an -200, suivie de la dynastie Chola.
	-- En Inde, la Civilisation védique en ... ?
	-- En Inde, Antiquité et Moyen Âge indien aux IVe et Ve siècles.
	-- En Inde, époque moderne depuis La colonie britannique (1750-1947).
	--
	-- l'Antiquité européenne commence au IVe millénaire BCE
	--
	-- Todo: valeurs autorisées pour un argument
	--	region_values			= "other,china,india,century",
	--	region_values			= "autre,chine,inde,siècle",
	--	err_args_values			= "Abnormal value of the argument %1",
	--	err_args_values			= "Valor anormal del argumento %1",
	--	err_args_values			= "Valeur anormale de l'argument %1",
	--	if ee.region and not string.find("other,china,india,century", ee.region) then
	--		ee.region = "fr"
	--		err_args_values = CA.str_vars("err_args_values", tostring(ee.region) )
	--		CA.err_add("Valeur anormale de l'argument %1" .. err_args_values)
	--	CA.cat_add( epoque, epoque, ee.c )
	--	end

	if (ee.region ~= "china") and (ee.region ~= "india") and (ee.region ~= "century") then
		ee.region = "other"
	end
	local list_epochs = {
		{ reg = "china",	start = -9999, stop =	-771, cat = "cat_epoch_china_antiquity", calc = "", },
		{ reg = "china",	start =	 -770, stop =	-221, cat = "cat_epoch_china_springs", calc = "", },
		{ reg = "china",	start =	 -220, stop =	1911, cat = "cat_epoch_china_empires", calc = "", },
		{ reg = "china",	start =	 1912, stop =	9999, cat = "cat_epoch_century_CE", calc = "century_roman", },
		--[[ -- DEBUG from Utilisateur:Wuyouyuan
		{ reg = "india",	start = -9999, stop =  -1901, cat = "cat_epoch_indian_indus", calc = "", },
		{ reg = "india",	start = -1900, stop =	 500, cat = "cat_epoch_indian_antiquity", calc = "", },
		{ reg = "india",	start =	  501, stop =	1750, cat = "cat_epoch_indian_muslim", calc = "", },
		{ reg = "india",	start =	 1751, stop =	9999, cat = "cat_epoch_century_CE", calc = "century_roman", },
		--]]
		{ reg = "india",	start = -9999, stop =	 300, cat = "cat_epoch_indian_antiquity", calc = "", },
		{ reg = "india",	start =	  301, stop =	1000, cat = "cat_epoch_indian_classic", calc = "", },
		{ reg = "india",	start =	 1001, stop =	1600, cat = "cat_epoch_indian_middle_age", calc = "", },
		{ reg = "india",	start =	 1601, stop =	9999, cat = "cat_epoch_century_CE", calc = "century_roman", },
--	cat_epoch_indian_indus	l’antiquité indienne cat_epoch_indian_antiquity 300 301 période classique indienne cat_epoch_indian_classic 1000 1001 moyen-âge indien 1600 1601 période moderne à nos jours cat_epoch_century_CE cat_epoch_indian_muslim
		--
		{ reg = "century",	start = -9999, stop =	-100, cat = "cat_epoch_century_BCE", calc = "century_roman", },
		{ reg = "century",	start =	 -99,  stop =	   0, cat = "cat_epoch_century_BCE_1", calc = "century_roman", },
		{ reg = "century",	start =	 1,	   stop =	 100, cat = "cat_epoch_century_CE_1", calc = "century_roman", },
		{ reg = "century",	start =	 101,  stop =	9999, cat = "cat_epoch_century_CE", calc = "century_roman", },
		--
		{ reg = "other",	start = -9999, stop =	 500, cat = "cat_epoch_antiquity", calc = "", },
		{ reg = "other",	start =	  501, stop =	1400, cat = "cat_epoch_middle_age", calc = "", },
		{ reg = "other",	start =	 1401, stop =	9999, cat = "cat_epoch_century_CE", calc = "century_roman", },
	--	{ reg = "other",	start =	 1401, stop =	9999, cat = "cat_epoch_century_CE", val = ee.event_century_roman, },
	}
	-- BCE = Before Common Era = «BC». AEC = Antes de la Era Común = «a. C.». AEC = Avant l'ère commune = «av. J.-C.»
	local error_id = nil
	if ee.year_epoch then ee.yearNepoch = tonumber(ee.year_epoch) end
--	if ee.event == "epoch" then ee.yearNepoch = tonumber(ee.year_epoch) end
	if ee.midle_century then ee.event_century_roman = MathRoman.int2roman(ee.midle_century) end
	if ee.vague_year then cats = cats .. CA.cat_add("err_vague_year") end
	if ee.vague_cent then cats = cats .. CA.cat_add("err_vague_epoch") end
	--[[
	err_vague_year
	if		ee_birth.vague_year or ee_death.vague_year	then epq = "err_vague_year"
	elseif	ee_birth.vague_cent or ee_death.vague_cent	then epq = "err_vague_epoch"
	--]]
	--
	if CA.args_final.missing_epoch then -- no year, no century. ni année, ni époque.
		cats = cats .. CA.cat_add("err_unknown_epoch_cat") -- Category:Unknown epoch. Catégorie:Epoque inconnue.
	elseif ee.midle_century and not ee.midle_life then -- century without year
	--	ee.event_century_roman = MathRoman.int2roman(ee.midle_century)
		if ee.midle_century > 0
		then cats = cats .. CA.cat_add("cat_epoch_century_CE", ee.midle_century )
		else cats = cats .. CA.cat_add("cat_epoch_century_BCE", ee.midle_century ) end
	--	cats = cats .. CA.cat_add("err_unknown_epoch_cat") -- Category:Unknown epoch. Catégorie:Epoque inconnue.
	else
		for i, epq in pairs(list_epochs) do -- Parmi toutes les époques définies
			if ee.region and ( epq.reg == ee.region) then -- enforce_roman_century by reg = region = "century"
				if ee.event_author and ( epq.start <= ee.event_author) and (ee.event_author <= epq.stop ) then
					if epq.calc == "century_roman" then epq.val = ee.event_century_roman else epq.val = "" end
				--	if epq.calc == "century_roman" then epq.val = ee.century else epq.val = "" end
					-- MathRoman.
					cats = cats .. CA.cat_add(epq.cat, epq.val or "" )
				end
			end
		end
	end
	-- Un seul nombre accepté
	if ee.tabN > 1 then -- verify the number is alone
		local arg_nm = CA.wiki_translations[ee.argname]
		arg_nm = CA.error_color(arg_nm)
		errs = errs .. CA.err_add("err_one_number_argument", arg_nm )
	end
	-- Ambigüité des années en nombres romains
	if ee.year and ee.base and (ee.base == "roman") then
		errs = errs .. CA.err_add("err_year_in_roman_number", ee.nbr_in )
	end
	-- Year to compute the epoch, for an event or an author
	if ee.birthyear and tonumber(ee.year) then
		ee.epoch_year = tonumber(ee.year) + CA.constants.author_writing_after_birth
	end
	if ee.deathyear and tonumber(ee.year) then
		ee.epoch_year = tonumber(ee.year) - CA.constants.author_writing_before_death
	end
	ee.event_century_roman = ee.event_century_roman
	if ee.event == "birth" then ee.birth_century_roman = ee.event_century_roman end
	if ee.event == "death" then ee.death_century_roman = ee.event_century_roman end
	if ee.year and ee.year < 1 then -- Naissance en ...
		ee.year_out = CA.str_vars( "year_BCE", - ee.year )
	end
	--
	local tst = "\n* century_epoch "
	tst = tst .. CA.tam("event", ee.event) .. CA.tam("nbr_in", ee.nbr_in)
	tst = tst .. CA.tam("year", ee.year) .. CA.tam("event_author", ee.event_author)
	tst = tst .. CA.tam("century", ee.century) .. CA.tam("event_century_roman", ee.event_century_roman)
	tst = tst .. CA.tam("region", ee.region)
	tst = tst .. CA.tam("errs", CA.error_color(errs)) .. CA.tam("cat", cat)
	ee.wkt = tst
	ee.errs = ee.errs .. errs
	ee.cats = ee.cats .. cats
	return ee, tst, cats
end -- function p.century_epoch(ee)

-- In the chain of calls : p.a_number() p.year_century() p.century_epoch() p.compute_midle_year_century() p.year_century_epoch_cats() p.events_epochs()
function p.compute_midle_year_century(birthyear, deathyear, year_epoch, birthcentury, deathcentury)
--	midle_life, midle_century = p.compute_midle_year_century( 1468, 1579, 1489)
--	midle_life, midle_century = p.compute_midle_year_century( ee_birth)
	local tbl
	if type(birthyear) == "table" then
		tbl = birthyear
		birthyear = tonumber(tbl.birthyear)
		deathyear = tonumber(tbl.deathyear)
		year_epoch = tonumber(tbl.year_epoch)
		birthcentury = tonumber(tbl.birthcentury)
		deathcentury = tonumber(tbl.deathcentury)
	else
		birthyear = tonumber(birthyear)
		deathyear = tonumber(deathyear)
		year_epoch = tonumber(year_epoch)
		birthcentury = tonumber(birthcentury)
		deathcentury = tonumber(deathcentury)
	end
	if birthyear or deathyear or year_epoch then CA.args_final.missing_epoch = false end
	local midle_life, midle_century, midle_birth, midle_death
	if birthyear then midle_birth = birthyear + CA.constants.author_writing_after_birth end -- +20
	if deathyear then midle_death = deathyear - CA.constants.author_writing_before_death end -- -5
	if midle_birth and midle_death then
		midle_life = math.floor( midle_birth / 2 + midle_death / 2 )
	elseif midle_birth then
		midle_life = midle_birth + 10
	elseif midle_death then
		midle_life = midle_death - 10
	elseif birthcentury then
		midle_century = birthcentury
	elseif deathcentury then
		midle_century = deathcentury
	end
	if year_epoch then midle_life = year_epoch end -- activate year_epoch, else midle_life
	if midle_life then
		midle_century = math.floor( midle_life / 100 )
		if midle_century > 0 then
			midle_century = midle_century + 1
		end
	end
	return midle_life, midle_century
end -- function p.compute_midle_year_century( birthyear, deathyear, year_epoch)

--[[
* ancien Modèle:Auteur :
Générer un nom d'époque à partir d'un numéro de siècle ou d'année, comme "du XVe siècle", ou "de l'Antiquité".
* Lier ce nom au texte précédent.
* S'adapter à des valeurs numériques ou non.
* Un auteur est dit du 20e siècle, de 1901 à 2000, s’il a écrit pendant ce siècle de 20 ans après sa naissance à 5 ans avant son décès.
* Cette règle automatique peut donc classer un auteur dans deux siècles ou deux époques à la fois.
* Le Ve siècle BCE s'étend de -500 à -401. Il n'existe pas d'an 0 ni de siècle 0 dans le calendrier grégorien ni dans le calendrier julien.
Les époques sont :
* à partir du siècle 15 (en l'an 1401 et suivants) : "du XVe siècle" et suivants
* des siècles 6 à 14 inclus (de l'an 501 à l'an 1400 inclus) : "du Moyen Âge"
* pour le siècle 5 et avant (avant l'an 501) : "de l'Antiquité"
* pour le siècle -9 et avant (avant l'an -800) : "de l'Antiquité chinoise"
* pour les années -771 et avant : "de l'Antiquité chinoise
* On ne catégorise les années de naissances et de décès que dans les 100 dernières années.
--]]

-- Generate categories from region, birthyear, deathyear, century, epoch, year_epoch
-- In the chain of calls : p.a_number() p.year_century() p.century_epoch() p.compute_midle_year_century() p.year_century_epoch_cats() p.events_epochs()
function p.year_century_epoch_cats(ee)
	local year, century, epoch, tst, cats
	local t = ""
	CA.catView = ":"
	local nowyear = tonumber(os.date("%Y") ) -- local now_date = os.date("%Y-%m-%d %H:%M:%S")
	ee.midle_life, ee.midle_century = p.compute_midle_year_century(ee)
	ee, tst, cats = p.century_epoch(ee)
--	args_final.year_epoch = year_epoch
--	and tonumber(args_final.birthyear) and tonumber(args_final.deathyear)
	if ee.deathyear and tonumber(ee.deathyear) then
	--	cat_right()
	--	cat_deathyear()
	end
--	if CA.option(":") or CA.option("catview") then CA.catView = ":" else CA.catView = ":" end
	CA.options_to_catView()
	return ee, t, cats
end -- function p.year_century_epoch_cats(ee)

-- Générer les textes de categories et d'erreurs des annees et siecles.
-- In the chain of calls : p.a_number() p.year_century() p.century_epoch() p.compute_midle_year_century() p.year_century_epoch_cats() p.events_epochs()
function p.events_epochs(args_final, mode, c, verif)
--	local err, cat = "", ""
	local wkt = wkt or ""
	local t, cat, cts
	local cats = cats or ""
	local tst = tst or ""
	local errs = errs or ""
	local ee, ee_birth, ee_death, ee_epoch = {}, {}, {}, {}
	local events_text = " "
	if type(args_final) ~= "table" then args_final = CA.args_final end
	CA.args_final.missing_epoch = true
	--
--	args_final.birthyear = tonumber(args_final.birthyear)
--	args_final.deathyear = tonumber(args_final.deathyear)
	args_final.event_author = tonumber(args_final.event_author)
	args_final.event_yr = tonumber(args_final.event_yr)
	args_final.year_epoch = tonumber(args_final.year_epoch)
	--
	if args_final.year_epoch then
		-- calculer l'epoque ou le siècle à partir de l'argument fournit
		ee_epoch = { c = ":", argname = "birthyear", region = args_final.region, region_values = args_final.region_values,
		birthyear = args_final.birthyear, birthcentury = args_final.birthcentury, epoch = args_final.year_epoch, errs = "", cats = "" } --, event = "epoch"
		ee_epoch = p.century_epoch(ee_epoch)
		cats = cats .. ee_epoch.cats -- .. "epochA"
		ee.year_epoch = ee_epoch.year_epoch -- "epoch" ee.yearNepoch
		ee.yearNepoch = ee_epoch.yearNepoch -- "epoch" ee.yearNepoch
	end
	--
	args_final, t, cts = p.year_century_epoch_cats(args_final)
	cats = cats .. (cts or "")
	ee_birth = { c = ":", region = args_final.region, region_values = args_final.region_values, birthyear = args_final.birthyear, birthcentury = args_final.birthcentury, argname = "birthyear", event = "birth", errs = "", cats = "" }
	ee_death = { c = ":", region = args_final.region, region_values = args_final.region_values, deathyear = args_final.deathyear, deathcentury = args_final.deathcentury, argname = "deathyear", event = "death", errs = "", cats = "" }
	-- old : compute_midle_year_century
	-- Categorize the year of death for 100 years
	-- Clasificar el año que murió hace 100 años
	-- Catégoriser l'année de décès depuis 100 ans
	local year_limit = CA.nowyear - CA.constants.categorise_death_for_n_years
	if ee_birth.year and (year_limit < ee_birth.year) then -- Naissance en ...
	--	cats = cats .. CA.cat_add( "authors_birthyear", ee_birth.year )
	end
	if ee_death.year and (year_limit < ee_death.year) then -- Décès en ...
		cats = cats .. "d" .. CA.cat_add( "authors_deathyear", ee_death.year )
	end
	--
	-- Vague, uncertain year or century. Année ou siècle vague incertain.
	local epq = nil
	if		ee_birth.vague_year or ee_death.vague_year	then epq = "err_vague_year"
	elseif	ee_birth.vague_cent or ee_death.vague_cent	then epq = "err_vague_epoch"
	end
	if epq then cats = cats .. "v" .. CA.cat_add( epq ) end
	--
	-- Verify bith < death. Comprobar nacer < muerte. Vérifier naissance < Décès
	ee_birth.event_yr = tonumber(ee_birth.year) -- annees
	ee_death.event_yr = tonumber(ee_death.year)
	ee_birth.event_ct = tonumber(ee_birth.century) -- siecles
	if ee_birth.event_ct then ee_birth.event_ct = ee_birth.event_ct*100 end
	ee_death.event_ct = tonumber(ee_death.century)
	if ee_death.event_ct then ee_death.event_ct = ee_death.event_ct*100 end
	if ee_birth.event_yr and ee_birth.event_yr < 0 then ee_birth.event_yr = ee_birth.event_yr + 1 end
	if ee_death.event_yr and ee_death.event_yr < 0 then ee_death.event_yr = ee_death.event_yr + 1 end
	if ee_birth.event_ct and ee_birth.event_ct < 0 then ee_birth.event_ct = ee_birth.event_ct + 100 end
	if ee_death.event_ct and ee_death.event_ct < 0 then ee_death.event_ct = ee_death.event_ct + 100 end
	--
	local birth_then_death = true -- Check Birth < Death. Vérifier naissance < Décès
	local lifetime = true -- Normal life < 120 years. Durée de vie normale < 120 ans
	local lifetime_txt = "" -- Normal life < 120 years. Durée de vie normale < 120 ans
	if ee_birth.event_yr and ee_death.event_yr then
		-- year -> year. annee -> annee
		if ( (ee_birth.event_yr + CA.constants.author_lifetime_limit) < ee_death.event_yr ) then
			lifetime = false
			lifetime_txt = CA.str_vars("err_life_too_long", ee_birth.event_yr, ee_death.event_yr)
		end
		if ee_birth.event_yr > ee_death.event_yr then birth_then_death = false end
	elseif ee_birth.event_ct and ee_death.event_yr then
		-- century -> year. siecle -> annee
		if (ee_birth.event_ct + CA.constants.author_lifetime_limit) < ee_death.event_yr then
			lifetime = false
			lifetime_txt = CA.str_vars("err_life_too_long", ee_birth.event_ct, ee_death.event_yr)
		end
		if (ee_birth.event_ct - 100) > ee_death.event_yr then birth_then_death = false end
	elseif ee_birth.event_yr and ee_death.event_ct then
		-- year -> century. annee -> siecle
		if (ee_birth.event_yr + CA.constants.author_lifetime_limit) < (ee_death.event_ct - 100) then
			lifetime = false
			lifetime_txt = CA.str_vars("err_life_too_long", ee_birth.event_yr, (ee_death.event_ct - 100) )
		end
		if ee_birth.event_yr > (ee_death.event_ct) then birth_then_death = false end
	elseif ee_birth.event_ct and ee_death.event_ct then
		-- century -> century. siecle -> siecle
		if (ee_birth.event_ct + CA.constants.author_lifetime_limit) < ee_death.event_ct then
			lifetime = false -- CA.constants.author_lifetime_limit
			lifetime_txt = CA.str_vars("err_life_too_long", ee_birth.event_ct, ee_death.event_ct)
		end
		if ee_birth.event_ct > ee_death.event_ct then birth_then_death = false end
	end
	if not lifetime then
		-- err_life_too_long = "Durée de vie trop longue de %1 à %2.",
		errs = errs .. lifetime_txt -- CA.str_vars("err_life_too_long", ee_birth.year, ee_death.year)
		cats = cats .. CA.cat_add("err_life_too_long_cat")
		error_id = "err-year"..tostring(ee_birth.year)..">"..tostring(ee_death.year)
	end
	if not birth_then_death then -- si naissance apres Décès pour year ou century
		--	err_death_before_birth	= "Error: death '''%1''' is before birth '''%2'''.",
		--	err_death_before_birth_cat= "Author death is before birth",
		errs = errs .. CA.str_vars("err_death_before_birth", ee_death.year, ee_birth.year)
		cats = cats .. CA.cat_add("err_death_before_birth_cat")
		error_id = "err-year"..tostring(ee_birth.year)..">"..tostring(ee_death.year)
	end
--	if not (ee_birth.event_yr or ee_death.event_yr or ee_birth.event_ct or ee_death.event_ct) then
	if CA.args_final.missing_epoch then -- no year, no century. ni année, ni époque.
		-- Category:Unknown epoch. Catégorie:Epoque inconnue.
		cats = cats .. CA.cat_add("err_unknown_epoch_cat")
	end
	--
	-- birthcentury birthuncertain deathyear death deathcentury. DEBUG to do.
	-- Todo: Catégorie:Siècle incertain
	--	return res, cat, err, t -- p.annees_epoques(args_final, mode, c, verif)
	--	res = res .. tostring(t) ; errors = errors .. err
	--
	errs = errs .. ee_birth.errs .. ee_death.errs
	tst = "\n* events_epochs "
	-- tst = tst .. CA.tam("event", ee_birth.event) .. CA.ta("nbr_in", ee_birth.nbr_in)
	if ee_birth.year then
		tst = tst .. CA.tam("birth.nbr_in", ee_birth.nbr_in)
		tst = tst .. CA.tam("birth.year", ee_birth.year)
		tst = tst .. CA.tam("birth.author", ee_birth.event_author)
	elseif ee_birth.century then
		tst = tst .. CA.tam("birth.nbr_in", ee_birth.nbr_in)
		tst = tst .. CA.tam("birth.century", ee_birth.century)
	end
	-- tst = tst .. "<br/>" .. CA.ta("event", ee_death.event) .. CA.ta("nbr_in", ee_death.nbr_in)
	if ee_death.year then
		tst = tst .. CA.tam("death.nbr_in", ee_death.nbr_in)
		tst = tst .. CA.tam("death.author", ee_death.year_author)
		tst = tst .. CA.tam("death.year", ee_death.year)
	elseif ee_death.century then
		tst = tst .. CA.tam("death.nbr_in", ee_death.nbr_in)
		tst = tst .. CA.tam("death.century", ee_death.century)
	end
	tst = tst .. CA.tam("region", ee_death.region)
	-- tst = tst .. CA.ta("birth_yr", birth_yr) .. CA.ta("death_yr", death_yr)
	-- tst = tst .. wkt
	tst = tst .. CA.tam("err", CA.error_color(err)) -- .. CA.ta("cats", cats)
	--
	-- Remplacer les siècles sans texte par X ème siècle
	local birth_txt, death_txt = "", ""
	if ee_birth.century and not ee_birth.year and not ee_birth.vague
		then birth_txt = ee_birth.event_century_roman
		else birth_txt = ee_birth.nbr_in
	end
	if ee_death.century and not ee_death.year and not ee_death.vague
		then death_txt = ee_death.event_century_roman
		else death_txt = ee_death.nbr_in
	end
	--
	birth_txt = ee_birth.vague_year or ee_birth.vague_cent or ""
	death_txt = ee_death.vague_year or ee_death.vague_cent or ""
--	wkt = "<br/>(" .. (ee_birth.nbr_in or " ") .. " - " .. (ee_death.nbr_in or " ") .. ") " .. cats
--	events_text = "( " .. (ee_birth.nbr_in or ee_birth.year_out or " ") .. " - " .. (ee_death.nbr_in or ee_death.year_out or " ") .. " )"
	events_text = "( " .. (ee_birth.birthyear or ee_birth.nbr_in or ee_birth.year_out or " ")
				.. " - " .. (ee_death.deathyear or ee_death.nbr_in or ee_death.year_out or " ") .. " )"
	wkt = "<br/>" .. events_text .. " " .. cats
	--
	if ee_birth.error_roman then -- roman number error in ee_birth
		errs = errs .. CA.err_add("err_roman2int", ee_birth.roman_txt, ee_birth.nbr_out, ee_birth.error_roman, CA.user_translations.birth) -- "/birth"
	end
	if ee_death.error_roman then -- roman number error in ee_death
		errs = errs .. CA.err_add("err_roman2int", ee_death.roman_txt, ee_death.nbr_out, ee_death.error_roman, CA.user_translations.death) --  "/death")
	end
	--
--	ee.year_epoch = ee_birth.year_epoch -- "epoch" ee.yearNepoch
--	ee.yearNepoch = ee_birth.yearNepoch -- "epoch" ee.yearNepoch
--	events_text = cats
	if ee_birth then ee.birth_in = ee_birth.nbr_in end
	if ee_birth then ee.death_in = ee_death.nbr_in end
	if ee_epoch then ee.epoch_in = ee_epoch.nbr_in end
	if ee_epoch then ee.year_epoch = ee_epoch.year_epoch end -- "epoch" ee.yearNepoch
	if ee_epoch then ee.yearNepoch = ee_epoch.yearNepoch end -- "epoch" ee.yearNepoch
	ee.events_text = events_text
	ee.wkt = wkt
	ee.tst = tst
	ee.errs = errs
	ee.cats = cats
	return ee -- wkt, cats, tst, errs, ee
end -- function p.events_epochs(args_final, mode, c, verif)

function p.century_epoch_test1( t, event, region, birthyear, birthcentury, deathyear, deathcentury)
	local ee = { c = ":", nowyear = CA.nowyear, event = event, region = region, birthyear = birthyear, birthcentury = birthcentury, deathyear = deathyear, deathcentury = deathcentury }
	ee = AT.century_epoch( ee ) -- enforce_roman_century by reg = region = "century"
	if not ee.nbr_out then ee.nbr_out = "..." end
	t = t .. CA.Tr() .. CA.Td(ee.event) .. CA.Td(ee.region) .. CA.Td(ee.birthyear) .. CA.Td(ee.birthcentury) .. CA.Td(ee.deathyear) .. CA.Td(ee.deathcentury)
	t = t .. CA.Td(ee.year) .. CA.Td(ee.nbr_out) .. CA.Td(ee.epoch_year)
	t = t .. CA.Td( (ee.cats or " ") .. " " .. (ee.errs or " ") )
	return t
end -- function p.century_epoch_test1( t, event, region, birthyear, birthcentury, deathyear, deathcentury)

function p.years_to_epoch_test(res, args_final)
	CA.catView = ":"
	local nowyear = tonumber(os.date("%Y") ) -- local now_date = os.date("%Y-%m-%d %H:%M:%S")
	local t = "years_to_epoch_test"
	if type(res) == "string" then t = "\n* " .. tostring(res) .. " : "
	else t = "\n* '''years_to_epoch_test:''' " end
	local headers = CA.Tc("event") .. CA.Tc("region") .. CA.Tc("birth year") .. CA.Tc("birth century") .. CA.Tc("death year") .. CA.Tc("death century") .. CA.Tc("year") .. CA.Tc("nbr out") .. CA.Tc("epoch year")
	--
	t = t .. CA.Th() .. headers .. CA.Tc( " Catégories et erreurs " )
	t = t .. CA.Tr() .. headers .. CA.Td( " '''China''' ( antiquity, -770 springs, -220 empires, 1912 century ) (Authors write from 20 years.) " )
	t = p.century_epoch_test1( t, "birth", "china", "-791", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "china", "-790", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "china", "-241", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "china", "-240", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "china", "1891", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "china", "1892", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "china", "1980", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "china", "1981", nil, nil, nil)
	--
	t = t .. CA.Tr() .. headers .. CA.Td("	'''India''' ( antiquity, 301 classic, 1001 middle_age, 1601 modern ) (Authors write from 20 years.) ")
	t = p.century_epoch_test1( t, "birth", "india", "280", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "india", "281", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "india", "980", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "india", "981", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "india", "1580", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "india", "1581", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "india", "1680", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "india", "1681", nil, nil, nil)
	--
	t = t .. CA.Tr() .. headers .. CA.Td(" '''Other''' ( antiquity, 501 middle_age, 1401 century ) (Authors write from 20 years.) ")
	t = p.century_epoch_test1( t, "birth", "other", "-1000", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "other", "480", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "other", "481", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "other", "1380", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "other", "1381", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "other", "1480", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "other", "1481", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "other", "1580", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "other", "1581", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "other", "1880", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "other", "1881", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "other", "1980", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "other", "1981", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "other", "2080", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "other", "2081", nil, nil, nil)
	t = p.century_epoch_test1( t, "death", "other", nil, nil, "2005", nil)
	t = p.century_epoch_test1( t, "death", "other", nil, nil, "2006", nil)
	t = t .. CA.Te()
	t = t .. "<br>years_to_epoch_test : end "
	CA.options_to_catView()
	return t
end -- function p.years_to_epoch_test( res, args_final)

function p.century_to_epoch_test( res, args_final)
	CA.catView = ":"
	local nowyear = tonumber(os.date("%Y") ) -- local now_date = os.date("%Y-%m-%d %H:%M:%S")
	local t = tostring(res or "century_to_epoch_test:")
	local headers = CA.Tc("event") .. CA.Tc("region") .. CA.Tc("birth year") .. CA.Tc("birth century") .. CA.Tc("death year") .. CA.Tc("death century") .. CA.Tc("year") .. CA.Tc("nbr out") .. CA.Tc("epoch year")
	--
	t = t .. CA.Th() .. headers .. CA.Td(" '''Region = century''' always force centuries (Authors write from 20 years.) ")
	t = p.century_epoch_test1( t, "birth", "century", "-221", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "century", "-220", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "century", "-121", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "century", "-120", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "century", "-21", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "century", "-20", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "century", "-19", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "century", "80", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "century", "81", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "century", "180", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "century", "181", nil, nil, nil)
	--
	t = t .. CA.Tr() .. headers .. CA.Td(" '''Year or century ?''' roman centuries from -75 to +25, else years. ")
	t = p.century_epoch_test1( t, "birth", "century", nil, "-CXI", nil, nil)
	t = p.century_epoch_test1( t, "birth", "century", nil, nil, nil, "-CXI")
	t = p.century_epoch_test1( t, "birth", "century", "-CXI", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "century", nil, nil, "-CXI", nil)
	t = p.century_epoch_test1( t, "birth", "century", nil, "-LXXVI", nil, nil)
	t = p.century_epoch_test1( t, "birth", "century", nil, "-LXXV", nil, nil)
	t = p.century_epoch_test1( t, "birth", "century", nil, "XXV", nil, nil)
	t = p.century_epoch_test1( t, "birth", "century", nil, "XXVI", nil, nil)
	t = p.century_epoch_test1( t, "birth", "century", "CXI", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "century", nil, nil, "CXI", nil)
	t = p.century_epoch_test1( t, "birth", "century", nil, "CXI", nil, nil)
	t = p.century_epoch_test1( t, "birth", "century", nil, nil, nil, "CXI")
	--
	t = t .. CA.Tr() .. headers .. CA.Td(" '''Uncertain''' ")
	t = p.century_epoch_test1( t, "birth", "other", "vers -1357", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "other", "vers MCXI", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "other", "vers 1357 ou MCCCLIX", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "other", "deux dates de naissance", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "other", "avant le X siècle", nil, nil, nil)
	t = p.century_epoch_test1( t, "birth", "other", nil, "avant le X siècle", nil, nil)
	t = p.century_epoch_test1( t, "birth", "other", nil, nil, "avant le X siècle", nil)
	t = p.century_epoch_test1( t, "birth", "other", nil, nil, nil, "avant le X siècle")
	t = t .. CA.Te()
	t = t .. "<br>century_to_epoch_test : end "
	CA.options_to_catView()
	return t
end -- function p.century_to_epoch_test( res, args_final)

function p.events_epochs_test1( t, region, birthyear, birthcentury, deathyear, deathcentury, yearNepoch)
	local ee = { c = ":", nowyear = CA.nowyear, region = region, birthyear = birthyear, birthcentury = birthcentury, deathyear = deathyear, deathcentury = deathcentury, yearNepoch = yearNepoch }
	CA.catView = ":"
	local ee = p.events_epochs(ee, mode, ":", verif)
	t = t .. CA.Tr() .. CA.Td(ee.region) .. CA.Td(ee.birthyear) .. CA.Td(ee.birthcentury) .. CA.Td(ee.deathyear) .. CA.Td(ee.deathcentury) .. CA.Td(ee.yearNepoch) .. CA.Td( (ee.events_text or " ") .. ", " .. (ee.cats or " ") .. ", " .. (ee.errs or " ") )
	CA.options_to_catView()
	return t
end -- function p.events_epochs_test1( t, region, birthyear, birthcentury, deathyear, deathcentury)

-- In the chain of calls : p.a_number() p.year_century() p.century_epoch() p.compute_midle_year_century() p.year_century_epoch_cats() p.events_epochs()
function p.events_epochs_test(res, args_final)
	-- Unitary tests of p.a_number
	local t = tostring(res or "")
	CA.catView = ":"
	local nowyear = tonumber(os.date("%Y") ) -- local now_date = os.date("%Y-%m-%d %H:%M:%S")
	local headers = CA.Tc("région") .. CA.Tc("naissance") .. CA.Tc("décès") .. CA.Tc("époque") .. CA.Tc("siècle automatique")
	--
	t = t .. CA.Th() .. headers .. CA.Tc(" catégories et erreurs ")
	t = t .. CA.Tr() .. headers .. CA.Tc(" '''Durée de vie normale'''") -- "epoch" ee.yearNepoch
	t = p.events_epochs_test1( t, "other", "-519", nil, "-400", nil, -222)
	t = p.events_epochs_test1( t, "other", "-33", nil, "33", nil, nil)
	t = p.events_epochs_test1( t, "other", "82", nil, nil, "3", 1777)
	t = p.events_epochs_test1( t, "other", nil, "3", "419", nil, nil)
	t = p.events_epochs_test1( t, "other", "400", nil, "519", nil, 2121)
	--
	t = t .. CA.Tr() .. headers .. CA.Td(" '''Exemples d'époques en Inde''' ")
	t = p.events_epochs_test1( t, "india", "-1958", nil, "-1834", nil, nil)
	t = p.events_epochs_test1( t, "india", "1700", nil, "1777", nil, nil)
	--
	t = t .. CA.Tr() .. headers .. CA.Tc(" '''Durée de vie anormale''' ")
	t = p.events_epochs_test1( t, "india", "-1758", nil, "-1834", nil, nil)
	t = p.events_epochs_test1( t, "india", "1700", nil, "1677", nil, nil)
	--
	t = t .. CA.Tr() .. headers .. CA.Tc(" '''Durée de vie > 120 ans de la naissance au décès'''")
	t = p.events_epochs_test1( t, "other", "-520", nil, "400", nil, nil)
	t = p.events_epochs_test1( t, "other", "-20", nil, "100", nil, nil)
	t = p.events_epochs_test1( t, "other", "400", nil, "520", nil, nil)
	t = p.events_epochs_test1( t, "other", "400", nil, nil, "5", nil)
	t = p.events_epochs_test1( t, "other", "400", nil, nil, "6", nil)
	t = p.events_epochs_test1( t, "other", nil, "4", "555", nil, nil)
	--
	t = t .. CA.Tr() .. headers .. CA.Tc(" '''Autres cas : pas d'époque''' ")
	t = p.events_epochs_test1( t, "other")
	t = p.events_epochs_test1( t, "other", 1567, nil, 1654, nil, 1888)
	--
	t = t .. CA.Tr() .. headers .. CA.Tc(" '''Autres cas : année ou siècle en nombre romain''' ")
	t = p.events_epochs_test1( t, "other", nil, "début du XVIIème siècle", "avant 1885", nil, nil)
	t = p.events_epochs_test1( t, "other", "1768", nil, nil, "fin du XIXème siècle", nil)
	t = p.events_epochs_test1( t, "other", "après CDLVII", nil, "585", nil, nil)
	t = t .. CA.Te()
	CA.options_to_catView()
	return t
end -- function p.events_epochs_test(res, args_final)

function p.year_century_epoch_cats_test1( t, region, birthyear, deathyear, year_epoch, name)
	--local ee = AT.events_epochs(args_final, mode, ":", verif)
	local args_final = { c = ":", nowyear = CA.nowyear, region = region, birthyear = birthyear, deathyear = deathyear, year_epoch = year_epoch }
	CA.catView = ":"
	args_final = mw.clone(args_final) -- to not disturb args in final version
	--
	if args_final and tonumber(args_final.birthyear) and tonumber(args_final.deathyear) then
		-- compute midle_century
		args_final.midle_life = math.floor( tonumber(args_final.birthyear) / 2 + tonumber(args_final.deathyear) / 2 )
	elseif args_final and tonumber(args_final.birthyear) then
		args_final.midle_life = tonumber(args_final.birthyear) + 20
	elseif args_final and tonumber(args_final.deathyear) then
		args_final.midle_life = tonumber(args_final.deathyear) - 5
	end
	if args_final and args_final.year_epoch then
		args_final.midle_life = args_final.year_epoch -- activate year_epoch, else midle_life
	end
	if args_final and tonumber(args_final.midle_life) then
		args_final.midle_century = math.floor( tonumber(args_final.midle_life) / 100 )
		if args_final.midle_century > 0 then
			args_final.midle_century = args_final.midle_century + 1
		end
	end
	args_final.midle_life, args_final.midle_century = p.compute_midle_year_century(args_final)
--	args_final.year_epoch = year_epoch
	local ee_epoch_arg = AT.events_epochs(args_final, mode, ":", verif)
	t = t .. CA.Tr() .. CA.Td(name) .. CA.Td(region) .. CA.Td(birthyear) .. CA.Td(deathyear)
	t = t .. CA.Td(args_final.midle_life) .. CA.Td(year_epoch) .. CA.Td(args_final.midle_century)
	t = t .. CA.Td( (ee_epoch_arg.events_text or " ") .. " " .. (ee_epoch_arg.cats or " ") .. " " .. (ee_epoch_arg.errs or " ") )
	CA.options_to_catView()
	return t
end -- function p.year_century_epoch_cats_test1( t, region, birthyear, deathyear, year_epoch, name)

function p.unique_century_life_test1( t, region, birthyear, deathyear, year_epoch, name)
	--local ee = AT.events_epochs(args_final, mode, ":", verif)
	local args_final = { c = ":", nowyear = CA.nowyear, region = region, birthyear = birthyear, deathyear = deathyear, year_epoch = year_epoch }
	CA.catView = ":"
	args_final = mw.clone(args_final) -- to not disturb args in final version
--	args_final.midle_century = p.compute_midle_year_century( birthyear, deathyear, year_epoch)
--	local ee = AT.events_epochs(args_final, mode, ":", verif)
--	args_final.year_epoch = year_epoch
	args_final.midle_life, args_final.midle_century = p.compute_midle_year_century(args_final)
	local ee_epoch_arg = AT.events_epochs(args_final, mode, ":", verif)
	t = t .. CA.Tr() .. CA.Td(name) .. CA.Td(region) .. CA.Td(birthyear) .. CA.Td(deathyear)
	t = t .. CA.Td(args_final.midle_life) .. CA.Td(year_epoch) .. CA.Td(args_final.midle_century)
	t = t .. CA.Td( (ee_epoch_arg.events_text or " ") .. " " .. (ee_epoch_arg.cats or " ") .. " " .. (ee_epoch_arg.errs or " ") )
	CA.options_to_catView()
	return t
end -- function p.unique_century_life_test1( t, region, birthyear, deathyear, year_epoch, name)

-- In the chain of calls : p.a_number() p.year_century() p.century_epoch() p.compute_midle_year_century() p.year_century_epoch_cats() p.events_epochs()
function p.unique_century_life_test(res)
	local t = ""
	CA.catView = ":"
	local nowyear = tonumber(os.date("%Y") ) -- local now_date = os.date("%Y-%m-%d %H:%M:%S")
--	t = t .. "\n* '''Époque unique pour divers auteurs :'''"
	if res then t = "\n* " .. tostring(res) .. " : "
	else t = "\n* '''Époque unique pour divers auteurs :'''" end
	t = t .. "\n* Le siècle unique convient-il dans tous les cas ?"
	t = t .. CA.Th() .. CA.Tc("nom") .. CA.Tc("région") .. CA.Tc("né") .. CA.Tc("mort")
	t = t .. CA.Tc("mi-vie n+20 à m-5") .. CA.Tc("force époque") .. CA.Tc("siècle unique") .. CA.Tc("catégories et erreurs <br/><b>AVEC siècle unique</b>")
	t = p.unique_century_life_test1( t, "china", " -551", " -479", nil,		"Confucius")
	t = p.unique_century_life_test1( t, "other", "	-59", "	  17", nil,		"Tite-Live")
	t = p.unique_century_life_test1( t, "other", "	120", "	 180", nil,		"Aulu-Gelle")
	t = p.unique_century_life_test1( t, "century"," 400", "		", nil,		"Astérix")
	t = p.unique_century_life_test1( t, "century","	   ", "	 500", nil,		"Obélix")
	t = p.unique_century_life_test1( t, "century","	   ", "	 500", "510",	"Obélix")
	t = p.unique_century_life_test1( t, "india", "	685", "	 763", nil,		"Shantideva")
	t = p.unique_century_life_test1( t, "other", " 1822", " 1909", nil,		"Ernest Pinard")
	t = p.unique_century_life_test1( t, "other", " 1822", " 1909", "1905",	"Ernest Pinard")
	t = p.unique_century_life_test1( t, "other", " 1868", " 1955", nil,		"Paul Claudel")
	t = p.unique_century_life_test1( t, "other", " 1955", " 1868", nil,		"Claudel Paul")
	t = p.unique_century_life_test1( t, "other", " 1918", " 2013", nil,		"Nelson Mandela")
	t = p.unique_century_life_test1( t, "other", " 1918", " 2013", "1666",	"Nelson Mandela")
	t = t .. CA.Te()
	CA.options_to_catView()
	return t
end -- function p.unique_century_life_test(res)

--	Auteurs sans notices d’Autorité‎ (53 P)

-- Interact arguments in international args_final
function p.interact_args_final(args_import)
	-- args_final = p.interact_args_final(args_import)
	if type(args_import) ~= "table" then args_import = CA.args_import end
	local args_final = mw.clone(args_import)
	local a = args_import
	local i = {} -- interact
	--
	-- update sources of untouch arguments
	local k = " wd.src = "
	for key, argm in pairs(CA.args_known) do
		if CA.args_wikidata[key] then
		-- and args_final[key] and (CA.args_wikidata[key] == args_final[key])
			argm.src = "wd"
			k = k .. key .. ":" .. argm.src .. ", "
		end
	end
	--
	if a.image then
		i.image = a.image -- string.gsub( a.image, "%s", "" )
		if (i.image == "") or (i.image == " ") then
			i.image = nil
		end
	end
	--
	local x = "0"
	if (a.title == "") or not a.title then
		a.title = a.label or ""
		i.title = a.title
	end
	-- if absent, default link to other wikis
	if not a.wikipedia then i.wikipedia = a.title end
	if not a.wikiquote then i.wikiquote = a.title end
	if not a.commons then i.commons = a.title end
	if not a.indexpages then i.indexpages = a.title end
	--
	--	familyname	= 'nom',		lastname	= 'nomfamille',	firstname	= 'prenom',	galliname	= 'prenomGalli',
	--	initial		= 'initiale',	pseudonym	= 'pseudo',		title		= 'titre',
	local sortkey = a.sortkey
	local lastkey, firstkey = ""
	local tabkey = mw.text.split( a.title, '%s')
	local maxkey = table.maxn( tabkey )
	if a.title and not a.firstname and not a.familyname and not sortkey then
		-- If sortkey is undefined, enforce it and inform the user.
		lastkey = tabkey[maxkey] or "" -- select the last word
		if maxkey > 1 then firstkey = tabkey[1] else firstkey = "" end
		sortkey = lastkey .. ", " .. firstkey
		x = x .. "1"
	end
	a.familyname = mw.text.trim(a.familyname or "")
	if a.familyname == "" then a.familyname = nil end
	if a.familyname and a.firstname and not sortkey then
		sortkey = a.familyname .. ", " .. a.firstname
		x = x .. "2"
	end
	if a.title and a.familyname and not a.firstname and not sortkey then
		local title = string.gsub( a.title, a.familyname, "" )
		sortkey = a.familyname .. ", " .. title
		x = x .. "3"
	end
	if a.title and a.firstname and not a.familyname and not sortkey then
		local title = string.gsub( a.title, a.firstname, "" )
		sortkey = title .. ", " .. a.firstname
		x = x .. "4"
	end
	--
	i.sortkey = mw.text.trim(sortkey or "")
--	i.sortkey = string.gsub(i.sortkey, "%s", "")
	i.sortkey_txt = "DEFAULTSORT: " .. i.sortkey -- example {{DEFAULTSORT:Hugo, Victor}}
	p.sortkey_txt = i.sortkey_txt
	-- https://www.mediawiki.org/wiki/Help:Categories#Sort_key
	-- [[Category:Name|Sort]] Sort keys are case-sensitive, and spaces and other characters are also valid.
	-- https://www.mediawiki.org/wiki/Help:Sorting#Sort_order
	-- !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_'abcdefghijklmnopqrstuvwxyz{|}~¡¢£¤¥¦§¨©ª«­®¯°±²³´µ•¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ
	--
	if a.initial and (a.initial ~= string.upper(a.initial) ) then
		i.initial = string.upper(a.initial)
		x = x .. "6"
	end
	if i.sortkey and not a.initial then
		-- If initial is undefined, enforce it with the first word of sortkey
		i.initial = string.sub( i.sortkey, 1, 1 ) -- select the first letter
		i.initial = string.upper( i.initial or "" )
		x = x .. "7"
	end
	--
	i.sortkey_not_sure = nil
	if a.title then
		-- If sortkey is undefined, enforce it and inform the user.
		maxkey = table.maxn( tabkey )
		if (maxkey > 2) and not sortkey and not a.familyname then -- If sortkey will not be sure
			i.sortkey_not_sure = CA.msg_add("msg_auto_val_warning", CA.user_translations["sortkey"], i.sortkey)
			i.initial_not_sure = CA.msg_add("msg_auto_val_warning", CA.user_translations["initial"], i.initial)
		--	msg_auto_val_warning		= "Vérifiez l'argument automatique : %1 = '''%2'''.",
		--	msg_automatic_argument		= "Vérifiez l'argument automatique '''%1'''.",
		end
	end
	-- i.initial_not_sure = CA.msg_add("msg_automatic_argument", CA.user_translations["initial"])
	i.sortkey_test = (i.sortkey_txt or "") .. CA.ta("sortkey", i.sortkey) .. CA.ta("x", x) -- .. CA.ta("initial", x)
	if i.initial_not_sure  then i.sortkey_test = (i.initial_not_sure or "") .. " " .. i.sortkey_test end
	if i.sortkey_not_sure  then i.sortkey_test = (i.sortkey_not_sure or "") .. "" .. i.sortkey_test end
	p.sortkey_test = i.sortkey_test
	local opt = ", "
	if a.distinctions then i.distinctions = CA.multiple_selection(opt, CA.str_vars("distinctions_selector"), a.distinctions) end
	if a.functions then i.functions = CA.multiple_selection(opt, CA.str_vars("functions_selector"), a.functions) end
	if a.occupations then i.occupations = CA.multiple_selection(opt, CA.str_vars("occupations_selector"), a.occupations) end
	if not a.description then
		-- If description is undefined, replace it with distinctions + functions + occupations
		i.description = (i.distinctions or " ") .. " " .. (i.functions or " ") .. " " .. (i.occupations or " ")
		i.description = mw.text.trim(i.description)
		i.description = string.sub(i.description,1,-2) -- delete the last coma ","
		CA.msg_add("multi_selector_description", CA.ta("opt", '"'..opt..'"') .. CA.ta("distinctions", CA.str_vars("distinctions_selector") ) .. CA.ta("functions", CA.str_vars("functions_selector") ) .. CA.ta("occupations", CA.str_vars("occupations_selector") ) )
	end
	--
	if a.birth and not a.birthyear then
		local yyyy, err = CA.date_to_part(a.birth, "yyyy") -- , CA.str_vars("date_to_part_format")
		if yyyy then
			i.birthyear = yyyy
		else
			CA.err_add(err, CA.str_vars("birthyear"), "yyyy")
			CA.cat_add("date_to_part_call_cat")
		end
	end
	--
	if a.death and not a.deathyear then
		local yyyy, err = CA.date_to_part(a.death, "yyyy") -- , CA.str_vars("date_to_part_format")
		if yyyy then
			i.deathyear = yyyy
		else
			CA.err_add(err, CA.str_vars("deathyear"), "yyyy")
			CA.cat_add("date_to_part_call_cat")
		end
	end
	--
	if a.userlang then
		i.userlang = a.userlang
		CA.init_user_lang(a.userlang, CA.wiki_lang)
	end
	if a.wikilang then
		i.wikilang = a.wikilang
		CA.init_user_lang(CA.user_lang, a.wikilang)
	end
	--
	-- memorize interactions in CA.args_final and show messages and/or errors
	local n = 0
	for key, val in pairs(i) do
		local args_kwn = CA.args_known[key]
		if args_kwn then
		--	args_kwn.trk = (args_kwn.trk or "").."i"
			args_final[key] = val -- .. args_kwn.trk -- = i[key]
			args_kwn.src = nil -- automatic_argument value come from internal computing
			n = n + 1
			if (args_kwn.need == 2) and not a[key] then --
				-- need=2 necessary from argument or module interaction
				CA.msg_add("msg_auto_val_warning", CA.user_translations[key], val)
			--	CA.msg_add("msg_automatic_argument", CA.user_translations[initial], val)
			end
		else
			CA.err_add("err_unknown_auto_arg", CA.wiki_translations[key], val)
		--	CA.err_add("err_auto_val_unknown", CA.wiki_translations[key], val)
		end
	end
--	if CA.args_known.title then CA.args_known.title.trk = (CA.args_known.title.trk or "").."i="..n end
	CA.args_final = args_final
	return args_final, t
end -- function p.interact_args_final(args_final)

function p.default_sortkey_to_end(args_final) -- Implement sortkey for category to not disturb it by any other code.
	if type(args_final) ~= "table" then args_final = CA.args_final end
	local authors_initial_cat = CA.string_vars(CA.wiki_translations, "authors_initial_cat", args_final.initial)
	local t = "[[" .. mw.site.namespaces.Category.name .. ":" .. authors_initial_cat .. "|" .. args_final.sortkey .. "]]"
	return t
end

function p.firstname_familyname_test(t)
	local t = t or "\n* <b>Test of firstname and of family name:</b>"
	local function firstname_familyname_test1(t, title, label, firstname, familyname, initial)
		local tab2 = p.interact_args_final( { title = title, label = label, firstname = firstname, familyname = familyname, initial = initial } )
		t = t .. CA.Tr() .. CA.Td(title) .. CA.Td(label) .. CA.Td(firstname) .. CA.Td(familyname) .. CA.Td(initial) .. CA.Td(" ") .. CA.Td(tab2.initial) .. CA.Td(tab2.sortkey) .. CA.Td(tab2.sortkey_test)
		return t
	end
	local head = mw.text.split( CA.str_vars("firstname_familyname_test_header") , ',')
	t = t .. CA.Th() .. CA.Tc(head[1]) .. CA.Tc(head[2]) .. CA.Tc(head[3]) .. CA.Tc(head[4]) .. CA.Tc(head[5]) .. CA.Tc(" ") .. CA.Tc(head[6]) .. CA.Tc(head[7]) .. CA.Tc(head[8])
	t = firstname_familyname_test1( t, "Victor Hugo", "Victor Hugo")
	t = firstname_familyname_test1( t, "Victor Hugo", "Victor Hugo", "Victor")
	t = firstname_familyname_test1( t, "Victor Hugo", "Victor Hugo", "Victor", nil, "h")
	t = firstname_familyname_test1( t, "Victor Hugo", "Victor Hugo", nil, "Hugo")
	t = firstname_familyname_test1( t, "Victor Hugo", "Victor Hugo", "Victor", "Hugo")
	t = firstname_familyname_test1( t, "Ricardo De Magon", "Ricardo De Magon")
	t = firstname_familyname_test1( t, "Ricardo De Magon", "Ricardo De Magon", "Ricardo")
	t = firstname_familyname_test1( t, "Ricardo De Magon", "Ricardo De Magon", "Ricardo", nil, "m")
	t = firstname_familyname_test1( t, "Ricardo De Magon", "Ricardo De Magon", nil, "Magon")
	t = firstname_familyname_test1( t, "Ricardo De Magon", "Ricardo De Magon", "Ricardo", "Magon")
	t = t .. CA.Te()
	return t
end -- function p.firstname_familyname_test(t)

-- Done: Obsolete old arguments from Auteur2 fr.wikisource.org Modèle:Auteur/Documentation le 05/01/2014
function p.gener_oldargs(args_final) -- Could report use of some args and help to adapt wiki_selectors 25/09/2015
	-- Si un ancien argument spécial est utilisé, mettre la page dans la catégorie prévue, pour repérer toutes les pages concernées
	-- 27/01/2014 19:14 Norm=0 Obso=0 somme=0 + 6495 = 6495 Auteurs
	-- 27/01/2014 21:12 Norm=2887 Obso=0 somme=2887 + 3608 = 6495 Auteurs
	-- 09/02/2014 22:50 Norm=3489 Obso=0 somme=3489 + 3006 = 6495 Auteurs
	-- Aucune page d'auteur n'a utilisé les anciens arguments du Modèle:Auteur2 09/02/2014
	if type(args_final) ~= "table" then args_final = CA.args_final end -- optional arguments
	local res = ""
	local ifcat = false
	--	birth_text =	{typ = "oldargs", need = 0, keyword = "birth_text", },
	for key, argm in pairs(CA.args_known) do -- Parmi toutes les époques définies
		if (argm.typ == "oldargs") and (argm.val ~= nil) then
			ifcat = true
		end
	end
	--	if ifcat then res = res .. CA.cat_add("Arguments obsolètes") end
	--	if not ifcat then res = res .. CA.cat_add("Arguments normaux") end
	return res
end -- function p.gener_oldargs(args_final)

function p.list_wiki_selectors(t) -- list_wiki_selectors_title
	t = "\n* " .. (t or " <b>Selectors of this wiki</b>:")
	t = t .. "<br>" .. CA.ta("authorities_selector", CA.user_translations["authorities_selector"])
	t = t .. "<br>" .. CA.ta("distinctions_selector", CA.user_translations["distinctions_selector"])
	t = t .. "<br>" .. CA.ta("functions_selector", CA.user_translations["functions_selector"])
	t = t .. "<br>" .. CA.ta("occupations_selector", CA.user_translations["occupations_selector"])
	t = t .. "<br>" .. CA.ta("region_values", CA.user_translations["region_values"])
	t = t .. "<br>" .. CA.ta("rights_values", CA.user_translations["rights_values"])
	t = t .. "<br>" .. CA.ta("sex_values", CA.user_translations["sex_values"])
	t = t .. "\n*" .. CA.str_vars("life_constants_of_module")
	t = t .. "<br>" .. CA.str_vars(CA.user_translations["categorise_death_for_n_years"], CA.constants.categorise_death_for_n_years)
	t = t .. "<br>" .. CA.str_vars(CA.user_translations["author_writing_after_birth"], CA.constants.author_writing_after_birth)
	t = t .. "<br>" .. CA.str_vars(CA.user_translations["author_writing_before_death"], CA.constants.author_writing_before_death)
	t = t .. "<br>" .. CA.str_vars(CA.user_translations["author_mean_lifetime"], CA.constants.author_mean_lifetime)
	t = t .. "<br>" .. CA.str_vars(CA.user_translations["author_lifetime_limit"], CA.constants.author_lifetime_limit)
	return t
end -- function p.list_wiki_selectors(t)

function p.list_all_categories(t) -- list_all_categories_title
	t = "\n* " .. (t or " <b>List all eventual categories of this wiki:</b>")
	for key, txt in pairs(CA.user_translations) do
		if CA.is_in("cat_", key) or CA.is_in("_cat", key) then
			txt = CA.str_vars(txt, "**", "**", "**", "**", "**", "**")
			t = t .. "<br>" .. CA.ta(key, txt)
		end
	end
	return t
end -- function p.list_all_categories(t)

function p.list_all_errors(t) -- list_all_errors_title
	t = "\n* " .. (t or " <b>List all detectable errors of this wiki:</b>")
	for key, txt in pairs(CA.user_translations) do
		if CA.is_in("err_", key) or CA.is_in("_err", key) then
			txt = CA.str_vars(txt, "**", "**", "**", "**", "**", "**")
			t = t .. "<br>" .. CA.ta(key, txt)
		end
	end
	return t
end -- function p.list_all_errors(t)

-- More detailed tests
-- Pruebas más detalladas
-- Tests détaillés supplémentaires
function p.form_tests(args_final)
	if type(args_final) ~= "table" then args_final = CA.args_final end -- optional arguments
	local res = "\n:.\n"
--	CA.catView = ":"
	--
	---------------------------------------------------------------
	-- "\n* any texte" is forbiden before dropbox. Is it a bug ? --
	---------------------------------------------------------------
	--
	res = res .. "<h3>" .. CA.str_vars("page_tests_h3_title") .. "</h3>"
	res = res .. "<small><small>" .. CA.all_versions_text() .. "</small></small>"
	res = res .. "<br/> " .. CA.str_vars("page_tests_title") .. "<br/>"
	--
	res = res .. CA.dropdown_func(1, "table_args_source_title", CA.testable_lister, CA.args_source, "CA.args_source")
	res = res .. CA.dropdown_func(1, "table_args_unknown_title", CA.testable_lister, CA.args_unknown, "CA.args_unknown")
	res = res .. CA.dropdown_func(1, "list_wiki_selectors_title", p.list_wiki_selectors)
	res = res .. CA.dropdown_func(1, "list_all_categories_title", p.list_all_categories)
	res = res .. CA.dropdown_func(1, "list_all_errors_title", p.list_all_errors)
	res = res .. CA.dropdown_func(1, "selected_autorities_title", p.list_selected_authorities)
	res = res .. CA.dropdown_func(1, "used_options_title", CA.used_options_list, nil, CA.used_options)
	res = res .. CA.dropdown_func(1, CA.versions.warning_short() .. "Versions management", CA.versions.warning_report )
	res = res .. CA.dropdown_func(1, "tables_count_title", CA.tables_counts)
	res = res .. CA.dropdown_func(1, "list_all_args_title", p.list_all_args(nil, p.args_known_default) )
	res = res .. CA.dropdown_func(1, "spaces_page_names_title", CA.spaces_page_names_test)
	res = res .. CA.dropdown_func(1, "missing_translations_title", CA.verif_i18n, CA.i18n)
	res = res .. CA.dropdown_func(1, "wikidata_details_test_title", CA.wikidata_details_test)
	--
	res = res .. "<h3>" .. CA.str_vars("internal_tests_h3_title") .. "</h3>"
	res = res .. "<br/> " .. CA.str_vars("internal_tests_title") .. "<br/>"
	--
--	res = res .. CA.dropdown_func(1, "copyright_box_test_title", p.copyright_box_test)
	res = res .. CA.dropdown_func(1, "author_rights_test_title", p.author_rights_test)
	res = res .. CA.dropdown_func(1, "authorities_notices_test_title", AT.authorities_notices_test)
	res = res .. CA.dropdown_func(1, "authorities_select_test_title", p.authorities_select_test)
	res = res .. CA.dropdown_func(1, "multiple_selection_test_title", CA.multiple_selection_test)
	res = res .. CA.dropdown_func(1, "firstname_familyname_test_title", p.firstname_familyname_test)
	res = res .. CA.dropdown_func(1, "cat_add_test_title", CA.cat_add_test)
	res = res .. CA.dropdown_func(1, "unique_century_life_test_title", p.unique_century_life_test)
	res = res .. CA.dropdown_func(1, "year_to_epoch_test_title", p.years_to_epoch_test)
	res = res .. CA.dropdown_func(1, "century_to_epoch_test_title", p.century_to_epoch_test)
--	res = res .. CA.dropdown_func(1, "events_epochs_test_title", p.events_epochs_test) -- , "Evenements et époques. Events and epochs :")
--	function p.events_epochs_test(res, args_final)
	res = res .. CA.dropdown_func(1, "roman_to_digital_test_title", MathRoman.roman_to_digital_test)
	res = res .. CA.dropdown_func(1, "digital_to_roman_test_title", MathRoman.digital_to_roman_test)
	res = res .. CA.dropdown_func(1, "options_from_mode_title", CA.options_from_mode_test)
	res = res .. CA.dropdown_func(1, "args_known_structure_title", CA.args_known_structure) -- , CA.args_known, "CA.args_known")
	res = res .. CA.dropdown_func(1, "multiple_values_tests_title", CA.multiple_values_tests)
--	res = res .. CA.dropdown_func(1, "combined_translations_title", CA.i18n_lister)
	res = res .. CA.dropdown_func(1, "date_to_part_test_title", CA.date_to_part_test)
--	res = res .. CA.dropdown_func(1, "versions_details_title", CA.versions.warning_versions_details )
--	res = res .. CA.dropdown_func(1, "versions_manage_test_title", CA.versions.check_versions_test)
	res = res .. CA.dropdown_func(1, "dummy_languages_title", CA.dummy_languages)
	res = res .. CA.dropdown_func(1, "wikidata_arbitrary_access_title", CA.arbitrary_access_test)
--	res = res .. CA.dropdown_func(1, "test_table of wikidata time properties, CA.testable_lister", CA.testable_lister, CA.TimeTest, "CA.TimeTest")
	res = res .. CA.dropdown_func(1, "bind_verif_modules_title", CA.versions.bind_verif_modules_test )
	res = res .. CA.dropdown_func(1, "bind_verif_modules_report", CA.versions.bind_verif_modules_report )
	--
	res = res .. "\n<b>For other tests, look at [[" .. mw.site.namespaces.Module.name .. ":ControlArgs]].</b><br>"
	local res_function = "<br/>\n" .. (p.versions.vn.versionName or "MainModule") .. " " .. (p.versions.vn.versionNumber or "0.0") .. ":" .. (CA.mode_name or "mode ? ") .. ":" .. CA.wiki_lang .. " "
	--
--	T4085 Add a {{USERLANGUAGE}}/{{USERLANG}} magic word
--	*	https://phabricator.wikimedia.org/T4085
--	*	Pro arguments in short: {{CONTENTLANGUAGE}} & {{CONTENTLANG}} thus call it {{USERLANGUAGE}} & {{USERLANG}} (as {{USERIFCODE}} is too weird)
--	*	Note: On Betawiki (translatewiki.net) there is such a magic word; but they call it {{UILANGCODE}}
--	res = res .. CA.ta("USERLANGUAGE", frame:preprocess( "{{USERLANGUAGE}}" ) )
	res = res .. "<br>See: [https://phabricator.wikimedia.org/T68051 T68051 : Get the user language to help admins to maintain a module or a template]<br>"
	res = res .. CA.ta("REVISIONDAY", CA.frame:preprocess( "{{REVISIONDAY}}" ) )
	res = res .. CA.ta("CURRENTDAY2", CA.frame:preprocess( "{{CURRENTDAY2}}" ) )
	res = res .. CA.ta("CONTENTLANGUAGE", CA.frame:preprocess( "{{CONTENTLANGUAGE}}" ) )
	res = res .. CA.ta("REVISIONUSER", CA.frame:preprocess( "{{REVISIONUSER}}" ) )
	res = res .. CA.ta("USERLANG", CA.frame:preprocess( "{{USERLANG}}" ) )
	res = res .. CA.ta("UILANGCODE", CA.frame:preprocess( "{{UILANGCODE}}" ) )
	res = res .. CA.ta("USERIFCODE", CA.frame:preprocess( "{{USERIFCODE}}" ) )
	res = res .. CA.ta("USERLANGUAGE", CA.frame:preprocess( "{{USERLANGUAGE}}" ) )
	res = res .. res_function .. " Stop.<br>"
	--
	--[[
	res = res .. "<br>* <b>funct = doc1, [1] = wikidata_details_test_title|_535</b>"
							.. "<br><nowiki>{{Auteur3|doc1|wikidata_details_test_title|_535}}</nowiki> "
	res = res .. CA.frame:preprocess(	   "{{Auteur3|doc1|wikidata_details_test_title|_535}}")
	--
	res = res .. "<br>* <b>funct = doc1, [1] = wikidata_details_test_title|Q535</b>"
							.. "<br><nowiki>{{Auteur3|doc1|wikidata_details_test_title|Q535}}</nowiki> "
	res = res .. CA.frame:preprocess(	   "{{Auteur3|doc1|wikidata_details_test_title|Q535}}")
	--
	res = res .. "<br>* <b>funct = doc1, [1] = missing_translations_title|Q535</b>"
							.. "<br><nowiki>{{Auteur3|doc1|missing_translations_title|Q535}}</nowiki> "
	res = res .. CA.frame:preprocess(	   "{{Auteur3|doc1|missing_translations_title|Q535}}")
	--
	res = res .. "<br>* <b>funct = doc1, [1] = list_all_args_title</b>"
							.. "<br><nowiki>{{Auteur3|doc1|list_all_args_title}}</nowiki> "
	res = res .. CA.frame:preprocess(	   "{{Auteur3|doc1|list_all_args_title}}")
	--]]
	--[[
	res = res .. "<br>* <b>funct = doc1, [1] = options_from_mode_title</b>"
							.. "<br><nowiki>{{Auteur3|doc1|options_from_mode_title}}</nowiki> "
	res = res .. CA.frame:preprocess(	   "{{Auteur3|doc1|options_from_mode_title}}")
	--
	res = res .. "<br>* <b>funct = doc1, [1] = used_options_title</b>"
							.. "<br><nowiki>{{Auteur3|doc1|used_options_title}}</nowiki> "
	res = res .. CA.frame:preprocess(	   "{{Auteur3|doc1|used_options_title}}")
	--
	res = res .. "<br>* <b>funct = doc1, [1] = wikidata_any_page_title, [2] = wikidata ID</b>"
							.. "<br><nowiki>{{Auteur3|doc1|wikidata_any_page_title|Q535}}</nowiki> "
	res = res .. CA.frame:preprocess(	   "{{Auteur3|doc1|wikidata_any_page_title|Q535}}")
	--]]
--	CA.options_to_catView()
	return res
end -- function p.form_tests(args_final)

function p.form_tests_init(args_source)
	if type(args_source) ~= "table" then args_source = CA.args_source end -- optional arguments
	--[[
	if lang == "en" then args_source = ArgtestEN end
	if lang == "es" then args_source = ArgtestES end
	if lang == "fr" then args_source = ArgtestFR end
	if not args_source.debug then args_source.debug = " : docdata docdef docview docline " end
	--]]
	if p.i18n and p.i18n.en then p.i18n.en.error_i18n_wanted_to_test_missing_translation = 'English error i18n wanted for tests missing translation' end
	if p.i18n and p.i18n.es then p.i18n.es.error_i18n_deseada_para_probar_traduccion_maquante = 'Espagnol error i18n deseada para probar traducción maquante' end
	if p.i18n and p.i18n.fr then p.i18n.fr.error_i18n_voulue_pour_test_de_traduction_manquante = 'Français erreur i18n voulue pour tests de traduction manquante' end
	if not args_source.description then args_source.description = "Victor Hugo est très connu." end
	if not args_source.genre then args_source.genre = "Romanciers/Poètes/Auteurs de théatre" end
	if not args_source.language then args_source.language = "français/japonais" end
	if not args_source.occupations then args_source.occupations = "Académiciens/Personnalités politiques" end
	if not args_source.prize then args_source.prize = "Nobel de littérature/Pulitzer" end
	if not args_source.wikipedia then args_source.wikipedia = "Alain Fournier" end
	if not args_source.wikiquote then args_source.wikiquote = "Charles Beaudelaire" end
	if not args_source.commons then args_source.commons = "Victor Hugo" end
	if not args_source.indexpages then args_source.indexpages = "Paul Claudel" end
	if not args_source.epoch then args_source.epoch = "1234" end
	if not args_source.epoque then args_source.epoque = "1357" end
	return
end -- function p.form_tests_init(args_source)

-- relire ControlArgs/Author : module code in english

function p.docbox_namespace_error_and_cat() -- to insert before any other errors
	-- If DocBox is displayed out of Module or Template namespace, generate an error and a category "Module with usage error"
	-- Si DocBox est affiché hors de l'espace de nom Module ou Modèle, générer une erreur et une catégorie "erreur d'utilisation"
	local namespace = mw.title.getCurrentTitle().namespace
	local nsText = mw.title.getCurrentTitle().nsText
	if namespace ~= 10 and namespace ~= 828 then -- ns:Template and ns:Module
		CA.err_add("docbox_namespace_error_err", nsText)
		CA.cat_add("docbox_namespace_error_cat")
	end
	return
end -- function p.docbox_namespace_error_and_cat()

function CA.versions.warning_report_old(t)
	local v, d = CA.versions, CA.versions.d
	local t = "<br>Versions warning report for <b>" .. v.main_versionName .. " " .. v.main_versionNumber .. " " .. v.main_versionDate .. "</b> : "
	t = t .. "<br>Main module selector: <b>" .. v.main_selector .. "</b>"
	t = t .. "<br>Main module all versions: <b>" .. v.main_all_versions .. "</b>"
	CA.i18n_trac("versions.warning_report", "start", 1)
	local loaded_modules, loaded_tab, modu = v.loaded_modules()
	CA.loaded_modules_track = "v.warning_report : " .. loaded_modules
	t = t .. "<br>* Used modules: "
	t = t .. "<br>* " .. v.main_versionName .. " : "
	t = t .. CA.ta("versionName", v.main_versionName )
	t = t .. CA.ta("versionNumber", v.main_versionNumber )
	t = t .. CA.ta("versionDate", v.main_versionDate )
	for title, modu in pairs(CA.check_versions_tab or _G) do -- check_versions_tab
		if type(modu) == "table" and title ~= "CA_memory" and modu.versions and modu.versions.vn then --
			local vn = modu.versions.vn
		--	versionName = "ControlArgs1", versionNumber = "1.01", versionDate = "2015-09-09",
			t = t .. "<br>* " .. title .. " : "
			t = t .. CA.ta("versionName", vn.versionName )
			t = t .. CA.ta("versionNumber", vn.versionNumber )
			t = t .. CA.ta("versionDate", vn.versionDate )
		end
	end
	t = t .. "<br>"
	t = t .. "<br>* Received options : "
	t = t .. "<br>" .. CA.ta("CA.args_final.mode", CA.args_final.mode)
	t = t .. "<br>" .. CA.ta("CA.mode_options", CA.mode_options)
	t = t .. "<br>" .. CA.ta("CA.invoke_options", CA.invoke_options)
	t = t .. "<br>" .. CA.ta("CA.args_final.c", CA.args_final.c)
	return t
end -- function CA.versions.warning_report(t)

-- Display the documentation in an infobox, similar to edit-boxs
-- Affichage de documentation dans un cadre (box), semblable aux boites d'edition
function p.formDocBox(args_final)
	if type(args_final) ~= "table" then args_final = CA.args_final end -- optional arguments
	local err = CA.verify_args_tables(CA.args_known, CA.args_source)
	if err then return err end
	local res = CA.error_color("<center><b>" .. CA.str_vars("msg_delete_docbox") .. "</b><br/></center>")
	res = res .. CA.dropdown_func(1, CA.report_main_discreet .. CA.str_vars("actual_versions_title"), CA.versions.warning_report )
--	res = res .. A.dropdown_func(1, "versions_details_title", CA.versions.warning_versions_details ),
--	res = res .. "<br/> " .. CA.user_wiki_lang
--	res = res .. "<small><br/>" .. CA.all_versions_text("formDocBox", versions.all_versions) .. "</small>"
	if CA.docolor then res = res .. "\n:.\n: " .. CA.sources_of_datas_colors() end
	if CA.option("debug")		then res = res .. "\n*" .. CA.ta("catView", CA.catView) .. CA.ta("p.invoke_options", p.invoke_options) .. CA.ta("p.mode_options", p.mode_options) end
	if CA.option("docdata")		then res = res .. "\n*" .. CA.generDoc(" docdef docline ", CA.args_wikidata, "Wikidata import") end
--	if CA.option("docdata")		then res = res .. "\n*" .. CA.generDoc(" docdef docline ", CA.args_selected, "Wikidata select") end
	if CA.option("docview")		then res = res .. "\n*" .. CA.generDoc("", args_final, "Arguments") end
	if not CA.option("noerr")	then res = res .. "\n*" .. CA.errors_lister() end
	res = res .. "\n* " .. CA.categories_lister(":")
	res = '<div style=" width=90%; border: 1px solid #AAAAAA; margin:1em; background-color:#F1F1F1; padding:0.3em; ">' .. res .. '</div>'
	return res
end -- function p.formDocBox(args_final)

-- Generate the main box. Generar el cuadro principal. Générer la boîte principale.
function p.normal_box(args_final)
	-- Generate the main box, in HTML
	if type(args_final) ~= "table" then args_final = CA.args_final end -- optional arguments
	local title = args_final.title or "title"
	local caption = args_final.caption
	local image = args_final.image
	local initial = args_final.initial
	local description = args_final.description
	local birthyear = args_final.birthyear
	local deathyear = args_final.deathyear
	local wikipedia = args_final.wikipedia
	local wikiquote = args_final.wikiquote
	local entityid = args_final.entityid
	local commons = args_final.commons
	local indexpages = args_final.indexpages
	local sortkey = args_final.sortkey
	local rights_limit = args_final.rights_limit
	local interwikis = {}
	local wt = ''
	local warning_versions = CA.versions.warning_short()
	--
--	if type(description) ~= "string" then description = "x y z" end
	local ee = p.events_epochs(args_final, mode, c, verif)
--	wt = wt .. ee.cats
--	if type(description) ~= "string" then description = "a b c" end
	description = description .. " " .. ee.events_text
	if type(precededby) == "string" then
		-- use of another entity in wikidata
		-- a étudié à l'université du Witwatersrand en Afrique du Sud
		description = description .. CA.str_vars("preceded_by", precededby)
	end
	if type(sortkey) == "string" then
	--	sortkey_txt = mw.getCurrentFrame():preprocess("{{" .. sortkey_txt .. "}}")
	--	p.sortkey_txt = "DEFAULTSORT:" .. a.sortkey -- example {{DEFAULTSORT:Hugo, Victor}}
	--	sortkey = ''
	else sortkey = '' end
	--
	-- Generate image part of the table
--	image = nil
	if type(image) ~= "string" then image = "" end
	image = mw.text.trim(image)
	if image ~= "" then -- taille maximum 280px. Autrement les pages sont classées dans la [[:Catégorie:Taille d'image invalide]].
		image = '[[File:' .. image .. '|frameless|170x170px||class=photo]]'
	else
		image = "&nbsp;"
	end
	--[[ image = ''
	.. '<td valign="middle" align="center" rowspan="1" style=" border-left:{{{border|0}}}px solid #CCCCCC; ">'
		.. '<div id="AuthorImage" style=" padding:4px; ">'
			.. image
		.. '</div>'
	.. '</td>' --]]
	-- Generate interwikis links
	local links, scans, icon, icon2, icon3 = "", "", ""
	local cat_initiale, cat_view = "", ""
	if type(initial) == "string" then
	--	local authors_initial_cat = CA.str_vars("authors_initial_cat", initial)
		local authors_initial_cat = CA.string_vars(CA.wiki_translations, "authors_initial_cat", initial)
		local authors_initiale_txt = CA.str_vars("authors_initiale_txt", initial)
		local authors_initiale_pop = CA.str_vars("authors_initiale_pop", initial)
	--	see default_sortkey_to_end -- cat_initiale = "[[" .. mw.site.namespaces.Category.name .. ":" .. authors_initial_cat .. "|" .. sortkey .. "]]"
		cat_view = "[[:" .. mw.site.namespaces.Category.name .. ":" .. authors_initial_cat .. "|" .. authors_initiale_txt .. "]]"
		links = links .. '<span style="color:#aaaa66; line-height:3.0em; ">◀&nbsp;' .. cat_view .. cat_initiale .. '</span><br/>'
	--	links = links .. '<br/></span>' ..  "|&nbsp;" .. authors_initiale_txt
		-- Encode the character ◀=(U+25C0) '<<' (U+25C4)
	end
	if type(indexpages) == "string" then -- Fichier:Quill and ink.svg
	--	indexpages = string.gsub(indexpages, "-", " ") -- space -> "+"
		indexpages = string.gsub(indexpages, "%s", "+") -- space -> "+"
		indexpages = 'Special:IndexPages?key=' .. indexpages -- Victor+Hugo
	--	goal : https://fr.wikisource.org/wiki/Special:IndexPages?key=Tite-Live
	--	old ok links = links .. '<br/>' .. icon .. '[//fr.wikisource.org/wiki/' .. indexpages .. ' Fac-similés]'
		icon = '[[File:Quill and ink.svg|14px]]'
		--	line-height:1.5em;
		txt = CA.str_vars("box_links_indexpages")
		links = links .. '<span style=" height:1.5em; ">' .. icon .. '<span class="plainlinks">[//fr.wikisource.org/wiki/' .. indexpages .. ' &nbsp;' .. txt .. ']</span></span>'
	--	le lien interne ne fonctionne pas le 09/08/2014 depuis quelques semaines
	--	links = links .. '<br/><span style="color:#232388; ">• &nbsp;</span>[[' .. indexpages .. '|Fac-similés]] '
	end
	if type(wikipedia) == "string" then -- File:Wikipedia-logo.png
		-- [[File:' .. img .. '|22px|link=' .. authority_icon_link .. '|' .. autority_alt_text .. ']]
		txt = CA.str_vars("box_links_biography")
		icon = '[[File:Wikipedia-logo.png|14px|link=w:' .. CA.wiki_lang .. ':' .. wikipedia .. '|' .. txt .. ']]'
		links = links .. '<br/>' .. icon .. '&nbsp;[[w:' .. CA.wiki_lang .. ':' .. wikipedia .. '|' .. txt .. ']]'
	end
	if type(wikiquote) == "string" and type(entityid) == "string" then -- Fichier:Wikiquote-logo.png -- Wikiquote-logo-v3.png
		txt = CA.str_vars("box_links_wikiquote")
		icon = '[[File:Wikiquote-logo-v3.png|16px|link=wikiquote:' .. entityid .. '|' .. txt .. ']]'
		links = links .. '<br/>' .. icon .. '&nbsp;[[q:' .. CA.wiki_lang .. ':' .. wikiquote .. '|' .. txt .. ']]'
	end
	if type(commons) == "string" and type(entityid) == "string" then -- Fichier:Commons-logo.png
	--	links = links .. '<span style="color:#232388; ">• &nbsp;</span>[[commons:' .. commons .. '|Médias]]<br/>'
		txt = CA.str_vars("box_links_commons")
		icon = '[[File:Commons-logo.svg|16px|link=commons:' .. entityid .. '|' .. txt .. ']]'
		links = links .. '<br/>' .. icon .. '&nbsp;[[commons:' .. commons .. '|' .. txt .. ']]'
	end
	if type(entityid) == "string" and type(entityid) == "string" then -- File:Wikidata-logo.svg -- Q8023 for Nelson_Mandela
	--	local entityid_txt = CA.str_vars("entityid_txt")
		txt = CA.str_vars("entityid_txt")
		icon = '[[File:Wikidata-logo.svg|16px|link=wikidata:' .. entityid .. '|' .. txt .. ']]'
		links = links .. '<br/>' .. icon .. '&nbsp;[[d:' .. entityid .. '|' .. txt .. ']]'
	end
--	links = links .. '<br/>' .. CA.discreet_color( CA.str_vars("rights_limit_txt", rights_limit) )
--	links = links .. '<br/>' .. CA.versions.warning_short(d)
	local scans, SCAN_gallica, SCAN_europeana, SCAN_google = p.HTMLscans(args_final)
--	links = links .. "\n&nbsp;\n&nbsp;"
	scans = ""
	if type(SCAN_gallica) == "string" then
		-- scans = scans .. '<span style="color:#232388; ">•&nbsp;</span>[' .. SCAN_gallica .. ' Gallica]'
		scans = scans .. ' [' .. SCAN_gallica .. ' Gallica] &nbsp; '
	end
	if type(SCAN_europeana) == "string" then
	--	links = links .. '<br/><span style="color:#232388; ">•&nbsp;</span>[' .. SCAN_europeana .. ' Europeana]'
		-- scans = scans .. '<br/><span style="color:#232388; ">•&nbsp;</span>[' .. SCAN_europeana .. ' Europeana]'
		scans = scans .. ' [' .. SCAN_europeana .. ' Europeana] &nbsp; '
	end
	if type(SCAN_google) == "string" then
		-- scans = scans .. '<br/><span style="color:#232388; ">•&nbsp;</span>[' .. SCAN_google .. ' Google]'
		scans = scans .. ' [' .. SCAN_google .. ' Google] &nbsp; '
	end
	scans = CA.discreet_color( CA.str_vars("rights_limit_txt", rights_limit) ) .. ' &nbsp; ' .. scans
	scans = scans .. ' &nbsp; ' .. CA.report_main_discreet
	-- FIXME: The french display is in HTML direct to better adapt the size and the look to plural environments.
	-- Generate scans to display
	local notices = p.form_notices(CA.args_known, args_final)
	-- Generate the main box.
--	wt = wt .. warning_versions
	wt = wt .. '<div id="Author" class="vcard" style="margin-right:5px; box-shadow:0.2em 0.2em 0.2em #EFEFEF; background-color:#F1F1DE; padding:0.3em; overflow-x:hidden; line-height:80%; ">'
	  .. '<table cellspacing="0" cellpadding="0" style="background-color: transparent; border:none; padding:0em;">'
		.. '<tr>'
		  .. '<td valign="middle" rowspan="3" style="background-color: #F1F1DE; text-align:left; font-size:80%; ">'
			.. '<div style=" width:7em; text-align:left; line-height:220%; " >'
			.. links -- .. "<br>" .. scans
			.. '</div>'
		  .. '</td>'
		  .. '<td valign="top" rowspan="1" align="center" style="min-width:40%; padding:0.5em; ">'
			.. '<span id="AuthorName" style=" font-family:Times,serif; text-align:center; max-heigth:20%; line-height:80%; font-size:180%; font-weight:bold; padding-bottom:0.5em; ">' -- "Times New Roman",
			  .. title
			.. '</span>'
		  .. '</td>'
		  .. '<td valign="middle" align="center" rowspan="3" style=" border-left:{{{border|0}}}px solid #CCCCCC; ">'
			.. '<div id="AuthorImage" style=" padding:4px; ">'
				.. image
			.. '</div>'
		  .. '</td>'
		.. '</tr>'
		.. '<tr>'
		  .. '<td align="center" style="width:100%; padding:0.3em; ">' -- valign="top" 
			.. '<span class="label" style=" font-size:110%; max-heigth:20%; line-height:110%; text-align:center; " >'
			  .. description
			.. '</span>'
		  .. '</td>'
		.. '</tr>'
		.. '<tr>'
		  .. '<td >' -- colspan="1" 
			.. '<div align="center" style=" margin:0.3em; flex-flow:row wrap; text-align:center; " >'
				.. notices
			--	.. ' <span style=" color:#BBBBBB; ">|</span> &nbsp; '
				.. '<br/><br/><span style=" text-align:center; line-height:150%; font-size:80%; ">'
				  .. scans
				.. '</span>'
			.. '</div>'
		  .. '</td>'
		.. '</tr>'
	  .. '</table>'
	.. '</div>'
	return wt
end -- function p.normal_box(args_final)

-- Normal result of the module
function p.form_result(args_final)
	if type(args_final) ~= "table" then args_final = CA.args_final end -- optional arguments
	p.gener_categories(args_final) -- Produire les catégories sans les activer
	p.author_rights(args_final)
	local res = ""
	-- Eventual edit panel. Panneau de edit éventuel.
	--	notice		= " notices nobox noerr nocat ", CA.options_from_mode(mode_name)
	if CA.option("docview")		then res = res .. p.formDocBox(args_final) end
	-- Former normalement la box et ses annexes
--	if not CA.option("nobox") then res = res .. p.normal_box(args_final) end
--	notice		= " notices nobox noerr nocat ",
--	notices		= " notices nobox noerr nocat ",
--	edit			= " : catview docdef docline docsrc docdata ",
--	tests		= " : catview docview docdef docline docsrc docdata tests ",
	if not CA.option("nobox") and not CA.option("notices") then
		if type(args_final.sortkey_txt) == "string" then
			res = res .. mw.getCurrentFrame():preprocess("{{" .. args_final.sortkey_txt .. "}}")
		end
		res = res .. p.normal_box(args_final)
		res = res .. p.author_rights(args_final)
	end
	if not CA.option("nobox") and not CA.option("notices") then  end
	res = res .. CA.categories_lister("") -- always generate categories
	-- Display categories. Afficher les catégories.
	if ( not CA.option("nobox") and not CA.option("nocat") ) and ( CA.option("catview") or CA.option(":") ) then
		res = res .. CA.categories_lister(":") .. " " .. args_final.sortkey_txt
	end
	if not CA.option("nobox") then res = res .. microformat(CA.args_source, args_final) end
	CA.time3 = os.clock()
	--
	if CA.option("tests") or CA.args_final.mode == "tests" then res = res .. p.form_tests() end
	CA.time4 = os.clock()
	if CA.option("tests") or CA.args_final.mode == "tests" then res = res .. CA.tests_time(true, "") end
	-- Activer les catégories
	-- Option nocat means "Do not categorize and do not show categories."
--	if not CA.option("nocat") then res = res .. CA.categories_lister() end
	--
	if CA.option("notice") or CA.args_final.mode == "notice" or CA.option("notices") or CA.args_final.mode == "notices" then
		res = res .. p.form_notices(CA.args_known, CA.args_selected or CA.args_final)
	end
	return res
end -- function p.form_result(args_final, lang)

-- relire ControlArgs/Author : module code in english

------------------------------------------------------------
-- Arguments sources exemples
------------------------------------------------------------

p.ArgtestEN = { c=": debug wikidata docview docdef docline docafter erron interon data-on test-on i18non ",
	--bug6 local ArgtestEN = { c=": docdef docline docafter ",
	familyname = "Pierre Yves-André de La Fontaine", rights = "50", image = "Carjat Arthur Rimbaud 1872 n2.jpg",
	birthyear = "before 1793", deathyear = "1850", region = "chine",
	description = "French poet.", genre = "Poètes‎", Prize = "Goncourt", prizze = "Lauréats du Prix Goncourt",
	occupations = "Idéologues/Personnalités politiques", language = "Littérature bretonne",
	BNF = "cb11888266r"
}

p.ArgtestES = { c=": debug wikidata docview docdef docline docafter erron interon data-on test-on i18non ",
	--bug6 local ArgtestES = { c=": docdef docline docafter ",
	nom = "Pierre Yves-André de La Fontaine", droits = "non", image = "Carjat Arthur Rimbaud 1872 n2.jpg",
	anneeNaissance = "antes 1793", anneeDeces = "1950", ["región"] = "chine",
	description = "Poeta francés", Pris = "Goncourt", genre = "Poètes‎", commons = "Andréas del Fontana‎",
	metier = "Idéologues/Personnalités politiques", prix = "Lauréats du Prix Goncourt", langue = "Littérature bretonne",
	BNF = "cb11888266r"
}

p.ArgtestFR = { c=": debug wikidata docview docdef docline docafter erron interon data-on test-on i18non ",
	--bug6 local ArgtestFR = { c=": docdef docline docafter ",
	nom = "Pierre Yves-André de La Fontaine", droits = "non", image = "Carjat Arthur Rimbaud 1872 n2.jpg",
	siecleNaissance = "au XJX ème", anneeDeces = "1950", ["région"] = "chine",
	description = "Poète français.", Pris = "Goncourt", genre = "Poètes‎",
	metier = "Idéologues/Personnalités politiques", prix = "Lauréats du Prix Goncourt", langue = "Littérature bretonne",
	BNF = "cb11888266r"
} -- err_roman2int

p.ArgtestFR_min = { c=": debug wikidata docview docdef docline docafter erron interon data-on test-on i18non ",
	--bug6 local ArgtestFR = { c=": docdef docline docafter ",
	nom = "Jacques Brel", droits = "70", image = "Carjat Arthur Rimbaud 1872 n2.jpg",
	anneeNaissance = " 1793", anneeDeces = "1970", ["région"] = "chine",
	description = "Poète français.", BNF = "11888266r"
}

-- Authorities examples :
-- ARCid = "R457-J-44", BNF = "45274126861", DNB = "3684200072", GKD = "71yhjey852", IBLid = "37581257954"
-- BNF = cb11888266r = Alain Fournier
-- LCCN = n/50/23101 = Alain Fournier
-- = http://www.worldcat.org/identities/lccn-n50-23101
-- NLA = 35096649 = Alain Fournier
-- PND = 11850133X = Alain Fournier
-- VIAF = 7396281 = Arthur Rimbaud
-- VIAF = 34452139 = Alain Fournier
-- Worldcat = 35096649 = Happy Gilmore

-- relire ControlArgs/Author : module code in english

------------------------------------------------------------
------------------------------------------------------------
-- Interfaces, alias and functions to templates
-- Interfaces, alias y funciones para modelos
-- Interfaces, allias et fonctions pour les modèles
------------------------------------------------------------
------------------------------------------------------------

function p.track_args()
	local notrack = ""
	local t = "- " .. CA.ta("p.authorities_from_args", CA.tab_fields( p.authorities_from_args) )
	-- "<br/>* " ..
	t = t .. CA.ta("CA.args_final.authorities_arg", CA.tab_fields(CA.args_final.authorities_arg) )
	t = t .. CA.ta("CA.wiki_translations.authorities_selector", CA.wiki_translations.authorities_selector)
	t = t .. CA.ta("p.selected_autorities", CA.tab_fields( p.selected_autorities) )
	return notrack
end

function p.trc(fn_mode, t) -- res = res .. p.trc("where", "text")
	local res = ""
	local a = CA.args_final or {}
	-- put this in comment to desactivate
--	res = res .. "<br/>* " .. (fn_mode or "m") .. ", " .. (t or "t") .. ", " .. CA.ta("sortkey_test", a.sortkey_test)
	return res
end

------------------------------------------------------------
------------------------------------------------------------
-- Interfaces, alias and functions to templates
-- Interfaces, alias y funciones para modelos
-- Interfaces, allias et fonctions pour les modèles
------------------------------------------------------------
------------------------------------------------------------

p.options_for_modes = { -- default init
	normal		= "	",
	notice		= " notices nobox noerr nocat ",
	notices		= " notices nobox noerr nocat ",
	doc1		= " nobox noerr nocat ",
	edit		= " : catview docview docdef docline docsrc docdata ",
	tests		= " : catview docview docdef docline docsrc docdata tests ",
	-- Option nocat means "Do not categorize and do not show categories."
}

-- Basic use, only translate and verify arguments, without use of options, modes and resulting text
-- Uso básico, sólo traducir y verificar argumentos, sin el uso de opciones, modos y texto resultante
-- Utilisation de base, seulement traduire et vérifier les arguments, sans utilisation d'options, modes et texte résultant
function p.base(frame, mode_name, args_known_default)
	-- The base function only imports, translates and verifies arguments.
	-- It imports arguments from wikidata, module and template with increasing priorities.
	CA.frame = frame
	local res = ""
	CA.time1 = os.clock()
	args_known_default = args_known_default or CA.args_known_default
	CA.add_i18n_track_txt = " "
	local source_mode_name, source_key, try_lang = CA.get_arg_mode(mode_name) -- CA.mode_name from args source
	CA.mode_name = mode_name or CA.mode_name or "normal"
--	res = res .. CA.ta("base: source_mode_name", source_mode_name) .. CA.ta("CA.mode_name", CA.mode_name) -- DEBUG
	CA.versions.bind_verif_modules() -- Test of binding of the modules and versions control bind_verif_modules_report
	CA.versions.bind_verif_modules_report() -- Test of binding of the modules and versions control bind_verif_modules_report
	local t, tbl = CA.versions.init_i18n()
	CA.add_i18n_track_txt = CA.add_i18n_track_txt .. (t or "")
--	res = res .. CA.add_i18n_track_txt
	CA.module_init(frame)
	local args_source = CA.args_source
--	CA.categories_init() -- initialize the category list
	CA.verif_i18n()
	res = res .. p.trc("base verif_i18n")
	p.errors_list = {} -- Table to collect errors and messages
	CA.options_for_modes = p.options_for_modes
--	p.rights_limit = 0
	local source_mode_name, source_key, try_lang = CA.get_arg_mode(mode_name) -- CA.mode_name from args source
	CA.mode_name = source_mode_name or CA.mode_name or "normal"
	--
--	CA.args_source.id = "Q21157618" -- Charles Maumené
--	CA.args_source.id = "Q131671" -- Xénophane
	--
--	res = res .. CA.ta("base: mode_name", mode_name) .. CA.ta("source_mode_name", source_mode_name) .. CA.ta("CA.mode_name", CA.mode_name) -- DEBUG
	CA.init_args( args_known_default, CA.args_source, lang, msgs_list)
	local doc1_doc = CA.args_source.dockey or CA.args_source[1]
	local doc1_id = CA.args_source.entityid or CA.args_source.id or CA.args_source[2]
	CA.args_wikidata, t = CA.import_wikidata(CA.args_known, doc1_id)
	CA.args_import, t = CA.import_arguments(args_known_default, CA.args_source)
	--
	CA.time2 = os.clock()
	if type(CA.args_import.c) == "string" then
		CA.invoke_options = CA.args_import.c
	end
	if type(CA.args_import.mode) == "string" then
		mode_name = CA.args_import.mode
		CA.mode_options = mode_name
	end
	if CA.args_import then
		-- en : initialize or change the user and the wiki languages and their tables
		CA.init_wiki_user_lang(CA.args_import.wikilang, CA.args_import.userlang) -- CA.wiki_lang)
	end
	CA.invoke_options = CA.args_import.c or ""
	CA.mode_options = CA.options_from_mode(source_mode_name or mode_name)
--	CA.init_wiki_user_lang()
	local tt, used_options = CA.used_options_list(nil, CA.used_options)
	if not CA.option("nobox") and not CA.option("notices") then
		p.docbox_namespace_error_and_cat() -- to insert before any other errors
	end
	res = res .. p.trc("base end")
	return res
end -- function p.base(frame, mode_name, args_known_default)

function p.normal(frame)
	Interprojet.interprojet(frame)
	-- The normal function imports, translates and verifies arguments.
	-- It generates normal text and uses options to include edit or tests
	local res, t = "", ""
	res = res .. p.base(frame, "normal", p.args_known_default)
	CA.args_selected, p.selected_autorities, p.authorities_from_args = p.authorities_select()
	CA.args_final = p.interact_args_final(CA.args_selected or CA.args_import) -- Interactions between argumensts
	CA.mode_name = CA.args_final.mode or CA.args_import.mode or CA.args_source.mode or "normal"
	CA.mode_options = CA.options_from_mode(CA.mode_name)
	res = res .. p.trc("normal inter")
	--
--	res = res .. CA.ta("CA.args_final.mode", CA.args_final.mode) .. CA.ta("CA.mode_options", CA.mode_options)
	CA.time3 = os.clock()
--	res = res .. p.track_args()
	CA.init_wiki_user_lang()
	local loaded_modules, loaded_tab, modu = CA.versions.loaded_modules()
--	CA.loaded_modules_track = "p.normal : " .. loaded_modules
--	res = res .. "<br>" .. CA.loaded_modules_track -- DEBUG
	res = res .. p.trc("normal pre form_result")
	res = res .. p.form_result(CA.args_final) -- Generate wikitext, categories, and others
	res = res .. p.trc("normal post form_result")
--	res = res .. CA.trac_lang_t
	if CA.args_final and (CA.args_final.selectversions or CA.args_final.allversions) then -- version select from arguments
--		res = res .. CA.versions.warning_report("Track if args_final selectversions or allversions. ")
	end
	res = res .. p.default_sortkey_to_end(CA.args_final) -- Implement sortkey for category to not disturb it by any other code.
	return res
end -- function p.normal(frame)

function p.notices(frame)
--	Interprojet.interprojet(frame)
	local res, t = "", ""
	res = res .. p.base(frame, "notices", p.args_known_default)
	CA.args_selected, p.selected_autorities, p.authorities_from_args = p.authorities_select()
	CA.args_final = p.interact_args_final(CA.args_selected or CA.args_import) -- Interactions between argumensts
	CA.mode_name = CA.args_final.mode or CA.args_import.mode or CA.args_source.mode or "notices"
	CA.mode_options = CA.options_from_mode(CA.mode_name)
--	res = res .. p.track_args()
	CA.time3 = os.clock()
	res = res .. p.form_notices(CA.args_known, CA.args_selected)
	return res
end	 -- function p.notices(frame)

function p.notice(frame) -- alias function
	return p.notices(frame)
end

function p.doc(frame) return p.edit(frame) end -- alias function
function p.edit(frame)
	-- The edit function imports, translates and verifies arguments.
	-- It generates edit panel and normal text.
	Interprojet.interprojet(frame)
	local res, t = "", ""
	res = res .. p.base(frame, "edit", p.args_known_default)
	CA.args_selected, p.selected_autorities, p.authorities_from_args = p.authorities_select()
	CA.args_final = p.interact_args_final(CA.args_selected or CA.args_import) -- Interactions between argumensts
	
	p.form_tests_init()
	p.errors_list = {} -- Table to collect errors and messages
	CA.categories_init() -- initialize the category list
--	CA.init_user_lang()
--	CA.verif_i18n()
	CA.args_selected, p.selected_autorities, p.authorities_from_args = p.authorities_select()
	CA.args_final = p.interact_args_final(CA.args_selected or CA.args_import) -- Interactions between argumensts
	CA.mode_name = CA.args_final.mode or CA.args_import.mode or CA.args_source.mode or "edit"
	CA.mode_options = CA.options_from_mode(CA.mode_name)
	res = res .. p.trc("edit post inter")
	CA.init_wiki_user_lang()
	CA.time3 = os.clock()
--	CA.init_wiki_user_lang("en", "es")
	local res_function = "<br/>\n" .. (p.versions.vn.versionName or "MainModule") .. " " .. (p.versions.vn.versionNumber or "0.0") .. ":" .. (CA.mode_name or "mode ? ") .. ":" .. CA.wiki_lang .. " "
	res_function = res_function .. CA.tam(p.versions.vn.versionName, p.versions.vn.versionDate)
--	res = res .. res_function .. " Start:<br>"
--	local loaded_modules, loaded_tab, modu = CA.versions.loaded_modules()
--	CA.loaded_modules_track = "p.edit : " .. loaded_modules
--	res = res .. "<br>" .. CA.loaded_modules_track -- DEBUG
	res = res .. p.trc("edit pre form_result")
	res = res .. p.form_result() -- Generate normal wikitext, categories, and others
	res = res .. p.trc("edit pre form_result")
--	res = res .. res_function .. " Stop.<br>"
	res = res .. p.default_sortkey_to_end(CA.args_final) -- Implement sortkey for category to not disturb it by any other code.
	return res
end -- function p.edit(frame)

function CA.module_init_old(frame)
	CA.frame = frame or CA.frame
--	Mix arguments from {{#invoke:}}, then arguments from the prioritary template which replace ones from {{#invoke:}}.
	local v2, nn, ni = 0, 0, 0
	local args_tab, mode = {}
	local templat = frame:getParent().args -- arguments from template
	local invoked = frame.args -- arguments from #invoke module
	 -- Mix invoked modified arguments from prioritary template arguments.
	 -- Argument 1 from template become the mode in #invoke. Other i arguments must be shifted.
	args_tab = mw.clone(invoked)
	for key, val in pairs(templat) do
		local i = tonumber(key)
		if i then
			if i == 1 then mode = val -- mode = template[1]
			else args_tab[i-1] = val end -- transmit other unnamed arguments template[i], but shifted because the mode in template[1]
		else args_tab[key] = val end -- transmit any named template arguments template
	end
	CA.args_source = args_tab
	-- Default values of main module version.
	CA.MainModule.versionName = CA.MainModule.versionName or "ControlArgs0"
	CA.MainModule.versionNumber = CA.MainModule.versionNumber or "0.00"
	CA.MainModule.versionDate = CA.MainModule.versionDate or "2013-03-24"
	CA.categories_init()
--	CA.init_user_lang()
	CA.init_args()
--	CA.verif_i18n()
	return
end

--	function CA.doc1(frame) return p.doc1(frame) end
function p.doc1(frame)
	-- Form as documentation, a test in a dropbox.
	local res, t = "", ""
	res = res .. p.base(frame, "doc1", p.args_known_default)
	CA.args_selected, p.selected_autorities, p.authorities_from_args = p.authorities_select()
	CA.args_final = p.interact_args_final(CA.args_selected or CA.args_import) -- Interactions between argumensts
	local doc1_doc = CA.args_source.dockey or CA.args_source[1]
	local doc1_id = CA.args_source.entityid or CA.args_source.id or CA.args_source[2]
	--[[
	local function is_id(x) -- Verify the wikidata item format "Q12345".
		if type(x) == "string" then
			local Q = string.upper( string.sub(x, 1, 1) )
			local N = tonumber(string.sub(x, 2, -1) )
		end
		return x and (Q == "Q") and (type(N) == "number")
	end -- wikidata_details_test_title
	local templat = frame:getParent().args -- arguments from template
	local invoked = frame.args -- arguments from #invoked module
	if not is_id( doc1_id ) then
		res = res .. "<br>** missing_entityid ** " .. t .. CA.ta("doc1_doc" ,doc1_doc) .. CA.ta("doc1_id" ,doc1_id) 
		.. CA.ta("Template 1", (templat[1] or "-") .. ", 2=" .. (templat[2] or "-") .. ", 3=" .. (templat[3] or "-") ) .. ") , ("
		.. CA.ta("#invoke  1", (invoked[1] or "-") .. ", 2=" .. (invoked[2] or "-") .. ", 3=" .. (invoked[3] or "-") ) .. ") "
		return res
	end
	--]]
	CA.time3 = os.clock()
	local doc1_list = {
		actual_versions_title			= CA.dropdown_func(1, CA.report_main_discreet .. CA.str_vars("actual_versions_title"), CA.versions.warning_report ),
--		versions_details_title 			= CA.dropdown_func(1, "versions_details_title", CA.versions.warning_versions_details ),
		used_options_title				= CA.dropdown_func(1, "used_options_title", CA.used_options_list, nil, CA.used_options),
		tables_count_title				= CA.dropdown_func(1, "tables_count_title", CA.tables_counts),
		list_all_args_title 			= CA.dropdown_func(1, "list_all_args_title", p.list_all_args(nil, p.args_known_default) ),
		missing_translations_title		= CA.dropdown_func(1, "missing_translations_title", CA.verif_i18n, CA.i18n),
		wikidata_details_test_title		= CA.dropdown_func(1, "wikidata_details_test_title", CA.wikidata_details_test),
		wikidata_any_page_title			= CA.dropdown_func(1, "wikidata_any_page_title", CA.wikidata_any_page_test, doc1_doc, doc1_id), -- lng
		spaces_page_names_title			= CA.dropdown_func(1, "spaces_page_names_title", CA.spaces_page_names_test),
		table_args_source_title			= CA.dropdown_func(1, "table_args_source_title", CA.testable_lister, CA.args_source, "CA.args_source"),
		table_args_unknown_title		= CA.dropdown_func(1, "table_args_unknown_title", CA.testable_lister, CA.args_unknown, "CA.args_unknown"),
		list_wiki_selectors_title		= CA.dropdown_func(1, "list_wiki_selectors_title", p.list_wiki_selectors),
		list_all_categories_title		= CA.dropdown_func(1, "list_all_categories_title", p.list_all_categories),
		list_all_errors_title			= CA.dropdown_func(1, "list_all_errors_title", p.list_all_errors),
		selected_autorities_title		= CA.dropdown_func(1, "selected_autorities_title", p.list_selected_authorities),
		multiple_values_tests_title		= CA.dropdown_func(1, "multiple_values_tests_title", CA.multiple_values_tests),
		authorities_notices_test_title	= CA.dropdown_func(1, "authorities_notices_test_title", AT.authorities_notices_test),
		authorities_select_test_title	= CA.dropdown_func(1, "authorities_select_test_title", AT.authorities_select_test),
		multiple_selection_test_title	= CA.dropdown_func(1, "multiple_selection_test_title", CA.multiple_selection_test),
		firstname_familyname_test_title	= CA.dropdown_func(1, "firstname_familyname_test_title", p.firstname_familyname_test),
		copyright_box_test_title		= CA.dropdown_func(1, "copyright_box_test_title", AT.copyright_box_test),
		author_rights_test_title		= CA.dropdown_func(1, "author_rights_test_title", AT.author_rights_test),
		unique_century_life_test_title	= CA.dropdown_func(1, "unique_century_life_test_title", AT.unique_century_life_test),
		year_to_epoch_test_title		= CA.dropdown_func(1, "year_to_epoch_test_title", AT.years_to_epoch_test),
		century_to_epoch_test_title		= CA.dropdown_func(1, "century_to_epoch_test_title", AT.century_to_epoch_test),
		roman_to_digital_test_title		= CA.dropdown_func(1, "roman_to_digital_test_title", MathRoman.roman_to_digital_test),
		digital_to_roman_test_title		= CA.dropdown_func(1, "digital_to_roman_test_title", MathRoman.digital_to_roman_test),
		date_to_part_test_title			= CA.dropdown_func(1, "date_to_part_test_title", CA.date_to_part_test),
		cat_add_test_title				= CA.dropdown_func(1, "cat_add_test_title", CA.cat_add_test),
		args_known_structure_title		= CA.dropdown_func(1, "args_known_structure_title", CA.args_known_structure, CA.args_known, "CA.args_known"),
		options_from_mode_title			= CA.dropdown_func(1, "options_from_mode_title", CA.options_from_mode_test,
		{ boxstyle = "boxstyle", width = "80%", text_color="green", alignT="left", alignB="center", margin_all="3em", background_color="yellow", border_color="red", height="2em"} ),
		-- From ControlArgs :
		options_from_args_title			= CA.dropdown_func(1, "options_from_args_title", p.options_from_args_test),
--		versions_manage_test_title		= CA.dropdown_func(1, "versions_manage_test_title", CA.versions.check_versions_test),
		similar_args_test_title			= CA.dropdown_func(1, "similar_args_test_title", CA.similar_args_test),
		levenshtein_test_title			= CA.dropdown_func(1, "levenshtein_test_title", CA.levenshtein_test,
		{ boxstyle = "boxstyle", width = "88%", text_color = "#4488CC", margin_bottom="55px"} ),
		testable_lister_title			= CA.dropdown_func(1, "testable_lister_title", CA.testable_lister, CA.tablim, "CA.tablim", {} ),
		testable_limit_title			= CA.dropdown_func(1, "testable_limit_title", CA.testable_lister, CA.tablim, "CA.tablim",
		{ boxstyle = "boxstyle", levelmaxi = 2, max_n = 2, exclude1 = "hou" } ),
		combined_translations_title		= CA.dropdown_func(1, "combined_translations_title", CA.i18n_lister),
		dummy_languages_title			= CA.dropdown_func(1, "dummy_languages_title", CA.dummy_languages),
		time_format_test_title			= CA.dropdown_func(1, "time_format_test_title", CA.time_format_test),
		wikidata_arbitrary_access_title = CA.dropdown_func(1, "wikidata_arbitrary_access_title", CA.arbitrary_access_test),
	}
	local doc1_txt = doc1_list[doc1_doc]
	res = res .. (doc1_txt or "doc1_txt missing ")
	return res
end -- function p.doc1(frame)

function p.tests(frame)
	-- The tests function uses mode and options to include edit or tests.
	Interprojet.interprojet(frame)
	local res, t = "", ""
	res = res .. p.base(frame, "tests", p.args_known_default)
	CA.args_final = CA.interact_args_final(CA.args_import) -- Interactions between argumensts
	p.form_tests_init()
	p.errors_list = {} -- Table to collect errors and messages
	CA.categories_init() -- initialize the category list
	CA.args_selected, p.selected_autorities, p.authorities_from_args = p.authorities_select()
	CA.args_final = p.interact_args_final(CA.args_selected or CA.args_import) -- Interactions between argumensts
	CA.mode_name = CA.args_final.mode or CA.args_import.mode or CA.args_source.mode or "tests"
	CA.mode_options = CA.options_from_mode(CA.mode_name)
	res = res .. p.trc("tests post inter")
	CA.init_wiki_user_lang()
	CA.time3 = os.clock()
	local res_function = "<br/>\n" .. (p.versions.vn.versionName or "MainModule") .. " " .. (p.versions.vn.versionNumber or "0.0") .. ":" .. (CA.mode_name or "mode ? ") .. ":" .. CA.wiki_lang .. " "
	res_function = res_function .. CA.tam(p.versions.vn.versionName, p.versions.vn.versionDate)
	res = res .. res_function .. " Start:<br>"
	res = res .. p.trc("tests pre form_result")
	res = res .. p.form_result() -- Generate normal wikitext, categories, and others
	res = res .. p.trc("tests post form_result")
	res = res .. p.default_sortkey_to_end(CA.args_final) -- Implement sortkey for category to not disturb it by any other code.
	return res
end -- function p.tests(frame)

return p