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

Contenu supprimé Contenu ajouté
MdCentral.lua MdCentral 1.33.0-wmf.20 save as it is ot try it in MdTests.lua 20190306 0840.lua
MdCentral reuse modes.levenshtein_similar_tests always OK 20190317 0544.lua
Ligne 2 :
-- The main central module is mainly an installer of central libraries and a small demonstrator.
-- The main central module installs central libraries and bind the main and its sub-modules
local Central = p -- Save as MdCentral.lua MdCentral 1reuse modes.33.0-wmf.20levenshtein_similar_tests savefor asalways it is ot try it in MdTests.luaOK 2019030620190317 08400544.lua
------------------------------------------|------------------------ typical length --------------------------|----------max| DODO
 
Ligne 15 :
['versionFrom'] = "CentralTest begin debug from function modes.levenshtein_similar_tests OK.lua",
['versionName'] = "Centralizer",
['versionNumber'] = "1.0.0(190306T07190313T21:4026:00)",
['versionDate'] = "2019-03-06T0713T21:4026:00", -- UTC version structure MWMW 2019-03-02T09:28:00
['mainDescription'] = "Begin to use",
['functionDescription'] = "first functional support",
Ligne 29 :
}
}
 
Central.Central_version_name = Central.version.versionName
p.ModuleNS = mw.site.namespaces.Module.name .. ":" -- translate Module: in other languages
 
-- cut_libraries
--------------------------------------------------|------------------------ typical length --------------------------|----------max| DODO
 
-- only for ModuleCentralizer : restart from : ModuleCentralizer function modes.levenshtein_similar_tests OK.lua DODO
-- only for ModuleCentralizer : then in function p.init_central_moduleinit_international_report(() group only all sub-functions in the original order then delete duplicated one's.
-- only for ModuleCentralizer : then use function p.init_central_moduleinit_international_test() to replace function Central.init()
-- only for ModuleCentralizer : delete tests_groups and args_final and boxviews and update activity.report_subtasks_list
-- todo : then use function p.Init_central_module() to replace function Central.init()
 
-- TODO for ModuleCentralizer : then in function p.init_central_module() group only all sub-functions in the original order then delete duplicated one's.
p.NOWNOW = { -- in work subtasks for replace on 20181205
-- TODO for ModuleCentralizer : then use function p.init_central_module() to replace function Central.init()
{ "20190101", "20190101", "todo", "Rical", "S190101cTD", "Ask a central Template:Dropbox for all mediawikis users you and me. on 20190101", },
-- TODO for ModuleCentralizer : then use function p.init_international() to replace function Central.init()
{ "20181225", "20181226", "todo", "Rical", "S181227trb", "treebranches -- For each sought. Replace known. Later on 201811207", },
-- TODO for ModuleCentralizer : then use function p.init_international_report() to replace function Central.init()
{ "20181224", "20181224", "NOW", "Rical", "S181224rtn", "ModuleCentralizer replace template's display to their names in fr.wikipedia.org and fr.wikisouce.org", },
-- TODO for ModuleCentralizer : then use function p.init_international_test() to replace function Central.init() init_central_module
-- S181224rtn : a similar comportment suggest a change in MW"
-- S181224rtn : do not happened before the MediaWiki version "1.33.0-wmf.9 (02196d2)"
{ "20181224", "20181224", "NOW", "Rical", "S181224ust", "Module:Centralizer update subtasks list", },
{ "20181222", "20181225", "todo", "Rical", "S181222CrC", "Module:CentralSchool: finish reciprocal adaptation with Module:Centralizer", },
{ "20181222", "20181222", "done", "Rical", "S181222SCi", "For 'Begin' Simplify function Central.init(frame, ...) using function p.init_central_module()" },
{ "20181221", "20181222", "todo", "Rical", "S181221oTc", 'others: ["Tactic"] = "canbenil;nevererror" ', },
{ "20181220", "20181221", "NOW", "Rical", "S181220oso", "select only sub-functions in the right order in function p.init_central_module()", },
{ "20181220", "20181220", "NOW", "Rical", "S181220ust", "Module:Centralizer update subtasks list", },
{ "20181205", "20181206", "done", "Rical", "S181205mgT", "function modes.get_args_datas_tests(t) Tactic all in one for modes args datas no known_arguments no origins old" },
}
 
-- only for ModuleCentralizer : restart from : ModuleCentralizer function modes.levenshtein_similar_tests OK.lua DODO
p.teststests = "FAMLTVQDR"
-- done for ModuleCentralizer : delete tests_groups and args_final and boxviews and update activity.report_subtasks_list
 
-- done for ModuleCentralizer : then in function p.init_international() group only all sub-functions in the original order then delete duplicated one's.
p.version = { -- Modules dependencies. Dependencias del módulo. Dépendances du module.
-- done for ModuleCentralizer : then use function p.init_international() to replace function Central.init() function modes.
["versionName"] = "Centralizer",
-- done for ModuleCentralizer : then use function p.init_international_report(t) -- Reports known_arguments for phase = "mode" or "argument" or "QITEM" or "property"
["versionNumber"] = "1.0.0(181227T22:44)",
-- done for ModuleCentralizer : then use function p.init_international_test() to replace function Central.init()
["versionDate"] = "2018-12-27T22:44: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"] = "Centralizer;Centralizer/I18N;Mathroman;TestRequire", -- Sought module and submodules versions
["known"] = "Centralizer;Central-s-fr;Central-14 * Centralizer/I18N;Central/i18n * Mathroman22;Mathroman34", -- Known module and submodules versions
["treebranches"] = { -- For each sought. Replace known. Later on 201811207
{ "Centralizer", "Central-s-fr", "Central-2017" }, -- upper
{ "Centralizer/I18N", "Central-s-fr", "Central-2018" }, -- median
{ "Mathroman22", "Mathroman34" }, -- lower
}
}
Central.Central_version_name = Central.version.versionName
p.ModuleNS = mw.site.namespaces.Module.name .. ":" -- translate Module: in other languages
 
-- cut_libraries
Ligne 127 ⟶ 104 :
-- versions.args = args -- Object:args from 20180106 todo
-- Records are in function versions.setup_central_libraries(bindable_libraries, opt) -- Install central bindable libraries in package.loaded
-- done for ModuleCentralizer : then use function p.init_international() to replace function Central.init() function modes.
p.init_international = {} -- () to replace function Central.init()
modes.init_international = p.init_international -- Library:modes from arguments support on 20130125 in Module:Author, 20130312 in Module:ControlArgs
 
