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

Contenu supprimé Contenu ajouté
ModuleCentralizer datas.get_item_report(t) better on 20181204 2128.lua
Module:Centralizer mathroman.roman2int+int2roman OK 201811214
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 ModuleCentralizerModule:Centralizer datasmathroman.get_item_report(t) betterroman2int+mathroman.int2roman onOK 20181204201811214.lua
--------------------------------------------------|------------------------ typical length --------------------------|
 
p.NOWNOW = { -- in work subtasks for replace on 2018120320181205
{ "2018120420181210", "2018120720181211", "todo", "Rical", "S181125CrCS181210trb", "Module:CentralSchool:treebranches finish-- reciprocalFor adaptationeach withsought. Module:CentralizerReplace known. Later on 201811207", },
-- { "2018120420181207", "2018120420181210", "todo", "Rical", "S181204SCiS181207CrC", "ForModule:CentralSchool: 'Begin'finish functionreciprocal modes.get_args_datas(args_known)adaptation Simplifywith Central.initModule:Centralizer", },
-- { "2018120320181206", "2018120420181207", "todo", "Rical", "S181203madS181206SCi", "For 'Begin' renameSimplify function modesCentral.get_args_datasinit(frame, toCentral_version, modes.get_mode_args_datas( Tomode_name, simplify Central.init..)" },
{ "2018120320181206", "2018120320181207", "todo", "Rical", "S181203amtS181206tdp", "argif langs.select_lang() mises of translation try in deaceasing priority en=50%, es=7%, de=6%, fr=4% see Wivivi: In which language do you read Wikipedia?" },
{ "2018120320181206", "2018120320181207", "todo", "Rical", "S181203oTcS181206oTc", 'others: ["Tactic"] = "canbenil;nevererror" ', },
{ "2018113020181205", "2018120320181206", "NOWtodo", "Rical", "S181130mgTS181205sad", "functionsplit modes.get_args_datas_tests(t) Tactic allget_mode_args_datas in one2 forphases modes.get_args argsthen datas no args_final no originsmodes.get_mode_datas" },
{ "2018120320181205", "2018120320181206", "todo", "Rical", "S181203ustS181205mgT", "Module:Centralizerfunction updatemodes.get_args_datas_tests(t) subtasksTactic listall in one for modes args datas no args_final no origins old", },
{ "20181205", "20181205", "NOW", "Rical", "S181205ust", "Module:Centralizer update subtasks list", },
}
 
