Moduł:Brudnopis/Karol Szapsza/test
Dokumentacja dla tego modułu może zostać utworzona pod nazwą Moduł:Brudnopis/Karol Szapsza/test/opis
local p = {}
local function matchImagePage(s)
-- Finds the appropriate image subpage given a lower-case
-- portal name plus the first letter of that portal name.
if type(s) ~= 'string' or #s < 1 then return end
local firstLetter = mw.ustring.sub(s, 1, 1)
local imagePage
imagePage = 'Module:Portal/grafika'
return mw.loadData(imagePage)[s]
end
function p.grafika()
local function getImageName(s)
-- Gets the image name for a given string.
if type(s) ~= 'string' or #s < 1 then
return 'OpenEye icon.svg'
end
s = mw.ustring.lower(s)
return matchImagePage(s) or 'Contributions icon.svg'
end
end
return p