local cikart = {}
local m_qualifier = require("Modül:belirtici")
function cikart.bicimlendir_belirticiler(qualifiers)
local m_data = mw.loadData("Modül:aksan belirtici/veri")
if type(qualifiers) ~= "table" then
qualifiers = { qualifiers }
end
local accents = {}
local categories = {}
for _, accent in ipairs(qualifiers) do
local data
-- Replace an alias with the label that has a data table.
if m_data.digerler then
accent = m_data.digerler
end
-- Retrieve the label's data table.
if m_data.etiketler then
data = m_data.etiketler
end
-- Use the link and displayed text in the data table, if they exist.
if data then
if data.bag then
table.insert(accents, "[[w:" .. data.bag .. "|" ..
(data.goster or data.bag) .. "]]")
elseif data.goster then
table.insert(accents, data.goster)
end
--[[
if data then
if data.type == "sound change" then
table.insert(categories, lang:getCanonicalName() .. " terms with pronunciations exhibiting " .. accent)
end
end
]]
else
table.insert(accents, accent)
end
end
return m_qualifier.bicimlendir_belirtici(accents)
end
-- Called by {{accent}} or {{a}}.
function cikart.goster(frame)
local args = frame.getParent and frame:getParent().args or frame
if (not args or args == "") and mw.title.getCurrentTitle().nsText == "Template" then
return m_qualifier.bicimlendir_belirtici{ '{{{1}}}' }
end
local params = {
= {required = true, list = true}
}
args = require("Modül:parameters").process(args, params)
return cikart.bicimlendir_belirticiler(args)
end
return cikart