Ir al contenido
Menú principal
Menú principal
mover a la barra lateral
ocultar
Navegación
Página principal
Cambios recientes
Página aleatoria
Ayuda sobre MediaWiki
Wiki TVenserio
Buscar
Buscar
Crear una cuenta
Acceder
Herramientas personales
Modo oscuro
Crear una cuenta
Acceder
Páginas para editores desconectados
más información
Contribuciones
Discusión
Edición de «
Módulo:Cat see also
»
Módulo
Discusión
English
Leer
Editar código
Ver historial
Herramientas
Herramientas
mover a la barra lateral
ocultar
Acciones
Leer
Editar código
Ver historial
General
Lo que enlaza aquí
Cambios relacionados
Páginas especiales
Información de la página
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.
Comprobación antispam. ¡
No
rellenes esto!
require('Module:No globals') local p = {} function p.main(frame) local args = require('Module:Arguments').getArgs(frame) frame = mw.getCurrentFrame() -- Special case when the first given link in parameter is 'V', and -- the current page name starts by 'V' or 'In' if args[1] == 'V' then local title = mw.title.getCurrentTitle().text local cwttb = mw.text.split( title, ':' ); if title:sub(1, 1) == 'V' then args[1] = 'In' .. mw.getContentLanguage():lcfirst(title) elseif title:sub(1, 1) == 'I' then args[1] = mw.getContentLanguage():ucfirst(title:sub(3)) else args[1] = nil end local cwttc = cwttb [1] if mw.ustring.sub (cwttc, -5) == ' code' then cwttc = mw.ustring.sub (cwttc, 1, #cwttc-5) end if args[9] ~= nil then args['for'] = args[9] elseif mw.ustring.sub (cwttb[1], 1, 22) == 'Valid SVG created with' then args['for'] = '[[Template:C' .. mw.ustring.sub (cwttc, 12) .. '|' .. mw.ustring.sub (cwttc, 24) .. ']]' elseif mw.ustring.sub (cwttb[1], 1, 24) == 'Invalid SVG created with' then args['for'] = '[[Template:C' .. mw.ustring.sub (cwttc, 14) .. '|' .. mw.ustring.sub (cwttc, 26) .. ']]' end end -- filter the list of links in parameters local links = {} local linkformat = '<span lang="en" dir="ltr">[[:' .. (args.iw or args.SISTER or '') .. 'Category:%s|%s]]</span>' for i, v in ipairs(args) do -- discard HTML comments and opening or closing "nowiki" tags in values, -- then normalize and trim whitespaces v = v :gsub('<!%-%-.-%-%->', '') :gsub('<nowiki *>', ''):gsub('</nowiki *>', ''):gsub('<nowiki */>', '') :gsub('_', ' '):gsub('%s+', ' '):gsub('^%s*(.-)%s*$', '%1') -- do not insert any link for empty values if v ~= '' then local html = args["h" .. tostring(i)] if html ~= nil and html ~= '' then table.insert(links, linkformat:format(v, '<' .. html .. '>' .. v .. '</' .. html .. '>')) else table.insert(links, linkformat:format(v, v)) end end end -- do not return any box if the filtered list of links is now empty if #links == 0 then return '' end -- find the localized template to format the box and message containing the list if not args.lang or not mw.language.isSupportedLanguage(args.lang) then -- use page language instead of user language on pages translated using the Translate extension if frame:callParserFunction('#translation', '') ~= '' then args.lang = frame:preprocess('{{PAGELANGUAGE}}') else args.lang = frame:callParserFunction('Int', 'Lang') end end local fallbacks = mw.language.getFallbacksFor(args.lang) table.insert(fallbacks, 1, args.lang) for _, lang in ipairs(fallbacks) do if mw.title.new('Template:Cat see also/i18n/' .. lang).exists then args.lang = lang break end end -- prepare the formating of the list according to target language args.list = require('Module:Linguistic').conj(links, args.lang, 'and') args.length = #links -- format the box and its message continaing the list return frame:expandTemplate{ title = 'Template:Cat see also/i18n/' .. args.lang, args = args } end return p
Resumen:
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:
Módulo:Cat see also/doc
(
editar
)
Activar o desactivar el límite de anchura del contenido