Jump to content

Module:accel/en

Wiktionary වෙතින්

This module contains new entry creation rules for ඉංග්‍රීසි; see WT:ACCEL for an overview, and Module:accel for information on creating new rules.


return {generate = function(params, entry)
	local english_template, general_template
	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 "")
			.. "}}"
	elseif params.form == "archaic|2|s|pres" then
		-- [[Template:en-archaic second-person singular of]]
		english_template = "en-archaic second-person singular of"
	elseif params.form == "3|s|pres" then
		-- [[Template:en-third-person singular of]]
		english_template = "en-third-person singular of"
	elseif params.form == "archaic|3|s|pres" then
		-- [[Template:en-archaic third-person singular of]]
		english_template = "en-archaic third-person singular of"
	elseif params.form == "pres|ptcp" then
		-- [[Template:present participle of]]
		general_template = "present participle of"
	elseif params.form == "past" then
		-- [[Template:en-simple past of]]
		english_template = "en-simple past of"
	elseif params.form == "archaic|2|s|past" then
		-- [[Template:en-archaic second-person singular past of]]
		english_template = "en-archaic second-person singular past of"
	elseif params.form == "past|and|past|ptcp" or params.form == "past|;|past|ptcp" then
		-- [[Template:en-past of]]
		english_template = "en-past of"
	elseif params.form == "past|ptcp" then
		-- [[Template:past participle of]]
		general_template = "past participle of"
	elseif params.form == "archaic|past|and|archaic|past|ptcp" or params.form == "archaic|past|;|archaic|past|ptcp" then
		-- [[Template:en-archaic past of]]
		english_template = "en-archaic past of"
	elseif params.form == "p" then
		-- [[Template:plural of]]
		general_template = "plural of"
	end
	
	if english_template then
		entry.def = "{{" .. english_template .. "|" .. params.origin .. "}}"
	elseif general_template then
		entry.def = entry.make_def(general_template)
	end
end}
"https://si.wiktionary.org/w/index.php?title=Module:accel/en&oldid=34004" වෙතින් සම්ප්‍රවේශනය කෙරිණි