(Створена сторінка: local p = {} function p.listSeasons(frame) local seasons = { "П'ятий сезон", "Четвертий сезон", "Третій сезон", "Другий сезон", "Перший сезон" } local output = {} for _, season in ipairs(seasons) do if mw.title.new(season).exists then table.insert(output, string.format("%s", season, season)) end end return table.concat(output, ", ") en...)
(Немає відмінностей)

Версія за 23:14, 21 квітня 2024

Документацію для цього модуля можна створити у Модуль:AllPages/документація

local p = {}

function p.listSeasons(frame)
    local seasons = { "П'ятий сезон", "Четвертий сезон", "Третій сезон", "Другий сезон", "Перший сезон" }
    local output = {}
    
    for _, season in ipairs(seasons) do
        if mw.title.new(season).exists then
            table.insert(output, string.format("[[%s|%s]]", season, season))
        end
    end
    
    return table.concat(output, ", ")
end

return p