モジュール:fiu-fin-headword

出典: フリー多機能辞典『ウィクショナリー日本語版(Wiktionary)』
ナビゲーションに移動 検索に移動

このモジュールについての説明文ページを モジュール:fiu-fin-headword/doc に作成できます

local export = {}

local lang = require("モジュール:languages").getByCode("fiu-fin-pro")

-- The main entry point.
-- This is the only function that can be invoked from a template.
function export.show(frame)
	local args = frame:getParent().args
	SUBPAGENAME = mw.title.getCurrentTitle().subpageText
	
	local head = args["head"]; if head == "" then head = nil end
	
	-- The part of speech. This is also the name of the category that
	-- entries go in. However, the two are separate (the "cat" parameter)
	-- because you sometimes want something to behave as an adjective without
	-- putting it in the adjectives category.
	local poscat = frame.args[1] or error("品詞が指定されていません。パラメータ1をモジュールの呼び出しに渡して下さい。.")
	local cat = args["cat"]; if cat == "" then cat = nil end
	
	local inflections = {}
	local categories = {"バルト・フィン祖語 " .. (cat or poscat)}
	
	return require("モジュール:headword").full_headword{
		lang = lang,
		heads = {head},
		inflections = inflections,
		categories = categories,
	}
end

return export