Modul:Vorlage:Dokumentation: Unterschied zwischen den Versionen
2018-04-24
wp>PerfektesChaos (2017-11-11) |
wp>PerfektesChaos (2018-04-24) |
||
Zeile 1: | Zeile 1: | ||
--[=[ | --[=[ 2018-04-24 | ||
{{Dokumentation}} | {{Dokumentation}} | ||
]=] | ]=] | ||
Zeile 19: | Zeile 19: | ||
return tostring( e ) | return tostring( e ) | ||
end -- fake() | end -- fake() | ||
local function fatal( amend ) | |||
local s = "Wikipedia:Vorlagenfehler/Vorlage:Dokumentation" | |||
if amend then | |||
s = string.format( "%s/%s", s, amend ) | |||
end | |||
return string.format( "[[Kategorie:%s]]", s ) | |||
end -- fatal() | |||
Zeile 146: | Zeile 156: | ||
args = bottom } | args = bottom } | ||
if current.namespace == 10 then | if current.namespace == 10 then | ||
local cats | local cats | ||
sub = current.text .. "/Meta" | sub = current.text .. "/Meta" | ||
cats = mw.title.makeTitle( 10, sub ) | cats = mw.title.makeTitle( 10, sub ) | ||
if cats.exists then | if cats.exists then | ||
r = r .. | local s = string.format( "[[%s|/Meta]]", | ||
cats.prefixedText ) | |||
local wl = mw.html.create( "code" ) | |||
:wikitext( s ) | |||
local e = mw.html.create( "div" ) | |||
:addClass( "error" ) | |||
:css( { background = "#FFFF00", | |||
border = "#FF0000 2px solid", | |||
margin = "1em", | |||
padding = "5px" } ) | |||
r = r .. tostring( e:wikitext( "Unterseite " ) | |||
:node( wl ) | |||
:wikitext( " nicht mehr unterstützt" ) ) | |||
.. fatal() | |||
end | end | ||
end | end | ||
Zeile 167: | Zeile 189: | ||
:attr( "class", "error" ) | :attr( "class", "error" ) | ||
:wikitext( r ) | :wikitext( r ) | ||
r = | r = tostring( e ) .. fatal( "Intern" ) | ||
end | end | ||
return r | return r |