« Module:Multilingual » : différence entre les versions

Contenu supprimé Contenu ajouté
Module:Centralizer bypass a bug in viewers.doc_section 20181220 OK.lua
ModuleCentralizer S181222SCi=Simplify use init_central_module 20181221 OK.lua
Ligne 1 :
local p = {} -- The main central module install central libraries and bind the main and its sub-modules
local Central = p -- Save as ModuleCentralizer.lua Module:CentralizerModuleCentralizer bypassget_args_datas() aevents bugthen inmathroman viewers.doc_sectionOK 20181220 OK20181202.lua
--------------------------------------------------|------------------------ typical length --------------------------|
 
p.NOWNOW = { -- in work subtasks for replace on 2018120520181129
{ "2018121020181204", "2018121120181206", "todo", "Rical", "S181210trbS181204uCM", "treebranches -- For each'Begin' soughtupdate CentralManual.xml ReplaceGuideline known.to LaterTactic, onfunc 201811207names ...", },
{ "2018120720181202", "2018121020181204", "todo", "Rical", "S181207CrCS181202tmm", "Module:CentralSchool:For finish'Begin' reciprocalcheck adaptationall withargs, datas, functions, modes, Module:Centralizertests", },
{ "2018120620181130", "2018120720181202", "todo", "Rical", "S181206SCiS181130mgT", "For 'Begin' Simplify function Centralmodes.initget_args_datas(frame,args_known) Central_version,Tactic mode_name,all ...)in one for modes args datas no args_final no origins" },
{ "20181206", "20181207", "todo", "Rical", "S181206tdp", "if langs.select_lang() mises of translation try in deaceasing priority en=50%, es=7%, de=6%, fr=4% see Wivivi" },
{ "20181206", "20181207", "todo", "Rical", "S181206oTc", 'others: ["Tactic"] = "canbenil;nevererror" ', },
{ "20181205", "20181206", "todo", "Rical", "S181205sad", "split modes.get_mode_args_datas in 2 phases modes.get_args then modes.get_mode_datas" },
{ "20181205", "20181206", "todo", "Rical", "S181205CII", "mix Central.init and modes.get_args and function modes.get_mode_args_datas in function modes.Init_mode_args_datas" },
{ "20181205", "20181206", "todo", "Rical", "S181205mgT", "function modes.get_args_datas_tests(t) Tactic all in one for modes args datas no args_final no origins old" },
{ "20181205", "20181205", "NOW", "Rical", "S181205ust", "Module:Centralizer update subtasks list", },
}
-- FAMLTVQDR Tactic only once steps : Frame Mode-from-Frame Args Libraries Translations Versions QITEM Datas Results
p.teststests = "FAMLTVQDR"
 
