Module:CountryAdjectiveDemonym and Module:CountryAdjectiveDemonym/sandbox: Difference between pages
Appearance
(Difference between pages)
Content deleted Content added
simplified code |
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 |