Modul:TemplateData: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
2018-03-12
wp>PerfektesChaos (2018-03-11) |
wp>PerfektesChaos (2018-03-12) |
||
Zeile 1: | Zeile 1: | ||
local TemplateData = { suite = "TemplateData", | local TemplateData = { suite = "TemplateData", | ||
serial = "2018-03- | serial = "2018-03-12", | ||
item = 46997995 } | item = 46997995 } | ||
--[=[ | --[=[ | ||
Zeile 75: | Zeile 75: | ||
last = "block", | last = "block", | ||
lead = "block", | lead = "block", | ||
newlines = " | newlines = "*", | ||
spaced = "inline" }, | spaced = "inline" }, | ||
colors = { tableheadbg = "B3B7FF", | colors = { tableheadbg = "B3B7FF", | ||
Zeile 196: | Zeile 196: | ||
-- Parameter: | -- Parameter: | ||
-- adapt -- string, message ID after "templatedata-" | -- adapt -- string, message ID after "templatedata-" | ||
-- Returns string, with localized text | -- Returns string, with localized text | ||
local o = mw.message.new( "templatedata-" .. adapt ) | local o = mw.message.new( "templatedata-" .. adapt ) | ||
if Data.slang then | if Data.slang then | ||
Zeile 1.165: | Zeile 1.165: | ||
else | else | ||
local words = mw.text.split( source, "%s+" ) | local words = mw.text.split( source, "%s+" ) | ||
local show, start, unknown | local show, start, support, unknown | ||
for i = 1, #words do | for i = 1, #words do | ||
s = words[ i ] | s = words[ i ] | ||
Zeile 1.171: | Zeile 1.171: | ||
start = s | start = s | ||
end | end | ||
support = Permit.builder[ s ] | |||
if support == start or | |||
support == "*" then | |||
Permit.builder[ s ] = true | Permit.builder[ s ] = true | ||
else | else | ||
Zeile 1.199: | Zeile 1.201: | ||
show = "inline spaced" | show = "inline spaced" | ||
code = "{{_ | _ = _ }}" | code = "{{_ | _ = _ }}" | ||
end | |||
if Permit.builder.newlines == true then | |||
show = show .. " newlines" | |||
code = string.format( "N%sN", code ) | |||
end | end | ||
elseif start == "block" then | elseif start == "block" then | ||
Zeile 1.290: | Zeile 1.296: | ||
end | end | ||
if source then | if source then | ||
Data.tag.format | Data.tag.format = source | ||
end | end | ||
return r | return r |