10,731
edits
TheNightAvl (talk | contribs) No edit summary |
TheNightAvl (talk | contribs) No edit summary |
||
Line 110: | Line 110: | ||
end | end | ||
return to_Return | return to_Return | ||
end | |||
local temp_main = "" | |||
local function temp_append(text) | |||
temp_main = temp_main .. text | |||
end | end | ||
local form, colour | local form, colour | ||
Line 115: | Line 119: | ||
local link = mw.ustring.match(temp, "^%:([^%(%<%[%+%/]+)") | local link = mw.ustring.match(temp, "^%:([^%(%<%[%+%/]+)") | ||
link = mw.ustring.gsub(link, "%s+$", "") | link = mw.ustring.gsub(link, "%s+$", "") | ||
temp_append("'''" .. m_links.full_link{language = language, term = link} .. "'''") | |||
remove_temp("^%:[^%(%<%[%+%/]+") | remove_temp("^%:[^%(%<%[%+%/]+") | ||
if mw.ustring.find(temp, "^%([^%)]+%)") then | if mw.ustring.find(temp, "^%([^%)]+%)") then | ||
Line 124: | Line 128: | ||
remove_temp("^%[[^%]]+%]") | remove_temp("^%[[^%]]+%]") | ||
end | end | ||
temp_append(" (+ " .. glossary(form, colour) .. ")") | |||
end | end | ||
elseif mw.ustring.match(temp, "^[^%(%<%[%+%/]+") then | elseif mw.ustring.match(temp, "^[^%(%<%[%+%/]+") then | ||
Line 134: | Line 138: | ||
remove_temp("^%[[^%]]+%]") | remove_temp("^%[[^%]]+%]") | ||
end | end | ||
temp_append(glossary(form, colour)) | |||
if args["pos"] then | if args["pos"] then | ||
if data[form] then form = data[form].label end | if data[form] then form = data[form].label end | ||
temp_append("[[Category:" .. language.name .. " " .. pluralize(args["pos"]) .. " governing the " .. form .. "]]") | |||
end | end | ||
else | else | ||
error("Invalid parameter format") | error("Invalid parameter format") | ||
end | end | ||
local t, q, qq = "", "", "" | |||
local | while mw.ustring.find(temp, "^%<[^%>]+%>") do | ||
local content = mw.ustring.match(temp, "^%<([^%>]+)%>") | |||
if mw.ustring.sub(content, 1, 2) == "q:" then | |||
q = "(''" .. mw.ustring.sub(content, 3) .. "'') " | |||
elseif mw.ustring.sub(content, 1, 3) == "qq:" then | |||
qq = " (''" .. mw.ustring.sub(content, 4) .. "'')" | |||
elseif mw.ustring.sub(content, 1, 3) == "q*:" then | |||
show = "[(''" .. mw.ustring.sub(content, 4) .. "'') " mw.ustring.sub(show, 2) | |||
else | |||
t = " <small>‘".. content .."’</small>" | |||
end | |||
remove_temp("^%<[^%>]+%>") | remove_temp("^%<[^%>]+%>") | ||
end | end | ||
append(q .. temp_main .. q .. t) | |||
end | end | ||
end | end |