Central.infos = { -- from 20171218
Ligne 403 ⟶ 383 :
return "\n* ARGS.t=" .. tostring(ARGS.t) .. ", CNT.t=" .. tostring(CNT.t)
end
-------------------
---- CO
-------------------
 
 
-- cut_libraries
 
-- - - - ------------------ - - - - ------------------ - - - - -----------------------------
-- - - - ------------------ - - - - ------------------ - - - - -----------------------------
-- The Library:events supports events of types erros, warnings and categories.
-- viewers.save_configs("events.save_configs" memo, tab_view, group ) -- Init a new events group
-- events.add_err(key, ... ) -- Add an error in the actual table of events.
-- events.add_cat_group(groupCat, groupList) -- Add some categories in the actual table of events.
-- events.form(evt) -- Format events types
-- events.all_categories_test(t) -- test categories
-- - - - ------------------ - - - - ---------------------------------
-- - - - ------------------ - - - - ---------------------------------
 
-- events = {} -- already declared by Scribunto, see central_library.new() -- Record a library in package.loadedS
 
events.i18n = {} -- Translations for Library:events
events.i18n.br = {
events_test_tests_title = "List a table, test with limits:",
events_test_resTest_title = "List a table, test with limits:",
events_test_projects_title = "Test and display tests events for projects",
events_test_projects_headers = "Type;Key;Name test and values;result of the test",
events_test_MediaWiki_title = "Test and display tests events for MediaWiki",
events_test_MediaWiki_headers = "Type;Key;Name test and values;result of the test",
events_test_categ_Test_title = "Tester categ_Test : catégories dans quelques langues",
events_all_kinds_tests_title = "events.all_kinds_test() Test: toutes les sortes d'événements (err, wng, cat)",
events_all_kinds_tests_headers = "typ;key;idargs;result",
events_add_cat_deprecated = "Fonction obsolète dans le module principal.",
events_close_without_memo_err = "viewers.restore_configs(memo, where) sans <b>memo</b> dans le module <b>%1</b>.",
events_antiCrash_protect_err = "La fonction antiCrash() protège cette page contre un effondrement complet dû à une erreur interne : %1.",
} -- events.i18n.br
events.i18n.en = {
events_test_tests_title = "List a table, test with limits:",
events_test_resTest_title = "List a table, test with limits:",
events_test_projects_title = "Test and display tests events for projects",
events_test_projects_headers = "Type;Key;Name test and values;result of the test",
events_test_MediaWiki_title = "Test and display tests events for MediaWiki",
events_test_MediaWiki_headers = "Type;Key;Name test and values;result of the test",
events_test_categ_Test_title = "categ_Test test : classes in some languages",
events_all_kinds_tests_title = "events.all_kinds_test() Test: all kinds of events (err, wng, cat)",
events_all_kinds_tests_headers = "typ;key;idargs;result",
events_close_without_memo_err = "viewers.restore_configs(memo, where) without <b>memo</b> in module <b>%1</b>.",
events_antiCrash_protect_err = "The antiCrash() function protects this page against a complete crash due to an internal error: %1.",
} -- events.i18n.en
events.i18n.es = {
events_test_tests_title = "List a table, test with limits:",
events_test_resTest_title = "List a table, test with limits:",
events_test_projects_title = "Test and display tests events for projects",
events_test_projects_headers = "Type;Key;Name test and values;result of the test",
events_test_MediaWiki_title = "Test and display tests events for MediaWiki",
events_test_MediaWiki_headers = "Type;Key;Name test and values;result of the test",
events_test_categ_Test_title = "Prueba categ_Test: clases en algunos lenguajes",
events_all_kinds_tests_title = "events.all_kinds_test() Prueba: todo tipo de eventos (err, wng, cat)",
events_all_kinds_tests_headers = "typ;key;idargs;result",
events_add_cat_deprecated = "Función obsoleto en módulo principal.",
events_close_without_memo_err = "viewers.restore_configs(memo, where) sin <b>memo</b> en el módulo <b>%1</b>.",
events_antiCrash_protect_err = "La función antiCrash() protege esta página contra un colapso completo debido a un error interna: %1.",
} -- events.i18n.es
events.i18n.fr = {
events_test_tests_title = "List a table, test with limits:",
events_test_resTest_title = "List a table, test with limits:",
events_test_projects_title = "Test and display tests events for projects",
events_test_projects_headers = "Type;Key;Name test and values;result of the test",
events_test_MediaWiki_title = "Test and display tests events for MediaWiki",
events_test_MediaWiki_headers = "Type;Key;Name test and values;result of the test",
events_test_categ_Test_title = "Tester categ_Test : catégories dans quelques langues",
events_all_kinds_tests_title = "events.all_kinds_test() Test: toutes les sortes d'événements (err, wng, cat)",
events_all_kinds_tests_headers = "typ;key;idargs;result",
events_add_cat_deprecated = "Fonction obsolète dans le module principal.",
events_close_without_memo_err = "viewers.restore_configs(memo, where) sans <b>memo</b> dans le module <b>%1</b>.",
events_antiCrash_protect_err = "La fonction antiCrash() protège cette page contre un effondrement complet dû à une erreur interne : %1.",
} -- events.i18n.fr
events.i18n.hu = {
events_test_tests_title = "List a table, test with limits:",
events_test_resTest_title = "List a table, test with limits:",
events_test_projects_title = "Test and display tests events for projects",
events_test_projects_headers = "Type;Key;Name test and values;result of the test",
events_test_MediaWiki_title = "Test and display tests events for MediaWiki",
events_test_MediaWiki_headers = "Type;Key;Name test and values;result of the test",
events_test_categ_Test_title = "Tester categ_Test : catégories dans quelques langues",
events_all_kinds_tests_title = "events.all_kinds_test() Test: toutes les sortes d'événements (err, wng, cat)",
events_all_kinds_tests_headers = "typ;key;idargs;result",
events_add_cat_deprecated = "Fonction obsolète dans le module principal.",
events_close_without_memo_err = "viewers.restore_configs(memo, where) sans <b>memo</b> dans le module <b>%1</b>.",
events_antiCrash_protect_err = "La fonction antiCrash() protège cette page contre un effondrement complet dû à une erreur interne : %1.",
} -- events.i18n.hu
events.i18n.vi = {
events_test_tests_title = "List a table, test with limits:",
events_test_resTest_title = "List a table, test with limits:",
events_test_projects_title = "Test and display tests events for projects",
events_test_projects_headers = "Type;Key;Name test and values;result of the test",
events_test_MediaWiki_title = "Test and display tests events for MediaWiki",
events_test_MediaWiki_headers = "Type;Key;Name test and values;result of the test",
events_test_categ_Test_title = "Tester categ_Test : catégories dans quelques langues",
events_all_kinds_tests_title = "events.all_kinds_test() Test: toutes les sortes d'événements (err, wng, cat)",
events_all_kinds_tests_headers = "typ;key;idargs;result",
events_add_cat_deprecated = "Fonction obsolète dans le module principal.",
events_close_without_memo_err = "viewers.restore_configs(memo, where) sans <b>memo</b> dans le module <b>%1</b>.",
events_antiCrash_protect_err = "La fonction antiCrash() protège cette page contre un effondrement complet dû à une erreur interne : %1.",
} -- events.i18n.vi
 
events.test_group = {}
events.rowGroup = {}
events.tab_view = {}
events.tab_view.test_group = {}
events.tab_view.rowGroup = {}
 
function events.add_cat(key, ... ) -- Add a category in the actual table of events.
return events.add_record("cat", key, ...) -- Add a error, warning or category in the lists. S170626rev
end
 
function events.add_err(key, ... ) -- Add an error in the actual table of events.
return events.add_record("err", key, ...) -- Add a error, warning or category in the lists. S170626rev
end
 
function events.add_wng(key, ... ) -- Add a warning in the actual table of events.
return events.add_record("wng", key, ...) -- Add a error, warning or category in the lists. S170626rev
end
 
function events.form_cat(evt, txt, lnk, c, space)
local space = space or (mw.site.namespaces.Category.name .. ":")
local c = c or evt.ccc or ":"
if evt.typ == "cat" then -- Format a category to display or activate
evt.content_wkt = viewers.form9content(evt.key, lua_table.to_list( evt.vals ) )
evt.page_wkt = viewers.form9page(evt.key, lua_table.to_list( evt.vals ) )
evt.user_wkt = viewers.form9user(evt.key, lua_table.to_list( evt.vals ) )
return " [[" .. c .. space .. (evt.content_wkt or lnk) .. "|" .. (evt.user_wkt or txt) .. "]] "
else
return ""
end
end
 
events.list_all_events = {} -- Table to collect all events types "err", "wng" and "cat".
 
function events.new(typ, key, ...) -- Initialize and finalize a new event.
local evt = {} -- default event
if type(typ) == "table" then
evt = typ -- Use a predefined event
else -- To finalize an existing event.
evt.typ = typ
evt.key = key
end -- Finalize all events
evt.typ = evt.typ or typ -- Type of event: err, wng, cat
evt.key = evt.key or key -- Translation key, simple or extended by name
if type(typ) ~= "string" then typ = "notyp" end -- To debug abnormal type of event
if type(key) ~= "string" then key = "nokey" end -- To debug abnormal translation key
evt.name = evt.typ or evt.key or "name" -- Translation key, simple or extended by name
evt.vals = evt.vals or { ... } -- table of arguments values
evt.catview = evt.catview or ":" -- Default value for eventual use
-- Check, yes or no, to form an event, in special cases
if (evt.typ == "cat") then
evt.res, evt = events.form( evt ) -- Formats the resulting wikitext, can be re-form later
elseif (evt.typ == "err") then
evt.res, evt = events.form( evt ) -- Formats the resulting wikitext, can be re-form later
elseif (evt.typ == "wng") then
evt.res, evt = events.form( evt ) -- Formats the resulting wikitext, can be re-form later
end
return evt
end -- function events.new(typ, key, ...)
 
function events.add_new(evt) -- Add a error, warning or category in the lists. S170626rev
-- Select only new events
if type(evt) ~= "table" then evt = {} end
local new_evt = viewers.form9tests( tostring(evt.key), lua_table.to_list( evt.vals ) )
for i, event in pairs(events.list_all_events) do
local old_evt = viewers.form9tests( tostring(event.key), lua_table.to_list( event.vals ) )
if new_evt == old_evt then new_evt = nil ; break end -- Add only new events. Reject already seen events.
end
-- events.add_wng("modes_auto_val_warning_wng", langs.user_translations[key], val) -- form_result
if new_evt then table.insert(events.list_all_events, evt) end
return evt
end -- function events.add_new(typ, ref, ...)
 
function events.add_record(typ, key, ... ) -- Add a new error, warning or category in a list.
-- Guide line: all events are in a single table, including categories, without duplication.
-- Guide line: without duplication: events differ if the type, the key or any value of any argument differs.
-- Guide line: We can view or categorize categories.
local intern_or_use = versions.memo_i18n["en"][key]
local evt = events.new(typ, key, ...) -- Initialize and finalize a new event.
local evt = events.add_new(evt) -- Add an error, warning or category in the lists. S170626rev
local res, evt = events.form(evt, c) -- Format an event as an error, warning or category.
return res, evt
end -- local res, evt = events.add_record(typ, key, ... )
 
function events.form(evt, c) -- Format an event as an error, warning or category.
evt.res = tostring(evt.res) .. "? form " .. viewers.form9tests(".form evt.key=%1, evt.res=%2, ", evt.key, evt.res )
local evt = mw.clone(evt) -- do not disturb input event
if type(evt) ~= "table" then
evt.res = lua_table.rough_view(evt)
return evt.res, evt
end
if (evt.typ ~= "cat") and (evt.typ ~= "wng") and (evt.typ ~= "err") then
evt.res = lua_table.rough_view(evt)
return evt.res, evt
end
evt.tableStyle = evt.tableStyle or "" -- Could change the style of the wikitext. Not available on 20160916
if type(evt.name) ~= "string" then evt.name = ""
elseif evt.name ~= "" then evt.name = evt.name .. "_" end
evt.idargs = evt.name .. tostring( viewers.form9user( tostring(evt.key), lua_table.to_list( evt.vals ) ) )
-- Each type of event formats its own type of wikitext
evt.content_wkt = viewers.form9content(evt.key, lua_table.to_list( evt.vals ) )
evt.page_wkt = viewers.form9page(evt.key, lua_table.to_list( evt.vals ) )
evt.user_wkt = viewers.form9user(evt.key, lua_table.to_list( evt.vals ) )
evt.res = "" -- multilingual
if evt.typ == "err" then evt.res = viewers.styles_color_error(evt.user_wkt) end
if evt.typ == "wng" then evt.res = viewers.styles_color_warning(evt.user_wkt) end
evt.ccc = c or evt.catview or events.catview or ":"
evt.content_catspace = mw.site.namespaces.Category.name -- name: Local namespace name.
if evt.typ == "cat" then -- Format a category to display or activate
evt.res = events.form_cat(evt)
if viewers.is_in("_i_cat", key) then -- If needed, add a second "Category:Module with internal error"
res = res .. events.add_cat("versions_with_internal_error")
end
if viewers.is_in("_u_cat", key) then -- If needed, add a second "Category:Module with user error"
res = res .. events.add_cat("versions_with_user_error")
end
end
return evt.res, evt
end -- function events.form(evt, c)
 
events.all_kinds_test_test_group = {
{ "abc", "langs_form9user_all_types_values", { "pi = ", "circle / diameter", 3.14, }, },
{ "equation", "langs_form9user_all_types_values", { 11, 7, 3.14, }, },
{ "Matrix:", "langs_form9user_all_types_values", { "2.1.0", "v4-6, ISO_8601, FC14 h6", }, },
{ "pi = ", "langs_form9user_all_types_values", { "circle / diameter", 3.14, }, },
{ "quadrature", "langs_form9user_all_types_values", { function() end, "convert a square to a circle", }, },
}
-- langs_form9user_all_types_values = "Test: string=%1 number=%2 nil=%3 function=%4 table=%5.",
function events.all_kinds_test(t) -- Test: all kinds of events (err, wng, cat)
local memo = viewers.save_configs("events.all_kinds_test") -- Save global configuration before eventual changes.
events.all_kinds_trck = "\n* events.all_kinds_trck: "
local t = t or ""
t = t .. "\n* events.all_kinds_test(t) -- Test: all kinds of events (err, wng, cat): "
t = t .. events.all_kinds_trck
local tab_view = { -- Group datas and options for a table view with lines and columns.
test_group = events.all_kinds_test_test_group, -- Use default cases.
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 = {},
}
function tab_view.form_one_case(evt) -- Convert a case from test_group to rowGroup.
return { evt.typ or "t", evt.key or "k", evt.idargs or "i", evt.res or "r" }
end
t = t .. tableview.new(tab_view) -- Runs tests cases and formats a table view with lines and columns.
t = t .. viewers.ta("end #test_group *2", lua_table.level_count(tab_view.test_group) ) -- function tableview.new( nil bug170602
t = t .. viewers.ta("end #rowGroup *2", lua_table.level_count(tab_view.rowGroup) ) -- function tableview.new( nil bug170602
t = t .. events.all_kinds_trck
viewers.restore_configs(memo, "events.all_kinds_test") -- Restore global configurations after eventual changes.
return t
end -- function events.all_kinds_test(t)
 
function events.add_cat_group(groupCat, groupList) -- Add some categories in the actual table of events. Separated by ";".
-- catGroup("Country %1", "France,Italia") -> [[Category:Country France]] [[Category:Country Italia]]
if type(groupCat) ~= "string" then groupCat = "%1" end
if type(groupList) ~= "string" then return "" end
local cats = ""
for i, str in mw.text.gsplit(groupList, ";", true) do
local wkt = viewers.form9user(groupCat, str)
cats = cats .. events.add_cat(groupCat, wkt)
end
local res, evt = events.add("catGroup", groupCat, cats) -- Add an event to a group.
evt.trc = evt.trc .. viewers.form9user("\n* add_cat evt.typ=%1, evt.key=%2, ", evt.typ, evt.key)
return res, evt
end -- function events.add_cat_group(groupCat, groupList)
 
function events.select_typ(typ) -- Select events by one type
local is = {}
for i, evt in pairs(events.test_group) do
if evt.typ == typ then table.insert( is, evt.idargs ) end
end
return is
end
 
function events.sort_typ() -- Sort events by type in wng, err, cat.
local wng, err, cat = {}, {}, {}
for i, evt in pairs(events.test_group) do
if evt.typ == "wng" then table.insert( wng, evt ) end
if evt.typ == "err" then table.insert( err, evt ) end
if evt.typ == "cat" then table.insert( cat, evt ) end
end
return wng, err, cat
end -- function events.sort_typ()
 
function events.selector( tab_view, evt )
if type(evt) ~= "table" then
evt = { -- options for tableview.new() -- Formats a table with lines and columns.
headers = "typ;key;selector-name;wkt",
style = "",
typ = "err",
rowGroup = {},
}
else
evt.headers = evt.headers or "typ;key;else-name;wkt"
evt.tableStyle = evt.tableStyle or ""
evt.name = evt.name or "_"
evt.typ = evt.typ or "nil"
end
if (type(tab_view) == "table") and (type(tab_view.typ) == "string") and (tab_view.typ == evt.typ) then
table.insert( tab_view.test_group, { evt.typ, evt.key, evt.name, evt.wkt } )
elseif (type(tab_view) == "table") and (type(tab_view.typ) == "string") and (tab_view.typ == "v") then
table.insert( tab_view.test_group, { evt.typ, evt.key, evt.name, evt.wkt } )
else
tab_view = {}
table.insert( tab_view.test_group, { evt.typ, evt.key, evt.name, evt.wkt } )
end
end -- function events.selector( tab_view, evt )
 
function events.all_kinds_test_test(t) -- Test: all kinds of events (err, wng, cat)
local memo = viewers.save_configs("events.all_categories_test") -- Save global configuration before eventual changes.
local t = t or "\n* <b>events.all_kinds_test()</b> Test: all kinds of events (err, wng, cat)"
local tab_view = { -- Group datas and options for a table view with lines and columns.
test_group = nil, -- Use default cases.
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",
}
function tab_view.form_one_case(evt) -- Convert a case from test_group to rowGroup.
return { evt.typ, evt.key, evt.idargs, evt.res }
end
t = t .. tableview.new(tab_view) -- Form a table view with lines and columns.
viewers.restore_configs(memo, "events.all_kinds_test_test") -- Restore global configurations after eventual changes.
return t --, errors -- langs_missing_translations_title
end -- function events.all_kinds_test_test(t)
 
events.errors_list = {} -- Deprecated: Table to collect errors and warnings
events.erron = true -- Activated or not errors. Errores activado o no. Erreurs activées ou non.
events.categories_list = {} -- Table to collect all categories to generate in wikitext
 
function events.errors_lister(title, v1, v2, v3, v4, v5, v6, v7, v8, v9)
local res, msgref = "", ""
local mwtitle = mw.title.getCurrentTitle()
local page = tostring(mwtitle.nsText) .. ":" .. tostring(mwtitle.text)
if type(title) ~= "string" then title = "modes_error_list_header_err" end
res = res .. '\n*' .. viewers.form9user(title, page, v1, v2, v3, v4, v5, v6, v7, v8, v9) -- .. ' - ' .. page
local n = 0
for k, wng in ipairs(events.errors_list) do
msgref = viewers.form9user(wng.ref, wng.v1, wng.v2, wng.v3, wng.v4, wng.v5, wng.v6, wng.v7, wng.v8, wng.v9) -- texte traduit ou direct
if wng.typ == "wng" then
res = res .. '<br>⦁ ' .. viewers.styles_color_warning(msgref)
end
end
for k, wng in ipairs(events.errors_list) do
msgref = viewers.form9user(wng.ref, wng.v1, wng.v2, wng.v3, wng.v4, wng.v5, wng.v6, wng.v7, wng.v8, wng.v9) -- texte traduit ou direct
if wng.typ == "err" then
res = res .. '<br>⦁ ' .. viewers.styles_color_error(msgref)
n = n + 1
end
end
if n > 0 then
events.add_cat("versions_module_with_error_err")
end
return res
end -- function events.errors_lister(title, v1, v2, v3, v4, v5, v6, v7, v8, v9)
 
function events.gener_categories() -- Only for this library, form categories without activate them
-- events.gener_categories Only display categories, as a text line, using function events.categories_lister
-- function events.form(evt, c) -- Format an event as an error, warning or category.
local gener = {}
modes.options_to_cat_view()
-- c can replace cat_view to enforce the documentation or the categorisation
c = c or modes.cat_view or ""
for k, evt in pairs(events.list_all_events) do
evt = events.form(evt, c) -- Format an event as an error, warning or category.
table.insert(gener, evt ) -- Build a table with translations counts.
end
return gener
end -- function events.gener_categories(args_final)
 
function events.categories_lister(c) -- Categorize categories, or view categories if c=":".
local res = ""
modes.options_to_cat_view()
-- c can replace cat_view to enforce the documentation or the categorisation
c = c or modes.cat_view or ""
for k, evt in pairs(events.list_all_events) do
if (evt.typ == "cat") then
local keyuser = viewers.form9user(evt.key)
local keycontent = viewers.form9content(evt.key)
res = res .. events.form_cat(evt, keyuser, keycontent, c)
end
end
return res
end -- function events.categories_lister(c)
 
function drop_box.html(title, content_or_func) -- Builds the drop box at the html level.
local memo = viewers.save_configs("onedrop.html") -- Save global configuration before eventual changes.
local t = "\n* onedrop.html() -- Builds the drop box at the html level."
local drop_box_html = drop_box_html_start .. drop_box_html_medium .. drop_box_html_end .. drop_box_look_like
t = t .. drop_box_html_start .. drop_box_html_content
viewers.restore_configs(memo, "onedrop.html") -- Restore global configurations after eventual changes.
return drop_box_html_start
end -- t = t .. onedrop.html(title, content) -- Builds the drop box at the html level.
 
function drop_box.new_title() -- Support desk title of the docDropbox of the edit box.
local t, strings_c, tables_c, strs_on_tabs, subnames = langs.i18n_sub_counts("langs.main_i18n", "langs_main_i18n_languages_count", "user")
local report_main_discreet = viewers.styles_color_discreet( viewers.form_main_version(main_versions) )
local title = viewers.form9user("versions_support_desk_title", report_main_discreet, strs_on_tabs, tables_c)
-- "Support desk for %1 : %2 translations in %3 languages"
return title
end -- function drop_box.new_title()
 
drop_box.css_options = { -- Conventional CSS parameters : See -- https://en.wikisource.org/wiki/Template:drop_box#Parameters
["cssview"] = false, -- cssview : display values of options
["bg1"] = "#FFFFFF", -- bg1 : the background-color for the header
["fs1"] = "100%", -- font-size: 100%;
["fw1"] = "left", -- fw1 : the font-weight for the heading
["ta1"] = "left", -- ta1 : the text-align for the heading
["tc1"] = "black", -- tc1 : the text-color for the heading
--
["bg2"] = "#FFFFFF", -- bg2 : the background-color for the content
["fs2"] = "100%", -- font-size: 100%;
["fw2"] = "left", -- fw2 : the font-weight for the body
["ta2"] = "left", -- ta2 : the text-align for the body
["tc2"] = "black", -- tc2 : the text-color for the body
}
 
viewers.CSS_centralizer = { -- Conventional css parameters : from -- https://en.wikisource.org/wiki/Template:drop_box#Parameters UM
["change"] = "The Module:Centralizer as central changes 2 options like the sun: the typical color and round corners. Used as default in viewers.CSS_centralizer = {...}.",
["height"] = "20px", -- for the round corners
["border-radius"] = "30px", -- for the round corners
["background-color"] = "#ffffcc", -- for the typical color: with a yellow color drawing on the white
["border-color"] = "#ffffcc", -- for the typical color: with a yellow color drawing on the white
}
 
viewers.CSS_drop_down_boxes = { -- Conventional css parameters : from -- https://en.wikisource.org/wiki/Template:drop_box#Parameters UM
["change"] = "Typical style for drop-down boxes.",
["style"] = { -- style : HTML/CSS for affectionates only.
["style"] = "clear:both; margin-bottom:1em; width:99%; border-style:solid; border-radius:0px 0px 0px 0px; border-color:#AAAAAA; background-color:#FFFFFF;",
["title"] = "▼ /▶ ",
},
}
 
-------------------
---- CO CS
-------------------
 
viewers.CSS = { --- Default Conventional css parameters : from -- https://en.wikisource.org/wiki/Template:drop_box#Parameters UM
["margin_all"] = "0px", -- margin
["cssview"] = false, -- cssview : display values of options
["bg1"] = "#FFFFFF", -- bg1 : the background-color for the header
["fs1"] = "100%", -- font-size: 100%;
["fw1"] = "left", -- fw1 : the font-weight for the heading
["ta1"] = "left", -- ta1 : the text-align for the heading
["tc1"] = "black", -- tc1 : the text-color for the heading
--
["bg2"] = "#FFFFFF", -- bg2 : the background-color for the content
["fs2"] = "100%", -- font-size: 100%;
["fw2"] = "left", -- fw2 : the font-weight for the body
["ta2"] = "left", -- ta2 : the text-align for the body
["tc2"] = "black", -- tc2 : the text-color for the body
["change"] = "The Module:Centralizer as central changes 2 options like the sun: the typical color and round corners. Used as default in viewers.CSS_centralizer = {...}.",
["height"] = "20px", -- for the round corners
["border-radius"] = "30px", -- for the round corners
["background-color"] = "#ffffcc", -- for the typical color: with a yellow color drawing on the white
["border-color"] = "#ffffcc", -- for the typical color: with a yellow color drawing on the white
["change"] = "Typical style for drop-down boxes.",
["style"] = { -- style : HTML/CSS for affectionates only.
["style"] = "clear:both; margin-bottom:1em; width:99%; border-style:solid; border-radius:0px 0px 0px 0px; border-color:#AAAAAA; background-color:#FFFFFF;",
["title"] = "▼ /▶ ",
},
["fw1"] = "left", -- fw1 : the font-weight for the heading
-- All values here are default one's.
["fw2"] = "left", -- fw2 : the font-weight for the body
["fs1"] = "100%", -- fs1 : the font-size for the heading
["fs2"] = "100%", -- fs2 : the font-size for the body
["bg1"] = "#FFFFFF", -- bg1 : the background-color for the heading
["bg2"] = "#FFFFFF", -- bg2 : the background-color for the body
["ta1"] = "left", -- ta1 : the text-align for the heading
["ta2"] = "left", -- ta2 : the text-align for the body
["float"] = "none", -- float : should the box be floated? (left, right, or none)
["width"] = "99%", -- width : the width of the box, e.g. 33%
["border-radius"] = "0px 0px 0px 0px", -- border-radius: "15px 50px 30px 5px" : add rounded corners to an element.
["border-color"] = "#ffffcc", -- for the typical color: with a yellow color drawing on the white
["headType"] = "h4", -- -- headType : allows you to set the box header to "h4", e.g. <h4>Box 1.1</h4>
["tc1"] = "black", -- tc1 : the the text-color for the heading
["tc2"] = "black", -- tc1 : the the text-color for the body
["image"] = "Victor Hugo.jpg", -- from datas
}
 
-------------------
---- CO CS
-------------------
 
function viewers.CSS_change(CSS, content) -- Changes the drop_box style using any options.
local CSS = mw.clone(CSS) -- Save global style before eventual changes.
if type(CSS) == "table"
then CSS = CSS -- The new CSS style cans change any options. Only options known in CSS and redefined are active.
else CSS = mw.clone(viewers.CSS_centralizer) end -- as default
return CSS
end -- function viewers.CSS_change(CSS) -- Changes the drop_box style using any options.
 
function drop_box.new(selector, title, content_or_func, ...) -- Formats a drop_box for a doc or a group of tests. Take apart dropit options.
-- From 20180503 a bug (in Module:Centralizer or MediaWiki) some Dropboxes display twice : modes.get_args_report.
-- From 20180503 a bug (in Module:Centralizer or MediaWiki) See CentralManual display twice : modes.get_args_report.xml
-- selector = "allwaysview" -- To allways display one view. -- selector = "enforcerun" -- To debug one box with INTERNAL ERROR.
local memo = viewers.save_configs("drop_box.new") -- Save global configuration before eventual changes.
local t = ""
-- t = t .. "<p width:#10%; > ce texte doit etre tres long. ce texte doit etre tres long. ce texte doit etre tres long. ce texte doit etre tres long. ce texte doit etre tres long. ce texte doit etre tres long. ce texte doit etre tres long. ce texte doit etre tres long. ce texte doit etre tres long. </p>"
t = t .. "<p > ce texte doit etre tres long. ce texte doit etre tres long. ce texte doit etre tres long. ce texte doit etre tres long. ce texte doit etre tres long. ce texte doit etre tres long. ce texte doit etre tres long. ce texte doit etre tres long. ce texte doit etre tres long. </p>"
local args = {...}
local content_or_func_error = viewers.form9user("\n* Error : Abnormal content for drop_box.new(%1, %2).\n*", selector, title, content_or_func) -- , %3
if selector == "never" then return "" end
if not ( (selector == true) or (selector == title) or viewers.is_in_sp(selector, "allwaysview alltestsview enforcerun failinref nocontent") ) then return "" end
if (type(title) ~= "string") then title = "Default_title" end
local dropit = nil -- dropit to change the look of the drop_box
-- Style options in dropit{}: ta1, image, ta2, margin_bottom, width, border_radius, border_color, bg1)
for i, args_tab in ipairs(args) do -- Get the dropit options for the drop_box.
modes.recursiveLoop = (modes.recursiveLoop or 0) + 1
if modes.recursiveLoop > 33 then return "" end
-- The last argument can be a dropit to change the look of the drop_box
if (i == lua_table.level_count(args) ) and (type(args_tab) == "table") and (args_tab["dropit"] == "dropit") then
dropit = mw.clone( args_tab )
end
end
local dropit = dropit or {} -- for antiCrash
if type(title) ~= "string" then title = viewers.form9content("viewers_dropdown_missing_title") end
dropit.selector = selector
dropit.title = title
dropit.args = { ... } -- optional arguments for the content_or_func function
local func_from_name = nil
dropit.content = content_or_func -- string or function
if type(content_or_func) == "string" then func_from_name = lua_table.from_subnames_object(content_or_func) end -- Get the last sub-table from its sub-names.
dropit.content_error = ""
dropit.title = dropit.title .. ( dropit.title_errors or "" )
dropit.resultKind = "ref"
local success, result = true, ""
dropit.result = result
dropit.success = success
if type(func_from_name) == "function" then -- In case of named function:
dropit.func_name = content_or_func -- memorise its name
-- dropit.content = func_from_name -- and use it as content form function
end
-- Original code from wikisource : "{{Boîte déroulante/début|titre=" .. title .. "|ta1=" .. ta1 .. "}}" .. content .. "{{Boîte déroulante/fin}}"
local d = dropit
d.CSS = viewers.CSS
d.CSS.title = dropit.title or d.CSS.title
t = t .. '<div align="'.. d.CSS.ta2 ..'" >'
t = t .. '<div class="NavFrame" style="clear:both; margin-bottom; width:'.. d.CSS.width
t = t ..'; border-style:solid; border-radius:'.. d.CSS["border-radius"] ..'; border-color:'.. d.CSS["border-color"]
t = t ..'; background-color:'.. d.CSS.bg1 ..'; " title= >' -- "'.. d.CSS.label ..'"
t = t .. '<div class="NavHead" align="'.. d.CSS.ta1 ..'" style=" height:'.. d.CSS.height ..'; background-color:'.. d.CSS.bg1 ..'; color:'.. d.CSS.tc1 ..'; " >'
t = t .. d.CSS.title
t = t .. '</div>'
t = t .. '<div class="NavContent" align="'.. d.CSS.ta2 ..'" style="margin:'.. d.CSS.margin_all ..'; background-color:'.. d.CSS.bg1 ..'; display=block; " >'
t = t .. d.CSS.image
-- t = t .. d.CSS.content
t = t .. '</div>'
t = t .. '</div>'
t = t .. '</div>'
-- t = t .. "<p width="1004" > ce texte doit etre tres long. ce texte doit etre tres long. ce texte doit etre tres long. ce texte doit etre tres long. ce texte doit etre tres long. ce texte doit etre tres long. ce texte doit etre tres long. ce texte doit etre tres long. ce texte doit etre tres long. </p>"
-- <img src="w3schools.jpg" alt="W3Schools.com" width="104"
--height="142">
-- t = "<style " .. viewers.CSS_change(CSS) ">" .. t .. "</style>" -- example of use to try COCO
viewers.restore_configs(memo, "drop_box.new") -- Restore global configurations after eventual changes.
end -- t = t .. drop_box.new(selector, title, content_or_func, ...) -- Formats a drop_box for a doc or a group of tests. Take apart onedrop options.
 
 
-------------------
---- CO
-------------------
 
 
-- cut_libraries
Ligne 977 ⟶ 393 :
 
activity.i18n = {} -- Translations for activity library
activity.i18n.br = { -- br = Breton = Brezhoneg
-- Pour traduire, les langues de référence sont l'anglais et le français.
-- Pour traduire, ne traduisez pas des parties comme celles-ci : <b>%1</b> ; <b>%1</b> = <b>%2</b> (%3) ; <code>Q535</code> ; <br/> ; \n* ; _G.
["docfunc"] = "docfunc",
["docitem"] = "docitem",
["dockey"] = "dockey",
activity_description = "La Library:activity soutient la gestion des tâches de phabricator, des sous-tâches inter Lua-codeurs et des modules centraux interwikis.",
activity_central_library_description = "La Library:activity soutient la gestion des tâches de phabricator, des sous-tâches inter Lua-codeurs et des modules centraux interwikis.",
activity_display_central_libraries_title = "activity.describe_central_libraries() Description des bibliothèques centrales",
activity_translate_string_guide = "Pour traduire, ne traduisez pas les parties comme celles-ci : <b>%1</b> ; <b>%1</b> = <b>%2</b> (%3) ; <code>Q535</code> ; <br/> ; <br/> ; \n* ; _G.",
activity_Module_Central_central_version = "Module:Centralizer",
activity_Library_translate_I18N = "Module:Library/translate/I18N",
activity_Central_modules_reference_manual = "Scribunto/Central modules reference manual",
activity_report_subtasks_title = 'activity.central_subtasks_report(t) Surveiller les sous-tâches. Voir "NOW".',
activity_MW_Versions_report_title = "<b>activity.MW_Versions_report()</b> Surveiller les versions de MediaWiki, les 3 derniers mois.", -- fr
activity_central_count_admins_active_users = "Ce site, fr.wikisource.org, compte <b>%1</b> administrateurs pour <b>%2</b> utilisateurs actifs.",
activity_support_central_modules_title = "activity.begin_central_modules_support() Soutenir les premières utilisations des Central modules.",
activity_support_central_modules_headers = "Project; Language; Admins; Assets; Lien Modèle; Lien Module; Lien Tests; Début; Utilisé depuis; Codeur; OK", -- fr
activity_phabricator_tasks_title = "activity.phabricator_tasks_report() États des tâches connexes dans Phabricator",
activity_phabricator_tasks_headers = "Importance, modifiée le; Tâche; Etat; Titre",
activity_central_functions_report_title = "activity.central_functions_report(t) Lister les fonctions actuelles.",
activity_check_html_bold_tags_title = "activity.check_html_bold_tags() Signaler les déséquilibres des débuts et des fins de gras dans le code.",
activity_space_name_module = "Modulenn", -- br
activity_space_name_template = "Patrom",
activity_space_name_user = "Implijer", -- Implijer:VIGNERON - Wikimammenn
activity_test_page_user = "Documentation", -- br Documentation, Dokumentation, D
} -- activity.i18n.br
activity.i18n.de = { -- de = German = Deutsche
-- Modul:Central-s-de/Doku {{#invoke:Central-s-de|read}} de = German = Deutsch
Ligne 1 200 ⟶ 589 :
activity.coder_lang_module = { -- List to report of Module:Centralizer for 'Begin to use' 7 central modules, 7 coders, 7 projets, 7 langs to get.
-- br.wikisource.org/wiki/Modulenn:Centralizer-s-br/doc {{#invoke:Centralizer-s-br|read}} fr = Breton = Breton = Breitz
{ ["'lang"'] = "brfr", ["'project"'] = "wikisourcewikipedia", ["'module_vers"'] = "Centralizer", ["'coder"'] = "[[:sw:brfr:ImplijerUtilisateur:VIGNERONTED|VIGNERONTED]]", ["'ok"'] = "ok",
["'project_short"'] = "sw", ["'tests_lang"'] = "Centralizer/Documentation", ["'template"'] = "PatromModèle", ["'template_vers"'] = "Centralizer/Documentation",
["'module"'] = "Modulenn", ["'admins"'] = "16150", ["'assets"'] = "236", ["'beginon"'] = "20180719 ?", ["'usedfrom"'] = "20180719 ?", },
--
-- de.wikisource.org/wiki/Modul:Centralizer/Doku {{#invoke:Centralizer-s-de|read}} de = German = Deutsch
{ ["'lang"'] = "de", ["'project"'] = "wikisource", ["'module_vers"'] = "Centralizer", ["'coder"'] = "[[:s:de:Benutzer:DerFussi|DerFussi]]", ["'ok"'] = "...",
["'project_short"'] = "s", ["'tests_lang"'] = "Centralizer/Dokumentation", ["'template"'] = "Vorlage", ["'template_vers"'] = "Centralizer/Dokumentation",
["'module"'] = "Modul", ["'admins"'] = "16150", ["'assets"'] = "236", ["'beginon"'] = "20180719 ?", ["'usedfrom"'] = "20180719 ?", },
-- sur la page de projet je ne vois pas qui d'autre :Hexasoft Tejgad Arkanosis Xfigpower Zebulon84 ;Hlm Z.; Od1n TomT0m Archimëa
-- sur la page de projet je ne vois pas qui d'autre : {{u'|Hexasoft}}, {{u'|Tejgad}}, {{u'|Arkanosis}}, {{u'|Xfigpower}}, {{u'|Zebulon84}},, {{u'|Hlm Z.}}.
-- Je rajoute au hasard {{u'|Od1n}}, {{u'|TomT0m}} et... -- [[Utilisateur:Archimëa|Archimëa]] <
-- en.wikipedia.org/wiki/Module:Centralizer/Documentation {{#invoke:Centralizer-w-en|read}} en = English = English
{ ["'lang"'] = "en", ["'project"'] = "wikipedia", ["'module_vers"'] = "Centralizer", ["'coder"'] = "[[:w:en:User:Toohool|Toohool]]", ["'ok"'] = "...",
["'project_short"'] = "w", ["'tests_lang"'] = "Centralizer/Documentation", ["'template"'] = "Template", ["'template_vers"'] = "Centralizer/Documentation",
["'module"'] = "Module", ["'admins"'] = "0150", ["'assets"'] = "0", ["'beginon"'] = "20180719 ?", ["'usedfrom"'] = "20180719 ?", },
--
-- es.wikipedia.org/wiki/Módulo:Centralizers/Documentación {{#invoke:Centralizer-w-es|read}} es = Spanish = español
{ ["'lang"'] = "es", ["'project"'] = "wikipedia", ["'module_vers"'] = "Centralizer", ["'coder"'] = "[[:w:es:Usuario:Juan_Mayordomo|Juan_Mayordomo]]", ["'ok"'] = "...",
["'project_short"'] = "w", ["'tests_lang"'] = "Centralizer/Documentación", ["'template"'] = "Plantilla", ["'template_vers"'] = "Centralizer/Documentación",
["'module"'] = "Módulo", ["'admins"'] = "16150", ["'assets"'] = "236", ["'beginon"'] = "20180719 ?", ["'usedfrom"'] = "20180719 ?", },
--
-- es.wikisource.org/wiki/Módulo:Centralizer-s-es/Documentación {{#invoke:Centralizer-s-es|read}} es = Spanish = española
{ ["'lang"'] = "es", ["'project"'] = "wikisource", ["'module_vers"'] = "Centralizer", ["'coder"'] = "[[:s:es:Usuario:Alex brollo|Alex brollo]]", ["'ok"'] = "...", -- Usuario:Juan_Mayordomo
["'project_short"'] = "s", ["'tests_lang"'] = "Centralizer/Documentación", ["'template"'] = "Plantilla", ["'template_vers"'] = "Centralizer/Documentación",
["'module"'] = "Módulo", ["'admins"'] = "22150", ["'assets"'] = "234", ["'beginon"'] = "20180719 ?", ["'usedfrom"'] = "20180719 ?", },
--
-- Module br Modulenn, de Modul, en Module, es Módulo, fr Module, hu Modul, vi Mô-đun,
Ligne 1 231 ⟶ 620 :
-- Docum br Documentation, de Dokumentation, en Documentation, es Documentación, fr Documentation, hu Dokumentáció, vi tài liệu,
-- fr.wikisource.org/wiki/Module:Centralizer-s-fr/Documentation {{#invoke:Centralizer-s-fr|read}} fr = French = Français
{ ["'lang"'] = "fr", ["'project"'] = "wikisource", ["'module_vers"'] = "Centralizer", ["'coder"'] = "[[:s:fr:Utilisateur:Rical|Rical]]", ["'ok"'] = "ok",
["'project_short"'] = "s", ["'tests_lang"'] = "Centralizer/Documentation", ["'template"'] = "Modèle", ["'template_vers"'] = "Centralizer/Documentation",
["'module"'] = "Module", ["'admins"'] = "16", ["'assets"'] = "204", ["'beginon"'] = "20180719", ["'usedfrom"'] = "20180719 ?", },
--
-- fr.wikisource.org/wiki/Module:Auteur2Tpt/Tests {{#invoke:Auteur2Tpt|read}} fr = French = Français
{ ["'lang"'] = "fr", ["'project"'] = "wikisource", ["'module_vers"'] = "Auteur2Tpt", ["'coder"'] = "[[:s:fr:Utilisateur:Rical|Rical]]", ["'ok"'] = "ok",
["'project_short"'] = "s", ["'tests_lang"'] = "Auteur2Tpt/Documentation", ["'template"'] = "Modèle", ["'template_vers"'] = "Auteur2Tpt/Documentation",
["'module"'] = "Module", ["'admins"'] = "16", ["'assets"'] = "204", ["'beginon"'] = "20180719", ["'usedfrom"'] = "20180719 ?", },
--
-- hu.wikipedia.org/wiki/Modul:Centralizer-w-hu/doc {{#invoke:Centralizer-w-hu|read}} hu = Hungarian = Magyar
{ ["'lang"'] = "hu", ["'project"'] = "wikipedia", ["'module_vers"'] = "Centralizer", ["'coder"'] = "[[:w:hu:Szerkesztő:Tacsipacsi|Tacsipacsi]]", ["'ok"'] = "...",
["'project_short"'] = "w", ["'tests_lang"'] = "Centralizer/Dokumentáció", ["'template"'] = "Sablon", ["'template_vers"'] = "Centralizer/Dokumentáció",
["'module"'] = "Modul", ["'admins"'] = "3", ["'assets"'] = "77", ["'beginon"'] = "20180719 ?", ["'usedfrom"'] = "20180719 ?", },
--
-- vi.wikipedia.org/wiki/Mô đun:Centralizer-w-vi/tài liệu {{#invoke:Centralizer-w-vi|read}} vi = Vietnamese = Tiếng Việt
{ ["'lang"'] = "vi", ["'project"'] = "wikipedia", ["'module_vers"'] = "Centralizer", ["'coder"'] = "[[:w:vi:Thành viên:mxn|mxn]]", ["'ok"'] = "...",
["'project_short"'] = "w", ["'tests_lang"'] = "Centralizer/vi tài liệu", ["'template"'] = "Bản mẫu", ["'template_vers"'] = "Centralizer/vi tài liệu",
["'module"'] = "Mô đun", ["'admins"'] = "3", ["'assets"'] = "77", ["'beginon"'] = "20180719 ?", ["'usedfrom"'] = "20180719 ?", },
-- Projects : MediaWikis wikidata wikipedia wikisource wikiquote meta test2
-- NOWNOW -- User = 2, Module = 828, Template = 10,
Ligne 1 259 ⟶ 648 :
local memo = viewers.save_configs("activity.begin_central_modules_support") -- Save global configuration before eventual changes.
local t = t or "\n* <b>activity.begin_central_modules_support()</b> Support the first uses of Central modules."
-- MUMU : Reports in the CentralManual : if the last argument after the function itself is a table["CSStyle"] == "CSStyle" it change the style of the drop box.
-- p.ModuleNS = mw.site.namespaces.Module.name .. ":" -- translate Module: in other languages ONLY FOR local site
t = t .. "\n* Local NameSpaces: " .. viewers.ta("Module=828", mw.site.namespaces.Module.name )
Ligne 1 404 ⟶ 793 :
ftd = ftd .. "activity.MW_Versions_report;activity.phabricator_tasks_report;"
ftd = ftd .. "central_library.binded_in;central_library.new;"
ftd = ftd .. "datas.get_image;datas.get_item;datas.get_item_report;datas.property;drop_boxonedrop.new;"
ftd = ftd .. "events.add_cat;events.add_cat_group;events.add_err;events.add_wng;events.all_kinds_test;"
ftd = ftd .. "events.categories_lister;events.errors_lister;events.gener_categories;"
Ligne 1 753 ⟶ 1 142 :
return t
end -- t = function activity.central_subtasks_report(t) -- Report the current state of subtasks, See "NOW".
 
 
activity.phabricator_tasks_Group = { -- toDoc
-- Importance: Important
-- { "importance", "updateday", "TASKNBR", 0, "State", "Synthetic description of the phabricator task", }, -- Last update headers
{ 102, "Important", "20180412", "T185557", 0, "Open", "Create the easy function mw.wikibase.property('P21', 'Q8023', 'en')", },
{ 106, "Important", "2017070320190109", "T20170703T168726", 0, "ToCreateTriage", "StandardizeCreate content,syntax documentation page and user langagesfor availabilitySpecial:PageData.", },
{ "Important", "20190108", "T107595", 0, "Assigned", "[RFC] Multi-Content Revisions", },
-- CCicalese_WMF removed a subtask: : Introduce a ContentStore service to allow certain types of content to not be stored as serialized blobs..
{ "Important", "20181231", "T88416", 0, "Open", "Provide global user talk page (header)", },
{ "Central", "20181203", "T121470", 0, "Open", "Central Global Repository for Templates, Lua modules, and Gadgets", },
{ "Important", "20181201", "T107119", 0, "Open", "Provide a Lua method mw.loadTemplateData()", }, -- See PageData
{ "Important", "20181005", "T173207", 0, "Triage", "Implement Lua alternative to {{int:Lang}} / wgUserLanguage", },
{ "Important", "20180805", "T4085", 0, "Open", "Add a {{USERLANGUAGE}}/{{USERLANG}} magic word", },
{ "Important", "20180626", "T135845", 0, "Assigned", "Convert any module as central or centralisable", },
-- T135845 : Central modules must be really multi wikis.
-- T135845 : For this goal they need to join a standard template with the central module.
-- T135845 : But the MediaWiki security prohibit them in Lua modules. Then the deployment must do these.
-- Known Importance: ToCreate, Triage, Stalled, Open, Assigned, Resolved, Close, Declined, Declined, Obsolete, Invalid. Assigned To None = Triage
--
{ "Important", "20180603", "T85461", 0, "Resolved", "Lua error: too many language codes requested", },
{ "Important", "20180412", "T185557", 0, "Open", "Create the easy function mw.wikibase.property('P21', 'Q8023', 'en')", },
{ "Important", "20180413", "T142093", 0, "Open", "Decide how to do usage tracking for strings_c used to lookup entities (page titles, external ids, …)", },
{ "Important", "20170921", "T176362", 0, "Declined", "Implement ClassNameTests in Scribunto to enhance central modules stability", },
{ "Important", "20170907", "T68051", 1, "Open", "Central modules need the user language to display errors and category names", },
{ "Important", "20170727", "T149532", 0, "Assigned", "Why Multi-Content-Revisions? Use cases and requirements.", },
-- Known Importance: ToCreate, Triage, Stalled, Open, Assigned, Resolved, Close, Declined, Declined, Obsolete, Invalid. Assigned To None = Triage
-- T149532 Why Multi-Content-Revisions? Use cases and requirements. Jul 27 2017, 00:40 Assigned: daniel
{ "Important", "20170713", "T163923", 0, "Resolved", "Create Special:PageData as a canonical entry point for machine readable page data.", },
{ "Important", "20170703", "T20170703", 0, "ToCreate", "Standardize content, page and user langages availability", },
-- T20170703 : Rename T68051 : "Central modules need the user language to display errors and category names"
-- T20170703 : Standardize content, page and user langages availability
-- T20170703 : Content, page and user langages are not available nor defined in the same ways for scribunto modules.
-- T20170703 : That complicate modules which use them. Similar ways could enhance efficiency and reduce the development tasks.
{ 110, "Important", "20170325", "T20170325", 0, "ToCreate", "Centralize and share central datas about central modules", },
-- T20170325 : Centralize datas as MediaWiki versions installations in each lang-project, uses of central modules (helpers, projects, languages ...).
{ 114, "Important", "2018062620170309", "T135845T159322", 0, "AssignedOpen", "ConvertCentral anycategories moduleand asalerts centralfor orcentral centralisablemodules", },
-- T135845 : Central modules must be really multi wikis.
-- T135845 : For this goal they need to join a standard template with the central module.
-- T135845 : But the MediaWiki security prohibit them in Lua modules. Then the deployment must do these.
{ 116, "Important", "20160822", "T53660", 0, "Open", "Detect the edit state for modules which help users and helpers", },
{ 118, "Important", "20180806", "T4085", 0, "Open", "Add a {{USERLANGUAGE}}/{{USERLANG}} magic word", },
{ 118, "Important", "20181005", "T173207", 0, "Open", "Implement Lua alternative to {{int:Lang}} / wgUserLanguage", },
{ 119, "Important", "20180710", "T107119", 0, "Open", "Provide a Lua method mw.loadTemplateData()", }, -- See PageData
{ 120, "Important", "20170713", "T163923", 0, "Resolved", "Create Special:PageData as a canonical entry point for machine readable page data.", },
-- T163923: Permit at modules to change PageData (for stat, modules versions, mw versions...).
{ 122, "Important", "20170727", "T149532", 0, "Resolved", "Why Multi-Content-Revisions? Use cases and requirements.", },
{ 124, "Important", "20180817", "T168726", 0, "Open", "Create syntax documentation page for Special:PageData.", },
{ 126, "Important", "20170907", "T68051", 1, "Open", "Central modules need the user language to display errors and category names", },
{ 132, "Important", "20180603", "T85461", 0, "Resolved", "Lua error: too many language codes requested", },
-- T85461 https://meta.wikimedia.org/wiki/Module:Assemble_multilingual_message
-- T85461 https://meta.wikimedia.org/w/index.php?title=Module:Assemble_multilingual_message&action=edit#mw-ce-l46
{ 134, "Important", "20170309", "T159322", 0, "Open", "Central categories and alerts for central modules", },
-- T159322 : Does the community agree to implement central categories and alerts for central modules?
-- T159322 : This enhances the efficiency of the detection and the correction of errors, in some ways:
{ 136, "Important", "2016052220170211", "T85419T20170211", 01, "OpenToCreate", "UserIn mw.language.fetchLanguageNames( 'fr' ) some groupslanguages shouldnames beare exposednot toin ScribuntoFrench", },
-- T85419: to adapt errors and warning for administrators or modules coders
{ 138, "Important", "20180413", "T142093", 0, "Open", "Decide how to do usage tracking for strings_c used to lookup entities (page titles, external ids, …)", },
{ 140, "Important", "20170211", "T20170211", 1, "ToCreate", "In mw.language.fetchLanguageNames( 'fr' ) some languages names are not in French", },
-- T20161220 : ToDo: test: local getContentLanguage = mw.language.getContentLanguage().code -- default content_lang
{ 146, "Important", "2017092120160822", "T176362T53660", 0, "DeclinedOpen", "ImplementDetect ClassNameTeststhe inedit Scribuntostate tofor enhancemodules centralwhich moduleshelp users and stabilityhelpers", },
-- T163923: Permit at modules to change PageData (for stat, modules versions, mw versions...).
-- T176362 : phabtask : Implement getTestProvider in Scribunto to enhance central modules stability
{ "Important", "20160522", "T85419", 0, "Open", "User groups should be exposed to Scribunto", },
-- T176362 : phabtask : proposed functions in MediaWiki:
-- T85419: to adapt errors and warning for administrators or modules coders
-- T176362 : phabtask : mw.getTestProvider(mw_tests, nmaxi) -- To initialise, to limit all tests in time and to limit cases to nmaxi.
{ "Important", "20170121", "T122752", 1, "Open", "#invoke do not record the main module in package.loaded", },
-- T176362 : phabtask : mw.ClassNameCase(case, n), used inside mw.getTestProvider() to run each test case of number 1 to nmaxi.
-- T176362 : phabtask : The case object contains fields: count, OK="OK"..., n, name, type, args{}, expect{}, NameTest{}, func(), provide(), run()
-- T176362 : phabtask : Functions used in central modules: tests_groups.getTestProvider(), .init(), .gettests_groups(), .getcases(), .subdiffs(), .normalcase(case), viewers.form9en()
-- T176362 : phabtask : In the tests_groups library, tests cases are in recursive groups of groups of cases. Groups levels: main module, sub modules or libraries, functions and their tests cases.
{ 148, "Important", "20170121", "T122752", 1, "Open", "#invoke do not record the main module in package.loaded", },
-- T122752: 20161202 18:25 See example https://fr.wikisource.org/wiki/Module:Phab.TestpackG : detect "in " "_G" or package.loaded
-- T122752: 20160102 22:46 See example https://fr.wikisource.org/wiki/Module:TestRequire
Ligne 1 806 ⟶ 1 197 :
-- T122752: (actu | diff) 2016-01-18T02:09:45‎ Rical (discussion | contributions | bloquer)‎ . . (319 599 octets) (+10 183)‎ . . (translate library.i18n first)
-- T122752: 2016-01-02 phabricator: T122752 Rical created this task. Sat, Jan 2, 2016-01-02 23:08
{ 156, "Important", "20180508", "T63958", 0, "Assigned", "Use existing $dateFormats to format dates on Wikidata", },
{ 160, "Important", "20170521", "T67687", 0, "Resolved", "mw.load_data can be used to pass data between #invoke's by reading frame arguments", },
--
-- Known Importance: ToCreate, Triage, Stalled, Open, Assigned, Resolved, Close, Declined, Declined, Obsolete, Invalid. Assigned To None = Triage
--
-- Importance: Central
{ 202, "Central", "20180701", "T198107", 0, "Open", "Begin to use central modules in 7 wikis S180625btu", },
{ 206, "Central", "20171106", "T20171106", 0, "ToCreate", "Lua-coders could better report bugs with recent MediaWiki versions for each wiki", },
{ 210, "Central", "2018100220180718", "T121470T52329", 0, "OpenStalled", "CentralWe Globalneed Repositorya common repository for Templates, LuaScribunto modules, and Gadgetstemplates", },
{ 214, "Central", "2018071820180312", "T52329T41610", 0, "StalledOpen", "WeScribunto needshould a common repository for Scribuntosupport modulesglobal andmodule templatesinvocations", },
{ 218, "Central", "20180312", "T41610", 0, "Open", "Scribunto should support global module invocations", },
-- T41610: subscriber: kaldari 2017-05-20, 16:03
-- T41610: You can include Lua modules in extensions and then register them with Scribunto as global modules.
Ligne 1 820 ⟶ 1 212 :
-- T41610: Wikibase/client/includes/DataAccess/Scribunto/mw.wikibase.entity.lua
-- T41610: Wikibase/client/includes/DataAccess/Scribunto/mw.wikibase.lua
{ 224, "Central", "20170301", "T20170301", 0, "ToCreate", "Phabricator tasks states for easier versions management of modules", },
-- datas to get for each query: Task number, title, state, priority, Authored By and date, Last event date, number of subscribers, Assigned.
{ 228, "Central", "20170225", "T20170225", 0, "ToCreate", "? Report MediaWiki changes for the versions management, and use {{subst:}}", },
-- T20170225: The gerrit team needs the date of a bug and the dates of mw install in each wiki to debug mw.
-- T20170225: We could detect, record and report all date-time changes of MediaWiki, for some weeks.
-- T20170225: We could use {{subst:}} in 2 ways. See https://www.MediaWiki.org/wiki/Manual:Substitution
-- T20170225: duplicate of T121470: Central Global Repository for Templates, Lua modules, and Gadgets.
{ 230, "Central", "20170314", "T1238", 0, "Close", "Central Code Repository for code used on wikis (Templates, Lua modules, Gadgets)", },
--
-- Importance: Other
{ 302, "Other", "20180320", "T147618", 0, "Open", "Localize one or more major WMF software products related to new editor retention to hu.wikipedia", },
{ 304, "Other", "20180320", "T132308", 0, "Open", "Internationalise citoid dates", },
{ 306, "Other", "20180320", "T142906", 1, "Close", "Data access in user language doesn't obey the uselang get parameter", },
{ 308, "Other", "20180106", "T104109", 0, "Close", "No syntax highlight for large JavaScript/CSS/Lua/API pages", },
{ 310, "Other", "20170427", "T162877", 0, "Close", "CodeEditor default changed if you have never used the toggle", },
{ 312, "Other", "20170427", "T161875", 0, "Close", "CodeEditor is always enabled when starting an edit on a page containing code", },
-- T161875: Actual: It is enabled, though mw.user.options.get('usecodeeditor') correctly gives 0.
{ 314, "Other", "20180412", "T85412", 0, "Open", "The formatPropertyValues needs an option to format data from date-time, angle or geographic coordinates", },
{ 316, "Other", "20170912", "T156048", 0, "Open", "Add syntax highlighting to wiki diff of source code pages (like Gerrit)", },
{ 318, "Other", "20180710", "T107119", 0, "Open", "Provide a Lua method mw.loadTemplateData()", },
{ 320, "Other", "20170524", "T166202", 0, "Open", "Strings defined as long comments give a Lua modules syntax error", },
--
-- Other, ToCreate or not
{ 321, "Other", "20170213", "T20170213", 0, "ToCreate", "Some languages have not French names in French language", },
{ 322, "Other", "20151215", "T20151215", 0, "ToCreate", "In some cases the box of the drop_box is not displayed", },
-- T20151215: .. "\n------ " -- This code interact with drop_box and debug the task T20151215 2016-11-13 17:57.
-- T20151215: if there is "\n------ " before editDocBox and then the editDocBox <div> is only a bar of 1 em hight, and its content is after the <div>. Rical 2016-10-24 08:15.
{ 326, "Other", "20160616", "T20160616", 0, "ToCreate", "? Add module and library types in scribunto ?", },
-- T20160616: get.is_library = ( true ) -- true if the object is a library
{ 328, "Other", "20171007", "T155624", 0, "Open", "Special:Version not showing SHA info for MediaWiki version on fr.wikisource", },
-- UTC-20170407-20:21 : reported in T155624 Special:Version not showing SHA info for MediaWiki version on fr.wikisource
--
-- Known Importance: ToCreate, Triage, Stalled, Open, Assigned, Resolved, Close, Declined, Declined, Obsolete, Invalid. Assigned To None = Triage
--
-- Importance: Obsolete: Do not create, these functions come from mw... libraries.
{ 428, "Obsolete", "20161022", "T20161022", 0, "ToCreate", "? Scribunto functions are out of package.loaded", },
-- T20161022: -- Found in Lua_reference_manual but not in Module:Centralizer-s-fr :
-- T20161022: -- 2016-10-22 15:45 : versions.all_G_and_loaded_list() : Variables in _G global space without libraries and modules in packageloaded. ,
Ligne 1 859 ⟶ 1 253 :
-- assert = function , ipairs = function , rawequal = function , getmetatable = function , rawset = function , pcall = function , type = function ,
-- selector = function , rawget = function , tonumber = function , error = function , setmetatable = function
{ 430, "Obsolete", "20170324", "T133498", 1, "Declined", "Detect and extend known title <-> entity links in a semi-automatic way", },
{ 432, "Obsolete", "20161128", "T151715", 0, "Invalid", 'string.gsub( s, "%%1", repl) fails as "invalid capture index"', },
{ 434, "Obsolete", "20170110", "T154769", 0, "Invalid", 'When "Erreur Lua : attempt to call a string value", where?', },
-- T154769: Rical 2017-01-08 My main mistake was to write xpcall() where pcall() is right.
-- T154769: Tests are there https://fr.wikisource.org/wiki/Module:Phab.T154769.Test
-- T154769: versions.anti_crash() preserve pages against residual errors which can crash pages.
{ 436, "Obsolete", "20170202", "T155898", 0, "Invalid", "Preview change from external local editors", },
-- T155898: OK, I will continue to search in JEdit plugins. Perhaps I will ask them an adapted solution.
{ 438, "Obsolete", "20160424", "T67507", 0, "Resolved", "It should be possible to get entity id from page title", },
{ 440, "Obsolete", "20160524", "T119978", 0, "Invalid", "Get name and record-time of all modules to better manage their versions", },
{ 442, "Obsolete", "20160813", "T75460", 0, "Resolved", "[Story] Make Lua functions default to the user's language on multilingual wikis", },
} -- activity.phabricator_tasks_Group = {...}
 
Ligne 2 118 ⟶ 1 512 :
 
datas.i18n = {} -- Translations for datas library
datas.i18n.br = {
-- Pour traduire, les langues de référence sont l'anglais et le français.
-- Pour traduire, ne traduisez pas des parties comme celles-ci : <b>%1</b> ; <b>%1</b> = <b>%2</b> (%3) ; <code>Q535</code> ; <br/> ; \n* ; _G.
-- Wikidata
datas_Wikidata_header = "Données : ",
datas_known_Datas_header = "Données connues : ",
datas_sougth_Datas_header = "Données souhaitées : ",
datas_needed_Datas_header = "Données nécessaires : ",
datas_Wikidata_wikibase_err = "Erreur : Wikibase n'est pas disponible.",
datas_Wikidata_getEntity_err = "Erreur : getEntity Wikidata n'est pas disponible.",
datas_Wikidata_getEntityObject_err = "Erreur : L'élément <b>%1</b> de Wikidata n'est pas trouvé.",
datas_Wikidata_property_err = "Erreur : La propriété <b>%1</b> de Wikidata n'est pas trouvée.",
datas_Wikidata_error_err = "Erreur Wikidata : <b>%1</b> ",
-- datas_Wikidata_cat_err = "modes_no_source_arguments_cat",
datas_Wikidata_cat_err = "Module with internal error", -- modes_no_source_arguments_cat
datas_structured_data_txt = 'Données de Wikidata',
datas_Wikidata_any_page_title = "Wikidata pour une autre page :",
datas_Wikidata_details_test_title = "Tests et données importées de Wikidata",
datas_Wikidata_arbitrary_tests_title = "datas.get_item() Test de Wikidata accès arbitraire",
datas_Wikidata_arbitrary_access_text = "Wikidata pour un titre : ",
datas_Wikidata_time_details_title = "datas.Wikidata_time_details{} Wikidata propriétés de temps pour plus de détails",
datas_update_Special_PageData_title = "datas.update_PageData() Partager des DATA entre modules en Special:PageData",
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.",
-- Messages et erreurs divers
datas_no_args_Wikidata_err = "Erreur interne : Module sans table d'arguments Wikidata.",
datas_sources_of_datas = "Informations de : /Wikidata, /modèle ou module, /autres, /warning, /erreur",
} -- datas.i18n.br
datas.i18n.de = {
-- Zum Übersetzen sind die Referenzsprachen Englisch und Französisch.
Ligne 2 626 ⟶ 1 992 :
end
end -- function datas.load_data(t, datext) -- Pass data between #invoke's
 
-- cut_libraries
 
-- - - - ------------------ - - - - ------------------ - - - - -----------------------------
-- - - - ------------------ - - - - ------------------ - - - - -----------------------------
-- The Library:events supports events of types erros, warnings and categories.
-- viewers.save_configs("events.save_configs" memo, tab_view, group ) -- Init a new events group
-- events.add_err(key, ... ) -- Add an error in the actual table of events.
-- events.add_cat_group(groupCat, groupList) -- Add some categories in the actual table of events.
-- events.form(evt) -- Format events types
-- events.all_categories_test(t) -- test categories
-- - - - ------------------ - - - - ---------------------------------
-- - - - ------------------ - - - - ---------------------------------
 
-- events = {} -- already declared by Scribunto, see central_library.new() -- Record a library in package.loadedS
 
events.i18n = {} -- Translations for Library:events
events.i18n.en = {
events_test_tests_title = "List a table, test with limits:",
events_test_resTest_title = "List a table, test with limits:",
events_test_projects_title = "Test and display tests events for projects",
events_test_projects_headers = "Type;Key;Name test and values;result of the test",
events_test_MediaWiki_title = "Test and display tests events for MediaWiki",
events_test_MediaWiki_headers = "Type;Key;Name test and values;result of the test",
events_test_categ_Test_title = "categ_Test test : classes in some languages",
events_all_kinds_tests_title = "events.all_kinds_test() Test: all kinds of events (err, wng, cat)",
events_all_kinds_tests_headers = "typ;key;idargs;result",
events_close_without_memo_err = "viewers.restore_configs(memo, where) without <b>memo</b> in module <b>%1</b>.",
events_antiCrash_protect_err = "The antiCrash() function protects this page against a complete crash due to an internal error: %1.",
} -- events.i18n.en
events.i18n.es = {
events_test_tests_title = "List a table, test with limits:",
events_test_resTest_title = "List a table, test with limits:",
events_test_projects_title = "Test and display tests events for projects",
events_test_projects_headers = "Type;Key;Name test and values;result of the test",
events_test_MediaWiki_title = "Test and display tests events for MediaWiki",
events_test_MediaWiki_headers = "Type;Key;Name test and values;result of the test",
events_test_categ_Test_title = "Prueba categ_Test: clases en algunos lenguajes",
events_all_kinds_tests_title = "events.all_kinds_test() Prueba: todo tipo de eventos (err, wng, cat)",
events_all_kinds_tests_headers = "typ;key;idargs;result",
events_add_cat_deprecated = "Función obsoleto en módulo principal.",
events_close_without_memo_err = "viewers.restore_configs(memo, where) sin <b>memo</b> en el módulo <b>%1</b>.",
events_antiCrash_protect_err = "La función antiCrash() protege esta página contra un colapso completo debido a un error interna: %1.",
} -- events.i18n.es
events.i18n.fr = {
events_test_tests_title = "List a table, test with limits:",
events_test_resTest_title = "List a table, test with limits:",
events_test_projects_title = "Test and display tests events for projects",
events_test_projects_headers = "Type;Key;Name test and values;result of the test",
events_test_MediaWiki_title = "Test and display tests events for MediaWiki",
events_test_MediaWiki_headers = "Type;Key;Name test and values;result of the test",
events_test_categ_Test_title = "Tester categ_Test : catégories dans quelques langues",
events_all_kinds_tests_title = "events.all_kinds_test() Test: toutes les sortes d'événements (err, wng, cat)",
events_all_kinds_tests_headers = "typ;key;idargs;result",
events_add_cat_deprecated = "Fonction obsolète dans le module principal.",
events_close_without_memo_err = "viewers.restore_configs(memo, where) sans <b>memo</b> dans le module <b>%1</b>.",
events_antiCrash_protect_err = "La fonction antiCrash() protège cette page contre un effondrement complet dû à une erreur interne : %1.",
} -- events.i18n.fr
events.i18n.hu = {
events_test_tests_title = "List a table, test with limits:",
events_test_resTest_title = "List a table, test with limits:",
events_test_projects_title = "Test and display tests events for projects",
events_test_projects_headers = "Type;Key;Name test and values;result of the test",
events_test_MediaWiki_title = "Test and display tests events for MediaWiki",
events_test_MediaWiki_headers = "Type;Key;Name test and values;result of the test",
events_test_categ_Test_title = "Tester categ_Test : catégories dans quelques langues",
events_all_kinds_tests_title = "events.all_kinds_test() Test: toutes les sortes d'événements (err, wng, cat)",
events_all_kinds_tests_headers = "typ;key;idargs;result",
events_add_cat_deprecated = "Fonction obsolète dans le module principal.",
events_close_without_memo_err = "viewers.restore_configs(memo, where) sans <b>memo</b> dans le module <b>%1</b>.",
events_antiCrash_protect_err = "La fonction antiCrash() protège cette page contre un effondrement complet dû à une erreur interne : %1.",
} -- events.i18n.hu
events.i18n.vi = {
events_test_tests_title = "List a table, test with limits:",
events_test_resTest_title = "List a table, test with limits:",
events_test_projects_title = "Test and display tests events for projects",
events_test_projects_headers = "Type;Key;Name test and values;result of the test",
events_test_MediaWiki_title = "Test and display tests events for MediaWiki",
events_test_MediaWiki_headers = "Type;Key;Name test and values;result of the test",
events_test_categ_Test_title = "Tester categ_Test : catégories dans quelques langues",
events_all_kinds_tests_title = "events.all_kinds_test() Test: toutes les sortes d'événements (err, wng, cat)",
events_all_kinds_tests_headers = "typ;key;idargs;result",
events_add_cat_deprecated = "Fonction obsolète dans le module principal.",
events_close_without_memo_err = "viewers.restore_configs(memo, where) sans <b>memo</b> dans le module <b>%1</b>.",
events_antiCrash_protect_err = "La fonction antiCrash() protège cette page contre un effondrement complet dû à une erreur interne : %1.",
} -- events.i18n.vi
 
events.test_group = {}
events.rowGroup = {}
events.tab_view = {}
events.tab_view.test_group = {}
events.tab_view.rowGroup = {}
 
function events.add_cat(key, ... ) -- Add a category in the actual table of events.
return events.add_record("cat", key, ...) -- Add a error, warning or category in the lists. S170626rev
end
 
function events.add_err(key, ... ) -- Add an error in the actual table of events.
return events.add_record("err", key, ...) -- Add a error, warning or category in the lists. S170626rev
end
 
function events.add_wng(key, ... ) -- Add a warning in the actual table of events.
return events.add_record("wng", key, ...) -- Add a error, warning or category in the lists. S170626rev
end
 
function events.form_cat(evt, txt, lnk, c, space)
local space = space or (mw.site.namespaces.Category.name .. ":")
local c = c or evt.ccc or ":"
if evt.typ == "cat" then -- Format a category to display or activate
evt.content_wkt = viewers.form9content(evt.key, lua_table.to_list( evt.vals ) )
evt.page_wkt = viewers.form9page(evt.key, lua_table.to_list( evt.vals ) )
evt.user_wkt = viewers.form9user(evt.key, lua_table.to_list( evt.vals ) )
return " [[" .. c .. space .. (evt.content_wkt or lnk) .. "|" .. (evt.user_wkt or txt) .. "]] "
else
return ""
end
end
 
events.list_all_events = {} -- Table to collect all events types "err", "wng" and "cat".
 
function events.new(typ, key, ...) -- Initialize and finalize a new event.
local evt = {} -- default event
if type(typ) == "table" then
evt = typ -- Use a predefined event
else -- To finalize an existing event.
evt.typ = typ
evt.key = key
end -- Finalize all events
evt.typ = evt.typ or typ -- Type of event: err, wng, cat
evt.key = evt.key or key -- Translation key, simple or extended by name
if type(typ) ~= "string" then typ = "notyp" end -- To debug abnormal type of event
if type(key) ~= "string" then key = "nokey" end -- To debug abnormal translation key
evt.name = evt.typ or evt.key or "name" -- Translation key, simple or extended by name
evt.vals = evt.vals or { ... } -- table of arguments values
evt.catview = evt.catview or ":" -- Default value for eventual use
-- Check, yes or no, to form an event, in special cases
if (evt.typ == "cat") then
evt.res, evt = events.form( evt ) -- Formats the resulting wikitext, can be re-form later
elseif (evt.typ == "err") then
evt.res, evt = events.form( evt ) -- Formats the resulting wikitext, can be re-form later
elseif (evt.typ == "wng") then
evt.res, evt = events.form( evt ) -- Formats the resulting wikitext, can be re-form later
end
return evt
end -- function events.new(typ, key, ...)
 
function events.add_new(evt) -- Add a error, warning or category in the lists. S170626rev
-- Select only new events
if type(evt) ~= "table" then evt = {} end
local new_evt = viewers.form9tests( tostring(evt.key), lua_table.to_list( evt.vals ) )
for i, event in pairs(events.list_all_events) do
local old_evt = viewers.form9tests( tostring(event.key), lua_table.to_list( event.vals ) )
if new_evt == old_evt then new_evt = nil ; break end -- Add only new events. Reject already seen events.
end
-- events.add_wng("modes_auto_val_warning_wng", langs.user_translations[key], val) -- form_result
if new_evt then table.insert(events.list_all_events, evt) end
return evt
end -- function events.add_new(typ, ref, ...)
 
function events.add_record(typ, key, ... ) -- Add a new error, warning or category in a list.
-- Guide line: all events are in a single table, including categories, without duplication.
-- Guide line: without duplication: events differ if the type, the key or any value of any argument differs.
-- Guide line: We can view or categorize categories.
local intern_or_use = versions.memo_i18n["en"][key]
local evt = events.new(typ, key, ...) -- Initialize and finalize a new event.
local evt = events.add_new(evt) -- Add an error, warning or category in the lists. S170626rev
local res, evt = events.form(evt, c) -- Format an event as an error, warning or category.
return res, evt
end -- local res, evt = events.add_record(typ, key, ... )
 
function events.form(evt, c) -- Format an event as an error, warning or category.
evt.res = tostring(evt.res) .. "? form " .. viewers.form9tests(".form evt.key=%1, evt.res=%2, ", evt.key, evt.res )
local evt = mw.clone(evt) -- do not disturb input event
if type(evt) ~= "table" then
evt.res = lua_table.rough_view(evt)
return evt.res, evt
end
if (evt.typ ~= "cat") and (evt.typ ~= "wng") and (evt.typ ~= "err") then
evt.res = lua_table.rough_view(evt)
return evt.res, evt
end
evt.tableStyle = evt.tableStyle or "" -- Could change the style of the wikitext. Not available on 20160916
if type(evt.name) ~= "string" then evt.name = ""
elseif evt.name ~= "" then evt.name = evt.name .. "_" end
evt.idargs = evt.name .. tostring( viewers.form9user( tostring(evt.key), lua_table.to_list( evt.vals ) ) )
-- Each type of event formats its own type of wikitext
evt.content_wkt = viewers.form9content(evt.key, lua_table.to_list( evt.vals ) )
evt.page_wkt = viewers.form9page(evt.key, lua_table.to_list( evt.vals ) )
evt.user_wkt = viewers.form9user(evt.key, lua_table.to_list( evt.vals ) )
evt.res = "" -- multilingual
if evt.typ == "err" then evt.res = viewers.styles_color_error(evt.user_wkt) end
if evt.typ == "wng" then evt.res = viewers.styles_color_warning(evt.user_wkt) end
evt.ccc = c or evt.catview or events.catview or ":"
evt.content_catspace = mw.site.namespaces.Category.name -- name: Local namespace name.
if evt.typ == "cat" then -- Format a category to display or activate
evt.res = events.form_cat(evt)
if viewers.is_in("_i_cat", key) then -- If needed, add a second "Category:Module with internal error"
res = res .. events.add_cat("versions_with_internal_error")
end
if viewers.is_in("_u_cat", key) then -- If needed, add a second "Category:Module with user error"
res = res .. events.add_cat("versions_with_user_error")
end
end
return evt.res, evt
end -- function events.form(evt, c)
 
events.all_kinds_test_test_group = {
{ "abc", "langs_form9user_all_types_values", { "pi = ", "circle / diameter", 3.14, }, },
{ "equation", "langs_form9user_all_types_values", { 11, 7, 3.14, }, },
{ "Matrix:", "langs_form9user_all_types_values", { "2.1.0", "v4-6, ISO_8601, FC14 h6", }, },
{ "pi = ", "langs_form9user_all_types_values", { "circle / diameter", 3.14, }, },
{ "quadrature", "langs_form9user_all_types_values", { function() end, "convert a square to a circle", }, },
}
-- langs_form9user_all_types_values = "Test: string=%1 number=%2 nil=%3 function=%4 table=%5.",
function events.all_kinds_test(t) -- Test: all kinds of events (err, wng, cat)
local memo = viewers.save_configs("events.all_kinds_test") -- Save global configuration before eventual changes.
events.all_kinds_trck = "\n* events.all_kinds_trck: "
local t = t or ""
t = t .. "\n* events.all_kinds_test(t) -- Test: all kinds of events (err, wng, cat): "
t = t .. events.all_kinds_trck
local tab_view = { -- Group datas and options for a table view with lines and columns.
test_group = events.all_kinds_test_test_group, -- Use default cases.
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 = {},
}
function tab_view.form_one_case(evt) -- Convert a case from test_group to rowGroup.
return { evt.typ or "t", evt.key or "k", evt.idargs or "i", evt.res or "r" }
end
t = t .. tableview.new(tab_view) -- Runs tests cases and formats a table view with lines and columns.
t = t .. viewers.ta("end #test_group *2", lua_table.level_count(tab_view.test_group) ) -- function tableview.new( nil bug170602
t = t .. viewers.ta("end #rowGroup *2", lua_table.level_count(tab_view.rowGroup) ) -- function tableview.new( nil bug170602
t = t .. events.all_kinds_trck
viewers.restore_configs(memo, "events.all_kinds_test") -- Restore global configurations after eventual changes.
return t
end -- function events.all_kinds_test(t)
 
function events.add_cat_group(groupCat, groupList) -- Add some categories in the actual table of events. Separated by ";".
-- catGroup("Country %1", "France,Italia") -> [[Category:Country France]] [[Category:Country Italia]]
if type(groupCat) ~= "string" then groupCat = "%1" end
if type(groupList) ~= "string" then return "" end
local cats = ""
for i, str in mw.text.gsplit(groupList, ";", true) do
local wkt = viewers.form9user(groupCat, str)
cats = cats .. events.add_cat(groupCat, wkt)
end
local res, evt = events.add("catGroup", groupCat, cats) -- Add an event to a group.
evt.trc = evt.trc .. viewers.form9user("\n* add_cat evt.typ=%1, evt.key=%2, ", evt.typ, evt.key)
return res, evt
end -- function events.add_cat_group(groupCat, groupList)
 
function events.select_typ(typ) -- Select events by one type
local is = {}
for i, evt in pairs(events.test_group) do
if evt.typ == typ then table.insert( is, evt.idargs ) end
end
return is
end
 
function events.sort_typ() -- Sort events by type in wng, err, cat.
local wng, err, cat = {}, {}, {}
for i, evt in pairs(events.test_group) do
if evt.typ == "wng" then table.insert( wng, evt ) end
if evt.typ == "err" then table.insert( err, evt ) end
if evt.typ == "cat" then table.insert( cat, evt ) end
end
return wng, err, cat
end -- function events.sort_typ()
 
function events.selector( tab_view, evt )
if type(evt) ~= "table" then
evt = { -- options for tableview.new() -- Formats a table with lines and columns.
headers = "typ;key;selector-name;wkt",
style = "",
typ = "err",
rowGroup = {},
}
else
evt.headers = evt.headers or "typ;key;else-name;wkt"
evt.tableStyle = evt.tableStyle or ""
evt.name = evt.name or "_"
evt.typ = evt.typ or "nil"
end
if (type(tab_view) == "table") and (type(tab_view.typ) == "string") and (tab_view.typ == evt.typ) then
table.insert( tab_view.test_group, { evt.typ, evt.key, evt.name, evt.wkt } )
elseif (type(tab_view) == "table") and (type(tab_view.typ) == "string") and (tab_view.typ == "v") then
table.insert( tab_view.test_group, { evt.typ, evt.key, evt.name, evt.wkt } )
else
tab_view = {}
table.insert( tab_view.test_group, { evt.typ, evt.key, evt.name, evt.wkt } )
end
end -- function events.selector( tab_view, evt )
 
function events.all_kinds_test_test(t) -- Test: all kinds of events (err, wng, cat)
local memo = viewers.save_configs("events.all_categories_test") -- Save global configuration before eventual changes.
local t = t or "\n* <b>events.all_kinds_test()</b> Test: all kinds of events (err, wng, cat)"
local tab_view = { -- Group datas and options for a table view with lines and columns.
test_group = nil, -- Use default cases.
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",
}
function tab_view.form_one_case(evt) -- Convert a case from test_group to rowGroup.
return { evt.typ, evt.key, evt.idargs, evt.res }
end
t = t .. tableview.new(tab_view) -- Form a table view with lines and columns.
viewers.restore_configs(memo, "events.all_kinds_test_test") -- Restore global configurations after eventual changes.
return t --, errors -- langs_missing_translations_title
end -- function events.all_kinds_test_test(t)
 
events.errors_list = {} -- Deprecated: Table to collect errors and warnings
events.erron = true -- Activated or not errors. Errores activado o no. Erreurs activées ou non.
events.categories_list = {} -- Table to collect all categories to generate in wikitext
 
function events.errors_lister(title, v1, v2, v3, v4, v5, v6, v7, v8, v9)
local res, msgref = "", ""
local mwtitle = mw.title.getCurrentTitle()
local page = tostring(mwtitle.nsText) .. ":" .. tostring(mwtitle.text)
if type(title) ~= "string" then title = "modes_error_list_header_err" end
res = res .. '\n*' .. viewers.form9user(title, page, v1, v2, v3, v4, v5, v6, v7, v8, v9) -- .. ' - ' .. page
local n = 0
for k, wng in ipairs(events.errors_list) do
msgref = viewers.form9user(wng.ref, wng.v1, wng.v2, wng.v3, wng.v4, wng.v5, wng.v6, wng.v7, wng.v8, wng.v9) -- texte traduit ou direct
if wng.typ == "wng" then
res = res .. '<br>⦁ ' .. viewers.styles_color_warning(msgref)
end
end
for k, wng in ipairs(events.errors_list) do
msgref = viewers.form9user(wng.ref, wng.v1, wng.v2, wng.v3, wng.v4, wng.v5, wng.v6, wng.v7, wng.v8, wng.v9) -- texte traduit ou direct
if wng.typ == "err" then
res = res .. '<br>⦁ ' .. viewers.styles_color_error(msgref)
n = n + 1
end
end
if n > 0 then
events.add_cat("versions_module_with_error_err")
end
return res
end -- function events.errors_lister(title, v1, v2, v3, v4, v5, v6, v7, v8, v9)
 
function events.gener_categories() -- Only for this library, form categories without activate them
-- events.gener_categories Only display categories, as a text line, using function events.categories_lister
-- function events.form(evt, c) -- Format an event as an error, warning or category.
local gener = {}
modes.options_to_cat_view()
-- c can replace cat_view to enforce the documentation or the categorisation
c = c or modes.cat_view or ""
for k, evt in pairs(events.list_all_events) do
evt = events.form(evt, c) -- Format an event as an error, warning or category.
table.insert(gener, evt ) -- Build a table with translations counts.
end
return gener
end -- function events.gener_categories(args_final)
 
function events.categories_lister(c) -- Categorize categories, or view categories if c=":".
local res = ""
modes.options_to_cat_view()
-- c can replace cat_view to enforce the documentation or the categorisation
c = c or modes.cat_view or ""
for k, evt in pairs(events.list_all_events) do
if (evt.typ == "cat") then
local keyuser = viewers.form9user(evt.key)
local keycontent = viewers.form9content(evt.key)
res = res .. events.form_cat(evt, keyuser, keycontent, c)
end
end
return res
end -- function events.categories_lister(c)
 
-- cut_libraries
Ligne 2 637 ⟶ 2 370 :
-- The Module:Centralizer/I18N translations for langs library update and complete Module:Centralizer translations.
langs.i18n = {} -- Translations for Library:langs
langs.i18n.br = {
language = 'langue',
langs_translations_counts_title = "langs.translations_counts() Comptages des traductions en tables",
langs_translations_stats_report_title = "Traductions: nombres par langues et par librairies ou modules.",
langs_translations_stats_report_headers = "En-têtes calculés",
langs_form9user_tests_title = "viewers.form9user() Test: Remplacer <b>%1</b> à %9 par tostring( argN ) à partir des arguments",
langs_form9user_all_types_values = "Résultats de test: string=<b>%1</b> number=<b>%2</b> nil=<b>%3</b> function=<b>%4</b> table=%5.",
langs_form99user_tests_title = "viewers.form99user() Test: Remplacer %01 à %99 par tostring( argN ) à partir des arguments",
langs_form99user_all_types_values = "en viewers.form99user() Valeurs de tous types : <b>%1</b>, <b>%2</b>, <b>%3</b>, <b>%4</b>, %5.",
langs_translations_key_missing = "Erreur interne: Clé de traduction manquante ou anormale dans viewers.trans9vars()",
langs_form99user_no_tranlation = "en viewers.form99user() Manque de traduction.",
langs_form99user_a_value_is_table = "en viewers.form99user() Une valeur est une table.",
langs_lang_not_exist_err = "Erreur : La langue <b>%1</b> n'est pas disponible.",
langs_abnormal_char_in_text_title = "langs.abnormal_char_in_text() Test: Détecter les caractères anormaux dans un texte unilingue.",
langs_abnormal_char_in_alphabet = "abcdefghabklmnopqrstuvwxyz ABCDEFGHABKLMNOPQRSTUVWXYZ 013456789 àéèêëiouüœ ÀÉÈÊËIOUÜŒ ,;.:!?",
langs_list_MediaWiki_languages_title = "langs.list_MediaWiki_languages() Liste de toutes les langues de MediaWiki.",
-- Principaux textes, erreurs et catégories des outils
langs_first_tests_languages = "Documentation des premières langues",
langs_content_page_user_lang_msg = "Langues : content: <b>%1</b>, page: <b>%2</b>, user: <b>%3</b>.",
langs_without_translation_err = "Argument connu, mais non traduit : <b>%1</b>.",
langs_without_translation_N_err = "Il y a <b>%1</b> arguments non traduits.",
langs_main_i18n_languages_count = "Ce module peut traduire <b>%1</b> phrases en <b>%2</b> langues : ",
langs_table_can_translate_counts = "La table <b>%1</b> peut traduire <b>%2</b> phrases en <b>%3</b> langues.",
langs_mw_language_fetchLanguageName = "<b>%1</b>(%2=%3), ",
langs_counts_translations_headers = "*; Nom de la table; Textes; Tables; Commentaire",
langs_i18n_list_all_string = "Cette liste montre tous les textes, mais ne peut remplacer les déclarations originales.",
langs_languages_nbr_and_list = "\n* Il y a <b>%1</b> tables de traductions dans ces langues : <b>%2</b> <br>",
langs_string_translated_in_langs = "Il y a <b>%1</b> textes traduits en <b>%2</b> langues.",
langs_no_wiki_translations_err = "Erreur interne : Module sans table d'arguments traduits.",
langs_list_in_translated_lang = "<b>%1</b> traductions en langage <b>%2</b> : <b>%3</b> : <b>%4</b>",
langs_changing_translations_title = "langs.changing_translations() Changements de traduction dans les tables i18n",
langs_changing_translations_headers = "Module; Langue; Clé i18n; Traduction précédente; Traduction changeante",
langs_missing_translations_title = "langs.missing_translations() Traductions manquantes dans les tables i18n.",
langs_missing_translations_headers = "Langue; clé i18n; Traduction précédente; Nouvelle traduction; Module",
langs_changing_translations_help = "Voir aussi <b>%1</b> pour demander de l'aide pour traduire.",
langs_mixed_translations_title = "Tables de traductions i18n combinées :",
langs_dummy_languages_title = "langs.dummy_languages() Caractéristiques de quelques langues:",
langs_Module_Central_version = "Central-w-fr",
langs_selectLang_tests_title = "langs.select_lang() Tests: Select a language for tests or other",
langs_selectLang_test_headers = "Wiki language; User language; Sought language; Selected language; Example",
langs_selectLang_test_example = "Language: content = <b>%1</b>, user = <b>%2</b>, selected = <b>%3</b>.",
langs_selectLang_test_err = "Internal error : langs.select_lang(lang) has no tests table.",
langs_selectLang_test_cat = "Module avec erreur interne",
langs_missing_one_translation_err = "Traduction manquante, clé <b>%1</b> en langue <b>%2</b>",
langs_missing_one_translation_i_cat = "Traduction manquante, au moins une", -- + "Module with internal error",
} -- langs.i18n.br
langs.i18n.de = {
language = 'Sprache',
Ligne 3 650 ⟶ 3 337 :
-- The Module:Centralizer/I18N translations for lua_table library update and complete Module:Centralizer translations.
lua_table.i18n = {} -- Translations for lua_table library
lua_table.i18n.br = {
luaTable_recursive_luaTable_title = "MediaWiki lua_table récursive",
luaTable_rough_view_tests_title = "lua_table.rough_view() Test: Former un code Lua grossier d'une table",
luaTable_structure_level_maxi = "Limite de niveau recursif = <b>%1</b> ",
luaTable_table_listlimit_max_n = "Limite de longueur max_n = <b>%1</b> ",
lua_table_structure_recursive_report= "lua_table.structure() Lister une table, test avec ou sans limites :",
luaTable_toList_tests_title = "lua_table.to_list() Retourne une liste à partir d'une table Lua.",
luaTable_toList_tests_headers = "Cas testé; Table à lister, vue brute; Liste de sortie",
luaTable_toTable_tests_title = "lua_table.to_table() Test: convertir une phrase en table de mots",
luatable_form_subcounts_subtables = "La table <b>%1</b> compte <b>%2</b> variables, <b>%3</b> sous-tables, <b>%4</b> fonctions.",
luaTable_fromsubnames_base_err = "Erreur interne: dans langs.sub_i18n_counts(), base indisponible pour la table subnames <b>%1</b>.",
luaTable_fromsubnames_subtable_err = "Erreur interne: dans langs.sub_i18n_counts(), <b>%1</b> n'est pas une sous-table dans subnames <b>%2</b>.",
luaTable_form_sub_counts_type_err = "Un <b>%1</b> remplace la table : <b>%2</b>.",
-- luaTable_fromsubnames_missing_err = "Erreur interne : in lua_table.form_sub_counts() La recherche de cette sous-table <b>%1</b> n'a trouvé que celle-ci <b>%2</b>.", obsolete
luaTable_fromsubnames_tests_headers = "Sous-nom; Table de base; Taille de la table; Entrée lua_table.rough_view",
luaTable_table_dont_exists_err = "La table <b>%1</b> n'existe pas.",
luaTable_table_args_source_title = "lua_table.structure() Table des arguments reçus, args_source :",
luaTable_tables_differences_title = "Signaler les différences entre 2 tables.",
} -- lua_table.i18n.br
lua_table.i18n.de = {
luaTable_recursive_luaTable_title = "MediaWiki lua_table rekursive",
Ligne 3 793 ⟶ 3 461 :
else break end -- get the last object which is not a table
end
-- example for a function : lua_table.from_subnames_object("versions.Boîte déroulante", base_table) -- Get the function from its sub-names.
-- example for a return : lua_table.from_subnames_object("versions.DropBox", base_table) -- Replace the function name by the sought one's.
-- p_template_drop_box_name = 'Boîte déroulante', -- Modèle:Boîte déroulante for drop_box.form
-- example : get : form9content("p_template_drop_box_name" -- previous function name 'Boîte déroulante', -- Modèle:Boîte déroulante for drop_box.form
-- example : return lua_table.from_subnames_object("versions.DropBox", base_table) -- Replace the function name by the sought one's.
return sub_obj
end
Ligne 4 264 ⟶ 3 937 :
end -- function lua_table.count_tests(t)
 
-- opt = { dropitonedrop.dropitonedrop = "dropitonedrop", level_maxi = 3, max_n = 2, exclude1 = "hou" } ) -- example of use , {width = "88%", tc1 = "blue"}
function lua_table.normal_options(opt, recursiveLevel, recursive_limit) -- Normalize lua_table options.
if type(opt) ~= "table" then opt = {} end
Ligne 4 474 ⟶ 4 147 :
lua_table.tablim.house = { "kitcheen", "bedroom"}
lua_table.tablim.house.garden = { flower = "rose", nature = "river"}
-- opt = { dropitonedrop.dropitonedrop = "dropitonedrop", level_maxi = 3, max_n = 2, exclude1 = "hou" } ) -- , {width = "88%", tc1 = "blue"}
 
function lua_table.structure(table, tablename, opt)
Ligne 4 514 ⟶ 4 187 :
local t = t or "\n* <b>lua_table.structure()</b> List the structure of a table, with or without limits"
local t = t .. "\n* lua_table.structure() List a table, <b>test with limits</b>:"
local opt = { ["dropitonedrop"] = "dropitonedrop", ["level_maxi"] = 3, ["max_n"] = 2, ["exclude1"] = "hou" }
local res, tot_vars, tot_func, tot_tabs = lua_table.structure(lua_table.tablim, "lua_table.tablim", opt)
local t = t .. res -- luaTable_structure_limits_title
Ligne 4 538 ⟶ 4 211 :
-- The Module:Centralizer/I18N translations for lua_table library update and complete Module:Centralizer translations.
mathroman.i18n = {} -- Translations for mathroman library
mathroman.i18n.br = {
mathroman_errors_head_err = "Erreur : ",
mathroman_roman_err = "Erreur de romain : ",
mathroman_value_error_err = "Erreur de valeur : ",
mathroman_J_before_end_err = "Caractère J avant la fin",
mathroman_char_X_in_N_err = "Caractère <b>%1</b> en <b>%2</b>",
mathroman_char_increase_err = "3 caractères croissants",
mathroman_greater_4999_err = "Valeur > 4999",
mathroman_null_value_err = "Valeur nulle",
mathroman_rom2dig_value_err = "Erreur de valeur de nombre romain",
mathroman_dig2rom_value_err = "Erreur de valeur décimale",
mathroman_roman2int_tests_title = "mathroman.roman2int() Test des nombres romains en nombres décimaux",
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 décimal; Valeur romaine; Correct; Erreur(s)",
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",
mathroman_is_not_string_err = "La valeur <b>%1</b> n'est pas un texte convertible en nombre",
} -- mathroman.i18n.br
mathroman.i18n.de = {
mathroman_errors_head_err = "Fehler: ",
Ligne 4 966 ⟶ 4 620 :
modes.cat_view = "" -- = ":" to document a category rather than truly categorize it
modes.i18n = {} -- Translations for modes library
modes.i18n.br = {
-- Noms et descriptions des arguments de configurations
[1] = "1",
[2] = "2",
[3] = "3",
[4] = "4",
["modules_guide"] = "Argument modules_guide",
label_descr = "Argument automatique de Wikidata.",
sitelink = 'sitelink',
sitelink_descr = "Argument automatique de Wikidata.",
-- Languages
contentlang = "contentlang",
contentlang_descr = "Langue du wiki.",
pagelang = "pagelang",
pagelang_descr = "Langue de la page.",
userlang = "userlang",
userlang_descr = "Language du lecteur de la page.",
--
QITEM = 'QITEM',
uri = 'uri',
itemid = 'itemid',
itemid_descr = "Identifiant des données de Wikidata, comme <code>Q535</code> pour Victor Hugo.",
itemid2 = 'id',
itemid2_descr = "Autre identifiant des données de Wikidata, comme <code>Q535</code> pour Victor Hugo.",
debug = 'debug',
category = 'Catégorie',
mode = "mode",
mode_descr = "Type d'utilisation du module ou du modèle : lire, éditer, documenter, tester.",
options = "options",
options_descr = "Options d'affichage d'un module ou d'un modèle.",
c = "c",
c_descr = "Options d'affichage d'un module ou d'un modèle.",
knownversions = "knownversions",
knownversions_descr = "Versions connues, pour les gérer.",
soughtversions = "soughtversions",
soughtversions_descr = "Versions demandées, pour les gérer.",
modes_form_ok_categ_tests = "Test de génération de catégorie OK",
-- Principaux textes, erreurs et catégories des outils
language = 'langue',
-- Messages et erreurs divers
modes_used_options_list_title = "modes.used_options_list() Utilisation des options :",
modes_options_uses_tests_title = "modes.options_from_mode_tests() Modes et options en bref",
versions_bind_arguments_tests_title = "modes.options_from_args_tests() Test des options de modes",
modes_options_from_args_title = "Test des options des arguments",
-- Groupes d'arguments
modes_needed_to_verify = "(obligatoire, à vérifier)",
modes_list_needed_args = "Liste des arguments nécessaires :",
modes_list_all_config_arguments = "Liste des arguments de configuration :",
modes_list_all_system_arguments = "Liste des arguments système :",
modes_list_all_other_args = "Liste des autres arguments :",
modes_language_cat = 'Parle <b>%1</b>',
modes_date_months_names = "Janvier, Février, Mars, Avril, Mai, Juin, Juillet, Août, Septembre, Octobre, Novembre, Décembre",
modes_date_to_part_format = "dd yyyy mmmm",
modes_date_to_part_call_err = "Erreur interne : Argument anormal de définition de date <b>%1</b>.",
modes_date_to_part_call_cat = "Module avec erreur interne",
modes_date_to_part_not_found_err = "Erreur interne : partie non définie de date <b>%1</b>.",
-- Gestion des arguments
modes_error_list_header_err = "Assistance sur les paramètres de ce modèle :",
modes_need_arg_value_err = "Erreur : Vous devez définir cet argument nécessaire mais absent : <b>%1</b>.",
modes_none_value_err = "Erreur : Aucun argument n'a été défini.",
modes_unknown_argument_err = "Erreur : Le paramètre <b>%1</b> est inconnu dans ce modèle. Vérifier ce nom ou signaler ce manque.",
modes_too_unnamed_arguments_err = "Erreur : Ce paramètre non nommé est en trop : <b>%1</b> = <b>%2</b>.",
modes_without_translation_wsid_err = "Erreur interne : Signaler au développeur que l'argument interne <b>%1</b> est inconnu dans les notices.",
modes_is_defined_err = "L'argument <b>%1</b>:<b>%2</b> est défini.",
modes_is_undefined_err = "L'argument <b>%1</b>:<b>%2</b> n'est pas défini.",
modes_args_values_err = "Valeur anormale de l'argument <b>%1</b> = <b>%2</b> parmi : (%3) ",
-- Messages et erreurs divers
modes_nearest_argument_err = "Erreur : Voulez vous l'argument connu <b>%1</b> ?",
modes_max_nearest_argument_msg = "Un nom d'argument plus long accepte plus d'erreurs de lettres.",
modes_value_re_defined_err = "Erreur : La valeur de l'argument <b>%1</b> est déjà définie. Choisir une seule valeur d'un seul synonyme.",
modes_lang_table_err = "Erreur interne : La langue <b>%1</b> ou sa table est erronée.",
modes_lang_table_err_i_cat = "Module avec erreur interne", -- modes_no_source_arguments_cat
modes_lang_table_err_i_cat = "Module avec langue d'arguments erronée",
modes_lang_not_translated_err = "Erreur : La langue <b>%1</b> n'est pas traduite.",
modes_generDoc1_paramName_err = "Erreur interne : en generDoc1, mauvais argument <b>%1</b>.",
modes_unknown_auto_arg_err = "Erreur interne: Argument automatique inconnu : <b>%1</b> = <b>%2</b>.",
--
modes_delete_docbox_wng = "Vous devez suprimer cette documentation avant d'enregistrer.<br>Supprimez tous les modes pour revenir en mode read.",
modes_auto_val_warning_wng = "Vérifiez l'argument automatique.",
--
modes_assist_user_param_err = "Support aux utilisateurs pour vérifier les paramètres :",
modes_args_values_err = "Valeur anormale de l'argument <b>%1</b> = <b>%2</b> (%3)",
--
modes_no_known_arguments_err = "Erreur interne : Module sans table d'arguments connus.",
modes_no_known_arguments_i_cat = "Module sans table d'arguments connus.",
modes_no_source_arguments_err = "Erreur interne : Module sans table d'arguments sources.",
modes_no_source_arguments_i_cat = "Module sans table d'arguments source.",
--
modes_list_all_args_main_title = "modes.list_all_args_main() Liste de tous les arguments acceptés",
modes_levenshtein_similar_tests_title = "modes.levenshtein() Test des distances de <b>[https://fr.wikipedia.org/wiki/Distance_de_Levenshtein Levenshtein]</b> entre mots:",
modes_args_known_structure_title = "modes.args_known_structure() Définitions des arguments",
modes_args_unknown_report_title = "viewers.simple_list_test() Signaler les arguments inconnus",
modes_normal_box_main_text_1 = "Boîte d'information simple : titre de cette page <b>%1</b>, description : <b>%2</b>",
modes_normal_box_main_text_2 = "<br/>Il était <b>%1</b>, se nommait <b>%2</b> <b>%3</b>, il est mort en <b>%4</b>.",
-- Ces textes sont utilisés pour titrer des tests.
modes_list_wiki_selectors_title = "Liste des sélecteurs de ce module :",
modes_all_categories_list_title = "modes.all_categories_list() Liste des catégories éventuelles de ce module :",
modes_all_errors_list_title = "modes.all_errors_list() Liste des erreurs détectables de ce module :",
modes_multiple_values_tests_title = "modes.multiple_values() Test des arguments à valeurs multiples",
modes_multiple_selection_tests_title= "modes.multiple_selection() Test de sélection multiple",
modes_multiple_selection_test_headers= "Options;Sélecteur;À sélectionner;Sélectionnés",
modes_multiple_selection_test_select= "2;nobel;président;député;prix",
modes_recursiveLevel_err = "Erreur de niveau récursif <b>%1</b> > <b>%2</b>",
modes_recursive_normal_tests_title = "modes.recursive_normal() Test: Normalise le niveau récursif et la limite récursive",
modes_namespaces_page_list_title = "modes.namespaces_page_list() Module, namespaces, et noms de pages :",
modes_args_known_report_title = "modes.args_known_report(t) Rapport des principaux arguments connus.",
modes_args_known_report_headers = "clé; valeur; type; nécessaire; mot-clé; synonyme; propriété; format; source",
modes_get_args_report_title = "modes.get_args() Valeurs des argument dans p.args_known{}.", -- fr
} -- modes.i18n.br
 
modes.i18n.de = {
-- Namen und Beschreibungen von Konfigurationsargumenten
Ligne 6 680 ⟶ 6 224 :
-- Import args mode options
local t = "t= * * * "
modes.frame = modes.frame or mw.getCurrentFrame() -- frame or modes.frame or
modes.args_template = modes.frame:getParent().args
args_template = modes.args_template
Ligne 7 279 ⟶ 6 823 :
-- The Module:Centralizer/I18N translations for lua_table library update and complete Module:Centralizer translations.
versions.i18n = {} -- Translations for versions library
versions.i18n.br = {
-- Principaux textes, erreurs et catégories des outils
versions_module_with_error_err = "Module avec erreur",
versions_with_internal_error = "Module avec erreur interne",
versions_with_internal_error_cat = "Module avec erreur interne",
versions_with_usage_error = "Module avec erreur d'utilisation",
versions_with_usage_error_cat = "Module avec erreur d'utilisation",
versions_err_module_miss_i18n_i_cat = "Module manquant de traduction i18n",
versions_module_miss_i18n_mini_err = "Erreur interne : La table i18n n'a que <b>%1</b> traductions.",
versions_running_times_title = "versions.running_times() Temps d'exécution et références pour les Lua-codeurs.",
versions_luatables_counts = "<b>%1</b> variables, <b>%3</b> sous-tables, <b>%2</b> fonctions",
versions_table_dont_exists = "La table <b>%1</b> n'existe pas.",
versions_table_listlimit_levelmaxi = "Limite de niveau recursive_limit = <b>%1</b> ",
versions_table_listlimit_max_n = "Limite de longueur max_n = <b>%1</b> ",
versions_with_usage_error_cat = "Module avec erreur d'utilisation",
versions_module_with_error_err = "Module avec erreur",
versions_with_internal_error_cat = "Module avec erreur interne",
 
-- Gestion des versions
versions_versions_no_select_altern_err = "Erreur de versions : pas de sélection dans l'alternative <b>%1</b> du module <b>%2</b>.",
versions_versions_too_select_altern_err = "Erreur de versions : <b>%1</b> sélections dans l'alternative <b>%2</b> du module <b>%3</b>.",
versions_versions_select_not_used_err = "Erreur de versions : le sélecteur <b>%1</b> n'est pas dans les alternatives <b>%2</b> du module <b>%3</b>.",
versions_versions_missing_module_err = "Erreur de versions : module absent pour la version <b>%1</b> du module <b>%2</b>.",
versions_main_module_missing_err = "Le module principal est introuvable.",
versions_select_unknown_module_err = "Internal error: Le Module:<b>%1</b> manquant est remplacé par le module normal Module:<b>%2</b>.",
versions_I18N_module_no_base_err = "Le module de traductions <b>%1</b> n'a pas de version de base.",
versions_no_versions_module_err = "Le module <b>%1</b> n'est pas dans le système des versions.",
versions_all_versions_tests = "Versions avertissements : <b>%1</b>, normaux : <b>%2</b>, liste : <b>%3</b>.",
versions_all_versions_check = "Versions: manquantes: <b>%1</b>, inconnues: <b>%2</b>, normales: <b>%3</b>, en excès: <b>%4</b>, toutes selectionées : <b>%5</b>.",
versions_missing_versions_err = "Le module <b>%1</b> manque dans le module principal <b>%2</b>.",
versions_replaced_versions_err = "Le module <b>%1</b> remplace le sous-module absent dans le module principal <b>%2</b>.",
versions_unknownversions_err = "Le module <b>%1</b> est inconnu dans le module principal <b>%2</b>.",
versions_module_miss_i18n_txt_err = "Erreur interne : Le texte <b>%1</b> manque de traduction en langue <b>%2</b>, et/ou d'autres.",
versions_module_miss_i18n_count_err = "Erreur interne : Il y a <b>%1</b> manques parmi <b>%2</b> traductions.",
versions_module_miss_i18n_none_err = "OK, aucune traduction manquante.",
versions_module_miss_i18n_trad_err = "Erreur interne : manque de traduction pour l'argument <b>i18n.%1.%2</b>.",
 
-- Titres des tests
versions_all_G_and_loaded_list_title = "versions.all_G_and_loaded_list() Objects dans l'espace global _G",
versions_central_changes_headers = "clé; valeur; compte; niveau",
versions_support_desk_title = "Informations de soutien: en version <b>%1</b>",
versions_versions_management_report = "versions.versions_management_report() Rapport de gestion des versions",
-- versions_bind_modules_tests_title = "versions.bind_modules_test() Test de la gestion des versions des modules",
versions_verif_bind_modules_report = "Liaison des modules et contrôle des versions",
versions_bind_modules_test_headers = "Versions demandées; Versions utilisées; Versions connues; ACTUEL : Erreurs dans le module actif; SIMULATION : Erreurs dans le module actif",
versions_tasks_changes_report = "versions.tasks_changes_report() Documentations, tâches et modifications",
versions_sort_central_modules_title = "versions.sort_central_modules_report() Liste triée des modules et bibliothèques centraux.",
versions_sort_central_modules_headers = "Titre; Version; Date; Traductions / Langues",
versions_sort_central_modules_counts = "ceci: + <b>%2</b>/<b>%3</b> T/L, ",
versions_versions_management_title = "versions.versions_support_test() Tests du support de versions.",
versions_versions_management_headers = "sought; versions; process; comments",
versions_add_deprecated_err = "Fonction obsolète <b>%1(...)</b>. Remplacez-la par <b>%2(...)</b> dans le module <b>%3</b>.",
versions_deprecated_function_tests = "versions.deprecated_function() Test: Fonction obsolète. Remplacez-la dans le module.",
} -- versions.i18n.br
versions.i18n.de = {
-- Principaux textes, erreurs et catégories des outils
Ligne 8 935 ⟶ 8 425 :
-- These Module:Centralizer/I18N translations for viewers library update and complete Module:Centralizer translations.
viewers.i18n = {}
viewers.i18n.br = {
-- Principaux textes, erreurs et catégories des outils
viewers_test_no_values = "Test: sans valeurs",
viewers_test_the_value_is_table = "Test: la valeur est une table",
viewers_test_all_types_values = "Test: valeurs de tous types",
viewers_Dropbox_label_Unwrap = "Dérouler/Enrouler",
viewers_page_tests_title = "Tests et informations liées à cette page :",
viewers_section_title_page = "Tests de cette page",
viewers_section_title_module = "Tests de ce module",
viewers_section_title_internal = "Tests internes",
-- Ne pas traduire ces noms de bibliothèques
viewers_section_title_library_activity = "Library:activity",
viewers_section_title_library_datas = "Library:datas",
viewers_section_title_library_langs = "Library:langs",
viewers_section_title_library_lua_table = "Library:lua_table",
viewers_section_title_library_mathroman = "Library:mathroman",
viewers_section_title_library_modes = "Library:modes",
viewers_section_title_library_versions = "Library:versions",
viewers_section_title_library_wiewers = "Library:wiewers",
viewers_section_title_is_missing = "Cette section manque de titre",
viewers_dropdown_missing_title = "Titre manquant pour cette boite déroulante",
-- Titres des tests
viewers_page_tests_title = "Tests et informations liées à cette page :",
viewers_module_tests_title = "Tests et informations liées à ce module :",
viewers_internal_tests_title = "Tests internes de non régression :",
viewers_tableView_default_headers = "A; B; C; D; E",
viewers_tableView_tests_title = "tableview.new() Test: former un tableau avec lignes et colonnes.",
viewers_tab_view_form_elem_detail = "détail = <b>%1</b> | <b>%2</b> | <b>%3</b> | <b>%4</b> | %5.",
viewers_tableView_tests_err = "Erreur interne: tableview.new() échec anormal.",
viewers_format_time_tests_title = "viewers.formatDate() Tests de codage et conversions de dates",
viewers_parts_of_date_tests_title = "viewers.date_to_part() Tests de date vers jour, mois, année ou ère",
viewers_simpleList_tests_title = "viewers.simple_list() Test: Trier une liste de mots sans répétition",
viewers_save_restore_balance_title = "viewers.save_restore_balance_report() Test: sauver et restaurer, équilibre des configurations",
viewers_save_restore_balance_headers = "i; où; enregistre; restaure; erreurs",
} -- viewers.i18n.br
viewers.i18n.de = {
-- Haupttexte, Fehler und Kategorien von Werkzeugen
Ligne 9 213 ⟶ 8 668 :
return view
end -- function viewers.value(value, form)
 
function viewers.value_subtables(value, form, level, level_limit) -- Formats a string from values like: true, 123.456, "abcd", func(), table{}, subtables{}.
local typ, view = type(value), "-" -- options: ' nonil noquote '
if ( type(level) ~= "number" ) then level = 1 end
if ( type(level_limit) ~= "number" ) then level_limit = 5 end
if typ == "boolean" then
if value == true then view = "true" else view = "false" end
elseif typ == "function" then view = "func()"
elseif typ == "number" then view = tostring(value)
elseif typ == "string" then
if viewers.is_in('noquote', form) then view = value
else view = '"' .. value .. '"' end
elseif (typ == "table") and (level < level_limit) then
level = level + 1
view = view .. viewers.value_subtables(value, form, level, level_limit) -- Formats a string from values like: subtables{}.
elseif typ == "nil" then view = "nil"
if viewers.is_in('nonil', form) then view = "" end
end
return view
end -- t = t .. function viewers.value_subtables(value, form, level, level_limit) -- Formats a string from values...
 
function viewers.phab_task(task, comment) -- Forms a link to a Phabricator task.
Ligne 9 781 ⟶ 9 256 :
return val
end
dh = drop_box.dh
 
function drop_box.html(title, content_or_func) -- Builds the drop box at the html level.
local memo = viewers.save_configs("onedrop.html") -- Save global configuration before eventual changes.
local t = "\n* onedrop.html() -- Builds the drop box at the html level."
local drop_box_html = drop_box_html_start .. drop_box_html_medium .. drop_box_html_end .. drop_box_look_like
t = t .. drop_box_html_start .. drop_box_html_content
viewers.restore_configs(memo, "onedrop.html") -- Restore global configurations after eventual changes.
return drop_box_html_start
end -- t = t .. onedrop.html(title, content) -- Builds the drop box at the html level.
 
function drop_box.new_title() -- Support desk title of the docDropbox of the edit box.
local t, strings_c, tables_c, strs_on_tabs, subnames = langs.i18n_sub_counts("langs.main_i18n", "langs_main_i18n_languages_count", "user")
local report_main_discreet = viewers.styles_color_discreet( viewers.form_main_version(main_versions) )
local title = viewers.form9user("versions_support_desk_title", report_main_discreet, strs_on_tabs, tables_c)
-- "Support desk for %1 : %2 translations in %3 languages"
return title
end -- function drop_box.new_title()
 
drop_box.css_options = { -- Conventional CSS parameters : See -- https://en.wikisource.org/wiki/Template:drop_box#Parameters
Ligne 9 798 ⟶ 9 288 :
["tc2"] = "black", -- tc2 : the text-color for the body
}
 
function drop_box.new(selector, title, content_or_func, ...) -- Formats a drop_box for a doc or a group of tests. Take apart onedrop options.
-- res = res .. drop_box.new(selector, "activity_report_subtasks_title", activity.central_subtasks_report) -- typical use
-- selector = "allwaysview" -- To allways display one view. -- selector = "enforcerun" -- To debug one box with INTERNAL ERROR.
local memo = viewers.save_configs("drop_box.new") -- Save global configuration before eventual changes.
local onedrop = {}
onedrop.selector = selector
onedrop.title = onedrop.title or title
onedrop.erros = "" -- put all variables in a table for easier tests.
onedrop.content = ""
onedrop.content_or_func = content_or_func
onedrop.args = {...}
if not onedrop.title then onedrop.erros = onedrop.erros .. viewers.form9content("viewers_dropdown_missing_title") end
if onedrop.selector == "never" then return "" end -- function viewers.is_in_sp(
if (onedrop.selector == true) or viewers.is_in_sp(onedrop.selector, "allwaysview alltestsview enforcerun") then onedrop.view = true end
if not onedrop.view then
onedrop.content = ""
onedrop.erros = onedrop.erros .. "\n* The selector of this Drop box is abnormal. This Drop box is in error." -- MUMU : means to report in the CentralManual.
return "<b>" .. onedrop.erros .. "</b></b>" -- to not transmit bad pairs of <b>...</b>
end
-- All cases : "allwaysview alltestsview enforcerun failinref nocontent"
-- In other cases continue : "allwaysview alltestsview enforcerun "
onedrop.content_or_func = nil -- From a function to a string.
if type(onedrop.content_or_func) == "function" then onedrop.content = lua_table.from_subnames_object(onedrop.content_or_func) end -- Get the last sub-table from its sub-names.
if type(onedrop.content) ~= "string" then
onedrop.content = ""
onedrop.erros = onedrop.erros .. "\n* The content of this Drop box is not a string or a translation of a title." -- MUMU : means to report in the CentralManual.
end
if (type(onedrop.title) ~= "string") then
onedrop.title = ""
onedrop.erros = onedrop.erros .. "\n* The title of this Drop box is not a string or a translation of a title." -- MUMU : means to report in the CentralManual.
end
-- COCO
-- Style options in onedrop{}: ta1, image, ta2, margin_bottom, width, border_radius, border_color, bg1
for i, args_tab in ipairs(args) do -- Get the onedrop options for the drop_box.
modes.recursiveLoop = (modes.recursiveLoop or 0) + 1
if modes.recursiveLoop > 33 then return "" end
-- The last argument can be a onedrop to change the look of the drop_box
if (i == lua_table.level_count(args) ) and (type(args_tab) == "table") and (args_tab["CSStyle"] == "CSStyle") then
-- MUMU : Reports in the CentralManual : if the last argument after the function itself is a table["CSStyle"] == "CSStyle" it change the style of the drop box.
onedrop = mw.clone( args_tab )
end
end
if type(onedrop.content) == "function" then onedrop.content_or_func = onedrop.content(title, content, onedrop) end -- and use it as content form function
if type(title) == "function" then
title = title() -- function drop_box.new_title()
elseif type(title) ~= "string" then title = "viewers_dropdown_missing_title" end
title = viewers.form9user(title)
local opt = mw.clone(drop_box.css_options) -- Save global configuration before eventual changes.
onedrop = { -- Conventional css parameters : from -- https://en.wikisource.org/wiki/Template:drop_box#Parameters
image = nil,
cssview = onedrop.cssview, -- cssview : display values of options
fw1 = onedrop.fw1 or opt.fw1, -- "left", -- fw1 : the font-weight for the heading
fw2 = onedrop.fw2 or opt.fw2, -- "left", -- fw2 : the font-weight for the body
fs1 = onedrop.fs1 or opt.fs1, -- "100%", -- font-size: 100%;
fs2 = onedrop.fs2 or opt.fs2, -- "100%", -- font-size: 100%;
bg1 = onedrop.bg1 or opt.bg1, -- "#FFFFFF", -- bg1 : the background-color for the heading
bg2 = onedrop.bg2 or opt.bg2, -- "#FFFFFF", -- bg2 : the back.clicground-color for the body
ta1 = onedrop.ta1 or opt.ta1, -- "left", -- ta1 : the text-align for the heading
ta2 = onedrop.ta2 or opt.ta2, -- "left", -- ta2 : the text-align for the body
float = onedrop.float or opt.float, -- "none", -- float : should the box be floated? (left, right, or none)
width = onedrop.width or opt.width, -- "99%", -- width : the width of the box, e.g. 33%
border_radius = onedrop.border_radius or opt.border_radius, -- "0px 0px 0px 0px", -- border-radius: "15px 50px 30px 5px" : add rounded corners to an element.
style = onedrop.style or opt.style, -- "0px 0px 0px 0px", -- style : HTML/CSS affectionados only: any other css style arguments for the whole box
-- <div id="NavFrame10" class="NavFrame" style="clear:both; margin-bottom:1em; width:99%; border-style:solid; border-radius:0px 0px 0px 0px; border-color:#AAAAAA; background-color:#FFFFFF;" title="▼ /▶ ">
hidden = onedrop.hidden or opt.hidden, -- "true", -- hidden : set this to any string (e.g. hidden=true) to have the box hidden by default
headType = onedrop.headType or opt.fw1, -- "h4", -- headType : allows you to set the box header to (say) "h4", which means it will be included in the table of contents. This is provided as an explicit parameter because if you just surround the title with header tags, e.g. <h4>Box 1.1</h4>
tc1 = onedrop.tc1 or opt.tc1, -- "black", -- tc1 : the text-color for the heading
tc2 = onedrop.tc2 or opt.tc2, -- "black", -- tc2 : the text-color for the body
border_color = onedrop.border_color or opt.border_color, -- "#AAAAAA", -- border-color : the text-color for the heading and the body
-- display = onedrop.display or opt.display, -- "block", -- display: block : results without line break.
display = onedrop.display or opt.display, -- "inline", -- display: inline : results with free line break.
margin_all = onedrop.margin_all or opt.margin_all, -- "0px", -- margin
margin_bottom = onedrop.margin_bottom or opt.margin_bottom, -- "1em", -- margin-bottom
--
height = onedrop.height or opt.height, -- "1.6em", -- height
label = onedrop.label or opt.label, -- "&#x25bc; &nbsp; /&#x25b6; &nbsp; ", -- = "Unwrap/Wrap",
-- ▼ = &#x25bc; -- ▶ = &#x25b6; https://fr.wikipedia.org/wiki/Table_des_caract%C3%A8res_Unicode/U25A0
-- label = label or viewers.form9user("viewers_drop_box_label_Unwrap"), -- = "Unwrap/Wrap" translations
}
if type(onedrop.content) ~= "string" then
onedrop.erros = tostring(onedrop.erros) .. "\n* Inside the viewer onedrop.new(), the result of function in test or in report is not a string."
end
if type(onedrop.image) == "string" then
onedrop.image = ''
.. '<div class="NavPic" style=" background-color:' .. onedrop.bg1 .. '; " >'
.. '[[File:' .. onedrop.image .. '|22px]]'
.. '</div>' -- &nbsp;
else
onedrop.image = ''
end
if onedrop.cssview then
onedrop.erros = onedrop.erros .. '\n* List values of <b>CSS if cssview</b>: '
for key, elem in pairs(onedrop) do
if (key ~= "content") and (key ~= "title") then t = t .. viewers.ta(key, elem) end
end
end
-- drop_box from https://fr.wikisource.org/wiki/Modèle:Boîte déroulante = drop_box from template on 20180505 OK.
-- p_template_drop_box_name = 'Boîte déroulante', -- Modèle:Boîte déroulante for drop_box.form
local dropbox_title = 'Boîte déroulante'
local dropbox_title = viewers.form9content("p_template_drop_box_name")
-- Gets the local dropbox in each wiki.
onedrop.content = onedrop.content or tostring(onedrop.content)
onedrop.title = onedrop.title or tostring(onedrop.title)
onedrop.box = "{{" .. langs.content_translations["p_template_drop_box_name"] .. "|selector=" .. tostring(onedrop.selector) .. "|title=" .. onedrop.title .. "|content=" .. onedrop.content .. "}}"
onedrop.box = onedrop.box .. mw.getCurrentFrame():expandTemplate{ title = dropbox_title, args = {
["label"] = onedrop.label, ["titre"] = onedrop.title, ["contenu"] = box,
["margeHaut"] = onedrop.margin_all, ["margeBas"] = onedrop.margin_bottom,
["hauteur"] = onedrop.height, -- ["width"] = onedrop.width, -- not in html V5
["couleurFond"] = onedrop.bg1, ["couleurBordure"] = onedrop.tc1,
["alignT"] = onedrop.ta1, ["align"] = onedrop.ta2,
["arrondi"] = onedrop.border_radius, ["couleurBordure"] = onedrop.border_color,
-- Keep default values for : br, image, alignB, hauteur, margeHaut, margeBas
} }
viewers.restore_configs(memo, "drop_box.new") -- Restore global configurations after eventual changes.
return onedrop.erros .. onedrop.box .. "</b>" -- to not transmit bad pairs of <b>...</b>
end -- res = res .. drop_box.new("enforce", "langs_list_MediaWiki_languages_title", langs.list_MediaWiki_languages ) -- OK, show in table ?
 
-- t = drop_box.form(dropit.title, dropit.content, dropit)
Ligne 9 888 ⟶ 9 495 :
return t
end -- function drop_box.form(title, content, dropit)
 
function drop_box.new(selector, title, content_or_func, ...) -- Formats a drop_box for a doc or a group of tests. Take apart dropit options.
-- From 20180503 a bug (in Module:Centralizer or MediaWiki) some Dropboxes display twice : modes.get_args_report.
-- From 20180503 a bug (in Module:Centralizer or MediaWiki) See CentralManual display twice : modes.get_args_report.xml
-- selector = "allwaysview" -- To allways display one view. -- selector = "enforcerun" -- To debug one box with INTERNAL ERROR.
local memo = viewers.save_configs("drop_box.new") -- Save global configuration before eventual changes.
local t = ""
local args = {...}
local content_or_func_error = viewers.form9user("\n* Error : Abnormal content for drop_box.new(%1, %2).\n*", selector, title, content_or_func) -- , %3
if selector == "never" then return "" end
if not ( (selector == true) or (selector == title) or viewers.is_in_sp(selector, "allwaysview alltestsview enforcerun failinref nocontent") ) then return "" end
if (type(title) ~= "string") then title = "Default_title" end
local dropit = nil -- dropit to change the look of the drop_box
-- Style options in dropit{}: ta1, image, ta2, margin_bottom, width, border_radius, border_color, bg1)
for i, args_tab in ipairs(args) do -- Get the dropit options for the drop_box.
modes.recursiveLoop = (modes.recursiveLoop or 0) + 1
if modes.recursiveLoop > 33 then return "" end
-- The last argument can be a dropit to change the look of the drop_box
if (i == lua_table.level_count(args) ) and (type(args_tab) == "table") and (args_tab["dropit"] == "dropit") then
dropit = mw.clone( args_tab )
end
end
local dropit = dropit or {} -- for antiCrash
if type(title) ~= "string" then title = "viewers_dropdown_missing_title" end
dropit.selector = selector
dropit.title = title
dropit.args = { ... } -- optional arguments for the content_or_func function
local func_from_name = nil
dropit.content = content_or_func -- string or function
if type(content_or_func) == "string" then func_from_name = lua_table.from_subnames_object(content_or_func) end -- Get the last sub-table from its sub-names.
dropit.content_error = ""
dropit.title = dropit.title .. ( dropit.title_errors or "" )
dropit.resultKind = "ref"
local success, result = true, ""
dropit.result = result
dropit.success = success
if type(func_from_name) == "function" then -- In case of named function:
dropit.func_name = content_or_func -- memorise its name
-- dropit.content = func_from_name -- and use it as content form function
end
local res = drop_box.form(dropit.title, dropit.content, dropit)
if not dropit.success then
dropit.content_ref = "content_error<ref>" .. viewers.styles_color_error( dropit.content_error) .. "</ref>"
dropit.content = dropit.content_ref
end
local list, count, level, split = lua_table.level_list(package.loaded) -- subtasks S170813lll
viewers.restore_configs(memo, "drop_box.new") -- Restore global configurations after eventual changes.
-- res = t .. res
return res
end -- function drop_box.new(selector, title, content, ...)
 
 
Ligne 10 080 ⟶ 9 737 :
local res = ""
if not mask_sections then res = res .. viewers.doc_section(selector, "viewers_section_title_page", "h2", mask_sections) end
-- { "20180824", "20180825", "done", "Rical", "S180824iCD", "in activity.begin_central_modules_support() header namespace and local links.", },
res = res .. drop_box.new(selector, "activity.begin_central_modules_support() Tests **", activity.begin_central_modules_support,
{ ["CSStyle"] = "CSStyle", ["border_radius"] = "5px", ["color"] = viewers.usual_colors["invoke"], }) -- doc link MUMU
res = res .. drop_box.new(selector, "datas.available_props_report(t) Reports availables datas properties **", datas.available_props_report)
-- res = res .. drop_box.new(selector, "modes_args_known_report_title", modes.args_known_report)
Ligne 10 106 ⟶ 9 766 :
local res = ""
if not mask_sections then res = res .. viewers.doc_section(selector, "Library:activity", "h3") end
-- MUMU : Reports in the CentralManual : if the last argument after the function itself is a table["CSStyle"] == "CSStyle" it change the style of the drop box.
res = res .. drop_box.new(selector, "activity_support_central_modules_title", activity.begin_central_modules_support) -- doc link
res = res .. drop_box.new(selector, "langs_translations_stats_report_title", langs.translations_statistics_report)
res = res .. drop_box.new(selector, "activity_phabricator_tasks_title", activity.phabricator_tasks_report) -- S170606act
Ligne 10 142 ⟶ 9 802 :
res = res .. drop_box.new(selector, "luaTable_rough_view_tests_title", lua_table.rough_view_test )
res = res .. drop_box.new(selector, "lua_table_structure_recursive_report", lua_table.structure_recursive_report)
res = res .. drop_box.new(selector, "luaTable_toList_tests_title", lua_table.to_list_tests, { ["dropitonedrop"] = "dropitonedrop", arggg = "dropitonedrop" } )
res = res .. drop_box.new(selector, "luaTable_toTable_tests_title", lua_table.to_table_test)
--
Ligne 10 164 ⟶ 9 824 :
res = res .. drop_box.new(selector, "modes_options_uses_tests_title", modes.options_from_mode_tests)
-- res = res .. drop_box.new(selector, "modes_options_uses_tests_title", modes.options_from_mode_tests,
-- donedrop.bg1="yellow", donedrop.border_color="red", donedrop.border_radius="10px 10px 10px 10px", image="Sanscrit dha.svg", } ) -- , cssview=true
res = res .. drop_box.new(selector, "modes_recursive_normal_tests_title", modes.recursive_normal_tests) -- only errors
-- arguments list
Ligne 10 245 ⟶ 9 905 :
 
-- The TemplateStyles extension introduces a <templatestyles> tag to specify that a stylesheet should be loaded from a wiki page. Placing this in a template allows the template to have custom styles without having to place them in MediaWiki:Common.css.
 
function p.init_international_report(t) -- Reports known_arguments for phase = "mode" or "argument" or "QITEM" or "property"
local memo = viewers.save_configs("p.Init_central_module_report") -- Save global configuration before eventual changes.
local t = t or "\n* <b>p.Init_central_module_report(t)</b> Reports known_arguments for phase = mode or argument or QITEM or property. \n*"
modes.actual_arguments = modes.actual_arguments or {} -- Activated known_arguments depending of for phase = mode or argument or QITEM or property
local tab_view = { -- Group datas and options for a table view with lines and columns.
test_group = modes.actual_arguments, -- = sorted activity.phabricator_tasks_Group,
title_memo = "p_Init_central_module_report **", -- Activated known_arguments depending of phase
headers = "activity_phabricator_tasks_headers", -- "Importance; modified on; Task; Status; Title"
headers = "key; keyword; typ; bind; need; prop; prop_default; format; value",
headers_class = "wikitable alternative center sortable",
form_one_case = function(case) -- Convert a case from test_group to rowGroup.
-- ["QITEM"] = { ["typ"] = "dat", ["need"] = 0, ["keyword"] = "QITEM", ["prop"] = "QITEM", prop_default = "Q34743", },
-- ["mode"] = { ["typ"] = "config", ["need"] = 0, ["keyword"] = "mode", ["prop_default"] = "read"},
-- ["label"] = { ["typ"] = "dat", ["need"] = 0, ["keyword"] = "label" , ["prop"] = "label", ["prop_default"] = "Aristote", },
return { case.key, case.keyword, case.typ, case.bind, case.need, case.prop, case.prop_default, case.format, case.value, }
end,
rowGroup = {},
-- track_on = true, allwaysview
-- res = res .. drop_box.new(selector, "p_Init_central_module_report **", p.Init_central_module_report) -- for phase = mode or argument or QITEM or property
}
t = t .. tableview.new(tab_view) -- Runs tests cases and formats a table view with lines and columns.
viewers.restore_configs(memo, "p.Init_central_module_report") -- Restore global configurations after eventual changes.
return t
end -- t = t .. function p.init_international_report(t) -- FAMLTVQDR replaces function Central.init( code DODO
 
p.options_for_modes = { -- module options_for_modes
Ligne 10 296 ⟶ 9 981 :
res = res .. " - viewers.phab_task('T198107', 'Begin to use')" .. "</center>"
res = res .. viewers.styles_color_error("<center><b>" .. viewers.form9user("modes_delete_docbox_wng") .. "</b><br/></center>")
res = res .. drop_box.formnew(drop_box.new_title(), versions.form_support_desk_report() )
if modes.option("debug") then res = res .. "\n*" .. viewers.ta("modes.cat_view", modes.cat_view) .. viewers.ta("modes.template_options", modes.template_options) .. viewers.ta("modes.mode_options", modes.mode_options) end
local lnk = props.QITEM
Ligne 10 521 ⟶ 10 206 :
 
p.i18n = {} -- translations tables known in the module
 
p.i18n.br = { -- Translations in breton
-- Arguments to import, do not translate. Arguments à importer, ne pas traduire.
["modules_guide"] = { ["typ"] = "ctr", ["need"] = 0, ["keyword"] = "modules_guide", ["modules_guide_default"] = "Centralizer", },
['p_template_drop_box_name'] = 'Boîte déroulante', -- Modèle:Boîte déroulante for drop_box.form
['c'] = 'c',
['mode'] = 'mode',
['options'] = 'options',
['itemid'] = 'itemid',
['QITEM'] = 'QITEM',
['uri'] = 'uri',
--
-- Translate all next arguments. Traduire tous les arguments suivants :
occupation_cat = '%1',
p_authors_deathyear_cat = "Auteurs-%1",
year_number_cat = "Année %1",
-- Noms et descriptions des arguments
lastname = 'nom',
lastname_descr = "Nom. A préciser pour corriger la clé de tri.",
firstname = 'prénom',
firstname_descr = "Prénom. A préciser pour corriger la clé de tri.",
firstname2 = 'prenom',
firstname2_descr = "Prénom. A préciser pour corriger la clé de tri.",
initial = 'initiale',
initial_descr = "Initiale pour corriger les catégories d'ateurs.",
title = 'titre',
title_descr = "Titre de la page, automatique.",
country = 'pays',
flag_of_country = 'Flag_of_France.svg',
flag_of_country_descr = 'Drapeau du pays',
 
-- naissance et deces
birthday = 'jourNaissance', -- nacimiento P569
birthday_descr = "Jour de naissance.",
birthyear = 'anneeNaissance',
birthyear_descr = "Année de naissance",
p_authors_birthyear_cat = "Naissance en %1", -- fr.wikisource Naissance en 1802 Décès en 1885
deathday = 'jourDeces', -- muerte P570
deathday_descr = "Jour de décès",
deathyear = 'anneeDeces',
deathyear_descr = "Année de décès",
p_authors_deathyear_cat = "Décès en %1", -- fr.wikisource Naissance en 1802 Décès en 1885
description = 'description',
description_descr = "Description de l'auteur, à préciser si la description automatique ne convient pas",
--
-- Arguments limités à des valeurs multiples
region = 'région',
region_descr = 'Région pour déterminer les époques anciennes.',
region_values = "autre;chine;inde;siècle", -- wiki_selectors
 
rights = 'droits',
rights_descr = "Type de droits d'auteur nécessaire parmi : 70,50,mpf,ONU,non.",
rights_values = '70;50;mpf;ONU;non',
 
sex = 'sexe',
sex_descr = "Sexe de l'auteur",
sex_values = 'homme;femme',
} -- p.i18n.br
 
p.i18n.en = { -- Translations in English
Ligne 11 110 ⟶ 10 737 :
-- ["docitem"] = { ["typ"] = "config", ["need"] = 0, ["keyword"] = "docitem"},
-- ["dockey"] = { ["typ"] = "config", ["need"] = 0, ["keyword"] = "dockey"},
function Central.doc(frame) -- Formats a documentation or a test in a drop_boxonedrop.
local res = ""
Central.init(frame, p.Module_Central_version, "doc", p.args_known, p.options_for_modes) -- QITEM
Ligne 11 299 ⟶ 10 926 :
{ site = "fr.wikisource", verstime = "2019-02-28T15:24:15", versid = "1.33.0-wmf.19 (e53935b)", seen_time = "2019-03-02T09:28:00", },
{ site = "www.MediaWiki", verstime = "2019-03-05T14:50:49", versid = "1.33.0-wmf.20 (e66958a)", seen_time = "2019-03-06T07:40:00", },
{ site = "www.MediaWiki", verstime = "2019-03-12T11:51:30", versid = "1.33.0-wmf.21 (0aba213)", seen_time = "2019-03-13T21:26:00", },
} -- MWMW
{ site = "fr.wikisource", verstime = "2019-03-13T00:24:25", versid = "1.33.0-wmf.21 (1d9232f)", seen_time = "2019-03-13T21:26:00", },
versions.MediaWiki_version_memo = "1.33.0-wmf.20 (e66958a)"
{ site = "fr.wikisource", verstime = "2019-03-14T12:09:28", versid = "1.33.0-wmf.21 (2ae1a70)", seen_time = "2019-03-16T15:16:34", },
} -- MWMW 1.33.0-wmf.21 (2ae1a70)
versions.MediaWiki_version_memo = "1.33.0-wmf.21 (2ae1a70)"
versions.MediaWiki_Versions_sort = "<" -- First on end, Last on begin
versions.MediaWiki_Versions_sort = ">" -- First on begin, Last on end