Module:etymology: Difference between revisions

Jump to navigation Jump to search
ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
No edit summary
Line 6: Line 6:
local m_parameters = require("Module:parameters")
local m_parameters = require("Module:parameters")
local plaenk_alt = mw.loadData("Module:lnk-pro-morph/data").alt
local plaenk_alt = mw.loadData("Module:lnk-pro-morph/data").alt
local root_reminder = "Have you forgotten to use <code><nowiki>{{root|" .. args[1] .. "|lnk-pro}}</nowiki></code>? Remember to use it even in derived terms and compounds."


local new_pos_data = {
local new_pos_data = {
Line 358: Line 359:
     }, "term")
     }, "term")
     if not args["nocat"] then categories = hydrate_categories(data["categories"], language, nil, args["newpos"]) end
     if not args["nocat"] then categories = hydrate_categories(data["categories"], language, nil, args["newpos"]) end
     mw.addWarning("Have you forgotten to use <code>{{root|" .. args[1] .. "|lnk-pro}}</code>? Remember to use it even in derived terms and compounds.")
     mw.addWarning(root_reminder)
     return format_etymology(out, categories)
     return format_etymology(out, categories)
end
end
Line 380: Line 381:
end
end
if not args["nocat"] then categories = hydrate_categories(data["categories"], language, nil, args["preposition"]) end
if not args["nocat"] then categories = hydrate_categories(data["categories"], language, nil, args["preposition"]) end
mw.addWarning("Have you forgotten to use <code>{{root|" .. args[1] .. "|lnk-pro}}</code>? Remember to use it even in derived terms and compounds.")
mw.addWarning(root_reminder)
return format_etymology(out, categories)
return format_etymology(out, categories)
end
end
Line 401: Line 402:
     }, "term")
     }, "term")
     if not args["nocat"] then categories = hydrate_categories(data["categories"], language_to, language_from) end
     if not args["nocat"] then categories = hydrate_categories(data["categories"], language_to, language_from) end
     mw.addWarning("Have you forgotten to use <code>{{root|" .. args[1] .. "|lnk-pro}}</code>? Remember to use it even in derived terms and compounds.")
     mw.addWarning(root_reminder)
     return format_etymology(out, categories)
     return format_etymology(out, categories)
end
end
Line 466: Line 467:
         out = format_prefixed_text(template, data["text"], args["nocap"], data["preposition"]) .. out
         out = format_prefixed_text(template, data["text"], args["nocap"], data["preposition"]) .. out
     end
     end
     mw.addWarning("Have you forgotten to use <code>{{root|" .. args[1] .. "|lnk-pro}}</code>? Remember to use it even in derived terms and compounds.")
     mw.addWarning(root_reminder)
     return format_etymology(out, categories)
     return format_etymology(out, categories)
end
end

Navigation menu