Module:pollasena-roots/templates: Difference between revisions
Jump to navigation
Jump to search
Created page with "local m_pr = require("Module:pollasena-roots") local export = {} local function concat_etymologies(args, etymologies) local capital = args.nocap and "f" or "F" return capital .. "rom " .. table.concat(etymologies, ", from ") .. "." end function export.qsc(frame) local parent_args = frame:getParent().args local ancestor_codes = { { code = "sekh", options = {} }, { code = "wasc", options = {optional = true, roots = true } } } local evolution, args, catego..." |
No edit summary |
||
| Line 29: | Line 29: | ||
{ code = "cel-pro", options = {annotated = true} }, | { code = "cel-pro", options = {annotated = true} }, | ||
{ code = "ine-pro", options = {roots = true} }, | { code = "ine-pro", options = {roots = true} }, | ||
} | } | ||
| Line 41: | Line 35: | ||
return concat_etymologies(args, evolution) .. categories | return concat_etymologies(args, evolution) .. categories | ||
end | end | ||
--[[ | |||
oltic (lyti) [< middle oltic (lyti-mid) < old oltic (lyti-old)] < proto-celtic (cel-pro) | |||
]] | |||
function export.lyti_loan(frame) | function export.lyti_loan(frame) | ||
| Line 59: | Line 57: | ||
local evolution, args, categories = m_pr.parse_args(parent_args, "lyti", ancestor_codes) | local evolution, args, categories = m_pr.parse_args(parent_args, "lyti", ancestor_codes) | ||
return concat_etymologies(args, evolution) .. categories | |||
end | |||
function export.gwax_wasc(frame) | |||
local parent_args = frame:getParent().args | |||
local ancestor_codes = { | |||
{ code = "wasc", options = {roots = true } } | |||
} | |||
local evolution, args, categories = m_pr.parse_args(parent_args, "gwax", ancestor_codes) | |||
return concat_etymologies(args, evolution) .. categories | |||
end | |||
function export.guim(frame) | |||
local parent_args = frame:getParent().args | |||
local ancestor_codes = { | |||
{ code = "ine-pro", options = { roots = true } } | |||
} | |||
local evolution, args, categories = m_pr.parse_args(parent_args, "guim", ancestor_codes) | |||
return concat_etymologies(args, evolution) .. categories | |||
end | |||
function export.sekh(frame) | |||
local parent_args = frame:getParent().args | |||
local ancestor_codes = { | |||
{ code = "wasc", options = {optional = true, roots = true } } | |||
} | |||
local evolution, args, categories = m_pr.parse_args(parent_args, "sekh", ancestor_codes) | |||
return concat_etymologies(args, evolution) .. categories | |||
end | |||
function export.hzlc(frame) | |||
local parent_args = frame:getParent().args | |||
local ancestor_codes = { | |||
{ code = "wasc", options = {optional = true, roots = true } } | |||
} | |||
local evolution, args, categories = m_pr.parse_args(parent_args, "hzlc", ancestor_codes) | |||
return concat_etymologies(args, evolution) .. categories | |||
end | |||
function export.soky(frame) | |||
local parent_args = frame:getParent().args | |||
local ancestor_codes = { | |||
{ code = "qsc", options = {} }, | |||
{ code = "sekh", options = {} }, | |||
{ code = "wasc", options = {optional = true, roots = true } } | |||
} | |||
local evolution, args, categories = m_pr.parse_args(parent_args, "soky", ancestor_codes) | |||
return concat_etymologies(args, evolution) .. categories | |||
end | |||
function export.azms(frame) | |||
local parent_args = frame:getParent().args | |||
local ancestor_codes = { | |||
{ code = "azms-old", options = {optional = true} }, | |||
{ code = "arto-pro", options = {} }, | |||
{ code = "mish-pro", options = {} }, | |||
{ code = "ine-pro", options = {optional = true, roots = true } } | |||
} | |||
local evolution, args, categories = m_pr.parse_args(parent_args, "azms", ancestor_codes) | |||
return concat_etymologies(args, evolution) .. categories | return concat_etymologies(args, evolution) .. categories | ||
Revision as of 16:46, 16 April 2026
- The following documentation is located at Module:pollasena-roots/templates/doc.[edit]
- Useful links: root page • root page's subpages • links • transclusions • testcases • sandbox
local m_pr = require("Module:pollasena-roots")
local export = {}
local function concat_etymologies(args, etymologies)
local capital = args.nocap and "f" or "F"
return capital .. "rom " .. table.concat(etymologies, ", from ") .. "."
end
function export.qsc(frame)
local parent_args = frame:getParent().args
local ancestor_codes = {
{ code = "sekh", options = {} },
{ code = "wasc", options = {optional = true, roots = true } }
}
local evolution, args, categories = m_pr.parse_args(parent_args, "qsc", ancestor_codes)
return concat_etymologies(args, evolution) .. categories
end
function export.lyti_inh(frame)
local parent_args = frame:getParent().args
local ancestor_codes = {
{ code = "lyti-mid", options = {} },
{ code = "lyti-old", options = {} },
{ code = "cel-pro", options = {annotated = true} },
{ code = "ine-pro", options = {roots = true} },
}
local evolution, args, categories = m_pr.parse_args(parent_args, "lyti", ancestor_codes)
return concat_etymologies(args, evolution) .. categories
end
--[[
oltic (lyti) [< middle oltic (lyti-mid) < old oltic (lyti-old)] < proto-celtic (cel-pro)
]]
function export.lyti_loan(frame)
local parent_args = frame:getParent().args
local source_code = parent_args.source or "und"
local ancestor_codes = {
{ code = "lyti-mid", options = {optional = not parent_args.mid} },
{ code = "lyti-old", options = {optional = not parent_args.old} },
{ code = source_code, options = {} },
}
local extra_params = {
mid = {type = "boolean"},
old = {type = "boolean"},
source = {},
}
local evolution, args, categories = m_pr.parse_args(parent_args, "lyti", ancestor_codes)
return concat_etymologies(args, evolution) .. categories
end
function export.gwax_wasc(frame)
local parent_args = frame:getParent().args
local ancestor_codes = {
{ code = "wasc", options = {roots = true } }
}
local evolution, args, categories = m_pr.parse_args(parent_args, "gwax", ancestor_codes)
return concat_etymologies(args, evolution) .. categories
end
function export.guim(frame)
local parent_args = frame:getParent().args
local ancestor_codes = {
{ code = "ine-pro", options = { roots = true } }
}
local evolution, args, categories = m_pr.parse_args(parent_args, "guim", ancestor_codes)
return concat_etymologies(args, evolution) .. categories
end
function export.sekh(frame)
local parent_args = frame:getParent().args
local ancestor_codes = {
{ code = "wasc", options = {optional = true, roots = true } }
}
local evolution, args, categories = m_pr.parse_args(parent_args, "sekh", ancestor_codes)
return concat_etymologies(args, evolution) .. categories
end
function export.hzlc(frame)
local parent_args = frame:getParent().args
local ancestor_codes = {
{ code = "wasc", options = {optional = true, roots = true } }
}
local evolution, args, categories = m_pr.parse_args(parent_args, "hzlc", ancestor_codes)
return concat_etymologies(args, evolution) .. categories
end
function export.soky(frame)
local parent_args = frame:getParent().args
local ancestor_codes = {
{ code = "qsc", options = {} },
{ code = "sekh", options = {} },
{ code = "wasc", options = {optional = true, roots = true } }
}
local evolution, args, categories = m_pr.parse_args(parent_args, "soky", ancestor_codes)
return concat_etymologies(args, evolution) .. categories
end
function export.azms(frame)
local parent_args = frame:getParent().args
local ancestor_codes = {
{ code = "azms-old", options = {optional = true} },
{ code = "arto-pro", options = {} },
{ code = "mish-pro", options = {} },
{ code = "ine-pro", options = {optional = true, roots = true } }
}
local evolution, args, categories = m_pr.parse_args(parent_args, "azms", ancestor_codes)
return concat_etymologies(args, evolution) .. categories
end
return export