Module:tln-headword

From Linguifex
Revision as of 18:59, 18 June 2026 by Nehster9 (talk | contribs) (Created page with "local p = {} function p.noun(frame) local args = frame:getParent().args local title = mw.title.getCurrentTitle().text local g = args.g or "?" local rom = args.rom or "" local pl = args.pl or "" local plrom = args.plrom or "" local text = "'''" .. title .. "'''" if rom ~= "" then text = text .. " • (" .. rom .. ")" end text = text .. " " .. g if pl ~= "" then text = text .. ", plural '''" .. pl .. "'''"...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


local p = {}

function p.noun(frame)
    local args = frame:getParent().args

    local title = mw.title.getCurrentTitle().text

    local g = args.g or "?"
    local rom = args.rom or ""

    local pl = args.pl or ""
    local plrom = args.plrom or ""

    local text = "'''" .. title .. "'''"

    if rom ~= "" then
        text = text .. " • (" .. rom .. ")"
    end

    text = text .. " " .. g

    if pl ~= "" then
        text = text .. ", plural '''" .. pl .. "'''"

        if plrom ~= "" then
            text = text .. " (" .. plrom .. ")"
        end
    end

    return text
end

return p