Jump to content

Module:ko-hanja-ety

Wiktionary වෙතින්

මෙම මොඩියුලය සඳහා උපදෙස් පත්‍රිකාවක් අවශ්‍ය වෙයි.
මෙම මොඩියුලය හා අදාළ අරමුණු සහ භාවිත උපදෙස්, උපදෙස් පිටුව තුළ ලේඛනගත කිරීමට කාරුණික වන්න.

local export = {}

local concat = table.concat
local insert = table.insert

function export.show(frame)
	local default_hyphen = {default = "-"}
	local params = {
		["dk"] = true,
		["m"] = true,
		["mh"] = default_hyphen,
		["ml"] = true,
		["m2"] = true,
		["m2h"] = default_hyphen,
		["m3"] = true,
		["m3h"] = default_hyphen,
		["m4"] = true,
		["m4h"] = default_hyphen,
		["em"] = true,
		["emun"] = default_hyphen,
		["jh"] = true,
		["jhh"] = default_hyphen,
		["ref"] = true,
	}
	
	local args = require("Module:parameters").process(frame:getParent().args, params)
	
	local midstop = [=[

|- 

]=]
	
	local ety_table = {[=[ 
{| class="mw-collapsible mw-collapsed wikitable" style="width:60%; background-color:#f8f9fa;"
|-
! colspan="3" style="text-align:center" | Historical Readings
|-
]=]}
	
	if args["dk"] ~= nil then
		insert(ety_table, [=[
| colspan="3" style="text-align:center; background-color:#eaecf0;" | <span class="explain" title="A system of somewhat artificial readings that had sought to capture traditional phonetic distinctions of Middle Chinese which were often unrealistic in Korean—fell out of use after the 1480s."><b>Dongguk Jeongun Reading</b></span>
|-
| colspan="1" style="text-align:center; background-color:#ffffff;" | <i>Dongguk Jeongun</i>, 1448 || colspan="2" style="text-align:center; background-color:#ffffff; min-width:65%;" | ]=] .. args["dk"] ..'')
	end
	
	insert(ety_table, midstop)
	
	if not (args["m"] == nil and args["m2"] == nil and args["m3"] == nil and args["m4"] == nil) then
		insert(ety_table, [=[
| colspan="3" style="text-align:center; background-color:#eaecf0;" | <b>Middle Korean</b>
|-
| colspan="1" rowspan="2" style="text-align:center; background-color:#f8f9fa;" | <b>Text</b> || colspan="2" style="text-align:center; background-color:#f8f9fa; min-width:65%;" | <b>[[음훈|Eumhun]]</b>
|-
| colspan="1" style="text-align:center; background-color:#f8f9fa;" | <b>Gloss (<i>hun</i>)</b> || colspan="1" style="text-align:center; background-color:#f8f9fa; min-width:25%;" | <b>Reading</b> 
]=])
	end
	
	insert(ety_table, midstop)

	if args["m"] ~= nil then
		local ref = args["ml"] == nil and "" or ("<sup>[https://ko.wikisource.org/wiki/%ED%9B%88%EB%AA%BD%EC%9E%90%ED%9A%8C/" .. args["ml"] .. "]</sup>")
		insert(ety_table, [=[
| style="text-align:center; background-color:#ffffff;" | <i>Hunmong Jahoe</i>, 1527]=] .. ref .. [=[ || style="text-align:center; background-color:#ffffff;" | ]=] .. args["mh"] .. [=[ || style="text-align:center; background-color:#ffffff;" | ]=] .. args["m"] ..'')
	end
	
	insert(ety_table, midstop)
		
	if args["m2"] ~= nil then
		insert(ety_table, [=[
| style="text-align:center; background-color:#ffffff;" | <i>Gwangju Cheonjamun</i>, 1575 || style="text-align:center; background-color:#ffffff;" | ]=] .. args["m2h"] .. [=[ || style="text-align:center; background-color:#ffffff;" | ]=] .. args["m2"] ..'')
	end
	
	insert(ety_table, midstop)
	
	if args["m3"] ~= nil then
		insert(ety_table, [=[
| style="text-align:center; background-color:#ffffff;" | <i>Sinjeung Yuhap</i>, 1576 || style="text-align:center; background-color:#ffffff;" | ]=] .. args["m3h"] .. [=[ || style="text-align:center; background-color:#ffffff;" | ]=] .. args["m3"] ..'')
	end
	
	insert(ety_table, midstop)
	
	if args["m4"] ~= nil then
		insert(ety_table, [=[
| style="text-align:center; background-color:#ffffff;" | <i>Seokbong Cheonjamun</i>, 1583 || style="text-align:center; background-color:#ffffff;" | ]=] .. args["m4h"] .. [=[ || style="text-align:center; background-color:#ffffff;" | ]=] .. args["m4"] ..'')
	end
	
	insert(ety_table, midstop)
	
	if args["em"] ~= nil then
		insert(ety_table, [=[
| colspan="3" style="text-align:center; background-color:#eaecf0;" | <span class="explain" title="The Korean language from the beginning of the seventeenth century to the end of the nineteenth century."><b>Early Modern Korean</b></span>
|-
| style="text-align:center; background-color:#f8f9fa; min-width:30%;" | <b>Text</b> || colspan="1" style="text-align:center; background-color:#f8f9fa;" | <b>Final (韻)</b> || colspan="1" style="text-align:center; background-color:#f8f9fa; min-width:25%;" | <b>Reading</b>
|-
| style="text-align:center; background-color:#ffffff;" | <i>Samun Seonghwi</i>, 1751 || style="text-align:center; background-color:#ffffff;" | ]=] .. args["emun"] .. [=[ || style="text-align:center; background-color:#ffffff;" | ]=] .. args["em"] ..'')
	end
	
	insert(ety_table, midstop)
	
	if args["jh"] ~= nil then
		insert(ety_table, [=[
| colspan="3" style="text-align:center; background-color:#eaecf0;" | <span class="explain" title="The Korean language from the beginning of the seventeenth century to the end of the nineteenth century."><b>Early Modern Korean</b></span>
|-
| rowspan="2" style="text-align:center; background-color:#f8f9fa;" | <b>Text</b> || colspan="2" style="text-align:center; background-color:#f8f9fa; min-width:65%;" | <b>[[음훈|Eumhun]]</b>
|-
| colspan="1" style="text-align:center; background-color:#f8f9fa;" | <b>Gloss (<i>hun</i>)</b> || colspan="1" style="text-align:center; background-color:#f8f9fa; min-width:25%;" | <b>Reading</b>
|-
| style="text-align:center; background-color:#ffffff;" | <i>Juhae Cheonjamun</i>, 1804 || style="text-align:center; background-color:#ffffff;" | ]=] .. args["jhh"] .. [=[ || style="text-align:center; background-color:#ffffff;" | ]=] .. args["jh"] ..'')
	end
	
	insert(ety_table, midstop)
	
	if args["ref"] ~= nil then
		insert(ety_table, [=[
| colspan="3" style="background-color:#f8f9fa" | ]=] .. args["ref"])
	end
	
	insert(ety_table, [=[ 
|}]=])
	
	return concat(ety_table)
end

return export
"https://si.wiktionary.org/w/index.php?title=Module:ko-hanja-ety&oldid=218123" වෙතින් සම්ප්‍රවේශනය කෙරිණි