Module:rad-stem/templates: Difference between revisions

m
ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
mNo edit summary
mNo edit summary
Line 1,707: Line 1,707:
if pp.imp == nil then
if pp.imp == nil then
if type(pp.a) == "table" then
if type(pp.a) == "table" then
for i,j in ipairs(pp.a) do
if pp.vstem then
local temp = "* <code>IMP[" .. i .. "]</code>" .. (pp.vstem and (": '''" .. mw.ustring.gsub(j['word'], "va$", "ja") .. "'''")) or " = <code>A[" .. i .. "]</code>"
for i,j in ipairs(pp.a) do
if j['note'] then temp = temp .. " (" .. j['note'] .. ")" end
local temp = "* <code>IMP[" .. i .. "]</code>: '''" .. mw.ustring.gsub(j['word'], "va$", "ja") .. "'''"
table.insert(review, temp)
if j['note'] then temp = temp .. " (" .. j['note'] .. ")" end
table.insert(review, temp)
end
else
for i,j in ipairs(pp.a) do
local temp = "* <code>IMP[" .. i .. "]</code> = <code>A[" .. i .. "]</code>"
if j['note'] then temp = temp .. " (" .. j['note'] .. ")" end
table.insert(review, temp)
end
end
end
elseif type(pp.a) == "string" then
elseif type(pp.a) == "string" then
table.insert(review, "* <code>IMP</code>" .. (pp.vstem and (": '''" .. mw.ustring.gsub(pp.a, "va$", "ja") .. "'''")) or " = <code>A</code>")
if pp.vstem then
table.insert(review, "* <code>IMP</code>: '''" .. mw.ustring.gsub(pp.a, "va$", "ja") .. "'''")
else
table.insert(review, "* <code>IMP</code> = <code>A</code>")
end
end
end
end
end