Module:Guidance: Difference between revisions

Jump to navigation Jump to search
no edit summary
imported>Pingu
No edit summary
imported>Pingu
No edit summary
Line 30: Line 30:


function p.reasons(frame)
function p.reasons(frame)
for i = 4,1,-1
for i = 5,1,-1
do
do
if string.find(frame.args[1],r[i][1]) then
if string.find(frame.args[1],r[i][1]) then
Line 44: Line 44:
return ro;
return ro;
end
end
 
function p.warn_1(frame)
function p.warn_1(frame)
for i = 4,1,-1
for i = 5,1,-1
do
do
if string.find(frame.args[1],r[i][1]) and (r[i][4] == 2) then
if string.find(frame.args[1],r[i][1]) and (r[i][4] == 1) then
if (w1 == nil) then
if w1 == nil then
w1 = r[i][2]
w1 = r[i][2].." occur."
elseif string.find(w1," and ") then
elseif string.find(w1," and ") then
w1 = r[i][2]..", "..w1
w1 = r[i][2]..", "..w1
Line 56: Line 56:
w1 = r[i][2].." and "..w1
w1 = r[i][2].." and "..w1
end
end
end
end
if w1 ~= nil then
if string.find(w1," and ") then
w1 = w1.." are"
else
w1 = w1.." is"
end
end
end
end
return w1;
return w1;
end
end
 
function p.warn_2(frame)
function p.warn_2(frame)
for i = 4,1,-1
for i = 5,1,-1
do
do
if string.find(frame.args[1],r[i][1]) and (r[i][4] == 1) then
if string.find(frame.args[1],r[i][1]) and (r[i][4] == 2) then
if w2 == nil then
if (w2 == nil) then
w2 = r[i][2].." occur."
w2 = r[i][2]
elseif string.find(w2," and ") then
elseif string.find(w2," and ") then
w2 = r[i][2]..", "..w2
w2 = r[i][2]..", "..w2
Line 79: Line 72:
w2 = r[i][2].." and "..w2
w2 = r[i][2].." and "..w2
end
end
end
end
if w2 ~= nil then
if string.find(w2," and ") then
w2 = w2.." are"
else
w2 = w2.." is"
end
end
end
end
return w2;
return w2;
end
function p.category(frame)
end
end


return p
return p
Anonymous user

Navigation menu