Module:CountryAdjectiveDemonym and Module:CountryAdjectiveDemonym/sandbox: Difference between pages

(Difference between pages)
Jump to navigation Jump to search
Page 1
Page 2
imported>Gonnym
simplified code
 
imported>Gonnym
No edit summary
 
Line 69: Line 69:
CountryAdjectiveDemonymDoLoadData()
CountryAdjectiveDemonymDoLoadData()
end
end
 
local similarLongerNouns = mw.loadData( 'Module:CountryAdjectiveDemonym/LongerNouns' )
for adjective, noun in pairs(countryAdjectivesToNounsTable) do
for adjective, noun in pairs(countryAdjectivesToNounsTable) do
if string.find(s, adjective) or string.find(s, noun) then
if string.find(s, adjective) or string.find(s, noun) then
for longerNoun, nameToUse in pairs(similarLongerNouns) do
if string.find(s, longerNoun) then
return nameToUse
end
end
return noun
return noun
end
end