Module:rad-pronunciation: Difference between revisions

Jump to navigation Jump to search
ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
No edit summary
Line 306: Line 306:


         for num, rhyme in ipairs(rhymes) do
         for num, rhyme in ipairs(rhymes) do
             if num > 1 then
             if rhymes_show ~= "\n* Rhymes:" then
                 rhymes_show = rhymes_show .. ","
                 rhymes_show = rhymes_show .. ","
             end
             end
             rhymes_show =
             local rhyme_cat = "Rhymes:Radestrian/" .. rhyme
                rhymes_show ..
            local rhyme_count = mw.site.stats.pagesInCategory(rhyme_cat, "pages")
                " <span class=\"IPA\">[[:Category:Rhymes:Radestrian/" ..
            if rhyme_count < 2 then
                    rhyme .. "|-" .. rhyme .. "]]</span>[[Category:Rhymes:Radestrian/" .. rhyme .. "]] " ..
            rhymes_show = rhymes_show ..
                "(" .. mw.site.stats.pagesInCategory("Rhymes:Radestrian/" .. rhyme, "pages") .. ")"
            " <span class=\"IPA\">" .. rhyme .. "</span>[[Category:" .. rhyme_cat .. "]]" ..
                " <sup>(no other rhymes on site)</sup>"
        else
            rhymes_show = rhymes_show ..
                " <span class=\"IPA\">[[:Category:" .. rhyme_cat .. "|-" .. rhyme .. "]]</span>[[Category:" .. rhyme_cat .. "]]" ..
                " <sup>(" .. rhyme_count .. ")</sup>"
            end
         end
         end
     end
     end

Navigation menu