Modul:accel/ku

A Wikiszótárból, a nyitott szótárból

A modult a Modul:accel/ku/doc lapon tudod dokumentálni

return {generate = function (params, entry)
	local template = {
		['comparative'] = 'comparative of',
		['superlative'] = 'superlative of'}
	
	if not template[params.form] then
		no_rule_error(params)
	end
	
	if params.form == 'comparative' or params.form == 'superlative' then
		entry.head = '{{head|' .. params.lang .. '|' .. params.form .. ' ' .. params.pos .. '}}'
	else
		entry.head = '{{head|' .. params.lang .. '|' .. params.pos .. ' ' .. params.form .. ' form}}'
	end
	entry.def = '{{' .. template[params.form] .. '|' .. params.lang
		.. (params.pos ~= 'adjective' and '|POS=' .. params.pos or '')
		.. '|' .. params.origin .. '}}'
end}