Module:descendants: Difference between revisions

Jump to navigation Jump to search
ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
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(terms)
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


Navigation menu