Module:fi-dial-map/Kettunen1940

From Wiktionary, the free dictionary
Jump to navigation Jump to search

local export = {}

function export.show(frame)
	local lines = {}
	
	for i = 1, 213 do
		local dataset_name = string.format("Kettunen1940_%03d", i)
		local load_ok, data = pcall(function() return mw.loadData("Module:fi-dialects/data/feature/" .. dataset_name) end)
		if load_ok then
			table.insert(lines, "# [[Template:fi-dial-map/feature/" .. dataset_name .. "|Map #" .. i .. ": " .. data.title .. "]]")
		else
			table.insert(lines, "# Map #" .. i .. " not imported yet")
		end
	end
	
	return table.concat(lines, "\n")
end

return export