Ir al contenido

Modulo:Yesno

Wikipediamanta

-- Function allowing for consistent treatment of boolean-like wikitext input.

return function (val, default) val = type(val) == 'string' and mw.ustring.lower(val) or val if val == nil then return nil elseif val == true or val == 'sí' or val == 's' or val == 'yes' or val == 'y' or val == 'true' or val == 't' or tonumber(val) == 1 then return true elseif val == false or val == 'no' or val == 'n' or val == 'false' or val == 'f' or tonumber(val) == 0 then return false else return default end end

"https://qu.wikipedia.org/w/index.php?title=Modulo:Yesno&oldid=642436" p'anqamanta chaskisqa (Wikipedia, Qhichwa / Quechua)