p.version = { -- Modules dependencies. Dependencias del módulo. Dépendances du module.
["versionName"] = "CentralizerCentral-s-fr",
["versionNumber"] = "1.0.0(181220T09181112T23:0723)",
["versionDate"] = "2018-1211-20T0912T23:0723:00", -- UTC version structure MWMW
["mainDescription"] = "Begin to use",
["functionDescription"] = "first functional support",
["taskDescription"] = "enough advanced to use in CentralSchool OK",
-- p_template_drop_box_name = 'Cuadro desplegable', -- Equivalent templates exist in other wikis
["sought"] = "CentralizerCentral;Centralizer/I18N;Mathroman;TestRequire", -- Sought module and submodules versions
["known"] = "CentralizerCentral;Central-s-fr;Central-14 * Centralizer/I18N;Central/i18n * Mathroman22;Mathroman34", -- Known module and submodules versions
["treebranches"] = { -- ForDone eachon sought. Replace known. Later on20181019 2018112071322
{ "CentralizerCentral", "Central-s-fr", "Central-201714" }, -- upper
{ "Centralizer/I18N", "Central-s-fr", "Central-201814" }, -- median
{ "Mathroman22", "Mathroman34" }, -- lower
}
Ligne 81 ⟶ 73 :
modes = {} -- Library:modes from arguments support on 20130125 in Module:Author, 20130312 in Module:ControlArgs
central_library = {} -- Object:central_library from versions.central_library on 20171211 in Module:Centralizer
-- p_template_drop_box_name = 'Cuadro desplegable', -- Equivalent templates exist in other wikis
-- p_template_drop_box_name = 'Boîte déroulante', -- Modèle:Boîte déroulante for drop_box.form. delete all function tables.
-- p_template_drop_box_name = 'Drop-down box', -- Template: Drop-down box for drop_box.form
-- p_template_drop_box_name = 'Cuadro desplegable', -- Modelo: cuadro desplegable :Boîte déroulante for drop_box.form
tableview = {} -- Object:tableview from 20170208
tab_view = {} -- Object:tab_view from 20170208
Ligne 189 ⟶ 185 :
mathroman.infos = { -- from 20130312
["libname"] = "mathroman", typ = "Library",
libdesc = "The Library:mathroman converts roman to integerdigital numbers and reverse. It also detects errors.",
versfirst = "130312.12:00", verslast = "171221.07:43",
versions = {
Ligne 946 ⟶ 942 :
activity.report_subtasks_list = { -- List of subtasks to report. See "NOWNOW", update
{ "---", "---", "---", "---", "---", "DUPLICATE NOW, in change", },
-- function versioning.antiCrash(options, content_or_func, ...) -- Form the display of a running error. in ModuleCentral 20170902.ModuleCentral 2e no antiCrash ok.lua
-- res = res .. drop_box.new(selector, "versions_antiCrash_tests_title", versions.anti_crash_tests ) -- Tests antiCrash() -- to_debug_on_20170507
{ "2019022720190201", "2019022920190202", "todo", "Rical", "S190227imeS190201ime", "include Lua modules in Wikibase/client/includes/DataAccess/Scribunto/mw.wikibase.lua, see phabtask T41610.", },
{ "2019022720190128", "2019022720190129", "todo", "Rical", "S190227dutS190128cCD", "delete unused tracker in _GCreate MediaWiki:Scribunto/CentralData ARGS,(change IAMO,from MAMO,admin tests_groupsonly)", },
{ "2019022520190126", "2019022720190128", "todo", "Rical", "S190225vtgS190126cCD", "tryCreate graphicsCentral/PageData/CentralData in viewers.try_graph()change --from seeany Macronuser)", },
{ "20190220", "20190225", "todo", "Rical", "S190220obv", "make object viewers.boxviews.form(cssView) from DropBox guided by tables", },
{ "20190217", "20190220", "todo", "Rical", "S190217TMD", "propose Template.DropBox and Module.DropBox to replace Drop-down box, Caja desplegable,Boîte déroulante", },
{ "20190212", "20190217", "todo", "Rical", "S190212eli", "easy https://en.wikisource.org/wiki/Template:Lorem_ipsum", },
{ "20190210", "20190212", "todo", "Rical", "S190210acr", "debug versions.anti_crash() using pcall in modes(frame) + tests", },
{ "20190208", "20190210", "todo", "Rical", "S190208uPD", "PageData change in datas.update_PageData(t) admin only activity.MW_Versions_report T163923+T168726 IF AVAILABLE", },
-- see 4.2 Paramètre "wikidata" https://fr.wikipedia.org/wiki/Aide:Infobox_en_Lua#Param.C3.A8tre_.22wikidata.22
{ "2019020620190124", "2019020820190126", "todo", "Rical", "S190206actS190124bob", "langs.abnormal_char_in_text()Create failsa tobutton debugobject for boxes, like drop_box with: n, states, shapes, keywords, colors", },
{ "2019020320190122", "2019020620190124", "todo", "Rical", "S190203cssS190122tbe", "userestructure Conventionalfor cssa parameters cssviewstructure in edit,Table content,of drop_box,Box infobox,Elements tableviewin viewers.boxviews.. form()", },
{ "2019020120190122", "2019020320190122", "todo", "Rical", "S1902014uMDS190122dut", "Afterdelete 'Begin'unused fullytracker usein _G Module:drop_box fromARGS, es.wikipedia.org/wiki/Módulo:Lista_plegableIAMO, MAMO, tests_groups", },
{ "2019013120190120", "2019020120190122", "todo", "Rical", "S190131ilpS190120vtg", "Aftertry 'Begin'graphics T20180621in Enoughviewers.try_graph() inform-- Centralsee modules for jumps to lang.project URI.Macron", },
{ "2019012920190117", "2019013120190120", "todo", "Rical", "S190129alpS190117obv", "Aftermake 'Begin'object T20180621 Automatic adapt Central modules for langviewers.project URIboxviews.form(cssView)", },
{ "2019012820190115", "2019012920190117", "todo", "Rical", "S190128rlvS190115mMW", "Afteruse 'Begin'Special:PageData FullyCentralData updateT163923+T168726 CentralManual.xmlin Tactic, func names ..activity.MW_Versions_report()", },
{ "2019012720190114", "2019012820190115", "todo", "Rical", "S190127vdfS190114eli", "debugeasy function versionshttps://en.deprecated_function() nil table wikisource.org/wiki/Template: mask it on 20180306Lorem_ipsum", },
{ "2019012420190112", "2019012720190114", "todo", "Rical", "S190124iccS190112acr", "Begin:debug beginversions.anti_crash() tousing integrate pcall changesin frommodes(frame) other+ coderstests", },
{ "2019012320190110", "2019012420190112", "todo", "Rical", "S190123iccS190110uPD", "Begin:automatize updatePageData importantchange Phabricatorin tasksdatas.update_PageData(t) tofor activateactivity.MW_Versions_report() theirIF availabilityAVAILABLE", },
{ "2019012220190109", "2019012320190110", "todo", "Rical", "S190122cJPS190109tac", "Begin:langs.abnormal_char_in_text() informs public Lua-coders Utilisateur:JackPotte [[:fr:Utilisateur:JackPotte|JackPotte fr de es en]]fails", },
{ "2019012020190106", "2019012120190109", "todo", "Rical", "S190120iTNS190106css", "Begin:use informConventional [https://meta.wikimedia.org/wiki/Tech/News#contributecss Techparameters News]cssview aboutin centraledit, modulescontent, begindrop_box, infobox, tableview ... phase", },
{ "2019011920190106", "2019012020190106", "todo", "Rical", "S1190194tglS190106FLI", "Begin:Propose translateto byuse groupsexistant ofInitial languagesin :wikidata. likeNo formatter viet, laos, cambodgia, allways with en, es, fr 1the daysresult.", },
{ "2019011820190104", "2019011920190106", "todo", "Rical", "S190118atrS190104uMD", "After 'Begin:' Askfully translationsuse inModule:drop_box metafrom [https://metaes.wikimediawikipedia.org/wiki/Translation_requests Translation_requests]Módulo:Lista_plegable", },
{ "2019011120190103", "2019011820190104", "todo", "Rical", "S190111aipS190103ilp", "After 'Begin:' whenT20180621 20Enough usedinform cases,Central modules announcefor thatjumps into thelang.project phabtaskURI.", },
{ "2019010420190102", "2019011120190103", "todo", "Rical", "S190104aipS190102alp", "After 'Begin:' whenT20180621 10Automatic used cases,adapt announceCentral thatmodules infor thelang.project phabtaskURI.", },
{ "2018122120190101", "2018122820190102", "todo", "Rical", "S181221s7PS190101rlv", "After 'Begin: search 7 Projects : MediaWikis wikidata' wikipediaFully wikisourcereport wikiquotemodules ?and 3libraries daysversions.", },
{ "2018121420181231", "2018122120190101", "todo", "Rical", "S181214iLCS181231ruc", "After 'Begin: Rical invite 7 Lua-coders : Tpt, Zolo, Od1n, Julien1978, Daehan, VIGNERON' ?report 3all daysviewers.usual_color(t)", },
{ "2018121220181230", "2018121420181231", "todo", "Rical", "S181212uCMS181230vdf", "Fordebug 'Begin'function update CentralManualversions.xmldeprecated_function() Tactic,nil functable names: ...mask it on 20180306", },
{ "2018121020181228", "2018121220181228", "todo", "Rical", "S181210tmmS181228tva", "ForUse 'Begin'tableview.new() checkfor all argstables, datas,search functions, modes, tests.table_end()", }, --
{ "2018121020181226", "2018121120181228", "todo", "Rical", "S181210trbS181226icc", "treebranchesBegin: --begin Forto eachintegrate sought.changes Replacefrom known.other Later on 201811207coders", },
{ "2018120720181225", "2018121020181226", "todo", "Rical", "S181207CrCS181225icc", "Module:CentralSchoolBegin: finishupdate reciprocalimportant adaptationPhabricator withtasks Module:Centralizerto activate their availability", },
{ "2018120620181225", "2018120720181225", "todo", "Rical", "S181206SCiS181225cJP", "For 'Begin': Simplifyinforms functionpublic Central.init(frame,Lua-coders Central_version,Utilisateur:JackPotte mode_name,[[:fr:Utilisateur:JackPotte|JackPotte ...)fr de es en]]", },
{ "2018120620181225", "2018120720181225", "todo", "Rical", "S181206tdpS181225iTN", "ifBegin: langsinform [https://meta.select_lang()wikimedia.org/wiki/Tech/News#contribute misesTech ofNews] translationabout trycentral inmodules deaceasingbegin priority en=50%phase", es=7%, de=6%, fr=4% see Wivivi" },
{ "2018120620181224", "2018120720181225", "todo", "Rical", "S181206oTcS181224tgl", 'others"Begin: ["Tactic"]translate =by "canbenil;nevererror"groups 'of languages : like for viet, laos, cambodgia, allways with en, es, fr 1 days", },
{ "2018120520181224", "2018120620181225", "todo", "Rical", "S181205sadS181224atr", "splitBegin: modes.get_mode_args_datasAsk translations in 2meta phases modes[https://meta.wikimedia.get_argsorg/wiki/Translation_requests then modes.get_mode_datasTranslation_requests]", },
{ "2018120520181217", "2018120620181224", "todo", "Rical", "S181205mgTS181217aip", "functionBegin: modes.get_args_datas_tests(t)when Tactic20 allused incases, oneannounce forthat modesin argsthe datas no args_final no origins oldphabtask", },
{ "2018120520181210", "2018120520181217", "NOWtodo", "Rical", "S181205ustS181210aip", "ModuleBegin:Centralizer updatewhen subtasks10 listused cases, announce that in the phabtask", },
{ "20181204", "20181206", "todo", "Rical", "S181204uCM", "For 'Begin' update CentralManual.xml Guideline to Tactic, func names ..." },
{ "20181202", "20181209", "todo", "Rical", "S181202s7P", "Begin: search 7 Projects : MediaWikis wikidata wikipedia wikisource wikiquote ? 3 days", },
{ "20181202", "20181209", "todo", "Rical", "S181202iLC", "Begin: Rical invite 7 Lua-coders : Tpt, Zolo, Od1n, Julien1978, Daehan, VIGNERON ? 3 days", },
{ "20181202", "20181204", "todo", "Rical", "S181202tmm", "For 'Begin' check all args, datas, functions, modes, tests", },
{ "20181130", "20181202", "todo", "Rical", "S181130mgT", "function modes.get_args_datas(args_known) Tactic all in one for modes args datas no args_final no origins" },
{ "20181128", "20181130", "todo", "Rical", "S181128tmm", "For 'Begin' check all args, datas, functions, modes, tests", },
{ "20181125", "20181128", "todo", "Rical", "S181125CrC", "Module:CentralSchool: finish reciprocal adaptation with Module:Centralizer", },
{ "20181124", "20181125", "todo", "Rical", "S181124n13", "Keep only need='default' with versatile one_arg, one_mode and prop_default" },
{ "20181124", "20181125", "todo", "Rical", "S181124Dng", "update function modes.get_args_datas(args_known) following its Tactic" },
{ "20181123", "20181124", "todo", "Rical", "S181123n13", "Upate MathRoman tests to better update its functions" },
{ "20181123", "20181123", "NOW", "Rical", "S181123ust", "Module:Centralizer update subtasks list", },
--
-- Automatic shift of below "todo" subtasks.
Ligne 1 023 ⟶ 1 025 :
{ "20170808", "20170810", "todo", "Rical", "S170707icc", "Begin: begin to integrate changes from other coders", },
{ "20170808", "20170810", "todo", "Rical", "S170707icc", "Begin: update important Phabricator tasks to activate their availability", },
-- Inform after 'Create Begin'
{ "20181209", "20181209", "todo", "Rical", "S170702cJP", "Begin: informs public Lua-coders Utilisateur:JackPotte [[:fr:Utilisateur:JackPotte|JackPotte fr de es en]]", },
{ "20181209", "20181209", "todo", "Rical", "S170702atr", "Begin: Ask translations in meta [https://meta.wikimedia.org/wiki/Translation_requests Translation_requests]", },
{ "20181209", "20181209", "todo", "Rical", "S181209iTNS170604iTN", "Begin: inform [https://meta.wikimedia.org/wiki/Tech/News#contribute Tech News] about central modules begin phase", },
-- S170604iTN : Tech/News#contribute : central, begin to use, efficiency, ask lua coders ?
-- Debug to support Create Begin's group
Ligne 1 082 ⟶ 1 085 :
ccc = {}, -- To communicate and compute between cases
rowGroup = {},
-- track_on == "details",
}
local function tab_view_rough_shifter(tab_view) -- Monitor and shift tasks.
Ligne 1 389 ⟶ 1 391 :
headers_class = "wikitable alternative center sortable",
rowGroup = {},
-- track_on == "details"true,
}
-- from MediaWiki 1.30.0-wmf.4 (3248a17) 22:41, 7 June 2017
Ligne 1 541 ⟶ 1 543 :
datas_update_Special_PageData_header = "site; temps de version; identificateur de version; heure de vue",
datas_get_item_report_title = "datas.get_item_report() Rapporte les données de mw.wikibase pour la page ou tout autre élément.",
datas_get_item_report_headers = "mot-clé; type; propriété; défaut; valeur"; -- br
-- Messages et erreurs divers
datas_no_args_Wikidata_err = "Erreur interne : Module sans table d'arguments Wikidata.",
Ligne 1 569 ⟶ 1 570 :
datas_update_Special_PageData_header = "Ort; Versionszeit; Versionskennung; Stunde der Sicht",
datas_get_item_report_title = "datas.get_item_report() Gibt mw.wikibase-Daten für die Seite oder einen anderen Artikel aus.",
datas_get_item_report_headers = "Stichwort; Art; Eigentum; Standard; Wert"; -- de
-- Verschiedene Nachrichten und Fehler
datas_no_args_Wikidata_err = "Interner Fehler: Modul ohne Wikidata-Argumenttabelle.",
Ligne 1 601 :
datas_update_Special_PageData_header = "site; version time; version identifier; seen hour",
datas_get_item_report_title = "datas.get_item_report() Reports datas from mw.wikibase for the page or any other item.",
datas_get_item_report_headers = "keyword; type; property; default; value"; -- en
-- Miscellaneous warnings and errors
datas_no_args_Wikidata_err = "Error: Module without Wikidata arguments table.",
Ligne 1 633 ⟶ 1 632 :
datas_update_Special_PageData_header = "sitio; tiempo de versión; identificador de versión; tiempo visto",
datas_get_item_report_title = "datas.get_item_report() Informes de datos de mw.wikibase para la página o cualquier otro elemento.",
datas_get_item_report_headers = "palabra clave; tipo; propiedad; defecto; valor"; -- es
-- Diversos mensajes y errores
datas_no_args_Wikidata_err = "Error: Módulo sin argumentos Wikidata tabla.",
Ligne 1 666 ⟶ 1 664 :
datas_update_Special_PageData_header = "site; temps de version; identificateur de version; heure de vue",
datas_get_item_report_title = "datas.get_item_report() Rapporte les données de mw.wikibase pour la page ou tout autre élément.",
datas_get_item_report_headers = "mot-clé; type; propriété; défaut; valeur"; -- fr
-- Messages et erreurs divers
datas_no_args_Wikidata_err = "Erreur interne : Module sans table d'arguments Wikidata.",
Ligne 1 694 ⟶ 1 691 :
 
datas_get_item_report_title = "datas.get_item_report() Rapporte les données de mw.wikibase pour la page ou tout autre élément.",
datas_get_item_report_headers = "kulcsszó; típus; ingatlan; alapértelmezett; érték"; -- hu
-- Messages et erreurs divers
datas_no_args_Wikidata_err = "Erreur interne : Module sans table d'arguments Wikidata.",
Ligne 1 722 ⟶ 1 718 :
datas_update_Special_PageData_header = "địa điểm; thời gian phiên bản; định danh phiên bản; thấy giờ",
datas_get_item_report_title = "datas.get_item_report() Báo cáo dữ liệu mw.wikibase cho trang hoặc bất kỳ mục nào khác.",
datas_get_item_report_headers = "từ khóa; kiểu; bất động sản; mặc định; giá trị"; -- vi
-- Các thông báo và lỗi khác nhau
datas_no_args_Wikidata_err = "Lỗi nội bộ: Mô-đun không có bảng đối số Wikidata.",
Ligne 1 877 ⟶ 1 872 :
end -- local one_arg = function datas.one_prop(one_arg) -- Get datas from mwwikibase for one property of the page.
 
function datas.get_item(args_known, QITEM) -- Get datas from mw.wikibase for the page. FAMLTVQDR
-- from 2016-08-16 ModuleCentral 3a lua_table.to_list.lua
local args_known = args_known or modes.args_known or p.args_known or {} -- optional value from p.args_known = {...}
Ligne 1 907 ⟶ 1 902 :
end -- local prop, props = datas.get_item(args_known, QITEM) -- Get datas from mw.wikibase for the page.
 
function datas.get_item_report(t) -- datas.get_item() Report datas from mw.wikibase
-- datas_get_item_report_title = "datas.get_item_report() Rapporte les données de mw.wikibase pour la page ou tout autre élément.",
function datas.get_item_report(t) -- datas.get_item() Report datas from mw.wikibase datas_get_item_report
local memo = viewers.save_configs("datas.get_item_report") -- Save global configuration before eventual changes.
local t = t or "\n* <b>datas.get_item_report(t)</b>: Report datas from mw.wikibase"
Ligne 1 924 ⟶ 1 918 :
test_group = sortprops, -- Use default cases.
rowGroup = {},
title_memo = "datas_get_item_report_titlemodes_args_known_report_title", -- Report datas from mw.wikibase",
headers = "datas_get_item_report_headersmodes_args_known_report_headers", -- "keyword; value; type; need; keyword; syn; property; by default; valueformat; source",
headers = "keyword; value; type; property; default; format",
headers_class = "wikitable alternative center sortable",
form_one_case = function(case) -- Convert a case from test_group to rowGroup.
return { case.keywordkey, case.val, case.typ, case.propneed, case.prop_defaultkeyword, case.syn, case.prop, case.format, } end,
headers = "key; val; typ; need; keyword; syn; prop; format",
}
t = t .. tableview.new(tab_view) -- Runs tests cases and formats a table view with lines and columns.
Ligne 2 007 ⟶ 2 001 :
headers = "key;val",
rowGroup = {},
-- track_on == "details",
}
function tab_view.form_one_case(case) -- Convert a case from test_group to rowGroup.
Ligne 2 483 ⟶ 2 476 :
headers_class = "wikitable alternative center sortable",
rowselect = selector,
rowGroup = {}, -- tests or tab_view.test_group or
-- track_on == "details",
}
function tab_view.form_one_case(case) -- Convert a case from test_group to rowGroup.
Ligne 2 628 ⟶ 2 620 :
return t
end -- function langs.main_i18n_languages_list()
 
langs.Central_version = "Central-s-fr" -- To adapt the version of Module:Centralizer in any translated text.
langs.default_user_lang = "en" -- To adapt the version of Module:Centralizer in any translated text.
-- waiting T68051 Central modules need the user language to display errors and category names
 
function langs.init_content_page_user_lang(content_lang, page_lang, user_lang)
Ligne 2 683 ⟶ 2 679 :
{ content_lang = "fr", user_lang = "es", sought = "tests", },
},
headers = "langs_selectLang_test_headers",
-- headers = "Wiki language; User language; Sought language; Selected language; Example",
rowGroup = {},
-- track_on == "details",
}
function tab_view.form_one_case(case) -- Convert a case from test_group to rowGroup.
Ligne 2 831 ⟶ 2 825 :
kind = "projects", -- MediaWiki or projects
typ = "err",
rowGroup = {}, -- tests or tab_view.test_group or
-- track_on == "details",
}
function tab_view.form_one_case(case) -- Convert a case from test_group to rowGroup.
Ligne 2 943 ⟶ 2 936 :
kind = "projects", -- MediaWiki or projects
typ = "err",
rowGroup = {}, -- tests or tab_view.test_group or
-- track_on == "details",
}
function tab_view.form_one_case(case) -- Convert a case from test_group to rowGroup.
Ligne 3 029 ⟶ 3 021 :
headers = " lang; isTag; isLang; isBuilt; langname; native ", --
rowGroup = {},
-- track_on == "details",
}
function tab_view.form_one_case(case) -- Convert a case from test_group to rowGroup.
Ligne 3 040 ⟶ 3 031 :
-- local isLang = mw.language.isSupportedLanguage(lang)
local isBuilt = mw.language.isValidBuiltInCode(lang)
local space_name = tostring(mw.site.namespaces.Module.name)
return { lang, isTag, tostring(isLang), isBuilt, langname, native, }
return { lang, isTag, tostring(isLang), isBuilt, langname, native, space_name, }
end
t = t .. tableview.new(tab_view) -- Runs tests cases and formats a table view with lines and columns.
Ligne 3 376 ⟶ 3 368 :
local tab_view = { -- Group datas and options for a table view with lines and columns.
test_group = {
-- { "Simple table", { 123, "abc", ["key"] = "txt" }, },
-- { "All types transmited", { "name", 111, true, false, { 789, "xyz"}, function()end }, },
-- { "10 values in the table", { "a", "b", "c", "d", "e", "f", "g", "h", "i9", "j10" }, },
{ "Any number of values", {
"a", "b", "c", "d", "e", "f", "g", "h", }"i09", }"j10",
{ "Any number of values", { "a", "b", "c", "d", "e", "f", "g", "h", "i09i19", }, }"j20",
{ "Any number of values", { "a", "b", "c", "d", "e", "f", "g", "h", "i09i29", "j10j30", }, },
{ "Any number of values", { "a", "b", "c", "d", "e", "f", "g", "h", "i09i39", "j10j40", "k11", }, },
"a", "b", "c", "d", "e", "f", "g", "h", "i49", "j50",
"a", "b", "c", "d", "e", "f", "g", "h", "i59", "j60" }, },
},
title_memo = "luaTable_toList_tests_title", -- "lua_table.to_list() Return a list from a Lua table.",
headers = "luaTable_toList_tests_headers", -- "Tested case; Input table, rough_view; Output list",
headers_class = "wikitable alternative center sortable",
rowGroup = {},
-- track_on == "details",
}
function tab_view.form_one_case(case) -- Convert a case from test_group to rowGroup.
Ligne 3 433 ⟶ 3 425 :
headers = "langs_selectLang_test_headers", -- "stringList; pattern; plain; result"
headers = "stringList; pattern; plain; result",
rowGroup = {},
-- track_on == "details",
}
function tab_view.form_one_case(case) -- Convert a case from test_group to rowGroup.
Ligne 3 651 ⟶ 3 641 :
headers = "luaTables_count_all_types_values_headers", -- "Tested case; Input table, rough_view; Output list",
headers = "Tested table; Function to count; Kind of count; Resulting counts",
rowGroup = {},
-- track_on == "details",
}
function tab_view.form_one_case(case) -- Convert a case from test_group to rowGroup RIC05900470
Ligne 3 967 ⟶ 3 955 :
mathroman_roman2int_tests_headers = "Nombre romain; Valeur décimale; Correct; Erreur(s)",
mathroman_int2roman_test_title = "mathroman.int2roman() Test des nombres décimaux en nombres romains",
mathroman_int2roman_tests_headers = "Nombre romaindécimal; entierValeur résultantromaine; attenduCorrect; Erreurs; raisonErreur(s)", -- br fr
mathroman_int_is_not_integer_err = "Le nombre non entier <b>%1</b> n'est pas convertible en nombre romain",
mathroman_int_is_not_number_err = "La valeur <b>%1</b> n'est pas un nombre convertible en nombre romain",
Ligne 3 986 ⟶ 3 974 :
mathroman_roman2int_tests_headers = "Römische Nummer; Dezimalwert; Richtig; Error (s)",
mathroman_int2roman_test_title = "mathroman.int2roman() Test von Dezimalzahlen in römischen Zahlen",
mathroman_int2roman_tests_headers = "Römische ZahlDezimalzahl; resultierendeRömischer GanzzahlWert; erwartetRichtig; Fehler;Error Grund(s)", -- de
mathroman_int_is_not_integer_err = "Das nicht ganzzahlige <b>%1</b> ist nicht in römische Zahl umwandelbar",
mathroman_int_is_not_number_err = "Der Wert <b>%1</b> ist keine Zahl, die in eine römische Zahl umgewandelt werden kann",
Ligne 4 005 ⟶ 3 993 :
mathroman_roman2int_tests_headers = "Roman number; Digital value; Correct; Error(s)",
mathroman_int2roman_test_title = "mathroman.int2roman() Test digital numbers to roman numbers",
mathroman_int2roman_tests_headers = "RomanDigital number; resultingRoman integervalue; expectedCorrect; errors; reasonError(s)", -- en
mathroman_int_is_not_integer_err = "The not integer number <b>%1</b> is not convertible to Roman numeral",
mathroman_int_is_not_number_err = "The value <b>%1</b> is not a convertible number to Roman numeral",
Ligne 4 024 ⟶ 4 012 :
mathroman_roman2int_tests_headers = "Número romano; Valor digital; Corregido; Error(s)",
mathroman_int2roman_test_title = "mathroman.int2roman() Prueba de números decimales a números romanos",
mathroman_int2roman_tests_headers = "Número romano;decimal, enteroValor resultanteromana; esperadoCorrecto; errores; razónError(es),", -- es
mathroman_int_is_not_integer_err = "El no entero <b>%1</b> no se puede convertir en número romano",
mathroman_int_is_not_number_err = "El valor <b>%1</b> no es un número y no se puede convertir en número romano",
Ligne 4 043 ⟶ 4 031 :
mathroman_roman2int_tests_headers = "Nombre romain; Valeur décimale; Correct; Erreur(s)",
mathroman_int2roman_test_title = "mathroman.int2roman() Test des nombres décimaux en nombres romains",
mathroman_int2roman_tests_headers = "Nombre romaindécimal; entierValeur résultantromaine; attenduCorrect; Erreurs; raisonErreur(s)", -- br fr
mathroman_int_is_not_integer_err = "Le nombre non entier <b>%1</b> n'est pas convertible en nombre romain",
mathroman_int_is_not_number_err = "La valeur <b>%1</b> n'est pas un nombre convertible en nombre romain",
Ligne 4 062 ⟶ 4 050 :
mathroman_roman2int_tests_headers = "Római szám; Decimális érték; helyes; Hiba (k)",
mathroman_int2roman_test_title = "mathroman.int2roman() A decimális számok vizsgálata római számokban",
mathroman_int2roman_tests_headers = "RómaiTizedes szám,; ennekRómai eredményekéntérték; azhelyes; egészHiba szám, a várható, a hibák, az ok(k)", -- hu
mathroman_int_is_not_integer_err = "A nem egész <b>%1</b> nem konvertálható a római számra",
mathroman_int_is_not_number_err = "A <b>%1</b> érték nem egy szám, amely átváltható egy római számra",
Ligne 4 081 ⟶ 4 069 :
mathroman_roman2int_tests_headers = "Số La Mã; Giá trị thập phân; chính xác; Lỗi",
mathroman_int2roman_test_title = "mathroman.int2roman() Kiểm tra các số thập phân trong số La Mã",
mathroman_int2roman_tests_headers = "Số Lathập phân; kếtGiá quảtrị La số nguyên; dựchính kiếnxác; lỗi; lý do", -- vi
mathroman_int_is_not_integer_err = "Số nguyên <b>%1</b> không thể chuyển đổi thành số La Mã",
mathroman_int_is_not_number_err = "Giá trị <b>%1</b> không phải là số có thể chuyển đổi thành số La Mã",
Ligne 4 197 ⟶ 4 185 :
return v, errs
end -- v, errs = mathroman.int2roman(int) -- Convert an integer to a roman number
 
