Module:form of: Difference between revisions

no edit summary
No edit summary
No edit summary
 
Line 746: Line 746:
if glossary ~= nil then
if glossary ~= nil then
if glossary == m_data.WIKT then
if glossary == m_data.WIKT then
display = "[[" .. normtag .. "|" .. display .. "]]"
display = "[[wikt:" .. normtag .. "|" .. display .. "]]"
elseif glossary == m_data.WP then
elseif glossary == m_data.WP then
display = "[[w:" .. normtag .. "|" .. display .. "]]"
display = "[[w:" .. normtag .. "|" .. display .. "]]"
elseif glossary == m_data.APPENDIX then
elseif glossary == m_data.APPENDIX then
display = "[[Appendix:Glossary#" .. anchor_encode(normtag) .. "|" .. display .. "]]"
display = "[[wikt:Appendix:Glossary#" .. anchor_encode(normtag) .. "|" .. display .. "]]"
elseif type(glossary) ~= "string" then
elseif type(glossary) ~= "string" then
error(("Internal error: Wrong type %s for glossary value %s for tag %s"):format(
error(("Internal error: Wrong type %s for glossary value %s for tag %s"):format(
Line 757: Line 757:
local link = glossary:match("^wikt:(.*)")
local link = glossary:match("^wikt:(.*)")
if link then
if link then
display = "[[" .. link .. "|" .. display .. "]]"
display = "[[wikt:" .. link .. "|" .. display .. "]]"
end
end
if not link then
if not link then
Line 766: Line 766:
end
end
if not link then
if not link then
display = "[[Appendix:Glossary#" .. anchor_encode(glossary) .. "|" .. display .. "]]"
display = "[[wikt:Appendix:Glossary#" .. anchor_encode(glossary) .. "|" .. display .. "]]"
end
end
end
end