Jump to content

Module:Sandbox/isaacl/ExpandPageAbbreviation

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Isaacl (talk | contribs) at 01:59, 28 February 2013 (Create ExpandPageAbbreviation module). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
local phraseForAbbr = mw.loadData('Module:Sandbox/isaacl/ExpandPageAbbreviation/data');

local self = { }

function self._expand(abbr)
    if phraseForAbbr[abbr] == nil then
        return abbr
    else
        return phraseForAbbr
    end
end

function self.expand(frame)
    local abbr = frame.args[1]
    return self._expand(abbr)
end

return self