mathroman.int2romanTests = { -- Autotest cases to validate the mathroman library at MediaWiki level.
-- each test_case defines a name, a function, an input, an output. See also viewers.strTestCase. 8 - 1 = 7 + 8 = 15 cases
{ ["int"] = -10, ["expect"] = "X", ["reason"] =}, -- "Forbiden negative value" },
{ ["int"] = 0, ["expect"] = "0", ["reason"] =}, -- "Forbiden null value" },
{ ["int"] = 1, ["expect"] = "I", ["reason"] =}, -- "Normal 1 digitcurrent value" },
{ ["int"] = 11, ["expect"] = "XI", ["reason"] =}, -- "Normal 2 digitcurrent value" },
{ ["int"] = 111, ["expect"] = "CXI", ["reason"] =}, -- "Normal 3 digitcurrent value" },
{ ["int"] = 1111, ["expect"] = "MCXI", ["reason"] =}, -- "Normal 4 digitcurrent value" },
{ ["int"] = "19", ["expect"] = "IXX", ["reason"] = "Converted string value" }, -- "string value"
{ ["int"] = 4999, ["expect"] = "MMMMCMXCIX" }, ["reason"] =-- "Highterlast limit of classic roman numbersvalue" },
{ ["int"] = 5000, ["expect"] = "0", ["reason"] =}, "Smaller-- too big"value classic> roman4999 numberserror" },
}
 
