Module:Month translator: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 15:
local day, month, year;
if 'dump' == args_t[1] then -- args_t[1] = 'dump' to dump month_names<month_names_t> table;
return mw.dumpObject (data.month_namesmonth_names_t);
end
if not args_t[1] then return nil end
Line 32:
day = t.d or ''; -- translate table contents to named variables;
month = mw.ustring.lower (t.m or ''); -- absent table entries are nil so set unused parts to empty string; lowercase for indexing
month = data.override_names[month] or data.month_namesmonth_names_t[month]; -- replace non-English name with English name from translation tables
year= t.y or '';
 
Line 48:
end
end
break; -- and done; if here found pattern match but did not find non-English month name in month_names{}<month_names_t>
end
end