Module:alternative forms: Difference between revisions
No edit summary |
|||
| (One intermediate revision by the same user not shown) | |||
| Line 21: | Line 21: | ||
} | } | ||
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 | 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 | ||
return export.display_alternative_forms(parent_args, mw.loadData("Module:headword/data").pagename) | |||
return export.display_alternative_forms(parent_args, | |||
end | end | ||
return export | return export | ||