Difference between revisions 43616 and 43617 on shnwiktionary

-- FIXME: Needs to be converted to use the standard [[မေႃႇၵျူး:headword]] module

local m_headword = require("Module:headword")
local m_gen = {
	codes = {
		["?"] = {type = "other", display = '<abbr title="gender incomplete">?</abbr>'},
		["m"] = {type = "gender", display = '<abbr title="masculine gender">m</abbr>'},
(contracted; show full)            head = mw.text.split(head, " ", true)
            head = table.concat(head, "]] [[")
            has_head_links = true
        end

        if (head:find("-", nil, false)) then
            head = mw.text.split(head, "-", true)
            head = table.concat(head, "]]-[[||
|")
            has_head_links = true
        end

        if (has_head_links == true) then
            head = "[[" .. head .. "]]"
        end
    end
(contracted; show full)    if (args[2] == "-")  then return "''uncountable''" end
    if (args["unc"] ~= nil)  then return "''usually uncountable''" end
    return nil
end


-- Returns the text with the description, link and qualifier of a plural 
-- (i.e. "feminine plural of [[|
|]]example]] (qualifier)"). If the plural is not
-- present as a parameter, [[မေႃႇၵျူး:pt-plural]] is used to automatically figure
-- it out from the lemma. If that is impossible, a request is returned and the
-- entry is added to [[ပိူင်ထၢၼ်ႈ:Portuguese nouns needing inflection]].
function get_primary_plural(lemma, pl, description, class, qualifier)
    if (pl == "" or pl == nil) then
        pl = m_plural.get_plural(lemma)
    end
(contracted; show full)

-- Returns a piece of text boldened and wikified (unless it is the same as the
-- pagename).
-- FIXME: Convert to use [[မေႃႇၵျူး:links]]
function make_link(text)
    if (PAGENAME == text) then return "'''" .. text .. "'''" end
    return  "'''[[||
|" .. text .. "#Portuguese|" .. text .. "]]'''"
end


-- Returns a text with a request for lacking information.
function please_add(text)
    --table.insert(cats, "terms needing attention")
    return "<sup><small><span style='color:#AAAAAA;'>please add " .. text .. "</span></small></sup>"
end

function qualifier(text)
    if (text == nil or text == "") then return "" end
    return '&nbsp;<span class="ib-brac"><span class="qualifier-brac">(</span></span><span class="ib-content"><span class="qualifier-content">' .. text ..
'</span></span><span class="ib-brac"><span class="qualifier-brac">)</span></span>'
end



return export