2,788
edits
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
error("language link data must contain term") | error("language link data must contain term") | ||
end | end | ||
local link = " | local link = data.term | ||
local alt = data.alt or data.term | |||
link = link .. "#" .. data.language. | if data.language and data.language.proto then | ||
alt = "*" .. alt | |||
link = "Appendix:" .. data.language.name .. "/" .. data.term | |||
elseif data.language then | |||
link = link .. "#" .. string.gsub(data.language.name, " ", "_") | |||
end | end | ||
return link .. "|" . | return "[[" .. link .. "|" .. alt .. "]]" | ||
end | end | ||