Module:etymology: Difference between revisions

Jump to navigation Jump to search
ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
(Created page with "local export = {} local m_languages = require("Module:languages") local m_links = require("Module:links") local m_parameters = require("Module:parameters") local no_term_params = { [1] = {required = true}, ["nocap"] = {type = "boolean"}, ["notext"] = {type = "boolean"}, ["nocat"] = {type = "boolean"}, } local no_term_data = { ["onomatopoeic"] = { categories = {"onomatopoeias"}, glossary = true, }, ["unknown"] = { cate...")
 
No edit summary
Line 126: Line 126:
     ["·"] = true,
     ["·"] = true,
}
}
local function is_infix(word)
    return affix_delimiter[mw.ustring.sub(word, 1, 1)] and affix_delimiter[mw.ustring.sub(word, -1)]
end
local function is_prefix(word)
    return affix_delimiter[mw.ustring.sub(word, -1)]
end
local function is_suffix(word)
    return affix_delimiter[mw.ustring.sub(word, 1, 1)]
end


function export.format_etymology(out, categories)
function export.format_etymology(out, categories)
Line 197: Line 209:


function export.affix_etymology(frame)
function export.affix_etymology(frame)
    local function is_infix(word)
        return is_delimiter[mw.ustring.sub(word, 1, 1)] and is_delimiter[mw.ustring.sub(word, -1)]
    end
   
    local function is_prefix(word)
        return is_delimiter[mw.ustring.sub(word, -1)]
    end
    local function is_suffix(word)
        return is_delimiter[mw.ustring.sub(word, 1, 1)]
    end
     local args = m_parameters.process(frame:getParent().args, affix_params)
     local args = m_parameters.process(frame:getParent().args, affix_params)
     local pre_out, categories = {}, {}
     local pre_out, categories = {}, {}

Navigation menu