Module:accel/en
Appearance
- The following documentation is generated by Module:documentation. [edit]
- Useful links: root page • root page’s subpages • links • transclusions • testcases • sandbox
This module contains new entry creation rules for English; see WT:ACCEL for an overview, and Module:accel for information on creating new rules.
return {generate = function(params, entry)
if params.form == "comparative" or params.form == "superlative" then
-- [[Template:en-comparative of]], [[Template:en-superlative of]]
entry.def = "{{en-" .. params.form .. " of|" .. params.origin
.. (params.pos ~= "adjective" and "|POS=" .. params.pos or "")
.. "}}"
else
if params.form == "pres|part" then
entry.pos_header = "Verb"
params.pos = "verb"
end
local heads = {}
local non_default_head = false
for _, target in ipairs(params.targets) do
if target.term ~= params.target_pagename then
non_default_head = true
table.insert(heads, target.term)
else
table.insert(heads, "+")
end
end
if non_default_head then
heads = "|head=" .. table.concat(heads, ",")
else
heads = ""
end
entry.head = "{{en-head|" .. params.pos .. "f" .. heads .. "}}"
end
end}