Module:category tree/affixes and compounds: Difference between revisions
No edit summary Tag: Reverted |
No edit summary Tag: Manual revert |
||
| Line 270: | Line 270: | ||
local parents = {} | local parents = {} | ||
if id then | if id then | ||
if pos == " | if pos == "words" then | ||
-- don't allow formerly-named categories with "words" | |||
return nil | |||
end | |||
if pos == "terms" then | |||
table.insert(parents, {name = labelpref .. term, sort = id, args = args}) | table.insert(parents, {name = labelpref .. term, sort = id, args = args}) | ||
else | else | ||
table.insert(parents, {name = | table.insert(parents, {name = "terms " .. affixtype .. "ed with " .. term_and_id, sort = id .. ", " .. pos, args = args}) | ||
table.insert(parents, {name = labelpref .. term, sort = id, args = args}) | table.insert(parents, {name = labelpref .. term, sort = id, args = args}) | ||
end | end | ||
elseif pos == "words" then | |||
-- don't allow formerly-named categories with "words" | |||
return nil | |||
elseif pos ~= "terms" then | elseif pos ~= "terms" then | ||
table.insert(parents, {name = "terms " .. affixtype .. "ed with " .. term, sort = pos, args = args}) | table.insert(parents, {name = "terms " .. affixtype .. "ed with " .. term, sort = pos, args = args}) | ||