p.version = { -- Modules dependencies. Dependencias del módulo. Dépendances du module.
["versionName"] = "Central-s-frCentralizer",
["versionNumber"] = "1.0.0(181204T18181214T09:5250)",
["versionDate"] = "2018-12-04T1814T09:5250: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"] = "CentralCentralizer;Centralizer/I18N;Mathroman;TestRequire", -- Sought module and submodules versions
["known"] = "CentralCentralizer;Central-s-fr;Central-14 * Centralizer/I18N;Central/i18n * Mathroman22;Mathroman34", -- Known module and submodules versions
["treebranches"] = { -- DoneFor oneach 20181019sought. Replace known. Later on 1322201811207
{ "CentralCentralizer", "Central-s-fr", "Central-142017" }, -- upper
{ "Centralizer/I18N", "Central-s-fr", "Central-142018" }, -- median
{ "Mathroman22", "Mathroman34" }, -- lower
}
Ligne 185 ⟶ 186 :
mathroman.infos = { -- from 20130312
["libname"] = "mathroman", typ = "Library",
libdesc = "The Library:mathroman converts roman to digitalinteger numbers and reverse. It also detects errors.",
versfirst = "130312.12:00", verslast = "171221.07:43",
versions = {
Ligne 942 ⟶ 943 :
activity.report_subtasks_list = { -- List of subtasks to report. See "NOWNOW", update
{ "---", "---", "---", "---", "---", "DUPLICATE NOW, in change", },
-- res = res .. drop_box.new(selector, "versions_antiCrash_tests_title", versions.anti_crash_tests ) -- Tests antiCrash() -- to_debug_on_20170507
-- function versioning.antiCrash(options, content_or_func, ...) -- Form the display of a running error. in ModuleCentral 20170902.ModuleCentral 2e no antiCrash ok.lua
{ "2019020820190227", "2019021020190229", "todo", "Rical", "S190201imeS190227ime", "include Lua modules in Wikibase/client/includes/DataAccess/Scribunto/mw.wikibase.lua, see phabtask T41610.", },
{ "2019020720190227", "2019020820190227", "todo", "Rical", "S190128cCDS190227dut", "Createdelete unused tracker in _G MediaWiki:Scribunto/CentralData (changeARGS, fromIAMO, adminMAMO, only)tests_groups", },
{ "2019010520190225", "2019020720190227", "todo", "Rical", "S190126cCDS190225vtg", "Createtry Central/PageData/CentralDatagraphics in viewers.try_graph(change) from-- anysee user)Macron", },
{ "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
{ "2019012420190206", "2019012620190208", "todo", "Rical", "S190124bobS190206act", "Createlangs.abnormal_char_in_text() afails buttonto object for boxes, like drop_box with: n, states, shapes, keywords, colorsdebug", },
{ "2019012220190203", "2019012420190206", "todo", "Rical", "S190122tbeS190203css", "restructureuse forConventional acss structureparameters cssview in Tableedit, ofcontent, Boxdrop_box, Elementsinfobox, intableview viewers.boxviews.form(). ", },
{ "2019012220190201", "2019012220190203", "todo", "Rical", "S190122dutS1902014uMD", "deleteAfter unused'Begin' trackerfully in _Guse Module:drop_box ARGS,from IAMO, MAMO, tests_groupses.wikipedia.org/wiki/Módulo:Lista_plegable", },
{ "2019012020190131", "2019012220190201", "todo", "Rical", "S190120vtgS190131ilp", "tryAfter graphics'Begin' inT20180621 viewers.try_graph()Enough --inform seeCentral Macronmodules for jumps to lang.project URI.", },
{ "2019011720190129", "2019012020190131", "todo", "Rical", "S190117obvS190129alp", "makeAfter object'Begin' viewersT20180621 Automatic adapt Central modules for lang.boxviewsproject URI.form(cssView)", },
{ "2019011520190128", "2019011720190129", "todo", "Rical", "S190115mMWS190128rlv", "useAfter Special:PageData'Begin' CentralDataFully T163923+T168726update inCentralManual.xml activityTactic, func names ...MW_Versions_report()", },
{ "2019011420190127", "2019011520190128", "todo", "Rical", "S190114eliS190127vdf", "easydebug https://enfunction versions.wikisource.org/wiki/Templatedeprecated_function() nil table :Lorem_ipsum mask it on 20180306", },
{ "2019011220190124", "2019011420190127", "todo", "Rical", "S190112acrS190124icc", "debugBegin: versions.anti_crash()begin usingto pcallintegrate inchanges modes(frame)from +other testscoders", },
{ "2019011020190123", "2019011220190124", "todo", "Rical", "S190110uPDS190123icc", "automatizeBegin: PageDataupdate changeimportant inPhabricator datas.update_PageData(t)tasks forto activity.MW_Versions_report()activate IFtheir AVAILABLEavailability", },
{ "2019010920190122", "2019011020190123", "todo", "Rical", "S190109tacS190122cJP", "langs.abnormal_char_in_text()Begin: failsinforms public Lua-coders Utilisateur:JackPotte [[:fr:Utilisateur:JackPotte|JackPotte fr de es en]]", },
{ "2019010620190120", "2019010920190121", "todo", "Rical", "S190106cssS190120iTN", "useBegin: Conventionalinform css[https://meta.wikimedia.org/wiki/Tech/News#contribute parametersTech cssviewNews] inabout edit,central content,modules drop_box, infobox, tableview ...begin phase", },
{ "2019010620190119", "2019010620190120", "todo", "Rical", "S190106FLIS1190194tgl", "ProposeBegin: totranslate useby existantgroups Initialof inlanguages wikidata.: Nolike matterfor theviet, laos, cambodgia, allways with en, es, fr 1 result.days", },
{ "2019010420190118", "2019010620190119", "todo", "Rical", "S190104uMDS190118atr", "After 'Begin': fullyAsk usetranslations Module:drop_boxin frommeta es[https://meta.wikipediawikimedia.org/wiki/Módulo:Lista_plegableTranslation_requests Translation_requests]", },
{ "2019010320190111", "2019010420190118", "todo", "Rical", "S190103ilpS190111aip", "After 'Begin': T20180621when Enough20 informused Central modulescases, forannounce jumpsthat toin lang.projectthe URI.phabtask", },
{ "2019010220190104", "2019010320190111", "todo", "Rical", "S190102alpS190104aip", "After 'Begin': T20180621when Automatic10 adaptused cases, Centralannounce modulesthat forin lang.projectthe URI.phabtask", },
{ "2019010120181221", "2019010220181228", "todo", "Rical", "S190101rlvS181221s7P", "After 'Begin': search 7 Projects : MediaWikis wikidata Fullywikipedia reportwikisource moduleswikiquote and? libraries3 versions.days", },
{ "2018123120181214", "2019010120181221", "todo", "Rical", "S181231rucS181214iLC", "After 'Begin': Rical invite 7 Lua-coders : Tpt, Zolo, Od1n, Julien1978, Daehan, VIGNERON report? all3 viewers.usual_color(t)days", },
{ "2018123020181212", "2018123120181214", "todo", "Rical", "S181230vdfS181212uCM", "debugFor function'Begin' versionsupdate CentralManual.deprecated_function()xml nilTactic, tablefunc :names mask it on 20180306...", },
{ "2018122820181210", "2018122820181212", "todo", "Rical", "S181228tvaS181210tmm", "UseFor tableview.new()'Begin' forcheck all tablesargs, searchdatas, .table_end()functions, modes, tests", }, --
{ "2018122620181210", "2018122820181211", "todo", "Rical", "S181226iccS181210trb", "Begin:treebranches begin-- toFor integrate each changessought. fromReplace otherknown. codersLater on 201811207", },
{ "2018122520181207", "2018122620181210", "todo", "Rical", "S181225iccS181207CrC", "BeginModule:CentralSchool: updatefinish importantreciprocal Phabricatoradaptation taskswith to activate their availabilityModule:Centralizer", },
{ "2018122520181206", "2018122520181207", "todo", "Rical", "S181225cJPS181206SCi", "For 'Begin:' informsSimplify publicfunction Lua-codersCentral.init(frame, Utilisateur:JackPotteCentral_version, [[:fr:Utilisateur:JackPotte|JackPotte frmode_name, de es en]]...)", },
{ "2018122520181206", "2018122520181207", "todo", "Rical", "S181225iTNS181206tdp", "Begin:if inform [https://metalangs.wikimedia.org/wiki/Tech/News#contributeselect_lang() Techmises News]of abouttranslation centraltry modulesin begindeaceasing phase"priority en=50%, es=7%, de=6%, fr=4% see Wivivi" },
{ "2019010320181206", "2019010420181207", "todo", "Rical", "S181224tglS181206oTc", "Begin'others: translate["Tactic"] by= groups"canbenil;nevererror" of languages : like for viet, laos, cambodgia, allways with en, es, fr 1 days"', },
{ "2019010120181205", "2019010220181206", "todo", "Rical", "S181224atrS181205sad", "Begin:split Ask translationsmodes.get_mode_args_datas in meta2 [https://meta.wikimediaphases modes.org/wiki/Translation_requestsget_args Translation_requests]then modes.get_mode_datas", },
{ "2018122520181205", "2019010120181206", "todo", "Rical", "S181217aipS181205mgT", "Begin:function whenmodes.get_args_datas_tests(t) 20Tactic usedall cases,in announceone thatfor inmodes theargs phabtaskdatas no args_final no origins old", },
{ "2018121820181205", "2018122520181205", "todoNOW", "Rical", "S181210aipS181205ust", "BeginModule:Centralizer whenupdate 10subtasks used cases, announce that in the phabtasklist", },
{ "20181211", "20181218", "todo", "Rical", "S181202s7P", "Begin: search 7 Projects : MediaWikis wikidata wikipedia wikisource wikiquote ? 3 days", },
{ "20181211", "20181218", "todo", "Rical", "S181202iLC", "Begin: Rical invite 7 Lua-coders : Tpt, Zolo, Od1n, Julien1978, Daehan, VIGNERON ? 3 days", },
{ "20181209", "20181211", "todo", "Rical", "S181206uCM", "For 'Begin' update CentralManual.xml Guideline to Tactic, func names ..." },
{ "20181207", "20181209", "todo", "Rical", "S181204tmm", "For 'Begin' check all args, datas, functions, modes, tests", },
{ "20181204", "20181207", "todo", "Rical", "S181125CrC", "Module:CentralSchool: finish reciprocal adaptation with Module:Centralizer", },
{ "20181203", "20181204", "todo", "Rical", "S181203mad", "For 'Begin' function modes.get_mode_args_datas(args_known) -- To simplify Central.init" },
{ "20181203", "20181203", "todo", "Rical", "S181203amt", "arg mises of translation try en=50%, es=7%, de=6%, fr=4% see Wivivi: In which language do you read Wikipedia?" },
{ "20181203", "20181203", "todo", "Rical", "S181203oTc", 'others: ["Tactic"] = "canbenil;nevererror" ', },
{ "20181130", "20181203", "NOW", "Rical", "S181130mgT", "function modes.get_args_datas_tests(t) Tactic all in one for modes args datas no args_final no origins" },
{ "20181203", "20181203", "todo", "Rical", "S181203ust", "Module:Centralizer update subtasks list", },
--
-- Automatic shift of below "todo" subtasks.
Ligne 1 083 ⟶ 1 079 :
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 386 :
headers_class = "wikitable alternative center sortable",
rowGroup = {},
-- track_on == true"details",
}
-- from MediaWiki 1.30.0-wmf.4 (3248a17) 22:41, 7 June 2017
Ligne 1 877 ⟶ 1 874 :
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. LVAMQDR
-- 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 2 007 ⟶ 2 004 :
headers = "key;val",
rowGroup = {},
-- track_on == "details",
}
function tab_view.form_one_case(case) -- Convert a case from test_group to rowGroup.
Ligne 2 482 ⟶ 2 480 :
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 626 ⟶ 2 625 :
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 685 ⟶ 2 680 :
{ 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 828 :
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 942 ⟶ 2 940 :
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 027 ⟶ 3 026 :
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 037 :
-- local isLang = mw.language.isSupportedLanguage(lang)
local isBuilt = mw.language.isValidBuiltInCode(lang)
return { lang, isTag, tostring(isLang), isBuilt, langname, native, }
local space_name = tostring(mw.site.namespaces.Module.name)
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 374 ⟶ 3 373 :
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", }, },
{ "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", "i19i09", "j20j10", }, },
{ "Any number of values", { "a", "b", "c", "d", "e", "f", "g", "h", "i29i09", "j30j10", "k11", }, },
"a", "b", "c", "d", "e", "f", "g", "h", "i39", "j40",
"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 431 ⟶ 3 430 :
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 647 ⟶ 3 648 :
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 4 191 ⟶ 4 194 :
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"] }, --= "currentNormal 1 digit value" },
{ ["int"] = 11, ["expect"] = "XI", ["reason"] }, --= "currentNormal 2 digit value" },
{ ["int"] = 111, ["expect"] = "CXI", ["reason"] }, --= "currentNormal 3 digit value" },
{ ["int"] = 1111, ["expect"] = "MCXI", ["reason"] }, --= "currentNormal 4 digit value" },
{ ["int"] = "19", ["expect"] = "IXX", ["reason"] = "Forbiden string value" }, -- "string value"
{ ["int"] = 4999, ["expect"] = "MMMMCMXCIX" }, ["reason"] --= "lastHighter valuelimit of classic roman numbers" },
{ ["int"] = 5000, ["expect"] = "0", ["reason"] },= --"Smaller too "valuebig >classic 4999roman errornumbers" },
}
 
