Module:Sandbox/Ajuanca/Names: Difference between revisions

Content deleted Content added
Testing
Testing
 
(2 intermediate revisions by the same user not shown)
Line 265:
table.insert(name.familyNames, fullNameTable[1])
elseif(#fullNameTable==2)then
-- El1st primeromaybe podríais sera nombregiven name
local isGiven = true
table.insert(name.familyNames, fullNameTable[1])
local terminations = {"ez", "es", "is", "iz"}
for c, termination in ipairs(terminations) do
local finalLetters = string.sub(fullNameTable[1], -2, -1)
if (finalLetters == termination) then
isGiven = false
end
end
if(isGiven)then
table.insert(name.familyNamesgivenNames, fullNameTable[1])
else
table.insert(name.familyNames, fullNameTable[1])
end
table.insert(name.familyNames, fullNameTable[2])
else
Line 276 ⟶ 288:
if(positions[2]==0)then
if(positions[1]==1) then
-- PuedeMaybe habera segundosecond apellidosurname normalis detrásbehind
table.insert(name.familyNames, table.concat(fullNameTable, " ", positions[1]))
elseif(positions[1]==2)then
-- Podría1st sermaybe unis nombrea given name
local isGiven = true
table.insert(name.familyNames, fullNameTable[1])
local terminations = {"ez", "es", "is", "iz"}
-- Este es apellido seguro
for c, termination in ipairs(terminations) do
local finalLetters = string.sub(fullNameTable[1], -2, -1)
if (finalLetters == termination) then
isGiven = false
end
end
if(isGiven)then
table.insert(name.givenNames, fullNameTable[1])
else
table.insert(name.familyNames, fullNameTable[1])
end
table.insert(name.familyNames, table.concat(fullNameTable, " ", positions[1]))
end