Module:links: Difference between revisions
No edit summary |
No edit summary |
||
| Line 377: | Line 377: | ||
-- Link to appendix for reconstructed terms and terms in appendix-only languages. Plain links interpret * | -- Link to appendix for reconstructed terms and terms in appendix-only languages. Plain links interpret * | ||
-- literally, however. | -- literally, however. | ||
if reconstructed == 1 then | if not lang:hasType("conlang") then | ||
if lang:hasType("appendix-constructed") then | |||
target = "wikt:Appendix:" .. lang:getFullName() .. "/" .. target | |||
elseif reconstructed == 1 then -- asterisk found | |||
if lang:getFullCode() == "und" then | |||
-- Return the original target as default display value. If we don't do this, we wrongly get | |||
-- [Term?] displayed instead. | |||
return nil, orig_target | |||
end | |||
target = "wikt:Reconstruction:" .. lang:getFullName() .. "/" .. target | |||
elseif anti_asterisk ~= 1 and (lang:hasType("reconstructed") or lang:getFamilyCode() == "qfa-sub") then | |||
error("The specified language " .. lang:getCanonicalName() | |||
.. " is unattested, while the given term does not begin with '*' to indicate that it is reconstructed.") | |||
else | |||
target = target | |||
end | end | ||
else | else | ||
target = target | target = "Contionary:" .. target | ||
end | end | ||
return target, orig_target, escaped > 0 | return target, orig_target, escaped > 0 | ||