10,731
edits
TheNightAvl (talk | contribs) (I DID IT!!! (Made %p for part of speech functional)) Tag: Reverted |
TheNightAvl (talk | contribs) No edit summary Tag: Reverted |
||
Line 1: | Line 1: | ||
local export = {} | local export = {} | ||
local d_languages = mw.loadData("Module:languages/data") | local d_languages = mw.loadData("Module:languages/data") | ||
local | local d = mw.loadData("Module:auto cat/data") | ||
local d_cats, d_pos = d.cats, d.pos | |||
-- Alternative to mw.ustring.gsub that is neater to call in code | -- Alternative to mw.ustring.gsub that is neater to call in code | ||
Line 120: | Line 104: | ||
local function hydrate_patterns() | local function hydrate_patterns() | ||
local out_patterns = {} | local out_patterns = {} | ||
for _, p_data in ipairs( | for _, p_data in ipairs(d_cats) do | ||
local p_template, p_categories = p_data[1], p_data[2] | local p_template, p_categories = p_data[1], p_data[2] | ||
local p_lua = replace(sanitize(p_template), {["%%s"] = "(..-)"}) | local p_lua = replace(sanitize(p_template), {["%%s"] = "(..-)"}) |