Content deleted Content added
Jackmcbarn (talk | contribs) rewrite |
Jackmcbarn (talk | contribs) handle false cognates |
||
Line 33:
end
local retval = args.src[to]
if retval ~= nil or args.from[k] ~= nil then
return retval
end
Line 45:
end
local to = args.to[k]
local falseCognate = args.from[k] ~= nil
if type
args.src[k] = nil▼
if v == nil and not falseCognate then
▲ args.src[k] = nil
end
for k2,v2 in ipairs(to) do
if k2 == 1 then
args.src[v2] = v
elseif v == nil then
args.src[v2] = nil
end
end
elseif to
if v == nil and not falseCognate then
args.src[k] = nil▼
end
args.src[to] = v▼
elseif not falseCognate then
args.src[k] = v
else
error('Attempt to write key "' .. k .. '" which has no translation and is a false cognate', 2)
▲ args.src[k] = nil
▲ args.src[to] = v
end
end
|