Module:Release status

-- local p = {}

local data = mw.loadData('Module:Release status/Data') local i18n = require('Dev:I18n').loadMessages('Release status', 'Common')

function p.status(frame) local status = mw.ustring.lower(frame.args[1] or 'unknown') local entry = data[status] or data.unknown local css = { ["background"] = '#' .. entry.background, ["border"]     = 'none', ["cursor"]     = 'inherit', ["font-weight"] = 'bold' }   if entry.color then css.color = '#' .. entry.color end local html = tostring(       mw.html.create('span')            :addClass('wds-button')            :css(css)            :wikitext(i18n:msg(data[status] and status or 'unknown'))    ) if entry.category then html = html .. ''   end return html end

return p