Module:Month translator: Difference between revisions

Content deleted Content added
create;
 
No edit summary
Line 45:
month_names_get (); -- build month names list; TODO: move table creation into a data module
 
if 'dump' == frame.args[1] then -- frame.args[1] = 'dump' to dump month_names table;
return mw.dumpObject (month_names);
Line 52:
for i, pattern in ipairs (patterns) do -- spin through the patterns table looking for a match
local c1, c2, c3; -- captures in the 'pattern' from the pattern table go here
 
c1, c2, c3 = mw.ustring.match (mw.text.trim(frame.args[1]), pattern[1]); -- one or more captures set if source matches patterns[i][1])
if c1 then -- c1 always set on match
t = {