Module:documentation: Difference between revisions

m 1 revision imported
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 10: Line 10:
local module_categorization_module = "Module:module categorization"
local module_categorization_module = "Module:module categorization"
local number_list_show_module = "Module:number list/show"
local number_list_show_module = "Module:number list/show"
local chemical_element_list_show_module = "Module:chemical element list/show"
local pages_module = "Module:pages"
local pages_module = "Module:pages"
local parameters_module = "Module:parameters"
local parameters_module = "Module:parameters"
Line 115: Line 116:
number_list_show_table = require(number_list_show_module).table
number_list_show_table = require(number_list_show_module).table
return number_list_show_table(...)
return number_list_show_table(...)
end
local function chemical_element_list_show_table(...)
chemical_element_list_show_table = require(chemical_element_list_show_module).table
return chemical_element_list_show_table(...)
end
end


Line 234: Line 240:
text = string.format(
text = string.format(
"This data module contains the " .. text_type .. " of " ..
"This data module contains the " .. text_type .. " of " ..
"[[Appendix:Unicode|Unicode]] code points within the range U+%04X to U+%04X.",
"[[wikt:Appendix:Unicode|Unicode]] code points within the range U+%04X to U+%04X.",
low, high)
low, high)
if subpage == "images" and safe_load_data("Module:Unicode data/emoji images/" .. first_three_of_code_point) then
if subpage == "images" and safe_load_data("Module:Unicode data/emoji images/" .. first_three_of_code_point) then
Line 398: Line 404:
end,
end,
},
},
{
regex = "^Module:chemical element list/data/(.+)$",
process = function(title, cats, lang_code)
local lang = insert_lang_data_module_cats(cats, lang_code, "Chemical element data modules")
if lang then
return ("This module contains data on chemical elements in %s.\n%s")
:format(lang:makeCategoryLink(), chemical_element_list_show_table() or "")
end
end,
},
{
{
regex = "^Module:accel/(.+)$",
regex = "^Module:accel/(.+)$",
Line 406: Line 422:
cats:insert(lang:getCanonicalName() .. " modules|accel")
cats:insert(lang:getCanonicalName() .. " modules|accel")
cats:insert(("Accel submodules|%s"):format(lang:getCanonicalName()))
cats:insert(("Accel submodules|%s"):format(lang:getCanonicalName()))
return ("This module contains new entry creation rules for %s; see [[WT:ACCEL]] for an overview, and [[Module:accel]] for information on creating new rules.")
return ("This module contains new entry creation rules for %s; see [[wikt:WT:ACCEL|WT:ACCEL]] for an overview, and [[Module:accel]] for information on creating new rules.")
:format(lang:makeCategoryLink())
:format(lang:makeCategoryLink())
end
end
Line 462: Line 478:
.. "This module is part of the category tree system, which is a general framework for generating the "
.. "This module is part of the category tree system, which is a general framework for generating the "
.. "descriptions and categorization of category pages.\n\n"
.. "descriptions and categorization of category pages.\n\n"
.. "For more information, see [[Module:category tree/lang/documentation]].\n\n"
.. "For more information, see [[wikt:Module:category tree/lang/documentation|Module:category tree/lang/documentation]].\n\n"
.. "'''NOTE:''' If you add a new language-specific module, you must add the language code to the "
.. "'''NOTE:''' If you add a new language-specific module, you must add the language code to the "
.. "list at the top of [[Module:category tree/lang]] in order for the module to be recognized."
.. "list at the top of [[Module:category tree/lang]] in order for the module to be recognized."
Line 513: Line 529:
local lang, langname = insert_lang_data_module_cats(cats, lang_code, "Swadesh modules")
local lang, langname = insert_lang_data_module_cats(cats, lang_code, "Swadesh modules")
if lang then
if lang then
return "This module contains the [[Swadesh list]] of basic vocabulary in " .. langname .. "."
return "This module contains the [[wikt:Swadesh list|Swadesh list]] of basic vocabulary in " .. langname .. "."
end
end
end
end
Line 522: Line 538:
local lang, langname = insert_lang_data_module_cats(cats, lang_code, "Swadesh modules")
local lang, langname = insert_lang_data_module_cats(cats, lang_code, "Swadesh modules")
if lang then
if lang then
local prefix = "This module contains the [[Swadesh list]] of basic vocabulary in the "
local prefix = "This module contains the [[wikt:Swadesh list|Swadesh list]] of basic vocabulary in the "
local etym_lang = get_lang(variety, nil, "allow etym")
local etym_lang = get_lang(variety, nil, "allow etym")
if etym_lang then
if etym_lang then
Line 665: Line 681:
cats:insert("Reference modules")
cats:insert("Reference modules")
return "This module holds bibliographical data for " ..
return "This module holds bibliographical data for " ..
page .. ". For the formatted bibliography see '''[[Appendix:Bibliography/" .. page .. "]]'''."
page .. ". For the formatted bibliography see '''[[wikt:Appendix:Bibliography/" .. page .. "|Appendix:Bibliography/" .. page .. "]]'''."
end,
end,
},
},
Line 693: Line 709:


local title = args["for"] and new_title(args["for"]) or get_current_title()
local title = args["for"] and new_title(args["for"]) or get_current_title()
local doc_title = args.from ~= "-" and new_title(args.from or title.fullText .. '/documentation') or nil
local doc_title = args.from ~= "-" and new_title(args.from or title.fullText .. '/doc') or nil
local contentModel = title.contentModel
local contentModel = title.contentModel
local pagetype, is_script_or_stylesheet = get_pagetype(title)
local pagetype, is_script_or_stylesheet = get_pagetype(title)
Line 840: Line 856:
output:insert(
output:insert(
"<dd><i style=\"font-size: larger;\">The following " ..
"<dd><i style=\"font-size: larger;\">The following " ..
"[[Help:Documenting templates and modules|documentation]] is located at [[" ..
"[[wikt:Help:Documenting templates and modules|documentation]] is located at [[" ..
doc_title.fullText .. "]]. " .. "<sup>[[" .. doc_title:fullUrl { action = "edit" } .. " edit]]</sup>" ..
doc_title.fullText .. "]]. " .. "<sup>[[" .. doc_title:fullUrl { action = "edit" } .. " edit]]</sup>" ..
cats_auto_generated_text .. "</i></dd>")
cats_auto_generated_text .. "</i></dd>")
Line 859: Line 875:
output:insert(
output:insert(
"<dd><i style=\"font-size: larger;\">The following " ..
"<dd><i style=\"font-size: larger;\">The following " ..
"[[Help:Documenting templates and modules|documentation]] is " ..
"[[wikt:Help:Documenting templates and modules|documentation]] is " ..
"generated by [[" .. doc_content_source .. "]]. <sup>[[" ..
"generated by [[" .. doc_content_source .. "]]. <sup>[[" ..
new_title(doc_content_source):fullUrl { action = "edit" } ..
new_title(doc_content_source):fullUrl { action = "edit" } ..
Line 867: Line 883:
output:insert(
output:insert(
"<dd><i style=\"font-size: larger;\">This " .. pagetype ..
"<dd><i style=\"font-size: larger;\">This " .. pagetype ..
" lacks a [[Help:Documenting templates and modules|documentation subpage]]. " ..
" lacks a [[wikt:Help:Documenting templates and modules|documentation subpage]]. " ..
(fallback_docs and "You may " or "Please ") ..
(fallback_docs and "You may " or "Please ") ..
"[" .. doc_title:fullUrl { action = "edit", preload = preload }
"[" .. doc_title:fullUrl { action = "edit", preload = preload }