48,355
edits
No edit summary |
No edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 5: | Line 5: | ||
local function term_error(terminfo) | local function term_error(terminfo) | ||
if terminfo.lang:hasType("family") then | if terminfo.lang then | ||
if terminfo.lang:hasType("family") then | |||
terminfo.term = "-" | |||
end | end | ||
end | end | ||
return terminfo | return terminfo | ||
| Line 19: | Line 17: | ||
local link = "" | local link = "" | ||
if terminfo.term | if terminfo.term ~= "-" then | ||
-- mw.log(terminfo.term) | -- mw.log(terminfo.term) | ||
link = require("Module:links").full_link(terminfo, "term") | link = require("Module:links").full_link(terminfo, "term") | ||
| Line 79: | Line 69: | ||
table.insert(categories, langname .. " terms borrowed back into " .. langname) | table.insert(categories, langname .. " terms borrowed back into " .. langname) | ||
else | else | ||
table.insert(categories, langname .. " " .. | table.insert(categories, langname .. " terms derived from " .. cat_name) | ||
if data.borrowing_type then | |||
table.insert(categories, langname .. " terms " .. data.borrowing_type .. " from " .. cat_name) | |||
end | |||
end | end | ||
end | end | ||
| Line 90: | Line 82: | ||
function export.format_source(data) | function export.format_source(data) | ||
local lang, sort_key = data.lang, data.sort_key | local lang, sort_key = data.lang, data.sort_key | ||
local display, categories = export.insert_source_cat_get_display(data) | local display, categories = export.insert_source_cat_get_display(data) | ||