Module:qhv-adj: Difference between revisions

no edit summary
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 7: Line 7:
local m_utils = require("Module:utilities")
local m_utils = require("Module:utilities")
local m_data = require('Module:qhv-adj/data')
local m_data = require('Module:qhv-adj/data')
local PAGENAME = mw.title.getCurrentTitle().text
local PAGENAME = gsub(mw.title.getCurrentTitle().text, "%s", " ")
local NAMESPACE = mw.title.getCurrentTitle().nsText
local NAMESPACE = mw.title.getCurrentTitle().nsText


Line 36: Line 36:
local decl = {}
local decl = {}
local word = frame.args[1] == "det" and "tolvie" or NAMESPACE == "Template" and "rōva" or parent_args.word or PAGENAME
local word = NAMESPACE == "Template" and "rōva" or parent_args.word or PAGENAME
local args = {}
local args = {}


Line 67: Line 67:
data.head = parent_args["head"] or nil
data.head = parent_args["head"] or nil
data.no_cat = parent_args["nocat"] or frame.args[1] == "det" and true or nil
data.no_cat = parent_args["nocat"] or parent_args["det"] or nil
-- Generate the forms
-- Generate the forms