Module:User:Lunabunn/ko-attest

Hello, you have come here looking for the meaning of the word Module:User:Lunabunn/ko-attest. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:User:Lunabunn/ko-attest, but we will also tell you about its etymology, its characteristics and you will know how to say Module:User:Lunabunn/ko-attest in singular and plural. Everything you need to know about the word Module:User:Lunabunn/ko-attest you have here. The definition of the word Module:User:Lunabunn/ko-attest will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:User:Lunabunn/ko-attest, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.


local export = {}
local us = mw.ustring

function export.ko_attest(frame)
	local parent_args = frame:getParent().args
	local args = require("Module:parameters").process(parent_args, {
		 = {type = "language", required = true, etym_lang = true},
		 = {},
		 = {},
		 = {},
		 = {},
		 = {type = "number"},
		 = {alias_of = "header"},
		 = {default = "first"},
		 = {alias_of = "work"},
		 = {},
		 = {},
		 = {alias_of = "work_hanja"},
		 = {},
		 = {alias_of = "year"},
		 = {type = "number"},
		 = {},
		 = {}, -- TODO: support multiple pages
		 = {},
	})

	local headers = {
		 = "First ] as ",
		 = "Also ] as ",
		 = "In the ] script, first ] as ",
		 = "In the ] script, first ] as ",
		 = "",
	}
	local header = headers]
	
	local hapaxes = {
		 = "] ",
		 = "] ",
		 = "] ",
		 = "] "
	}
	local hapax = (args and {hapaxes]} or {""})
	if hapax == nil then
		error("hapax= must be unspecified or between 1 and 4, inclusive")
	end

	local attest = args:makeWikipediaLink() .. " " .. hapax .. require("Module:links").full_link({
		term = args,
		lang = args,
		gloss = args,
		tr = args,
		alt = args,
	})
	
	local attest_work = ""
	if args then
		if not args then
			error("work= was supplied, so year= must be supplied")
		end
		local ko = require("Module:languages").getByCode("ko")
		
		local work_tr
		if args then
			work_tr = args
		else
			work_tr = ko:transliterate(us.gsub(args, "_", " "))
			work_tr = us.upper(us.sub(work_tr, 1, 1)) .. us.sub(work_tr, 2, -1)
		end
		
		local work = us.gsub(args, "_", "")
		if args then
			work = args .. " / " .. work 
		end
		local work_tagged = require("Module:script utilities").tag_text(work, ko)
		
		local position = ""
		if args and args then
			position = " " .. args .. ":" .. args
		elseif args then
			position = " " .. args
		elseif args then
			position = " " .. args
		end
		
		local link = ""
		if args then
			link = "<sup> .. "]</sup>"
		end
		
		attest_work = " in the ''" .. work_tr .. "'' (" .. work_tagged .. ")" .. position .. link .. ", " .. args
	end
	
	return header .. attest .. attest_work
end

return export