Module:Science redirect and Module:Science redirect/sandbox: Difference between pages

(Difference between pages)
Jump to navigation Jump to search
Page 1
Page 2
imported>Ahecht
 
imported>Ahecht
ucfirst
 
Line 25: Line 25:
for k, v in pairs(ocats) do
for k, v in pairs(ocats) do
    local h = mw.ustring.match(v, ".*%s(.*)")
    local h = mw.ustring.match(v, ".* (.*)")
    local catTitle = mw.title.new((h .. " redirects"), 14):getContent() and (h .. " redirects") or (k .. " redirects")
    outstr = outstr .. "\n=== " .. frame:expandTemplate{ title = 'cl', args = { (h .. " redirects"), (mw.language.getContentLanguage():ucfirst(h) .. " redirects"), count = "yes" } } .. " ===\n"
    outstr = outstr .. "\n=== " .. frame:expandTemplate{ title = 'cl', args = { catTitle, (mw.language.getContentLanguage():ucfirst(catTitle)), count = "yes" } } .. " ===\n"
    for kk, vv in pairs (conf.templates) do
    for kk, vv in pairs (conf.templates) do
        outstr = outstr .. "*" .. frame:expandTemplate{ title = 'cl', args = { ("Redirects " .. vv.category .. " of " .. k), count = "yes" } } .. "\n"
        outstr = outstr .. "*" .. frame:expandTemplate{ title = 'cl', args = { ("Redirects " .. vv.category .. " of " .. k), count = "yes" } } .. "\n"