Module:Symbol

local p = {} local data = mw.loadData('Module:Symbol/data') local getArgs = require('Module:Arguments').getArgs local mFileLink = require('Module:File link')._main

local i18n = { error = { no_data = 'Found no data', no_input = 'No input given' } }

function p.main(frame) local args = getArgs(frame, {   wrappers = {      'Template:Symbol'    }  }) return p._main(args) end

function p._main(args) assert(args[1], i18n.error.no_input) local symbol = data[args[1]:lower] assert(symbol, i18n.error.no_data)

-- If there is not file key, that means that there are different states -- for this symbol. if not symbol.file then symbol = symbol[(args[2] or 'yes'):lower] end

return mFileLink(symbol) end

return p