Module:qhv-adj: Difference between revisions

Jump to navigation Jump to search
no edit summary
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 m_gen = require('Module:getn')
local NONSYLLABIC = u(0x032F) -- non-syllabic, combining inverted breve below
local DIPHTHONG = u(0x035C) -- double articulation, combining double breve below


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 m_gen.format_list({n1, n2})
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 == "title" then
return data.forms.nom_sg[1]
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") .. [=[&#x200B;
! ]=] .. g_tooltip("s", "ol") .. [=[&#x200B;
! ]=] .. g_tooltip("p", "pa") .. [=[&#x200B;
! ]=] .. g_tooltip("p", "pa") .. [=[&#x200B;
|- style="background-color:#fdfdfd;" ]=] .. make_cases(data, false) .. [=[
|- style="background-color:#fdfdfd;" ]=] .. make_cases(data, false, true) .. [=[
|}
|}
]=]
]=]

Navigation menu