Module:snon-mut: Difference between revisions
No edit summary |
No edit summary |
||
| (6 intermediate revisions by the same user not shown) | |||
| Line 42: | Line 42: | ||
if data.vowel then | if data.vowel then | ||
data.final = term_lower | data.final = term_lower | ||
if not (normalized:match("^i[aeiou]")) then | |||
data.mut1 = "gh-" | data.mut1 = "gh-" | ||
data.mut2 = "n-" | data.mut2 = "n-" | ||
data.mut3 = "h-" | data.mut3 = "h-" | ||
end | |||
return data | return data | ||
end | end | ||
| Line 118: | Line 120: | ||
local data = export.get_mutation_data(title) | local data = export.get_mutation_data(title) | ||
local | local voiced, has_voiced, has_irreg_voiced = construct_mutation(data, data.vowel and "gh-prothesis" or "voiced", data.mut1, args.voiced) | ||
local nasal, has_nasal, has_irreg_nasal = construct_mutation(data, data.vowel and "n-prothesis" or "nasal", data.mut2, args.nasal) | local nasal, has_nasal, has_irreg_nasal = construct_mutation(data, data.vowel and "n-prothesis" or "nasal", data.mut2, args.nasal) | ||
local aspirate, has_aspirate, has_irreg_aspirate = construct_mutation(data, data.vowel and "h-prothesis" or "aspirate", data.mut3, args.aspirate) | local aspirate, has_aspirate, has_irreg_aspirate = construct_mutation(data, data.vowel and "h-prothesis" or "aspirate", data.mut3, args.aspirate) | ||
| Line 141: | Line 143: | ||
end | end | ||
result = result .. '\n' .. frame:expandTemplate{ title = 'inflection-table-bottom', args = { notes = notes } } | result = result .. '\n' .. frame:expandTemplate{ title = 'inflection-table-bottom', args = { notes = notes } } | ||
if not args.nocat and ( | if not args.nocat and (has_irreg_voiced or has_irreg_nasal or has_irreg_aspirate) then | ||
result = result .. require("Module:utilities").format_categories("Scots Norse terms with irregular mutation", lang) | result = result .. require("Module:utilities").format_categories("Scots Norse terms with irregular mutation", lang) | ||
end | end | ||