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 translit_param =  params.transliteration and '|' .. params.transliteration:gsub('%-', ' ')
		or ''
	
	if params.form == 'romanized' then
		entry.pos_header = 'Romanization'
		entry.head = '{{ja-romaji}}'
		entry.def = '{{ja-romanization of|' .. params.origin .. '}}'
	elseif params.form == 'kana-noun' then
		entry.pos_header = 'Noun'
		entry.head = '{{ja-noun' .. translit_param .. '}}'
		entry.def = '{{ja-def|' .. params.origin .. '}} {{rfdef|ja}}'
	elseif params.form == 'kana-proper-noun' then
		entry.pos_header = 'Proper noun'
		entry.head = '{{ja-pos|proper' .. translit_param .. '}}'
		entry.def = '{{ja-def|' .. params.origin .. '}} {{rfdef|ja}}'
	elseif params.form == 'kana-verb' then
		entry.pos_header = 'Verb'
		entry.head = '{{ja-verb' .. translit_param .. '}}'
		entry.def = '{{ja-def|' .. params.origin .. '}} {{rfdef|ja}}'
	elseif params.form == 'kana-adjective' then
		entry.pos_header = 'Adjective'
		entry.head = '{{ja-adj' .. translit_param .. '}}'
		entry.def = '{{ja-def|' .. params.origin .. '}} {{rfdef|ja}}'
	elseif params.form == 'kana-adverb' then
		entry.pos_header = 'Adverb'
		entry.head = '{{ja-pos|adverb' .. translit_param .. '}}'
		entry.def = '{{ja-def|' .. params.origin .. '}} {{rfdef|ja}}'
	else
		return entry.no_rule_error(params)
	end
end}
"https://si.wiktionary.org/w/index.php?title=Module:accel/ja&oldid=34015" වෙතින් සම්ප්‍රවේශනය කෙරිණි