Module:etymology: Difference between revisions

no edit summary
(Created page with "local export = {} -- For testing local force_cat = false --[[ If language is an etymology language, iterates through parent languages until it finds a non-etymology langua...")
 
No edit summary
Line 23: Line 23:
local function termError(terminfo)
local function termError(terminfo)
if terminfo.lang:getType() == "family" then
if terminfo.lang:getType() == "family" then
if terminfo.term and terminfo.term ~= "-" then
require("Module:debug").track("etymology/family/has-term")
end
terminfo.term = "-"
terminfo.term = "-"
end
end
Line 36: Line 32:
local link = ""
local link = ""
if terminfo.term == "-" then
if terminfo.term ~= "-" then
--[=[
[[Special:WhatLinksHere/Template:tracking/cognate/no-term]]
[[Special:WhatLinksHere/Template:tracking/derived/no-term]]
[[Special:WhatLinksHere/Template:tracking/borrowed/no-term]]
[[Special:WhatLinksHere/Template:tracking/calque/no-term]]
]=]
require("Module:debug").track(templateName .. "/no-term")
else
-- mw.log(terminfo.term)
link = " " .. require("Module:links").full_link(terminfo, "term", true)
link = " " .. require("Module:links").full_link(terminfo, "term", true)
end
end
Line 55: Line 42:
function export.format_etyl(lang, source, sort_key, categories, nocat)
function export.format_etyl(lang, source, sort_key, categories, nocat)
local info = {}
local info = {}
-- [[Special:WhatLinksHere/Template:tracking/etymology/sortkey]]
if sort_key then
require("Module:debug").track("etymology/sortkey")
end
if not categories then
if not categories then
Line 273: Line 254:
-- Internal implementation of {{semantic loan|...}} template
-- Internal implementation of {{semantic loan|...}} template
function export.semantic_loan(lang, terminfo, sort_key, nocap, notext, nocat)
function export.semantic_loan(lang, terminfo, sort_key, nocap, notext, nocat)
if nocap then
require("Module:debug").track("semantic_loan/nocap")
end
local pre_text = ""
local pre_text = ""
Line 288: Line 265:
-- Internal implementation of {{phono-semantic matching|...}} template
-- Internal implementation of {{phono-semantic matching|...}} template
function export.phono_semantic_matching(lang, terminfo, sort_key, nocap, notext, nocat)
function export.phono_semantic_matching(lang, terminfo, sort_key, nocap, notext, nocat)
if nocap then
require("Module:debug").track("phono_semantic_matching/nocap")
end
 
local pre_text = ""
local pre_text = ""