Cambios

Saltar a: navegación, buscar

Módulo:Documentation

516 bytes añadidos, 16:09 6 sep 2015
sin resumen de edición
local p = {}
 
local getType = function( namespace, page )
local pageType = 'template'
if namespace == 'Module' then
pageType = 'module'
elseif page.fullText:gsub( '/doc$', '' ):find( '%.css$' ) then
pageType = 'stylesheet'
elseif page.fullText:gsub( '/doc$', '' ):find( '%.js$' ) then
pageType = 'script'
elseif namespace == 'MediaWiki' then
pageType = 'message'
end
return pageType
end
 
-- Creating a documentation page or transclution through {{subst:doc}}
function p.create( f )
end
out = '{{documentation|' .. table.concat( templateArgs, '|' ) .. '}}\n<!-- Put categories/interwiki on the documentation page -->'
out = out:gsub( '|}}', '}}' )
if not args.content then
out = out .. '\n<!-- Put categories/interwiki on the documentation page -->'
end
end
local category = ''
if not args.nocat then
category = '[[CategoryCategoría:Documentation pagespáginas de documentación]]'
end
category = '[[Category:' .. pageType .. 's with no documentation]]'
else
category = '[[CategoryCategoría:Pages with no documentationPáginas sin documentación]]'
end
end
elseif badDoc then
colour = 'F9F2EA'
message = "'''This Esta " .. pageType .. "'s documentation needs improving or additional informationnecesita mejorarse o información adicional.'''\n"
if not args.nocat then
if mw.title.new( 'Category:' .. pageType .. 's with bad documentation' ).exists then
category = '[[Category:' .. pageType .. 's with bad documentation]]'
else
category = '[[CategoryCategoría:Pages with bad documentationPáginas con mala documentación]]'
end
end
local links = {
'[' .. docPage:fullUrl( 'action=edit' .. preload ) .. ' ' .. action .. ']',
'[' .. docPage:fullUrl( 'action=history' ) .. ' history]',
'[' .. page:fullUrl( 'action=purge' ) .. ' purge]'
}
Colaborador, Bots, Administradores
10 223
ediciones

Menú de navegación