Module:links: Difference between revisions

No edit summary
No edit summary
 
Line 337: Line 337:
end
end
end
end
 
-- Check if the term is reconstructed and remove any asterisk. Also check for anti-asterisk (!!).
-- Check if the term is reconstructed and remove any asterisk. Also check for anti-asterisk (!!).
-- Otherwise, handle the escapes.
-- Otherwise, handle the escapes.
Line 354: Line 354:
end
end
target, escaped = target:gsub("^(\\-)\\%*", "%1*")
target, escaped = target:gsub("^(\\-)\\%*", "%1*")
if reconstructed == 0 and lang:hasType("reconstructed") and not lang:hasType("conlang") then
orig_target = "*" .. target
reconstructed = 1
end


if not (sc and sc:getCode() ~= "None") then
if not (sc and sc:getCode() ~= "None") then
Line 389: Line 394:
target = "wikt:Reconstruction:" .. lang:getFullName() .. "/" .. target
target = "wikt:Reconstruction:" .. lang:getFullName() .. "/" .. target
elseif anti_asterisk ~= 1 and (lang:hasType("reconstructed") or lang:getFamilyCode() == "qfa-sub") then
elseif anti_asterisk ~= 1 and (lang:hasType("reconstructed") or lang:getFamilyCode() == "qfa-sub") then
error("The specified language " .. lang:getCanonicalName()
--error("The specified language " .. lang:getCanonicalName()
.. " is unattested, while the given term does not begin with '*' to indicate that it is reconstructed.")
--.. " is unattested, while the given term does not begin with '*' to indicate that it is reconstructed.")
orig_target = "*" .. target
else
else
target = target
target = target