Modul:accel/gl
Bu modul uchun Modul:accel/gl/doc nomli hujjat sahifasini yaratishingiz mumkin
return {generate = function (params, entry)
-- special handling for female equivalents
if params.pos == "noun" and params.form == "f" then
entry.head = "{{gl-noun|f}}"
-- definition already correct
return
end
-- special handling for verb forms
local gerund_verb_spec = params.form:match("^gerund%-(.*)$")
if gerund_verb_spec then
entry.head = "{{head|gl|gerund}}"
entry.def = "{{gl-verb form of|" .. gerund_verb_spec .. "}}"
return
end
local gerund_verb_spec = params.form:match("^reinteg%-gerund%-(.*)$")
if gerund_verb_spec then
entry.head = "{{head|gl|gerund}}"
entry.def = "{{gl-reinteg-verb form of|" .. gerund_verb_spec .. "}}"
return
end
local verb_spec = params.form:match("^verb%-form%-(.*)$")
if verb_spec then
entry.def = "{{gl-verb form of|" .. verb_spec .. "}}"
return
end
local verb_spec = params.form:match("^reinteg%-verb%-form%-(.*)$")
if verb_spec then
entry.def = "{{gl-reinteg-verb form of|" .. verb_spec .. "}}"
return
end
-- special handling for participles and participle forms
if params.form == "pp_ms" then
entry.pos_header = "Participle"
entry.head = "{{gl-pp}}"
entry.def = "{{past participle of|gl|" .. params.origin .. "}}"
elseif params.form:find("^pp_") then
entry.pos_header = "Participle"
if params.target:find("es$") then
-- entregues, assentes, etc.
entry.head = "{{head|gl|past participle form|g=p}}"
entry.def = "{{plural of|gl|" .. params.target:gsub("es$", "e") .. "}}"
else
local form_of_template = {pp_fs = "feminine singular of", pp_mp = "masculine plural of", pp_fp = "feminine plural of"}
local gender = {pp_fs = "f-s", pp_mp = "m-p", pp_fp = "f-p"}
entry.head = "{{head|gl|past participle form|g=" .. gender[params.form] .. "}}"
entry.def = "{{" .. form_of_template[params.form] .. "|gl|" .. params.target:gsub("[ao]s?$", "o") .. "}}"
end
end
end}