Module:Deranize: Difference between revisions

first draft of ⚠INCOMPLETE⚠ and frankly code-style-wise quite repulsive "deranization" function that we could use in a template to auto-deranize everything, who knows
 
checking how frame.args actually works
Line 63: Line 63:
-- {{#invoke:Deranize|deranize|arg}} (TODO: turn this into a family friendly template)
-- {{#invoke:Deranize|deranize|arg}} (TODO: turn this into a family friendly template)
function deranize(frame)
function deranize(frame)
  return #frame.args
end
function arsntersiontei()
   assert(#frame.args == 1, "This function requires exactly one argument")
   assert(#frame.args == 1, "This function requires exactly one argument")
   local normalized = mw.ustring.gsub(mw.ustring.lower(frame.args[1]), "i", "ı")
   local normalized = mw.ustring.gsub(mw.ustring.lower(frame.args[1]), "i", "ı")