Module:rad-stem/templates: Difference between revisions

m
ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
mNo edit summary
mNo edit summary
Line 1,689: Line 1,689:
for i, j in pairs(pp) do
for i, j in pairs(pp) do
if type(j) == "string" then
if type(j) == "string" then
table.insert(review, "* " .. i .. ": " .. j)
table.insert(review, "* <code>" .. string.upper(i) .. "</code>: '''" .. j .. "'''")
elseif type(j) == "table" then
elseif type(j) == "table" then
for k, l in ipairs(j) do
for k, l in ipairs(j) do
local temp = "* " .. i .. "[" .. k .. "]: " .. l.word
local temp = "* <code>" .. string.upper(i) .. "[" .. k .. "]</code>: '''" .. l.word .. "'''"
if l.note then temp = temp .. " (" .. l.note .. ")" end
if l.note then temp = temp .. " (" .. l.note .. ")" end
table.insert(review, temp)
table.insert(review, temp)
Line 1,699: Line 1,699:
end
end
return "Please review the following stems. If all is okay, add <code>|check=1</code> to generate the tables." .. string.char(10) .. table.concat(review, string.char(10))
return "Please review the following stems. If all is okay, add <code>|check=1</code> to generate the tables." .. string.char(10) .. table.concat(table.sort(review, function(a,b) return a < b end), string.char(10))
end
end
end
end