Module:fi-dialects/template/common

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

export.specials = { "standard", "common", "colloquial" } export.special = { ["standard"] = "Standard Finnish", ["common"] = "Most common form (found across dialects, including possibly some of the ones listed below) ", ["colloquial"] = "(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) return m_links.full_link({ term = term, lang = lang, alt = alt }) end

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

function export.extract_text(term) return term end

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

function export.format_sources(sources, include_background_source) if not sources or #sources == 0 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[source] or ("<" .. source .. ">"))	end if include_background_source then table.insert(list, "see the information for the for its sources and licensing") end return " " .. heading .. ": " .. table.concat(list, "; ") .. " " end

return export