Ligne 4 218 ⟶ 4 205 :
function mathroman.int2roman_test(t) -- Unitary tests of mathroman.int2roman
local memo = viewers.save_configs("mathroman.int2roman_test") -- Save global configuration before eventual changes.
local t = t or "\n* <b>mathroman.int2roman(t)</b> Test integerdigital to roman numbers."
local group = {}
for i, one_test in pairs(mathroman.int2romanTests) do -- apply the tests cases
one_test["result"], one_test["errs_rom"] = mathroman.int2roman( tonumber(one_test[".int"]) )
t = t .. "\n* one_test : " .. viewers.ta("one_test.int", one_test.int ) .. viewers.ta("one_test.expect", one_test.expect ) .. viewers.ta("one_test.result", one_test.result )
one_test["val_int"], one_test["err_int"] = mathroman.roman2int(one_test["result"]) -- DEBUG : function mathroman.roman2int() can fail without blocking page.
one_test["errors"] = one_test["errs_rom"] .. ", " .. one_test["err_int"]
t = t .. "\n* one_test : " .. viewers.ta("integer input", one_test["int"] ) .. viewers.ta("expected", one_test["expect"] ) .. viewers.ta("roman result", one_test["result"] )
table.insert(group, one_test)
end
local tab_view = { -- Group datas and options for a table view with lines and columns.
title_memo = "mathroman_int2roman_test_title", -- "mathroman.int2roman() Test integerdigital numbers to roman numbers"
test_group = group,
form_one_case = function(case) -- Convert a case from test_group to rowGroup.
local valX, errs = mathroman.int2roman(case["int"]) -- DEBUG : mathroman.roman2int() can fail without blocking page.
return { case["int"], tostring(case["result"]), tostring(case["expect"]), case["errors"], case["reason"], }
local valX, errsX = mathroman.int2roman(wordX) -- DEBUG : function mathroman.roman2int() can fail without blocking page.
return { case["int"], wordX, valX, viewers.form9tests("errs", errs) .. viewers.form9tests("errsX", errsX) } -- viewers.form9tests(ref, ...) -- Formats reference_key;v1;v2;v3;... for tests.
end,
headers = "mathroman_int2roman_tests_headers", -- "Digital number; Roman value; Correct; Error(s)"
headers = "roman input; resulting roman; expected; errors; reason", -- to try
headers = "mathroman_int2roman_tests_headers", -- "roman input; resulting roman; expected; errors; reason"
headers_class = "wikitable alternative center sortable",
rowGroup = {},
-- track_on == "details",
}
t = t .. tableview.new(tab_view) -- Runs tests cases and formats a table view with lines and columns.
Ligne 4 315 ⟶ 4 300 :
mathroman.roman2intTests = { -- Autotest cases to validate the mathroman library at MediaWiki level.
-- each test_case defines a name, a function, an input, an output. See also viewers.strTestCase. 6 cases
{ ["rom"] = "-X", ["expect"] = 10, ["reason"] = "Forbiden negative valuemathroman_char_X_in_N_err---1-" },
{ ["rom"] = "0", ["expect"] = 0, ["reason"] = "Converted null value" },
{ ["rom"] = "XIA", ["expect"] = 11, ["reason"] = "character A in 3" },
{ ["rom"] = "", ["expect"] = 0, ["reason"] = "empty value" },
{ ["rom"] = "MCXI", ["expect"] = 1111, ["reason"] = "normal integer decreasing" },
{ ["rom"] = "IXCMXIJ", ["expect"] = 12, ["reason"] = "Forbiden 3 increasing characters" },
{ ["rom"] = "XIJXJI", ["expect"] = 12, ["reason"] = "normal endX inY JZ" },
{ ["rom"] = "XJI", ["expect"] = 12, ["reason"] = "Forbiden J before endmathroman_char_increase_err" },
{ ["rom"] = "VLD", ["expect"] = 445, ["reason"] = "normal integer decreasing" },
{ ["rom"] = "IXC", ["expect"] = 89, ["reason"] = "null value" },
{ ["rom"] = "MMMMCMXCIX", ["expect"] = 4999, ["reason"] = "Highter limit of classic roman numbers" },
{ ["rom"] = "MMMMM", ["expect"] = 5000, ["reason"] = "Smaller too big classic roman numbersmathroman_J_before_end_err-XJI" },
{ ["rom"] = "MMMMMYJXC", ["expect"] = 5089, ["reason"] = "several errors;mathroman_J_before_end_err;mathroman_char_increase_err;mathroman_char_X_in_N_err-Y-6;mathroman_greater_4999_err;" },
}
 
function mathroman.roman2int_tests(t) -- Tests of main central modules -- S170606rmn
local memo = viewers.save_configs("mathroman.roman2int_tests") -- Save global configuration before eventual changes.
local t = t or "\n* <b>mathroman.roman2int(t)</b> Test roman to integerdigital numbers. " .. viewers.form9user("mathroman_roman2int_tests_title")
local group = {}
for i, one_test in pairs(mathroman.roman2intTests) do -- apply the tests cases
one_test["result"], one_test["err_int"] = mathroman.roman2int( tostring(one_test[".rom"]) ) -- DEBUG : function mathroman.roman2int() can fail without blocking page.
t = t .. "\n* one_test : " .. viewers.ta("one_test.rom", one_test.rom ) .. viewers.ta("one_test.expect", one_test.expect ) .. viewers.ta("one_test.result", one_test.result )
one_test["val_rom"], one_test["errs_rom"] = mathroman.int2roman(one_test["result"]) -- DEBUG : function mathroman.roman2int() can fail without blocking page.
one_test["errors"] = one_test["err_int"] .. ", " .. one_test["val_rom"]
t = t .. "\n* one_test : " .. viewers.ta("roman input", one_test["rom"] ) .. viewers.ta("expected", one_test["expect"] ) .. viewers.ta("roman result", one_test["result"] )
table.insert(group, one_test)
end
local tab_view = { -- Group datas and options for a table view with lines and columns.
title_memo = "mathroman_roman2int_tests_title", -- "mathroman.roman2int() Test roman to integerdigital numbers"
test_group = group,
form_one_case = function(case) -- Convert a case from test_group to rowGroup.
local valX, errs = mathroman.roman2int(case["rom"]) -- DEBUG : function mathroman.roman2int() can fail without blocking page.
return { case["rom"], case["result"], case["expect"], case["errors"], case["reason"], }
local wordX, errsX = mathroman.int2roman(valX) -- DEBUG : function mathroman.roman2int() can fail without blocking page.
return { case["rom"], tostring(valX), tostring(wordX), tostring(errs) .. ", " .. tostring(errsX), }
end,
headers = "mathroman_roman2int_tests_headers", -- "Roman number; Digital value; Correct; Error(s)"
headers = "roman input; resulting integer; expected; errors; reason", -- to try
headers_class = "wikitable alternative center sortable",
rowGroup = {},
-- track_on == "details",
}
t = t .. tableview.new(tab_view) -- Runs tests cases and formats a table view with lines and columns.
Ligne 5 212 ⟶ 5 195 :
-- - - - ------------------ - - - - ---------------------------------
 
