Module:MagazineVariables

From JoJo's Bizarre Encyclopedia - JoJo Wiki
Revision as of 12:21, 2 January 2023 by HudgynS (talk | contribs)
Jump to navigation Jump to search

Documentation for this module may be created at Module:MagazineVariables/doc

local p = {}

function p.main( frame )
    local magazineVariablesText = frame.args[1]
    local magazineVariablesData = mw.loadData( 'Module:MagazineVariables/data' )
    return magazineVariablesData[magazineVariablesText] or magazineVariablesText or ""
end

function p.jptext( frame )
    local magazineVariablesText = frame.args[1]
    local magazineVariablesData = mw.loadData( 'Module:MagazineVariables/dataJ' )
    local magazineVariablesReturn = frame:preprocess(magazineVariablesData[magazineVariablesText])
    if magazineVariablesReturn == "nil" then
        magazineVariablesReturn = magazineVariablesText
    end
    return magazineVariablesReturn or magazineVariablesText or ""
end

function p.romaji( frame )
    local magazineVariablesText = frame.args[1]
    local magazineVariablesData = mw.loadData( 'Module:MagazineVariables/dataR' )
    return magazineVariablesData[magazineVariablesText] or magazineVariablesText or ""
end

return p