Module:fi-dialects/template/common

Hello, you have come here looking for the meaning of the word Module:fi-dialects/template/common. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:fi-dialects/template/common, but we will also tell you about its etymology, its characteristics and you will know how to say Module:fi-dialects/template/common in singular and plural. Everything you need to know about the word Module:fi-dialects/template/common you have here. The definition of the word Module:fi-dialects/template/common will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:fi-dialects/template/common, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

Implements common features for {{fi-dial}} and {{fi-dial-map}}.


local export = {}
local m_links = require("Module:links")
local m_parse_utilities = require("Module:parse utilities")
local lang = require("Module:languages").getByCode("fi")

export.specials = { "standard", "common", "colloquial" }
export.special = {
	 = "Standard Finnish",
	 = "Most common form <small>(found across dialects, including possibly some of the ones listed below)</small>",
	 = "(Urban) Colloquial Finnish"
}

export.disclaimer = "The classification of and data for regional dialects is based on pre-1950s data. Since the 1950s, the dialects have become increasingly mixed, levelled and influenced by Standard Finnish. Besides Standard Finnish, a relatively uniform and originally urban 'colloquial Finnish' is beginning to emerge in their place, especially in the cities."

function export.mention(term, gloss, usage)
	return m_links.full_link({ term = term, lang = lang, gloss = gloss, pos = usage }, "term")
end

function export.link(term, alt, id)
	return m_links.full_link({ term = term, lang = lang, alt = alt, id = id })
end

function export.tag(term)
	return require("Module:script utilities").tag_text(term, lang)
end

function export.parse_term(term)
	if mw.ustring.find(term, "<") then
		local function generate_obj(text, parse_err_or_paramname)
			return { text = text }
		end
		local parsed = m_parse_utilities.parse_inline_modifiers(term, { param_mods = { id = { } }, generate_obj = generate_obj })
		return parsed.text, parsed.id
	end
	return term, nil
end

function export.extract_text(term)
	return (export.parse_term(term))
end

function export.make_link(term, alt, id)
	return export.link(term, alt, id)
end

function export.format_sources(sources, include_background_source)
	if not sources or not sources then
		return ""
	end
	
	local data = mw.loadData("Module:fi-dialects/data/source")
	local heading = #sources == 1 and "Source" or "Sources"
	local list = {}
	
	for _, source in ipairs(sources) do
		table.insert(list, data or ("&lt;" .. source .. "&gt;"))
	end
	
	if include_background_source then
		table.insert(list, "see the information for the ] for its sources and licensing")
	end
	return "<p><small>" .. heading .. ": " .. table.concat(list, "; ") .. "</small></p>"
end

function export.get_sort_key(term)
	return (lang:makeSortKey(term))
end

return export