Ligne 4 211 ⟶ 4 215 :
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 digitalinteger 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(one_test.["int"])
one_test["val_int"], one_test["err_int"] = mathroman.roman2int(one_test["result"]) -- DEBUG : function mathroman.roman2int() can fail without blocking page.
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["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 digitalinteger numbers to roman numbers"
test_group = group,
form_one_case = function(case) -- Convert a case from test_group to rowGroup.
return { case["int"], tostring(case["result"]), tostring(case["expect"]), case["errors"], case["reason"], }
local valX, errs = mathroman.int2roman(case["int"]) -- DEBUG : mathroman.roman2int() can fail without blocking page.
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_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 306 ⟶ 4 312 :
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"] = "mathroman_char_X_in_N_err---1-Forbiden negative value" },
{ ["rom"] = "0", ["expect"] = 0, ["reason"] = "Forbiden 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"] = "XIJIXCM", ["expect"] = 12, ["reason"] = "Forbiden 3 increasing characters" },
{ ["rom"] = "XJIXIJ", ["expect"] = 12, ["reason"] = "Xnormal end Yin ZJ" },
{ ["rom"] = "XJI", ["expect"] = 12, ["reason"] = "mathroman_char_increase_errForbiden J before end" },
{ ["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"] = "mathroman_J_before_end_err-XJISmaller too big classic roman numbers" },
{ ["rom"] = "MMMMMYJXC", ["expect"] = 5089, ["reason"] = ";mathroman_J_before_end_err;mathroman_char_increase_err;mathroman_char_X_in_N_err-Y-6;mathroman_greater_4999_err;several errors" },
}
 
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 digitalinteger 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(one_test.["rom"]) -- DEBUG : function mathroman.roman2int() can fail without blocking page.
one_test["val_rom"], one_test["errs_rom"] = mathroman.int2roman(one_test["result"]) -- 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["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 digitalinteger numbers"
test_group = group,
form_one_case = function(case) -- Convert a case from test_group to rowGroup.
return { case["rom"], case["result"], case["expect"], case["errors"], case["reason"], }
local valX, errs = mathroman.roman2int(case["rom"]) -- DEBUG : function mathroman.roman2int() can fail without blocking page.
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 201 ⟶ 5 209 :
-- - - - ------------------ - - - - ---------------------------------
 
modes.options_for_modes = { -- default options_for_modes LVAMQDR
["read"] = " box1 ",
["edit"] = " box1 docdef docline docsrc docdata catview docview : ",
Ligne 5 262 ⟶ 5 270 :
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 270 ⟶ 5 277 :
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 298 ⟶ 5 307 :
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 305 ⟶ 5 313 :
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 852 ⟶ 5 862 :
counts.known = counts.known+1 ; tt = tt .. viewers.ta(argmt.src, counts.known)
end
if modes.args_importargs_known[argmt.keyword] then
argmt.val = modes.args_importargs_known[argmt.keyword] ; argmt.src = "import" ;
counts[argmt.src] = counts[argmt.src]+1 ; tt = tt .. viewers.ta(argmt.src, counts[argmt.src])
end
Ligne 5 860 ⟶ 5 870 :
counts[argmt.src] = counts[argmt.src]+1 ; tt = tt .. viewers.ta(argmt.src, counts[argmt.src])
end
if modes.args_finalargs_known[argmt.keyword] then
argmt.val = modes.args_finalargs_known[argmt.keyword] ; argmt.src = "final" ;
counts[argmt.src] = counts[argmt.src]+1 ; tt = tt .. viewers.ta(argmt.src, counts[argmt.src])
end
Ligne 6 709 ⟶ 6 719 :
-- { "20181203", "20181204", "todo", "Rical", "S181203mad", "For 'Begin' rename function modes.get_args_datas( to modes.get_mode_args_datas( To simplify Central.init" },
-- function modes.get_mode_args_datas(args_known) -- S181203mad To simplify Central.init S181204SCi
function modes.get_args_datas(args_known) -- Applies the Tatic for (err, wng, cat) S181124Dng LVAMQDR
-- ["QITEM"] = { ["typ"] = "dat", ["need"] = "default", ["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.
Ligne 7 259 ⟶ 7 269 :
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 796 ⟶ 7 808 :
headers = " insub; sub; sought; known; errors ",
headers_class = "wikitable alternative center sortable",
-- track_on rowGroup = true{},
-- track_on == "details",
}
--
Ligne 8 202 ⟶ 8 215 :
end
 
function versions.setup_central_libraries(bindable_libraries, opt) -- LVAMQDR 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 354 ⟶ 8 367 :
headers = "module; arg; change; results; errors", -- "OK or error/s"
rowGroup = {},
-- track_on == "details",
-- ccc = {}, -- to remember
}
-- Runs tests cases and formats a table view with lines and columns.s
Ligne 8 449 ⟶ 8 462 :
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 481 ⟶ 8 496 :
 
-- 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) -- LVAMQDR
-- Initializes translations, bind_libraries, bind_sub_modules, get arguments, modes, options.
-- Imports arguments from wikidata, module and template with increasing priorities.
Ligne 8 576 ⟶ 8 591 :
headers = "versions_versions_management_headers", -- "sought; versions; process; comments",
headers_class = "wikitable alternative center sortable",
-- track_on rowGroup = true{},
-- track_on == "details",
}
function tab_view.form_one_case(vers_test) -- Convert a case from test_group to rowGroup.
Ligne 9 821 ⟶ 9 837 :
keys = "name;args;expect;result;errors",
rowGroup = {},
-- track_on == "details",
ccc = {},
}
-- Runs tests cases and formats a table view with lines and columns.s
Ligne 10 045 ⟶ 10 061 :
-- 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 117 ⟶ 10 134 :
-- headers_class = "wikitable alternative center sortable",
rowGroup = {},
-- track_on == true"details",
}
function tab_view.form_one_case(case) -- Convert a case from test_group to rowGroup.
Ligne 10 268 ⟶ 10 285 :
end
local dropbox_title = 'Drop-down box' -- Modèle:Boîte déroulante for drop_box.form
local dropbox_title = 'Boîte déroulante' -- Modèle:Boîte déroulante for Boîte déroulante
local dropbox_title = viewers.form9content('p_template_drop_box_name')
local dropbox_title = 'Boîte déroulante' -- 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 572 ⟶ 10 589 :
--
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 718 ⟶ 10 735 :
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 179 ⟶ 11 196 :
-- - - - ------------------ - - - - ---------------------------------
 
