Module:links: Difference between revisions

no edit summary
No edit summary
No edit summary
 
Line 445: Line 445:
-- If `no_alt_ast` is true, use pcall to catch the error which will be thrown if this is a reconstructed lang and the alt text doesn't have *.
-- If `no_alt_ast` is true, use pcall to catch the error which will be thrown if this is a reconstructed lang and the alt text doesn't have *.
if link.display == auto_display then
if link.display == auto_display then
insert(cats, lang:getFullName() .. " links with redundant alt parameters")
else
else
local ok, check
local ok, check
Line 453: Line 452:
ok = true
ok = true
check = export.get_link_page(orig_display, lang, sc, plain)
check = export.get_link_page(orig_display, lang, sc, plain)
end
if ok and link.target == check then
insert(cats, lang:getFullName() .. " links with redundant target parameters")
end
end
end
end
Line 664: Line 660:
end
end
term, alt = new_term, new_alt
term, alt = new_term, new_alt
if cats then
if not (srwc and srwc(term, alt)) then
insert(cats, lang:getFullName() .. " links with redundant wikilinks")
end
end
end
end
end
end
Line 1,233: Line 1,224:
if automated_tr or data.tr_fail then
if automated_tr or data.tr_fail then
local manual_tr = data.tr[1]
local manual_tr = data.tr[1]
if manual_tr then
if (export.remove_links(manual_tr) == export.remove_links(automated_tr)) and (not data.tr_fail) then
insert(cats, lang:getFullName() .. " terms with redundant transliterations")
end
end
if (not manual_tr) or lang:overrideManualTranslit(data.sc[1]) then
if (not manual_tr) or lang:overrideManualTranslit(data.sc[1]) then