Module:category tree/topic/data: Difference between revisions

m use mw.loadData("Module:headword/data").pagename in place of directly fetching pagename using mw.title.getCurrentTitle().text or .subpageText to properly support mammoth (split) pages and unsupported titles (manually assisted)
 
m top: clean up
 
(2 intermediate revisions by the same user not shown)
Line 81: Line 81:
-- topic code.
-- topic code.
if should_throw_error() then
if should_throw_error() then
error("Label " .. label .. " defined in both [["
error("Label " .. label .. " defined in both [[wikt:"
.. datamodule .. "|"
.. datamodule .. "]] and [[" .. labels[label].module .. "]].")
.. datamodule .. "]] and [[" .. labels[label].module .. "]].")
end
end