Edición de «Módulo:Navbar»

Advertencia: no has iniciado sesión. Tu dirección IP se hará pública si haces cualquier edición. Si inicias sesión o creas una cuenta, tus ediciones se atribuirán a tu nombre de usuario, además de otros beneficios.

Puedes deshacer la edición. Antes de deshacer la edición, comprueba la siguiente comparación para verificar que realmente es lo que quieres hacer, y entonces publica los cambios para así efectuar la reversión.

Revisión actual Tu texto
Línea 1: Línea 1:
local p = {}
local p = {}
local cfg = mw.loadData('Module:Navbar/configuration')
local cfg = mw.loadData('Módulo:Navbar/configuración')


local function get_title_arg(is_collapsible, template)
local function get_title_arg(is_collapsible, template)
Línea 56: Línea 56:
local title = mw.title.new(mw.text.trim(title_text), cfg.title_namespace)
local title = mw.title.new(mw.text.trim(title_text), cfg.title_namespace)
if not title then
if not title then
error(cfg.invalid_title .. title_text)
-- error(cfg.invalid_title .. title_text) -- diferente a en la Wikipedia inglesa
return
end
end
local talkpage = title.talkPageTitle and title.talkPageTitle.fullText or ''
local talkpage = title.talkPageTitle and title.talkPageTitle.fullText or ''
Línea 63: Línea 64:
-- link_descriptions should be easier...
-- link_descriptions should be easier...
local link_descriptions = {
local link_descriptions = {
{ ['mini'] = 'v', ['full'] = 'view', ['html_title'] = 'View this template',
{ ['mini'] = 'v', ['full'] = 'ver', ['html_title'] = 'Ver esta plantilla',
['link'] = title.fullText, ['url'] = false },
['link'] = title.fullText, ['url'] = false },
{ ['mini'] = 't', ['full'] = 'talk', ['html_title'] = 'Discuss this template',
{ ['mini'] = 't', ['full'] = 'discusión', ['html_title'] = 'Conversar sobre esta plantilla',
['link'] = talkpage, ['url'] = false },
['link'] = talkpage, ['url'] = false },
{ ['mini'] = 'e', ['full'] = 'edit', ['html_title'] = 'Edit this template',
{ ['mini'] = 'e', ['full'] = 'editar', ['html_title'] = 'Editar esta plantilla',
['link'] = 'Special:EditPage/' .. title.fullText, ['url'] = false },
['link'] = title:fullUrl('action=edit'), ['url'] = true },
{ ['mini'] = 'h', ['full'] = 'hist', ['html_title'] = 'History of this template',
{ ['mini'] = 'h', ['full'] = 'historial', ['html_title'] = 'Historial de esta plantilla',
['link'] = 'Special:PageHistory/' .. title.fullText, ['url'] = false },
['link'] = title:fullUrl('action=history'), ['url'] = true },
{ ['mini'] = 'm', ['full'] = 'move', ['html_title'] = 'Move this template',
{ ['mini'] = 'm', ['full'] = 'trasladar', ['html_title'] = 'Trasladar esta plantilla',
['link'] = mw.title.new('Special:Movepage'):fullUrl('target='..title.fullText), ['url'] = true },
['link'] = mw.title.new('Special:Movepage'):fullUrl('target='..title.fullText), ['url'] = true },
{ ['mini'] = 'w', ['full'] = 'watch', ['html_title'] = 'Watch this template',  
{ ['mini'] = 'w', ['full'] = 'vigilar', ['html_title'] = 'Vigilar esta plantiilla',  
['link'] = title:fullUrl('action=watch'), ['url'] = true }
['link'] = title:fullUrl('action=watch'), ['url'] = true }
}
}
Línea 151: Línea 152:
end
end
local frame = mw.getCurrentFrame()
return mw.getCurrentFrame():extensionTag{
-- hlist -> navbar is best-effort to preserve old Common.css ordering.
return frame:extensionTag{
name = 'templatestyles', args = { src = cfg.hlist_templatestyles }
} .. frame:extensionTag{
name = 'templatestyles', args = { src = cfg.templatestyles }
name = 'templatestyles', args = { src = cfg.templatestyles }
} .. tostring(div:done())
} .. tostring(div:done())
Línea 161: Línea 158:


function p.navbar(frame)
function p.navbar(frame)
return p._navbar(require('Module:Arguments').getArgs(frame))
return p._navbar(require('Módulo:Arguments').getArgs(frame))
end
end


return p
return p
Ten en cuenta que todas las contribuciones a Wiki TVenserio pueden ser editadas, modificadas o eliminadas por otros colaboradores. Si no deseas que las modifiquen sin limitaciones, no las publiques aquí.
Al mismo tiempo, asumimos que eres el autor de lo que escribiste, o lo copiaste de una fuente en el dominio público o con licencia libre (véase Wiki TVenserio:Derechos de autor para más detalles). ¡No uses textos con copyright sin permiso!
Cancelar Ayuda de edición (se abre en una ventana nueva)

Plantilla usada en esta página: