2,788
edits
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
local export = {} | local export = {} | ||
local m_inline = require("Module:inline") | |||
local m_languages = require("Module:languages") | local m_languages = require("Module:languages") | ||
local m_links = require("Module:links") | local m_links = require("Module:links") | ||
Line 237: | Line 238: | ||
local n_parts, n_affixes = 0, 0 | local n_parts, n_affixes = 0, 0 | ||
for i, term in ipairs(args[2]) do | for i, term in ipairs(args[2]) do | ||
local i_term, i_args = m_inline.parse(term) | |||
n_parts = n_parts + 1 | n_parts = n_parts + 1 | ||
local language_from = nil | local language_from = nil | ||
if args["l"][i] then language_from = m_languages.get_by_code(args["l"][i]) end | if args["l"][i] or i_args["l"] then language_from = m_languages.get_by_code(args["l"][i] or i_args["l"]) end | ||
local cite_term = term | local cite_term = term | ||
if (language_from and language_from.proto) or ((not language_from) and language_to.proto) then cite_term = "*" .. cite_term end | if (language_from and language_from.proto) or ((not language_from) and language_to.proto) then cite_term = "*" .. cite_term end | ||
Line 262: | Line 264: | ||
term = term, | term = term, | ||
language = language_from or language_to, | language = language_from or language_to, | ||
alt = args["alt"][i], | alt = args["alt"][i] or i_args["alt"], | ||
gloss = args["t"][i], | gloss = args["t"][i] or i_args["t"], | ||
pos = args["pos"][i], | pos = args["pos"][i] or i_args["pos"], | ||
showlanguage = (language_from and true), | showlanguage = (language_from and true), | ||
nobold = true, | nobold = true, |