মডিউল:তে/য়

উইকিসংকলন থেকে
পরিভ্রমণে চলুন অনুসন্ধানে চলুন

এই মডিউলের জন্য মডিউল:তে/য়/নথি-এ নথিপত্র তৈরি করা হয়ে থাকতে পারে

--	বাংলা উইকিপিডিয়ার জন্য, প্রদত্ত লেখার সাথে "ে" সামঞ্জস্যবিধান।

local appends = {
--	'তে/য়/ে'
	['া'] = 'য়',
	['ি'] = 'তে',
	['ী'] = 'তে',
	['ু'] = 'তে',
	['ূ'] = 'তে',
	['ৃ'] = 'তে',
	['ে'] = 'তে',
	['ৈ'] = 'তে',
	['ো'] = 'তে',
	['ৌ'] = 'তে',
	['অ'] = 'ে',
	['আ'] = 'তে',
	['ঈ'] = 'তে',
        ['উ'] = 'তে',
	['ঊ'] = 'তে',
	['ঋ'] = 'তে',
	['এ'] = 'তে',
	['ঐ'] = 'তে',
	['ও'] = 'তে',
	['ঔ'] = 'তে',
	['ক'] = 'ে',
	['খ'] = 'ে',
	['গ'] = 'ে',
	['ঘ'] = 'ে',
	['ঙ'] = 'ে',
	['চ'] = 'ে',
	['ছ'] = 'ে',
	['জ'] = 'ে',
	['ঝ'] = 'ে',
	['ঞ'] = 'ে',
	['ট'] = 'ে',
	['ঠ'] = 'ে',
	['ড'] = 'ে',
	['ঢ'] = 'ে',
	['ণ'] = 'ে',
	['ত'] = 'ে',
	['থ'] = 'ে',
	['দ'] = 'ে',
	['ধ'] = 'ে',
	['ন'] = 'ে',
	['প'] = 'ে',
	['ফ'] = 'ে',
	['ব'] = 'ে',
	['ভ'] = 'ে',
	['ম'] = 'ে',
	['য'] = 'ে',
	['র'] = 'ে',
	['ল'] = 'ে',
	['শ'] = 'ে',
	['ষ'] = 'ে',
	['স'] = 'ে',
	['হ'] = 'ে',
	['ড়'] = 'ে',
	['ঢ়'] = 'ে',
	['য়'] = 'ে',
--		নিচের বর্ণটি 'য়'
--	['়'] = 'য়ে',
--		
        ['ই'] = 'তে',
	['ং'] = 'য়ে',
}

local function fix_text(text)
	if text and text ~= '' then
		local last = mw.ustring.sub(text, -1)
		local append = appends[last]
		if append then
			return text .. append
		end
	end
	return text or ''
end

local function fix(frame)
	local args = frame:getParent().args
	return fix_text(args[1])
end

return { fix = fix }