跳转到内容

模組:Accel/hi

維基詞典,自由的多語言詞典

本模块包含印地語的新條目建立規則;有關概述,請參見en:WT:ACCEL,有關創建新規則的資訊,請參見en:Module:accel


return {generate = function (params, entry)
	local pos_to_template = {
		['名詞'] = 'hi-noun form',
		['動詞'] = 'hi-verb form',
		['形容詞'] = 'hi-adj form',
		['代詞'] = 'hi-pron form',
		['限定詞'] = 'hi-det form',
		['後置詞'] = 'hi-post form',
	}
	
	if pos_to_template[params.pos] then
		entry.head = "{{" .. pos_to_template[params.pos] ..
			(params.target ~= params.target_pagename and "|head=" .. params.target or "") ..
			(params.transliteration and "|tr=" .. params.transliteration or "") ..
			(params.gender and "|g=" .. params.gender or "") ..
			"}}"
	end

	entry.pronunc = "* {{hi-IPA" .. (params.transliteration and "|" .. params.transliteration or "") .. "}}"
end}