Module:Lgbtq

-- Controls the template (specifically the text and image). -- Thundermaker300

local p = {} local d = { {{'gay'},'This user is gay.'}, {{'lesbian','les'},'This user is lesbian.'}, {{'bisexual','bisex','bi'},'This user is bisexual.'}, {{'transgender','trans'},'This user is transgender.'}, {{'transsexual','transsex','transs'},'This user is transsexual.'}, {{'pansexual','pansex','pan'},'This user is pansexual.'}, {{'polysexual','polysex','poly'},'This user is polysexual.'}, {{'questioning'},'This user is questioning their sexuality.'}, {{'bi-curious','bicurious'},'This user is bi-curious.'}, {{'intersex','inter'},'This user is intersex.'}, {{'queer'},'This user identifies as queer.'}, {{'asexual','a'},'This user is asexual.'}, {{'allosexual','allo'},'This user is allosexual.'}, {{'skoliosexual','skolio'},'This user is skoliosexual.'}, {{'androsexual','andro'},'This user is androsexual.'}, {{'gynesexual','gyne'},'This user is gynesexual.'}, {{'nonbinary'},'This user identifies as nonbinary.'}, {{'demigender'},'This user identifies as demigender.'}, {{'demiboy'},'This user identifies as a demiboy.'}, {{'demigirl'},'This user identifies as a demigirl.'}, {{'agender'},'This user identifies as agender.'}, {{'genderfluid'},'This user is genderfluid.'}, {{'demisexual','demisex','demi'},'This user is demisexual.'}, {{'straight ally','ally'},'This user is a straight ally.'}, }

function findInArray(value) for i,v in pairs(d) do       for k,x in pairs(v[1]) do            if x == value then return i           end end end end

function p.getKey(frame) local arg = frame.args[1] local data = d[findInArray(arg)] if data then return data[1][1] end end

function p.getText(frame) local arg = frame.args[1] local data = d[findInArray(arg)] if data then return data[2] end end

return p