10,731
edits
TheNightAvl (talk | contribs) No edit summary |
TheNightAvl (talk | contribs) No edit summary |
||
Line 41: | Line 41: | ||
return out | return out | ||
end | |||
local function triage_langs(list) | |||
end | end | ||
Line 48: | Line 52: | ||
local current_lang | local current_lang | ||
local terms = {} | local terms = {} | ||
local langs = {} | |||
for i, term in ipairs(args) do --ryn:term1|term2|term3|rad:term1|term2 ... | for i, term in ipairs(args) do --ryn:term1|term2|term3|rad:term1|term2 ... | ||
Line 61: | Line 66: | ||
term = mw.ustring.gsub(term, "^.+%>%:%s*", "") | term = mw.ustring.gsub(term, "^.+%>%:%s*", "") | ||
end | end | ||
if terms[current_lang.code] == nil then terms[current_lang.code] = {} end | if terms[current_lang.code] == nil then | ||
terms[current_lang.code] = {} | |||
table.insert(langs, current_lang) | |||
end | |||
end | end | ||
if lang_change_arged then | if lang_change_arged then | ||
Line 71: | Line 79: | ||
end | end | ||
mw.logObject( | local items = {} | ||
for lang, lang_args in pairs(terms) do | |||
table.insert(lang_args, 1, lang) | |||
items[lang] = export.descendant(lang_args) | |||
end | |||
mw.logObject(items) | |||
end | end | ||