Module:osx-conj

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

Called by {{osx-conj}}. Do not use directly.


local export = {}

local m_conj_data = require("Module:osx-conj/data")
local m_links = require("Module:links")
local m_utils = require("Module:utilities")

local lang = require("Module:languages").getByCode("osx")

-- The main entry point.
-- This is the only function that can be invoked from a template.
function export.show(frame)

	local parent_args = frame:getParent().args
	local conj_type = (frame.args or parent_args) or "wk1"

	if not m_conj_data then
		error("Unknown conjugation '" .. conj_type .. "'")
	end
	
	local data = {forms = {}, categories = {}}
	
	data.head = parent_args or nil

	local args = require("Module:parameters").process(parent_args, m_conj_data.params, true)
	
	-- Override for templates
	if not args then
		setmetatable(args, {__index = function(self, key)
			return "{{{" .. key .. "}}}"
		end
		})
	end
	
	-- Generate the forms
	if parent_args.irr then
		table.insert(data.categories, "Old Saxon irregular verbs")
		if m_conj_data.irregular then
			m_conj_data.irregular(data)
		else
			m_conj_data(args, data)
		end
	else
		m_conj_data(args, data)
	end

	-- Make the table
	return make_table(data)
end

function make_table(data)
	local function show_form(form)
		if not form then
			return "—"
		end
		
		local ret = {}
		
		for key, subform in ipairs(form) do
			if mw.title.getCurrentTitle().nsText == "Reconstruction" and subform ~= "—" then
				subform = "*" .. subform
			end
			table.insert(ret, m_links.full_link({lang = lang, term = subform}))
		end
			
		return table.concat(ret, ", ")
	end
	
	local function repl(param)
		if param == "conj_type" then
			return data.conj_type
		else
			return show_form(data.forms)
		end
	end
	
	local wikicode = [=[
<div class="NavFrame" style="width: 42em">
<div class="NavHead" style="background: #CCCCFF;">Conjugation of ''{{{inf}}}'' ({{{conj_type}}})</div>
<div class="NavContent">
{| style="width: 100%; border:1px solid #CCCCFF; line-height: 125%; background-color:#F9F9F9; text-align:center; border: 1px solid #CCCCFF;" cellspacing="1" cellpadding="3" cellspacing="1" class="inflection-table"
|- style="background-color:#F2F2FF;"
|-
! style="background-color:#DEDEEE;" | infinitive
| colspan="2" style="background-color:#EFEFEF;" | {{{inf}}}
|-
! style="background-color:#CCCCFF;" | ]
! style="background-color:#DEDEEE;" | ]
! style="background-color:#DEDEEE;" | ]
|-
! style="background-color:#EEEEEE;" | 1st&nbsp;person&nbsp;singular
| style="background-color:#efefff;" | {{{pres_ind_1s}}}
| style="background-color:#efefff;" | {{{past_ind_1s}}}
|-
! style="background-color:#EEEEEE;" | 2nd&nbsp;person&nbsp;singular
| style="background-color:#efefff;" | {{{pres_ind_2s}}}
| style="background-color:#efefff;" | {{{past_ind_2s}}}
|-
! style="background-color:#EEEEEE;" | 3rd&nbsp;person&nbsp;singular
| style="background-color:#efefff;" | {{{pres_ind_3s}}}
| style="background-color:#efefff;" | {{{past_ind_3s}}}
|-
! style="background-color:#EEEEEE;" | plural
| style="background-color:#efefff;" | {{{pres_ind_p}}}
| style="background-color:#efefff;" | {{{past_ind_p}}}
|-
! style="background-color:#CCCCFF;" | ]
! style="background-color:#eeeede;" | present
! style="background-color:#eeeede;" | past
|-
! style="background-color:#eeeeee;" | 1st&nbsp;person&nbsp;singular
| style="background-color:#ffffef;" | {{{pres_sub_1s}}}
| style="background-color:#ffffef;" | {{{past_sub_1s}}}
|-
! style="background-color:#eeeeee;" | 2nd&nbsp;person&nbsp;singular
| style="background-color:#ffffef;" | {{{pres_sub_2s}}}
| style="background-color:#ffffef;" | {{{past_sub_2s}}}
|-
! style="background-color:#eeeeee;" | 3rd&nbsp;person&nbsp;singular
| style="background-color:#ffffef;" | {{{pres_sub_3s}}}
| style="background-color:#ffffef;" | {{{past_sub_3s}}}
|-
! style="background-color:#eeeeee;" | plural
| style="background-color:#ffffef;" | {{{pres_sub_p}}}
| style="background-color:#ffffef;" | {{{past_sub_p}}}
|-
! style="background-color:#CCCCFF;" | ]
! style="background-color:#eedede;" | present
! rowspan="3" style="background-color:#e0e0e0;" |
|-
! style="background-color:#eeeeee;" | singular
| style="background-color:#ffefef;" | {{{imp_s}}}
|-
! style="background-color:#eeeeee;" | plural
| style="background-color:#ffefef;" | {{{imp_p}}}
|-
! style="background-color:#CCCCFF; font-weight:bold;" | ]
! style="background-color:#deeede; font-weight:bold;" | ]
! style="background-color:#deeede; font-weight:bold;" | ]
|-
! style="background-color:#eeeeee; font-weight:bold;" |
|style="background-color:#efffef;" | {{{pres_part}}} 
|style="background-color:#efffef;" | {{{past_part}}}
|}</div></div>]=]

	return (mw.ustring.gsub(wikicode, "{{{(+)}}}", repl)) .. m_utils.format_categories(data.categories, lang)
end

return export