modes.options_for_modes = { -- default options_for_modes FAMLTVQDR
["read"] = " box1 ",
["edit"] = " box1 docdef docline docsrc docdata catview docview : ",
Ligne 5 273 ⟶ 5 256 :
local tab_view = { -- Group datas and options for a table view with lines and columns.
test_group = args_known,
rowGroup = {},
form_one_case = function(case) -- Convert a case from test_group to rowGroup.
return { viewers.value(case.key), case.bind, case.typ, case.need, case.keyword, case.prop, case.format, }
Ligne 5 280 ⟶ 5 264 :
headers = "modes_bind_args_known_report_headers",
headers = "key;bind;typ;need;keyword;prop;format",
rowGroup = {},
-- track_on == "details",
}
t = t .. "<br/>" .. tableview.new(tab_view) -- Runs tests cases and formats a table view with lines and columns.
Ligne 5 310 ⟶ 5 292 :
local tab_view = { -- Group datas and options for a table view with lines and columns.
test_group = args_group, -- tab_view.test_group or
rowGroup = {},
title_memo = "modes.args_known_report(t) Report of main known args. **",
title_memo = "modes_args_known_report_title", -- "modes.args_known_report(t) Rapport des principaux arguments connus.",
Ligne 5 316 ⟶ 5 299 :
return { (case.keyword), (case.val or "-"), case.typ, case.need, case.keyword, case.syn, case.prop, case.format, case.src, }
end,
rowGroup = {},
-- track_on == "details",
}
t = t .. "<br/>" .. tableview.new(tab_view) -- Runs tests cases and formats a table view with lines and columns.
Ligne 5 865 ⟶ 5 846 :
counts.known = counts.known+1 ; tt = tt .. viewers.ta(argmt.src, counts.known)
end
if args_knownmodes.args_import[argmt.keyword] then
argmt.val = args_knownmodes.args_import[argmt.keyword] ; argmt.src = "import" ;
counts[argmt.src] = counts[argmt.src]+1 ; tt = tt .. viewers.ta(argmt.src, counts[argmt.src])
end
Ligne 5 873 ⟶ 5 854 :
counts[argmt.src] = counts[argmt.src]+1 ; tt = tt .. viewers.ta(argmt.src, counts[argmt.src])
end
if args_knownmodes.args_final[argmt.keyword] then
argmt.val = args_knownmodes.args_final[argmt.keyword] ; argmt.src = "final" ;
counts[argmt.src] = counts[argmt.src]+1 ; tt = tt .. viewers.ta(argmt.src, counts[argmt.src])
end
Ligne 6 719 ⟶ 6 700 :
end -- function modes.init_modes_translate_events(frame, Central_version, mode_name, args_known, options_for_modes, QITEM)
 
-- p_template_drop_box_name = 'Cuadro desplegable', -- Equivalent templates exist in other wikis
-- { "20181204", "20181204", "todo", "Rical", "S181204SCi", "For 'Begin' function modes.get_args_datas(args_known) Simplify Central.init" },
-- p_template_drop_box_name = 'Boîte déroulante', -- Modèle:Boîte déroulante for drop_box.form
-- { "20181203", "20181204", "todo", "Rical", "S181203mad", "For 'Begin' rename function modes.get_args_datas( to modes.get_mode_args_datas( To simplify Central.init" },
-- p_template_drop_box_name = 'Drop-down box', -- Template: Drop-down box for drop_box.form
-- function modes.get_mode_args_datas(args_known) -- S181203mad To simplify Central.init S181204SCi
-- p_template_drop_box_name = 'Cuadro desplegable', -- Modelo: cuadro desplegable :Boîte déroulante for drop_box.form
function modes.get_args_datas(args_known) -- Applies the Tatic for (err, wng, cat) S181124Dng FAMLTVQDR
-- ["QITEM"] = { ["typ"] = "dat", ["keyword"] = "QITEM", ["prop"] = "QITEM", ["prop_default"] = "Q307", }, -- Galilée
-- datas.entity = mw.wikibase.getEntity(datas.QITEM or datas.default_item or "Q34743" ) -- Rudyard Kipling
-- Tactic : p.args_known redefines arguments from submodules then avoid their tactics.
-- Tactic : if the ["QITEM"] = don't exists do not query datas.item.
-- Tactic : if the ["keyword"] = "QITEM" don't exists do not query datas.item.
-- Tactic : if ["QITEM"] exists the decreasing priorities are : .
-- Tactic : if ["prop"] = "QITEM" try to query mw.wikibase.getEntity(...)
-- Tactic : then if not datas.item then try ["prop_default"] = "Q307" -- Galilée
-- Tactic : no other priority. Tactic todo
local args_known = args_known or modes.args_known or p.args_known or {}
local args_known_local = mw.clone(args_known)
local group, one_data, one_QITEM = {}, {}, {}
for i, one_arg in pairs(args_known_local) do
if not one_arg.prop then one_arg.prop = one_arg.prop_default end
if one_arg.prop then
one_arg.prop = datas.one_prop(one_arg)
one_arg["val"] = one_arg.prop
-- function datas.one_prop(one_arg) -- Get datas from mwwikibase for one property of the page.
-- elseif one_arg["prop"] == "labeluser" then one_arg["val"] = mw.wikibase.getLabelByLang(datas.QITEM, langs.user_lang ) -- Rudyard Kipling
-- return one_arg
end
if one_arg["QITEM"] then
-- function datas.get_item(args_known, QITEM) -- Get datas from mw.wikibase for the page.
-- datas.props = props
-- datas.prop = prop
-- return prop, props
datas.prop, datas.props = datas.get_item(args_known, one_arg["QITEM"]) -- Get datas from mwwikibase for one property of the page. function datas.get_item(
if not datas.props then
one_arg["QITEM"] = one_arg.prop_default
datas.prop, datas.props = datas.get_item(args_known, one_arg["QITEM"]) -- function datas.get_item(args_known, one_arg["QITEM"])
one_arg["val"] = datas.prop
end
if datas.props then one_arg["val"] = datas.props end
end
end -- modes.get_args_datas(t) is empty
return args_known
end -- args_known = modes.get_args_datas(args_known)
 
modes.get_args_datas_tests_group = { -- Table of the definitions of all known arguments at module level.
["QITEM"] = { ["typ"] = "dat", ["keyword"] = "QITEM", ["prop"] = "Q1001", ["prop_default"] = "Q307", }, -- Galilée
["label"] = { ["typ"] = "dat", ["keyword"] = "label" , ["prop"] = "label", ["prop_default"] = "label", },
["mode"] = { ["typ"] = "mode", ["keyword"] = "mode", ["prop"] = "edit", ["Tactic"] = "canbenil;nevererror", ["prop_default"] = "read", },
["labelcontent"] = { ["typ"] = "arg", ["keyword"] = "labelcontent",["prop"] = "labelcontent", ["prop_default"] = "Q307", }, -- Galilée
["labelpage"] = { ["typ"] = "arg", ["keyword"] = "labelpage", ["prop"] = "labelpage", ["prop_default"] = "Q307", }, -- Galilée
["labeluser"] = { ["typ"] = "arg", ["keyword"] = "labeluser", ["prop"] = "labeluser", ["prop_default"] = "Q307", }, -- Galilée
["labelbylang"] = { ["typ"] = "arg", ["keyword"] = "labelbylang",["prop"] = "labelbylang", ["prop_default"] = "Q307", }, -- Galilée
["birthyear"] = { ["typ"] = "dat", ["keyword"] = "birthyear", ["prop"] = "P569", ["format"] = "year", ["prop_default"] = "P570", }, -- birthyear else deathyear
["deathyear"] = { ["typ"] = "dat", ["keyword"] = "birthyear", ["prop"] = "P570", ["format"] = "year", ["prop_default"] = "P569", }, -- deathyear else birthyear
["birthyear"] = { ["typ"] = "err", ["keyword"] = "birthyear", ["prop"] = "WANTED ERROR", ["format"] = "year", ["prop_default"] = "P570", }, -- ERROR deathyear
-- Galilée (Q307), Victor Hugo (Q535), Aristote (Q868), Albert Einstein (Q937), Mohandas Karamchand Gandhi (Q1001), Christophe Colomb (Q7322),
}
 
-- { "20181130", "20181203", "todo", "Rical", "S181130mgT", "function modes.get_args_datas_tests(t) Tactic all in one for modes args datas no args_final no origins" },
function modes.get_args_datas_tests(t) -- Test: events.need_tactic for (err, wng, cat)
local memo = viewers.save_configs("modes.get_args_datas_tests") -- Save global configuration before eventual changes.
local args_known = args_known or modes.args_known or p.args_known or {}
local t = t or "\n* <b>modes.get_args_datas(t)</b> -- Test: all kinds of events (err, wng, cat): "
local group = {}
for i, one_event in pairs(modes.get_args_datas_tests_group) do
-- TO TAKE IN ACCOUNT
-- datas.prop, datas.props = datas.get_item(args_known, one_arg["QITEM"]) -- Get datas from mwwikibase for one property of the page. function datas.get_item(
-- t = t .. viewers.ta("keyword", one_event.keyword) .. viewers.ta("prop", one_event.prop) .. viewers.ta("prop_default", one_event.prop_default)
table.insert(group, one_event)
end -- modes.get_args_datas(t) is empty
local tab_view = { -- Group datas and options for a table view with lines and columns.
test_group = group, -- Use default cases
title_memo = "events_one_event_test_title", -- "events.all_kinds_test() Test: all kinds of events (err, wng, cat)",
headers_class = "wikitable alternative center sortable",
headers = "events_all_kinds_tests_headers", -- "typ;key;idargs;result"
headers = " arg name; type; property; prop_default; value",
form_one_case = function(case) -- Convert a case from test_group to rowGroup.
return { tostring(case.keyword), tostring(case.typ), tostring(case.prop), tostring(case.prop_default) , tostring(case.val) }
end,
rowGroup = {},
-- track_on = true,
}
-- res = res .. drop_box.new(selector, "modes_get_args_datas_tests_title", modes.get_args_datas_tests)
t = t .. tableview.new(tab_view) -- Formats a table view with lines and columns.
viewers.restore_configs(memo, "modes.get_args_datas_tests") -- Restore global configurations after eventual changes.
return t
end -- t = t .. modes.get_args_datas_tests(t) -- Tests
 
function modes.Init_mode_args_datas_tests(t) -- p.teststests = "FAMLTVQDR"
local memo = viewers.save_configs("modes.Init_mode_args_datas_tests") -- Save global configuration before eventual changes.
local args_known = args_known or modes.args_known or p.args_known or {}
local t = t or "\n* <b>modes.Init_mode_args_datas_tests(t) -- p.teststests</b> -- Test: all kinds of events (err, wng, cat): "
-- res = res .. drop_box.new(selector, "modes_Init_args_datas_tests_title p.teststests **", modes.Init_mode_args_datas_tests)
-- res = res .. drop_box.new(selector, "modes_get_args_datas_tests_title", modes.get_args_datas_tests)
local group = {}
for i, one_event in pairs(modes.get_args_datas_tests_group) do
-- TO TAKE IN ACCOUNT
-- datas.prop, datas.props = datas.get_item(args_known, one_arg["QITEM"]) -- Get datas from mwwikibase for one property of the page. function datas.get_item(
-- t = t .. viewers.ta("keyword", one_event.keyword) .. viewers.ta("prop", one_event.prop) .. viewers.ta("prop_default", one_event.prop_default)
table.insert(group, one_event)
end -- modes.get_args_datas(t) is empty
local tab_view = { -- Group datas and options for a table view with lines and columns.
test_group = group, -- Use default cases
title_memo = "events_one_event_test_title", -- "events.all_kinds_test() Test: all kinds of events (err, wng, cat)",
headers_class = "wikitable alternative center sortable",
headers = "events_all_kinds_tests_headers", -- "typ;key;idargs;result"
headers = " arg name; type; property; prop_default; value",
form_one_case = function(case) -- Convert a case from test_group to rowGroup.
return { tostring(case.keyword), tostring(case.typ), tostring(case.prop), tostring(case.prop_default) , tostring(case.val) }
end,
rowGroup = {},
-- track_on = true,
}
-- res = res .. drop_box.new(selector, "modes_get_args_datas_tests_title", modes.get_args_datas_tests)
t = t .. tableview.new(tab_view) -- Formats a table view with lines and columns.
viewers.restore_configs(memo, "modes.Init_mode_args_datas_tests") -- Restore global configurations after eventual changes.
return t
end -- t = t .. modes.Init_mode_args_datas_tests(t)
 
-- FAMLTVQDR Tactic only once steps : Frame Mode-from-Frame Args Libraries Translations Versions QITEM Datas Results
-- function modes.Librairies_Versions_Args_Mode_Item_Datas_Results(args_known) for function Central.init(
function modes.Init_Frame_Args_Mode_Libraries_Translations_Versions_QITEM_Datas_Results(frame, mode_name, args_known, options_for_modes, QITEM) -- FAMLTVQDR replaces function Central.init( code
-- Central.init(frame, mode_name, args_known, options_for_modes, QITEM) -- FAMLTVQDR Typical call
local res = ""
local frame = frame or mw.getCurrentFrame() -- for F = Frame
local args_known = args_known or modes.args_known or p.args_known or {} -- for A in FAMLTVQDR Arguments definitions at module level p.args_known = {...}
for key, one_arg in pairs(args_known) do
-- ["mode"] = { ["typ"] = "config", ["keyword"] = "mode", ["prop"] = "modes.options_for_modes", ["prop_default"] = "read", }, -- Mode read as default
if type(one_arg) == "table" then
if one_arg["keyword"] and (one_arg["keyword"] == "mode") and modes.options_for_modes[modes.mode_name] then modes.mode_name = modes.mode_name
else modes.mode_name = one_arg["prop_default"] end -- prop_default = read -- for M = Mode
end
end
local bindable_libraries = bindable_libraries or versions.bindable_libraries or {} -- optional value from p.args_known = {...}
versions.setup_central_libraries(bindable_libraries, opt) -- for L = Libraries Install central bindable libraries in package.loaded
langs.init_content_page_user_lang() -- function langs.init_content_page_user_lang() -- for T = Translations
-- versions.bindable_libraries = { -- New libraries to record in package.loaded[]
-- ["activity"] = "The <b>activity</b> library supports Lua-coders sub-tasks for central modules in international interactions.", }
versions.init(frame, Central_version, mode_name, args_known, options_for_modes, QITEM) -- V in FAMLTVQDR
local options_for_modes = options_for_modes or modes.options_for_modes or {} -- M in FAMLTVQDR or {} -- optional value from p.args_known = {...}
modes.options_for_modes = options_for_modes
versions.memo_i18n = mw.clone(versions.main_i18n or langs.main_i18n)
langs.main_i18n = versions.memo_i18n ; versions.main_i18n = versions.memo_i18n
-- local datas = mw.clone(datas) modes.get_args_datas
res = res .. modes.init_modes_translate_events(frame, Central_version, mode_name, modes.args_known, options_for_modes, QITEM or itemid)
datas.props = datas.get_item(args_known, QITEM) -- Get datas from mw.wikibase for the page.
args_known = modes.get_args_datas(args_known) -- Applies the Tatic for (err, wng, cat) S181124Dng
modes.get_args(args_known) -- Interactions between arguments
modes.args_final = modes.import_arguments(args_known, args_source, content_translations, args_wikidata) -- function modes.import_arguments()
modes.init_args_mode_options(mix, mode_name, modes.args_template) -- Import and mix args mode and options from template and invoke
langs.Central_version = Central_version or langs.Central_version or Central.Central_version_name
return res
end
 
function modes.Init_Frame_Args_Mode_Libraries_Translations_Versions_QITEM_Datas_Results_tests(t) -- For FAMLTVQDR.
local memo = viewers.save_configs("modes.Init_Frame_Args_Mode_Libraries_Translations_Versions_QITEM_Datas_Results_tests") -- Save global configuration before eventual changes.
local t = t or "\n* <b>For FAMLTVQDR tests</b>"
local tab_view = { -- Group datas and options for a table view with lines and columns.
test_group = {
{ ["typ"] = "config", ["keyword"] = "mode", ["prop"] = "modes.options_for_modes", ["prop_default"] = "read", }, -- Mode read as default
{ ["typ"] = "config", ["keyword"] = "mode", ["prop"] = "modes.options_for_modes", ["prop_default"] = "edit", }, -- Mode read as default
{ ["typ"] = "config", ["keyword"] = "modemode", ["prop"] = "modes.options_for_modes", ["prop_default"] = "read", }, -- Mode read as default
{ ["typ"] = "dat", ["keyword"] = "mode", ["prop"] = "modes.options_for_modes", ["prop_default"] = "read", }, -- Mode read as default
},
title_memo = "luaTable_toList_tests_title", -- "lua_table.to_list() Return a list from a Lua table.",
headers = "luaTable_toList_tests_headers", -- "Tested case; Input table, rough_view; Output list",
headers_class = "wikitable alternative center sortable",
rowGroup = {},
-- track_on == "details",
}
-- res = res .. drop_box.new(selector, "modes Init Frame Args Mode Libraries **", modes.Init_Frame_Args_Mode_Libraries_Translations_Versions_QITEM_Datas_Results_tests)
-- res = res .. drop_box.new(selector, "modes_get_args_datas_tests_title", modes.get_args_datas_tests)
function tab_view.form_one_case(case) -- Convert a case from test_group to rowGroup.
return { case.typ, case.keyword, case.prop, case.prop_default, }
end
local t = tableview.new(tab_view) -- Runs tests cases and formats a table view with lines and columns.
viewers.restore_configs(memo, "modes.Init_Frame_Args_Mode_Libraries_Translations_Versions_QITEM_Datas_Results_tests") -- Restore global configurations after eventual changes.
return t --, errors -- langs_missing_translations_title
end -- t = t .. modes.Init_Frame_Args_Mode_Libraries_Translations_Versions_QITEM_Datas_Results_tests
 
-- cut_libraries
Ligne 7 364 ⟶ 7 172 :
title_memo = "events_all_kinds_tests_title", -- "events.all_kinds_test() Test: all kinds of events (err, wng, cat)",
headers = "events_all_kinds_tests_headers", -- "typ;key;idargs;result",
rowGroup = {},
-- track_on == "details",
}
function tab_view.form_one_case(evt) -- Convert a case from test_group to rowGroup.
Ligne 7 404 ⟶ 7 210 :
return res
end -- function events.errors_lister(title, v1, v2, v3, v4, v5, v6, v7, v8, v9)
 
function events.gener_categories(args_final) -- Only for this library, form categories without activate them
local args_final = args_final
if type(args_final) ~= "table" then args_final = modes.args_final end
if args_final.birthyear then
events.add_cat("p_authors_birthyear_cat", args_final.birthyear)
end
if args_final.deathyear then
events.add_cat("p_authors_deathyear_cat", args_final.deathyear)
end
if args_final.description then
-- events.add_cat("p_authors_deathyear_cat", args_final.description)
end
return
end -- function events.gener_categories(args_final)
 
function events.categories_lister(c) -- Categorize categories, or view categories if c=":".
Ligne 7 903 ⟶ 7 694 :
headers = " insub; sub; sought; known; errors ",
headers_class = "wikitable alternative center sortable",
-- rowGrouptrack_on = {}true,
-- track_on == "details",
}
--
Ligne 8 310 ⟶ 8 100 :
end
 
function versions.setup_central_libraries(bindable_libraries, opt) -- FAMLTVQDR Install central bindable libraries in package.loaded
-- Record centralisable libraries if they are not included in standard mw.Extension:Scribunto
-- RunOnce : Do not repeat this function to not disturb subsequent processes.
Ligne 8 462 ⟶ 8 252 :
headers = "module; arg; change; results; errors", -- "OK or error/s"
rowGroup = {},
-- ccc = {}, -- to remember
-- track_on == "details",
}
-- Runs tests cases and formats a table view with lines and columns.s
Ligne 8 557 ⟶ 8 347 :
headers = "versions_sort_central_modules_headers", -- "Title; Version; Date; Translations / Languages",
form_elem_detail = "versions_sort_central_modules_counts", -- "this + %2/%3 T/L, "
rowGroup = {},
-- track_on == "details",
}
function tab_view.form_one_case(get) -- Convert a case from test_group to rowGroup.
Ligne 8 591 ⟶ 8 379 :
 
-- function versions.init(frame, mode_name, args_known, options_for_modes, QITEM)
function versions.init(frame, Central_version, mode_name, args_known, options_for_modes, QITEM) -- FAMLTVQDR
-- Initializes translations, bind_libraries, bind_sub_modules, get arguments, modes, options.
-- Imports arguments from wikidata, module and template with increasing priorities.
Ligne 8 686 ⟶ 8 474 :
headers = "versions_versions_management_headers", -- "sought; versions; process; comments",
headers_class = "wikitable alternative center sortable",
-- rowGrouptrack_on = {}true,
-- track_on == "details",
}
function tab_view.form_one_case(vers_test) -- Convert a case from test_group to rowGroup.
Ligne 9 932 ⟶ 9 719 :
keys = "name;args;expect;result;errors",
rowGroup = {},
ccc = {},
-- track_on == "details",
}
-- Runs tests cases and formats a table view with lines and columns.s
Ligne 10 156 ⟶ 9 943 :
-- headers_class = "wikitable alternative center sortable",
rowGroup = {},
-- track_on == "details",
}
function tab_view.form_one_case(case) -- Convert a case from test_group to rowGroup.
Ligne 10 229 ⟶ 10 015 :
-- headers_class = "wikitable alternative center sortable",
rowGroup = {},
-- track_on == "details"true,
}
function tab_view.form_one_case(case) -- Convert a case from test_group to rowGroup.
Ligne 10 255 ⟶ 10 041 :
end
 
