Module:pollasena-roots: Difference between revisions
No edit summary |
No edit summary |
||
| (8 intermediate revisions by the same user not shown) | |||
| Line 27: | Line 27: | ||
end | end | ||
local data = {term = term, alt = alt or term, lang = lang, to_wikt = natlang} | local data = {term = term, alt = alt or term, lang = lang, to_wikt = natlang} | ||
return require('Module:links').full_link(data) | return require('Module:links').full_link(data, "term") | ||
end | end | ||
| Line 34: | Line 34: | ||
local a = 0 | local a = 0 | ||
if frame.args[" | if frame.args["offset"] or (frame.args["old"] or frame.args["older"]) then | ||
local offset = frame.args["old"] and 1 or frame.args["older"] and 2 or tonumber(frame.args["offset"]) | |||
local offset = tonumber(frame.args["offset"]) | |||
for i=1,offset do | for i=1,offset do | ||
| Line 102: | Line 98: | ||
end | end | ||
if i~=1 and links[i-1] == "-" then | if i~=1 and links[i-1] == "-" then alts[i] = links[i]:gsub("^%*","") end | ||
if i~=1 and links[i-1] ~= " " then links[i] = links[i]:gsub("%|%*%-"," | --if i~=1 and links[i-1] ~= " " then links[i] = links[i]:gsub("(%|?)%*%-","%1-") end | ||
--if i~=1 and alts[i-1]:match("%-$") then links[i] = links[i]:gsub("%|%*","|") end | --if i~=1 and alts[i-1]:match("%-$") then links[i] = links[i]:gsub("%|%*","|") end | ||
end | end | ||
return table.concat(links) .. ncategories(categories) | return table.concat(links) .. ncategories(categories) | ||