Module:user:Oyunqi/ug-case

local export = {}

function export.make_table(data) local colors = { top = "#F0F0F0", gray = "#C0C0C0", straw = "#e2e4c0", blue = "#c0cfe4", gray_text = "#7f7f7f", green = "#c0e4c0", tan = "#e4d4c0", }	local result = {} --if data.notes then table.insert(result, data.notes .. '\n') end

--header table.insert(result, [=[ Declension of  (See Appendix:Uyghur nouns) ]=]) local str,_ = mw.ustring.gsub(table.concat(result), "}",		function(code)			return data.forms[code] or colors[code] or ""		end) return str --	return string.gsub(table.concat(result), "}",		function(code)			return data.forms[code] or colors[code]		end) end

function export.make_case(title,short,color)

local case = [=[ ! rowspan="13" style="background:" | impersonal

! style="background:;width:10%" | ! style="background:;width:40%" | singular ! style="background:;width:40%" | plural

! style="height:3em;background:#ECECEC" | nominative

! rowspan="2" style="height:3em;background:#ECECEC" | genitive / possesive

! colspan="2" style="height:3em;background:#ECECEC" |

Declension of genitive form

! style="height:3em;background:#ECECEC" | accusative

! style="height:3em;background:#ECECEC" | dative

! style="height:3em;background:#ECECEC" | locative

! style="height:3em;background:#ECECEC" | ablative

! rowspan="2" style="height:3em;background:#ECECEC" | locative-qualitative

! colspan="2" style="height:3em;background:#ECECEC" |

Declension of locative-qualitative form

! style="height:3em;background:#ECECEC" | limitative (delimiting)

! style="height:3em;background:#ECECEC" | semblative (similitude)

! style="height:3em;background:#ECECEC" | comparative (equivalence)

]=]	if title ~= "" then case = string.gsub(case,"impersonal",title) end if short ~= "" then case = string.gsub(case,"imp_",short .. "_") end if color ~= "" then case = string.gsub(case,"straw",color) end return case end

return export