function viewers.doc_section(selector, section, style, mask_sections) -- Formats the titleBegin of asection groupin of drop_boxviewers.newdoc_page(), typicaly for each libraryviewers.doc_module()... -- To bypass a persistent bug
local rest = ""
local selector, section, style, mask_sections = selector, section, style, mask_sections
local localsectionsection = viewers.form9user(section) -- like viewers_section_title_page or viewers_section_title_internal function viewers.form9user(
if mask_sections then return rest end
if selector == "never" then return rest end
local select = (selector == true) or (selector == title) or viewers.is_in_sp(selector, "allwaysview alltestsview enforcerun failinref nocontent")
if not select then style = "h3" end
if type(style) ~= "string" then style = "h3" end
local n = tonumber( string.sub(style, 2, 2) )
-- viewers_section_title_page = "Tests of this page",
style = "" ; for i = 1, n do style = style .. "=" end
-- viewers_section_title_module = "Tests of this module",
t = t .. "\n" .. style .. section .. " " .. style .. "\n" -- style OK
-- viewers_section_title_internal = "Internal tests",
-- t = t .. "\n* ModuleCentralizer only tests sections doc_section"
if localsection == "viewers_section_title_page" then localsection = "Tests of this page" end -- To bypass a persistent bug
return t
if localsection == "viewers_section_title_module" then localsection = "Tests of this module" end -- To bypass a persistent bug
end -- res = res .. viewers.doc_section(selector, "viewers_section_title_page", "h2", mask_sections) -- example
if localsection == "viewers_section_title_internal" then localsection = "Internal tests" end -- To bypass a persistent bug
res = res .. "<b>" .. viewers.styles_color_normal(localsection) .. "</b>"
return res
end -- if not mask_sections then res = res .. viewers.doc_section(selector, "viewers_section_title_module", "h2") end -- typical use
 
function drop_box.dh( opt )
Ligne 10 279 ⟶ 10 061 :
return val
end
dh = drop_box.dh
 
function drop_box.html(title, content_or_func) -- Builds the drop box at the html level.
Ligne 10 382 ⟶ 10 165 :
end
end
local dropbox_title-- ['p_template_drop_box_name'] = 'Drop-downBoîte boxdéroulante', -- Modèle:Boîte déroulante for drop_box.form
-- ['p_template_drop_box_name'] = 'Drop-down box', -- Modèle:Boîte déroulante for drop_box.form
local dropbox_title = viewers.form9content('p_template_drop_box_name')
local dropbox_title = viewers.form9content('Boîte déroulantep_template_drop_box_name') -- Modèle:Boîte déroulante for Boîte, déroulante...
t = t .. mw.getCurrentFrame():expandTemplate{ title = dropbox_title, args = {
["label"] = d.label, ["titre"] = d.title, ["contenu"] = d.content,
Ligne 10 655 ⟶ 10 438 :
function viewers.doc_module(selector, mask_sections) -- Formats some Dropboxes of tests to document a module.
local res = ""
if not mask_sections then res = res .. viewers.doc_section(selector, "viewers_section_title_module", "h2") end -- function viewers.doc_section(selector,
res = res .. drop_box.new(selector, "modes_args_unknown_report_title", modes.args_unknown_report)
res = res .. drop_box.new(selector, "versions_support_desk_title", versions.form_support_desk_report)
Ligne 10 679 ⟶ 10 462 :
--
if not mask_sections then res = res .. viewers.doc_section(selector, "Library:datas", "h3") end -- .get_item(
res = res .. drop_box.new(selector, "datas_get_item_report_titlemodes_args_known_report_title", datas.get_item_report)
-- res = res .. drop_box.new(selector, "datas_update_Special_PageData_title", datas.update_PageData)
--
Ligne 10 687 ⟶ 10 470 :
--
if not mask_sections then res = res .. viewers.doc_section(selector, "Library:langs", "h3") end
-- res = res .. drop_box.new(selector, "langs_selectLang_tests_title", langs.select_lang_test) -- lang %1 %2 %3
res = res .. drop_box.new(selector, "langs_translations_counts_title", langs.translations_counts) -- S170618ltc
-- res = res .. drop_box.new(selector, "langs_changing_translations_title", langs.changing_translations) -- no tabview
Ligne 10 715 ⟶ 10 498 :
if not mask_sections then res = res .. viewers.doc_section(selector, "Library:modes", "h3") end -- function viewers.doc_section(
-- if not mask_sections then res = res .. viewers.doc_section(selector, "viewers_section_title_library_modes", "h3") end
res = res .. drop_box.new(selector, "modes Init Frame Args Mode Libraries **modes_need_tactic_test_title", modes.Init_Frame_Args_Mode_Libraries_Translations_Versions_QITEM_Datas_Results_testsget_args_datas)
res = res .. drop_box.new(selector, "modes_get_args_datas_tests_title", modes.get_args_datas_tests)
res = res .. drop_box.new(selector, "modes_Init_args_datas_tests_title p.teststests **", modes.Init_mode_args_datas_tests)
-- end -- t = t .. modes.get_args_datas(t)
-- res = res .. drop_box.new(selector, "modes_args_known_report_title", modes.args_known_report)
Ligne 10 812 ⟶ 10 593 :
["tests"] = " box1 catview docdef docline docsrc docdata docview : tests ",
}
 
function viewers.doc_group(selector, mask_sections) -- Formats all results of this module and its sub-modules.
local res = ""
res = res .. viewers.doc_page(selector, mask_sections) -- included in viewers.doc_group -- mask for time limit
res = res .. viewers.doc_module(selector, mask_sections) -- included in viewers.doc_group -- mask for time limit
res = res .. viewers.doc_internal(selector, mask_sections) -- included in viewers.doc_group -- mask for time limit
res = res .. versions.running_times(false, "") -- always wiew in tests
return res
end -- res = res .. viewers.doc_group(selector, mask_sections) -- Formats all results of this module and its sub-modules.
 
function p.form_result(args_final, main_module) -- Formats all results of this module and its sub-modules.
Ligne 10 832 ⟶ 10 604 :
if modes.option("box1") or modes.option("catview")
then res = res .. " catview = " .. events.categories_lister(":") end -- Display categories
events.gener_categories(args_final) -- Formats all categories without activate them
if modes.option("docview") or modes.option(":") or modes.option("tests") or (modes.args_final.mode == "edit") then
res = res .. "\n* datas.default_item = <b>" .. datas.default_item .. "</b>, datas.default_name = <b>" .. datas.default_item .. "</b>\n"
Ligne 10 844 ⟶ 10 615 :
if modes.option("tests") then -- or (modes.args_final.mode == "tests") --
res = res .. viewers.doc_group("allwaysview") -- viewers.doc_group(selector, mask_sections) -- To enforce title of sections
-- res = res .. viewers.doc_page("allwaysview") -- included in viewers.doc_group -- mask for time limit
-- res = res .. viewers.doc_module("allwaysview") -- included in viewers.doc_group -- mask for time limit
-- res = res .. viewers.doc_internal("allwaysview") -- included in viewers.doc_group -- mask for time limit
res = res .. versions.running_times(false, "") -- always wiew in tests
end
viewers.restore_configs(memo, "p.form_result") -- Restore global configurations after eventual changes.
Ligne 11 305 ⟶ 11 076 :
-- - - - ------------------ - - - - ---------------------------------
 
p.args_known = { -- Table of the definitions of all known arguments at module level. FAMLTVQDR
 
-- Arguments in order without names, with their keyword for use as other arguments.
-- Arguments dans l'ordre, non nommés, avec leur keyword pour traitement comme les autres arguments.
-- [1] = { ["typ"] = "config", ["need"] = "noevent", ["keyword"] = "mode", ["syn"] = 2},
 
-- Tactic to integer i18n translations following a list of sub-modules: modules_guide with their own translations.
-- Tactic to integer default arguments values: defaults values are always from Centralizer.
Ligne 11 315 ⟶ 11 089 :
-- Special arguments to modify the fonctions and outputs of this module.
-- Arguments speciaux pour modifier le fonctionnement et les sorties de ce module.
["itemid"] = { ["typ"] = "config", ["need"] = "default", ["keyword"] = "itemid", ["prop_default"] = "Q307", }, -- Galilée
-- datas.entity = mw.wikibase.getEntity(datas.QITEM or datas.default_item or "Q34743" ) -- Rudyard Kipling
-- All arguments have a keyword identical to the registration name, except synonyms.
-- Tous les arguments ont un keyword identique au nom d'enregistrement, sauf les synonymes.
["modeimage"] = { ["typ"] = "configdat", ["keywordneed"] = "modedefault", ["propkeyword"] = "modes.options_for_modesimage", ["prop_defaultprop"] = "readP18", }, -- Mode read as default
["imagecountry"] = { ["typ"] = "dat", ["keywordneed"] = "imagedefault", ["keyword"] = "country", ["prop"] = "P18P27", },
["countrybirthyear"] = { ["typ"] = "dat", ["need"] = "default", ["keyword"] = "countrybirthyear", ["prop"] = "P27P569", ["format"] = "year", },
["birthyeardeathyear"] = { ["typ"] = "dat", ["need"] = "default", ["keyword"] = "birthyeardeathyear", ["prop"] = "P569P570", ["format"] = "year", },
["deathyearlastname"] = { ["typ"] = "dat", ["keywordneed"] = "deathyeardefault", ["propkeyword"] = "P570lastname", ["formatprop"] = "yearP734", },
["lastnamelastname2"] = { ["typ"] = "dat", ["need"] = "default", ["keyword"] = "lastname", ["prop"] = "P734", ["syn"] = 2, },
["lastname2firstname"] = { ["typ"] = "dat", ["need"] = "default", ["keyword"] = "lastnamefirstname", ["prop"] = "P734P735",["prop_default"] = "Galilée", },
["firstnamefirstname2"] = { ["typ"] = "dat", ["need"] = "default", ["keyword"] = "firstname", ["prop"] = "P735", ["syn"] = 2, ["prop_default"] = "Galilée", },
["firstname2initial"] = { ["typ"] = "dat", ["keywordneed"] = "firstnamedefault", ["propkeyword"] = "P735initial", ["prop_defaultprop"] = "GaliléeP735", },
["initialtitle"] = { ["typ"] = "dat", ["need"] = "default", ["keyword"] = "initiallabel", ["prop"] = "P735", ["syn"] = 2, ["prop_default"] = "label", },
["titlepersonlang"] = { ["typ"] = "dat", ["keywordneed"] = "labeldefault", ["keyword"] = "personlang", ["prop"] = "P735P1412", ["prop_default"] = "labelen", },
["personlangdescription"] = { ["typ"] = "dat", ["keywordneed"] = "personlangdefault", ["propkeyword"] = "P1412description", ["prop_defaultprop"] = "endescription", },
["descriptionlabel"] = { ["typ"] = "dat", ["need"] = "default", ["keyword"] = "descriptionlabel" , ["prop"] = "descriptionlabel", ["prop_default"] = "label", },
["labellabelcontent"] = { ["typ"] = "dat", ["keywordneed"] = "labeldefault" , ["keyword"] = "labelcontent",["prop"] = "labellabelcontent", ["prop_default"] = "labelQ307", }, -- Galilée
["labelcontentlabelpage"] = { ["typ"] = "dat", ["need"] = "default", ["keyword"] = "labelcontentlabelpage", ["prop"] = "labelcontentlabelpage", ["prop_default"] = "Q307", }, -- Galilée
["labelpagelabeluser"] = { ["typ"] = "dat", ["need"] = "default", ["keyword"] = "labelpagelabeluser", ["prop"] = "labelpagelabeluser", ["prop_default"] = "Q307", }, -- Galilée
["labeluserlabelbylang"] = { ["typ"] = "dat", ["keywordneed"] = "labeluserdefault", ["keyword"] = "labelbylang",["prop"] = "labeluserlabelbylang", ["prop_default"] = "Q307", }, -- Galilée
["labelbylangQITEM"] = { ["typ"] = "dat", ["need"] = "default", ["keyword"] = "labelbylangQITEM", ["prop"] = "labelbylangQITEM", ["prop_default"] = "Q307", }, -- Galilée
["QITEMitemid"] = { ["typ"] = "dat", ["need"] = "default", ["keyword"] = "QITEMitemid", ["prop"] = "QITEMitemid", ["prop_default"] = "Q307", }, -- Galilée
["itemid"] = { ["typ"] = "dat", ["keyword"] = "itemid", ["prop"] = "itemid", ["prop_default"] = "Q307", }, -- Galilée
-- Galilée (Q307), Victor Hugo (Q535), Aristote (Q868), Albert Einstein (Q937), Mohandas Karamchand Gandhi (Q1001), Christophe Colomb (Q7322),
-- Nelson Mandela (Q8023), Rudyard Kipling (Q34743), Martin Fleischmann (Q899264), Emmanuel Macron (Q3052772)
["sitelink"] = { ["typ"] = "dat", ["need"] = "default", ["keyword"] = "sitelink", ["prop"] = "sitelink", ["prop_default"] = "sitelink", },
["uri"] = { ["typ"] = "dat", ["need"] = "default", ["keyword"] = "uri", ["prop"] = "uri", ["prop_default"] = "uri", },
["sex"] = {["keyword"] = "sex", ["typ"] = "dat", ["need"] = "default", ["prop"] = "P21",
["arg_values"] = "sex_values", ["key_values"] = "male;femelle", ["prop_default"] = "male", }, -- wiki_selectors
["region"] = {["keyword"] = "region", ["typ"] = "dat", ["need"] = "default", ["prop_default"] = "England",
["arg_values"] = "region_values", ["key_values"] = "other;china;india;century", ["prop"] = "uri", }, -- wiki_selectors
["rights"] = {["keyword"] = "rights", ["typ"] = "dat", ["need"] = "default",
["arg_values"] = "rights_values", ["key_values"] = "no;none;ONU;none;cn;50;us;70;mpf", ["prop_default"] = "cn",-- wiki_selectors
["delay_values"]= "0;0;0;0;50;50;70;70;95", ["arg_uses"] = "none;none;none;none;cn;cn;us;us;mpf", ["prop_default"] = "cn" }, -- wiki_selectors
["args_known_monument"] = { ["typ"] = "dat", ["need"] = "noevent", ["keyword"] = "args_known_monument", ["prop"] = "P18", ["prop_default"] = "St Paul Cathedral.png", },
["labelbylang"] = { ["typ"] = "dat", ["need"] = "noevent", ["keyword"] = "labelbylang", ["prop"] = "P18", ["prop_default"] = "en", },
-- mw_wikibase_country = "England", -- English
-- mw_wikibase_flag = "England in the UK and Europe.svg", -- English
Ligne 11 586 ⟶ 11 359 :
-- - - - ------------------ - - - - ---------------------------------
 
function Central.install(frame, Central_version, mode_name, args_known, options_for_modes)
-- FAMLTVQDR Tactic only once steps : Frame Mode-from-Frame Args Libraries Translations Versions QITEM Datas Results
-- p.version.versionNumber = CentralI18N.version.versionNumber
-- function modes.Librairies_Versions_Args_Mode_Item_Datas_Results(args_known) for function Central.init(
function p.init_central_module(frame, mode_name, args_known, options_for_modes, QITEM) -- FAMLTVQDR replaces function Central.init( code
-- Central.init(frame, mode_name, args_known, options_for_modes, QITEM) -- FAMLTVQDR Typical call
local res = ""
return "\n* ARGS.t=" .. tostring(ARGS.t) .. ", CNT.t=" .. tostring(CNT.t)
local frame = frame or mw.getCurrentFrame() -- for F = Frame
end
local args_known = args_known or modes.args_known or p.args_known or {} -- for A in FAMLTVQDR Arguments definitions at module level p.args_known = {...}
 
for key, one_arg in pairs(args_known) do
function Central.demo(frame, Central_version, mode_name, args_known, options_for_modes)
-- ["mode"] = { ["typ"] = "config", ["keyword"] = "mode", ["prop"] = "modes.options_for_modes", ["prop_default"] = "read", }, -- Mode read as default
-- p.version.versionNumber = CentralI18N.version.versionNumber
if type(one_arg) == "table" then
local res = ""
if one_arg["keyword"] and (one_arg["keyword"] == "mode") and modes.options_for_modes[modes.mode_name] then modes.mode_name = modes.mode_name
return "\n* ARGS.t=" .. tostring(ARGS.t) .. ", CNT.t=" .. tostring(CNT.t)
else modes.mode_name = one_arg["prop_default"] end -- prop_default = read -- for M = Mode
end
end
local bindable_libraries = bindable_libraries or versions.bindable_libraries or {} -- optional value from p.args_known = {...}
versions.setup_central_libraries(bindable_libraries, opt) -- for L = Libraries Install central bindable libraries in package.loaded
langs.init_content_page_user_lang() -- function langs.init_content_page_user_lang() -- for T = Translations
-- versions.bindable_libraries = { -- New libraries to record in package.loaded[]
-- ["activity"] = "The <b>activity</b> library supports Lua-coders sub-tasks for central modules in international interactions.", }
versions.init(frame, Central_version, mode_name, args_known, options_for_modes, QITEM) -- V in FAMLTVQDR
local options_for_modes = options_for_modes or modes.options_for_modes or {} -- M in FAMLTVQDR or {} -- optional value from p.args_known = {...}
modes.options_for_modes = options_for_modes
versions.memo_i18n = mw.clone(versions.main_i18n or langs.main_i18n)
langs.main_i18n = versions.memo_i18n ; versions.main_i18n = versions.memo_i18n
-- local datas = mw.clone(datas) modes.get_args_datas
res = res .. modes.init_modes_translate_events(frame, Central_version, mode_name, modes.args_known, options_for_modes, QITEM or itemid)
datas.props = datas.get_item(args_known, QITEM) -- Get datas from mw.wikibase for the page.
args_known = modes.get_args_datas(args_known) -- Applies the Tatic for (err, wng, cat) S181124Dng
modes.get_args(args_known) -- Interactions between arguments
modes.args_final = modes.import_arguments(args_known, args_source, content_translations, args_wikidata) -- function modes.import_arguments()
modes.init_args_mode_options(mix, mode_name, modes.args_template) -- Import and mix args mode and options from template and invoke
langs.Central_version = Central_version or langs.Central_version or Central.Central_version_name
return res
end
 
function Central.init(frame, Central_version, mode_name, args_known, options_for_modes)
-- FAMLTVQDR for Args = p.args_known = {...}, Datas = function datas.get_item(args_known, QITEM), Libraries = Install central bindable libraries,
-- Modes = modes.options_for_modes = {...}, Versions = function versions.init(frame, ...) Initializes versions
-- p.version.versionNumber = CentralI18N.version.versionNumber
local res = ""
local res = "\n* Central.init(frame, Central_version, mode_name, args_known, options_for_modes)<br>"
tracker.init_trakers() -- Initialize some trakers. To run in Central.init()
local Central_version = Central_version or p.version.versionName -- optional value from p.args_known = {...}
modes.time1 = os.clock()
local args_known = args_known or modes.args_known or p.args_known or {} -- optional value from p.args_known = {...}
Central_version = Central_version or langs.Central_version or Central.Central_version_name
-- ["mode"] = { ["typ"] = "config", ["keyword"] = "mode", ["prop"] = "modes.options_for_modes", ["prop_default"] = "read", }, -- Mode read as default
local mode_name = mode_name or modes.mode_name -- Selected by the ["mode"] argument.
langs.Central_version = Central_version or langs.Central_version or Central.Central_version_name
if type(lang) == "content" then t = viewers.form9content(key_form, subnames, strings_c, tables_c) end
if type(langs.Central_version ~= "string") then langs.Central_version = (p.version["versionName"] .. " " .. p.version["versionNumber"] ) end -- Adapt to actual wiki as default
-- res = res .. modes.Init_Frame_Args_Mode_Libraries_Translations_Versions_QITEM_Datas_Results(frame, mode_name, args_known, options_for_modes, QITEM) -- FAMLTVQDR replaces function Central.init( code
local options_for_modes = options_for_modes or modes.options_for_modes or p.options_for_modes
res = res .. versions.init(frame, langs.Central_version) -- function versions.init(
versions.memo_i18n = mw.clone(versions.main_i18n or langs.main_i18n)
langs.main_i18n = versions.memo_i18n
res = res .. modes.init_modes_translate_events(frame, langs.Central_version, mode_name, modes.args_known, options_for_modes, QITEM or itemid)
modes.frame = mw.getCurrentFrame()
-- ["mode"] = { ["typ"] = "config", ["keyword"] = "mode", ["prop"] = "modes.options_for_modes", ["prop_default"] = "read", }, -- Mode read as default
modes.init_args_mode_options(mix, mode_name, modes.args_template) -- Import and mix args mode and options from template and invoke
modes.args_final = modes.import_arguments(args_known, args_source, content_translations, args_wikidata) -- function modes.import_arguments()
-- ["itemid"] = { ["typ"] = "config", ["keyword"] = "itemid", ["prop_default"] = "Q307", }, -- Galilée
-- datas.entity = mw.wikibase.getEntity(datas.QITEM or datas.default_item or "Q34743" ) -- Rudyard Kipling
datas.props = datas.get_item(args_known, QITEM) -- Get datas from mw.wikibase for the page.
-- local datas = mw.clone(datas) modes.get_args_datas
-- ["image"] = { ["typ"] = "dat", ["keyword"] = "image", ["prop"] = "P18", },
args_known = modes.get_args_datas(args_known) -- Applies the Tatic for (err, wng, cat) S181124Dng
modes.get_args(args_known) -- Interactions between arguments
langs.init_content_page_user_lang() -- function langs.init_content_page_user_lang()
res = res .. (datas.props_trk or "")
res = res .. "</b>"
-- p.version.versionNumber = CentralI18N.version.versionNumber
return res
end -- function Central.init(frame, Central_version, mode_name, args_known, options_for_modes)
--[[
function Central.init(frame, Central_version, mode_name, args_known, options_for_modes)
-- FAMLTVQDR for Args = p.args_known = {...}, Datas = function datas.get_item(args_known, QITEM), Libraries = Install central bindable libraries,
-- Modes = modes.options_for_modes = {...}, Versions = function versions.init(frame, ...) Initializes versions
-- p.version.versionNumber = CentralI18N.version.versionNumber
local options_for_modes = options_for_modes or modes.options_for_modes or p.options_for_modes
local res = "\n*res Central.. versions.init(frame, Central_version, mode_name, args_known, options_for_modes)<br>"
res = res .. versions.init(frame, Central_version) -- function versions.init(
versions.memo_i18n = mw.clone(versions.main_i18n or langs.main_i18n)
langs.main_i18n = versions.memo_i18n ; versions.main_i18n = versions.memo_i18n
-- local datas = mw.clone(datas) modes.get_args_datas
res = res .. modes.init_modes_translate_events(frame, Central_version, mode_name, modes.args_known, options_for_modes, QITEM or itemid)
datas.props = datas.get_item(args_known, QITEM) -- Get datas from mw.wikibase for the page.
modes.init_args_mode_options(mix, mode_name, modes.args_template) -- Import and mix args mode and options from template and invoke
modes.args_finalargs_import = modes.import_arguments(args_known, args_source, content_translations, args_wikidata) -- function modes.import_arguments()
modes.args_final = p.interact_args_final(modes.args_import) -- Interactions between arguments
args_known = modes.get_args_datas(args_known) -- Applies the Tatic for (err, wng, cat) S181124Dng
modes.get_args(args_known) -- Interactions between arguments
langs.init_content_page_user_lang() -- function langs.init_content_page_user_lang()
Ligne 11 679 ⟶ 11 395 :
return res
end -- function Central.init(frame, Central_version, mode_name, args_known, options_for_modes)
 
--]]
function Central.read(frame) -- The read mode generates the normal result for read only users.
-- Helpers or admins can add options to include edit or tests or user language...
Ligne 11 685 ⟶ 11 401 :
local t = Central.init(frame, Central.Central_version_name, "read", p.args_known, p.options_for_modes)
-- res = res .. t
-- modes.args_final = p.interact_args_final(modes.args_import) -- Interactions between arguments
res = res .. p.form_result(modes.args_final)
res = res .. "\n* " .. datas.track_val
Ligne 11 696 ⟶ 11 412 :
local t = Central.init(frame, Central.Central_version_name, "edit", p.args_known, p.options_for_modes)
-- res = res .. t
-- modes.args_final = p.interact_args_final(modes.args_import) -- Interactions between argumensts
-- res = res .. "</b>"
res = res .. p.form_result(modes.args_final)
return res
Ligne 11 889 ⟶ 11 605 :
{ site = "fr.wikisource", verstime = "2018-11-29T14:08:43", versid = "1.33.0-wmf.6 (e5db35f)", seen_time = "2018-11-29T21:51:00", },
{ site = "fr.wikisource", verstime = "2018-11-29T20:09:40", versid = "1.33.0-wmf.6 (e7d6fb2)", seen_time = "2018-11-29T23:33:00", },
{ site = "fr.wikisource", verstime = "2018-12-13T01:34:02", versid = "1.33.0-wmf.8 (2859494)", seen_time = "2018-12-17T08:33:00", },
{ site = "www.MediaWiki", verstime = "2018-12-18T14:22:32", versid = "1.33.0-wmf.9 (b5ca53a)", seen_time = "2018-12-18T18:00:00", },
{ site = "fr.wikisource", verstime = "2018-12-19T17:52:30", versid = "1.33.0-wmf.9 (7cf3023)", seen_time = "2018-12-20T09:07:00", },
} -- MWMW
versions.MediaWiki_version_memo = "1.33.0-wmf.96 (7cf3023e7d6fb2)"
versions.MediaWiki_Versions_sort = "<" -- First on end, Last on begin
versions.MediaWiki_Versions_sort = ">" -- First on begin, Last on end
-- function activity.MW_Versions_report(t) -- Reports versions of MediaWiki for 3 months.
 
function viewers.doc_group(selector, mask_sections) -- functionFormats viewersall or any documentations of tests and reports.doc_internal(selector, mask_sections)-- snaks tst
local res = ""
res = res .. viewers.doc_section(selector, "Tests of this page", "h2", mask_sections)
if p.teststests == "FAMLTVQDR" then
-- res = res .. drop_box.new(selector, "p.teststests = FAMLTVQDR Init_mode_args_datas_tests **activity_report_subtasks_title", modesactivity.Init_mode_args_datas_tests central_subtasks_report)
res = res .. drop_boxviewers.newdoc_page(selector, "modes Init Frame Args Mode Libraries **", p.init_central_module_testsmask_sections)
res = res .. drop_boxviewers.newdoc_module(selector, "modes_get_args_datas_tests_title", modes.get_args_datas_testsmask_sections)
res = res .. viewers.doc_pagedoc_internal(selector, mask_sections) -- mask for time limit function viewers.doc_page(
-- res = res .. viewersversions.doc_modulerunning_times(selectorfalse, mask_sections"") -- mask for time limit
return res
else
res = res .. viewers.doc_section(selector, "Tests of this page", "h2", mask_sections) -- function viewers.doc_section(
res = res .. viewers.doc_section(selector, "Tests of this page", "h2", mask_sections)
res = res .. drop_box.new(selector, "activity_report_subtasks_title", activity.central_subtasks_report) -- to try if needed
res = res .. viewers.doc_page(selector, mask_sections) -- mask for time limit
res = res .. viewers.doc_module(selector, mask_sections) -- mask for time limit
res = res .. viewers.doc_internal(selector, mask_sections) -- function viewers.doc_internal(selector, mask_sections)
res = res .. versions.running_times(false, "")
end
return res
end -- function viewers.doc_group(selector, mask_sections) item: