Module:User:Vampyricon/txb-noun/table

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


local export = {}

local Array = require 'Module:array'

local function add_forms(wikitable, forms)
	if type(wikitable) ~= 'string' then
		error('Expected string, got ' .. type(wikitable))
	end
	
	wikitable = wikitable:gsub('{{{(+)}}}', forms)
	return wikitable
end

local stylesheet = require("Module:TemplateStyles")("Template:User:Vampyricon/txb-decl-1st/style.css")

function export.make_table_sg(data)
	local output = Array(data.title, stylesheet)
	output:insert [=[

{| class="wikitable inflection-table inflection-table-txb"
|-
! class="corner-header" | Case
! class="number-header" | Singular
|-
! class="case-header" | ]
| class="form-cell" | {{{nom_sg}}}
|-
! class="case-header" | ]
| class="form-cell" | {{{gen_sg}}}
|-
! class="case-header" | ]
| class="form-cell" | {{{obl_sg}}}
|-
! class="case-header" | ]
| class="form-cell" | {{{abl_sg}}}
|-
! class="case-header" | ]
| class="form-cell" | {{{all_sg}}}
|-
! class="case-header" | ]
| class="form-cell" | {{{per_sg}}}
|-
! class="case-header" | ]
| class="form-cell" | {{{loc_sg}}}
|-
! class="case-header" | ]
| class="form-cell" | {{{com_sg}}}
|-]=]
	output:insert('\n|}')
	if data.footnotes and data.footnotes ~= "" then
		output:insert('\n' .. data.footnotes)
	end

	return add_forms(output:concat(), data.forms)
end

function export.make_table_pl(data)
	local output = Array(data.title, stylesheet)
	output:insert [=[

{| class="wikitable inflection-table inflection-table-txb"
|-
! class="corner-header" | Case
! class="number-header" | Plural
|-
! class="case-header" | ]
| class="form-cell" | {{{nom_pl}}}
|-
! class="case-header" | ]
| class="form-cell" | {{{gen_pl}}}
|-
! class="case-header" | ]
| class="form-cell" | {{{obl_pl}}}
|-
! class="case-header" | ]
| class="form-cell" | {{{abl_pl}}}
|-
! class="case-header" | ]
| class="form-cell" | {{{all_pl}}}
|-
! class="case-header" | ]
| class="form-cell" | {{{per_pl}}}
|-
! class="case-header" | ]
| class="form-cell" | {{{loc_pl}}}
|-
! class="case-header" | ]
| class="form-cell" | {{{com_pl}}}
|-]=]
	output:insert('\n|}')
	if data.footnotes and data.footnotes ~= "" then
		output:insert('\n' .. data.footnotes)
	end
	
	return add_forms(output:concat(), data.forms)
end

function export.make_table(data)
	local output = Array(data.title, stylesheet)
	output:insert [=[

{| class="wikitable inflection-table inflection-table-txb"
|-
! class="corner-header" | Case
! class="number-header" | Singular
! class="number-header" | Plural
|-
! class="case-header" | ]
| class="form-cell" | {{{nom_sg}}}
| class="form-cell" | {{{nom_pl}}}
|-
! class="case-header" | ]
| class="form-cell" | {{{voc_sg}}}
| class="form-cell" | {{{voc_pl}}}
|-
! class="case-header" | ]
| class="form-cell" | {{{gen_sg}}}
| class="form-cell" | {{{gen_pl}}}
|-
! class="case-header" | ]
| class="form-cell" | {{{acc_sg}}}
| class="form-cell" | {{{acc_pl}}}
|-
! class="case-header" | ]
| class="form-cell" | {{{per_sg}}}
| class="form-cell" | {{{per_pl}}}
|-
! class="case-header" | ]
| class="form-cell" | {{{com_sg}}}
| class="form-cell" | {{{com_pl}}}
|-
! class="case-header" | ]
| class="form-cell" | {{{all_sg}}}
| class="form-cell" | {{{all_pl}}}
|-
! class="case-header" | ]
| class="form-cell" | {{{abl_sg}}}
| class="form-cell" | {{{abl_pl}}}
|-
! class="case-header" | ]
| class="form-cell" | {{{loc_sg}}}
| class="form-cell" | {{{loc_pl}}}
|-
! class="case-header" | ]
| class="form-cell" | {{{caus_sg}}}
| class="form-cell" | {{{caus_pl}}}
|-]=]
	output:insert('\n|}')
	if data.footnotes and data.footnotes ~= "" then
		output:insert('\n' .. data.footnotes)
	end
	
	return add_forms(output:concat(), data.forms)
end

return export