p.args_known = { -- Table of the definitions of all known arguments at module level. LVAMQDR
 
-- 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 192 ⟶ 11 206 :
-- 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.
["imagemode"] = { ["typ"] = "datconfig", ["needkeyword"] = "defaultmode", ["keywordprop"] = "imagemodes.options_for_modes", ["propprop_default"] = "P18read", }, -- Mode read as default
["countryimage"] = { ["typ"] = "dat", ["needkeyword"] = "defaultimage", ["keyword"] = "country", ["prop"] = "P27P18", },
["birthyearcountry"] = { ["typ"] = "dat", ["need"] = "default", ["keyword"] = "birthyearcountry", ["prop"] = "P569", ["format"] = "yearP27", },
["deathyearbirthyear"] = { ["typ"] = "dat", ["need"] = "default", ["keyword"] = "deathyearbirthyear", ["prop"] = "P570P569", ["format"] = "year", },
["lastnamedeathyear"] = { ["typ"] = "dat", ["needkeyword"] = "defaultdeathyear", ["keywordprop"] = "lastnameP570", ["propformat"] = "P734year", },
["lastname2lastname"] = { ["typ"] = "dat", ["need"] = "default", ["keyword"] = "lastname", ["prop"] = "P734", ["syn"] = 2, },
["firstnamelastname2"] = { ["typ"] = "dat", ["need"] = "default", ["keyword"] = "firstnamelastname", ["prop"] = "P735P734",["prop_default"] = "Galilée", },
["firstname2firstname"] = { ["typ"] = "dat", ["need"] = "default", ["keyword"] = "firstname", ["prop"] = "P735", ["syn"] = 2, ["prop_default"] = "Galilée", },
["initialfirstname2"] = { ["typ"] = "dat", ["needkeyword"] = "defaultfirstname", ["keywordprop"] = "initialP735", ["propprop_default"] = "P735Galilée", },
["titleinitial"] = { ["typ"] = "dat", ["need"] = "default", ["keyword"] = "labelinitial", ["prop"] = "P735", ["syn"] = 2, ["prop_default"] = "label", },
["personlangtitle"] = { ["typ"] = "dat", ["needkeyword"] = "defaultlabel", ["keyword"] = "personlang", ["prop"] = "P1412P735", ["prop_default"] = "enlabel", },
["descriptionpersonlang"] = { ["typ"] = "dat", ["needkeyword"] = "defaultpersonlang", ["keywordprop"] = "descriptionP1412", ["propprop_default"] = "descriptionen", },
["labeldescription"] = { ["typ"] = "dat", ["need"] = "default", ["keyword"] = "labeldescription" , ["prop"] = "label", ["prop_default"] = "labeldescription", },
["labelcontentlabel"] = { ["typ"] = "dat", ["needkeyword"] = "defaultlabel" , ["keyword"] = "labelcontent", ["prop"] = "labelcontentlabel", ["prop_default"] = "Q307label", }, -- Galilée
["labelpagelabelcontent"] = { ["typ"] = "dat", ["need"] = "default", ["keyword"] = "labelpagelabelcontent", ["prop"] = "labelpagelabelcontent", ["prop_default"] = "Q307", }, -- Galilée
["labeluserlabelpage"] = { ["typ"] = "dat", ["need"] = "default", ["keyword"] = "labeluserlabelpage", ["prop"] = "labeluserlabelpage", ["prop_default"] = "Q307", }, -- Galilée
["labelbylanglabeluser"] = { ["typ"] = "dat", ["needkeyword"] = "defaultlabeluser", ["keyword"] = "labelbylang",["prop"] = "labelbylanglabeluser", ["prop_default"] = "Q307", }, -- Galilée
["QITEMlabelbylang"] = { ["typ"] = "dat", ["need"] = "default", ["keyword"] = "QITEMlabelbylang", ["prop"] = "QITEMlabelbylang", ["prop_default"] = "Q307", }, -- Galilée
["itemidQITEM"] = { ["typ"] = "dat", ["need"] = "default", ["keyword"] = "itemidQITEM", ["prop"] = "itemidQITEM", ["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 475 ⟶ 11 490 :
 
function Central.init(frame, Central_version, mode_name, args_known, options_for_modes)
-- LVAMQDR 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 = "\n* Central.init(frame, Central_version, mode_name, args_known, options_for_modes)<br>"
-- res = res .. tracker.init_trakers() -- Initialize some trakers. To run in Central.init()
-- modes.time1 = os.clock()
local args_known = args_known or modes.args_known or p.args_known or {} -- optional value from p.args_known = {...}
-- ["mode"] = { ["typ"] = "config", ["keyword"] = "mode", ["prop"] = "modes.options_for_modes", ["prop_default"] = "read", }, -- Mode read as default
Central_version = Central_version or langs.Central_version or Central.Central_version_name
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
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)
 
-- LVAMQDR = Librairies Versions Args Mode Item Datas Results:
-- function modes.Librairies_Versions_Args_Mode_Item_Datas_Results(args_known) for function Central.init(
function modes.Librairies_Versions_Args_Mode_Item_Datas_Results(frame, mode_name, args_known, options_for_modes, QITEM) -- LVAMQDR replaces function Central.init( code
-- Central.init(frame, mode_name, args_known, options_for_modes, QITEM) -- LVAMQDR Typical call
local res = ""
local bindable_libraries = bindable_libraries or versions.bindable_libraries or {} -- optional value from p.args_known = {...}
versions.setup_central_libraries(bindable_libraries, opt) -- L in LVAMQDR Install central bindable libraries in package.loaded
-- 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.", }
local args_known = args_known or modes.args_known or p.args_known or {} -- A in LVAMQDR Arguments definitions at module level p.args_known = {...}
versions.init(frame, Central_version, mode_name, args_known, options_for_modes, QITEM) -- V in LVAMQDR
local options_for_modes = options_for_modes or modes.options_for_modes or {} -- M in LVAMQDR 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
langs.init_content_page_user_lang() -- function langs.init_content_page_user_lang()
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)
-- LVAMQDR 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* Central.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
Ligne 11 493 ⟶ 11 567 :
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)
-- LVAMQDR 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* Central.init(frame, Central_version, mode_name, args_known, options_for_modes)<br>"
res = res .. modes.Librairies_Versions_Args_Mode_Item_Datas_Results(frame, mode_name, args_known, options_for_modes, QITEM) -- LVAMQDR replaces function Central.init( code
-- local datas = mw.clone(datas) modes.get_args_datas
-- datas.props = datas.get_item(args_known, QITEM) -- Get datas from mw.wikibase for the page.
res = res .. (datas.props_trk or "")
res = res .. "</b>"
Ligne 11 504 ⟶ 11 593 :
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 515 ⟶ 11 604 :
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 717 ⟶ 11 806 :
local res = ""
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, "")
return res