45,641
edits
No edit summary |
No edit summary |
||
Line 62: | Line 62: | ||
if lang then | if lang then | ||
lang = fetch_lang(lang, 2) | lang = fetch_lang(lang, 2) | ||
end | end | ||
Line 74: | Line 70: | ||
function export.cognate(frame) | function export.cognate(frame) | ||
local args = frame:getParent().args | local args = frame:getParent().args | ||
local params = { | local params = { | ||
Line 193: | Line 185: | ||
function export.learned_borrowing(frame) | function export.learned_borrowing(frame) | ||
local args, lang, term = parse_2_lang_args(frame, "has text") | local args, lang, term = parse_2_lang_args(frame, "has text") | ||
Line 203: | Line 192: | ||
function export.semi_learned_borrowing(frame) | function export.semi_learned_borrowing(frame) | ||
local args, lang, term = parse_2_lang_args(frame, "has text") | local args, lang, term = parse_2_lang_args(frame, "has text") | ||
Line 213: | Line 199: | ||
function export.orthographic_borrowing(frame) | function export.orthographic_borrowing(frame) | ||
local args, lang, term = parse_2_lang_args(frame, "has text") | local args, lang, term = parse_2_lang_args(frame, "has text") | ||
Line 223: | Line 206: | ||
function export.unadapted_borrowing(frame) | function export.unadapted_borrowing(frame) | ||
local args, lang, term = parse_2_lang_args(frame, "has text") | local args, lang, term = parse_2_lang_args(frame, "has text") | ||
Line 249: | Line 229: | ||
function export.partial_calque(frame) | function export.partial_calque(frame) | ||
local args, lang, term = parse_2_lang_args(frame, "has text") | local args, lang, term = parse_2_lang_args(frame, "has text") | ||
Line 375: | Line 352: | ||
if not desc_tree and entryLang:getType() == "family" then | if not desc_tree and entryLang:getType() == "family" then | ||
error("Cannot use language family code in [[Template:desc]].") | error("Cannot use language family code in [[Template:desc]].") | ||
end | end | ||
Line 410: | Line 381: | ||
true) | true) | ||
elseif ts or gloss or #args["g"] > 0 then | elseif ts or gloss or #args["g"] > 0 then | ||
link = require("Module:links").full_link( | link = require("Module:links").full_link( | ||
{ | { | ||
Line 426: | Line 395: | ||
:gsub("<small>%[Term%?%]</small> ", "") | :gsub("<small>%[Term%?%]</small> ", "") | ||
:gsub("%[%[Category:[^%[%]]+ term requests%]%]", "") | :gsub("%[%[Category:[^%[%]]+ term requests%]%]", "") | ||
end | end | ||
Line 488: | Line 454: | ||
if desc_tree and not args["noalts"] or not desc_tree and args["alts"] then | if desc_tree and not args["noalts"] or not desc_tree and args["alts"] then | ||
alts = m_desctree.getAlternativeForms(entryLang, term, id) | alts = m_desctree.getAlternativeForms(entryLang, term, id) | ||
end | end | ||
Line 671: | Line 635: | ||
local g = args["g"][i] | local g = args["g"][i] | ||
if | if term or alt or tr or ts then | ||
return require("Module:links").full_link( | return require("Module:links").full_link( | ||
{ term = term, alt = alt, id = id, lang = lang, sc = sc, tr = tr, | { term = term, alt = alt, id = id, lang = lang, sc = sc, tr = tr, |