Module:alternative forms: Difference between revisions

No edit summary
Undo revision 501826 by Sware (talk)
 
(One intermediate revision by the same user not shown)
Line 21: Line 21:
}
}


    local m_param_utils = require(parameter_utilities_module)
local m_param_utils = require(parameter_utilities_module)


local param_mods = m_param_utils.construct_param_mods {
local param_mods = m_param_utils.construct_param_mods {
Line 92: Line 92:
-- If the to-be-linked term is the same as the pagename, display it unlinked.
-- If the to-be-linked term is the same as the pagename, display it unlinked.
for _, item in ipairs(items) do
for _, item in ipairs(items) do
if not item.term and (lang:makeEntryName(item.term)) == pagename then
if not item.term and lang:stripDiacritics(item.term) == pagename then
track("term is pagename")
track("term is pagename")
item.alt = item.alt or item.term
item.alt = item.alt or item.term
Line 140: Line 140:
function export.create(frame)
function export.create(frame)
local parent_args = frame:getParent().args
local parent_args = frame:getParent().args
local title = mw.title.getCurrentTitle()
return export.display_alternative_forms(parent_args, mw.loadData("Module:headword/data").pagename)
local PAGENAME = title.text
return export.display_alternative_forms(parent_args, title)
end
end


return export
return export