45,607
edits
No edit summary |
No edit summary |
||
Line 9: | Line 9: | ||
local PAGENAME = mw.title.getCurrentTitle().text | local PAGENAME = mw.title.getCurrentTitle().text | ||
local NAMESPACE = mw.title.getCurrentTitle().nsText | local NAMESPACE = mw.title.getCurrentTitle().nsText | ||
local lang = require("Module:languages").getByCode("qhv") | local lang = require("Module:languages").getByCode("qhv") | ||
Line 85: | Line 81: | ||
function make_table(data) | function make_table(data) | ||
local function g_tooltip(n1, n2) | local function g_tooltip(n1, n2) | ||
return | return require('Module:getn').format_list({n1, n2}) | ||
end | end | ||
Line 116: | Line 112: | ||
if param == "decl_type" then | if param == "decl_type" then | ||
return data.decl_type | return data.decl_type | ||
elseif param == "pagename" and NAMESPACE == "Template" then | elseif param == "pagename" and NAMESPACE == "Template" then | ||
return "rōva" | return "rōva" | ||
Line 127: | Line 121: | ||
end | end | ||
local function make_cases(data, pre) | local function make_cases(data, pre, post) | ||
local cases = {"nominative", "accusative", "genitive", "dative", "locative", "instrumental", "comitative", "vocative"} | local cases = {"nominative", "accusative", "genitive", "dative", "locative", "instrumental", "comitative", "vocative"} | ||
local genders = {"lunar", "solar", "terrestrial", "aquatic"} | local genders = {"lunar", "solar", "terrestrial", "aquatic"} | ||
local ret = {} | local ret = {} | ||
data.pre = pre | data.pre, data.post = pre, post | ||
for _, case in ipairs(cases) do | for _, case in ipairs(cases) do | ||
Line 170: | Line 164: | ||
! ]=] .. g_tooltip("s", "ol") .. [=[​ | ! ]=] .. g_tooltip("s", "ol") .. [=[​ | ||
! ]=] .. g_tooltip("p", "pa") .. [=[​ | ! ]=] .. g_tooltip("p", "pa") .. [=[​ | ||
|- ]=] .. make_cases(data, true) .. [=[ | |- ]=] .. make_cases(data, true, false) .. [=[ | ||
|}<ul style="margin-left:0px;"></ul> | |}<ul style="margin-left:0px;"></ul> | ||
]=] | ]=] | ||
Line 191: | Line 185: | ||
! ]=] .. g_tooltip("s", "ol") .. [=[​ | ! ]=] .. g_tooltip("s", "ol") .. [=[​ | ||
! ]=] .. g_tooltip("p", "pa") .. [=[​ | ! ]=] .. g_tooltip("p", "pa") .. [=[​ | ||
|- style="background-color:#fdfdfd;" ]=] .. make_cases(data, false) .. [=[ | |- style="background-color:#fdfdfd;" ]=] .. make_cases(data, false, true) .. [=[ | ||
|} | |} | ||
]=] | ]=] |