Difference between revisions 34804 and 35203 on mkwiktionary

-- Модул:links
-- Imported from mk.wikipedia
-- 2016-06-227-03 -- V2 -- last modified by DenisWasRight
-- Extended version for mk.wiktionary

local export = {}

--TODO: move to [[Module:languages]]
local override_translit = {
	["ab"] = true,
(contracted; show full)		-- Is there at least a transliteration we can work from?
		link = m_scriptutils.request_script(terminfo.lang, terminfo.sc)
		
		if link == "" or not terminfo.tr or terminfo.tr == "-" then
			-- No link to show, and no transliteration either. Show a term request.
			local category = ""
			
			if mw.title.getCurrentTitle().nsText ~= "
TemplateШаблон" then
				category = "[[Категорија:" .. terminfo.lang:getCanonicalName() .. " term requests]]"
			end
			
			link = "<small>[Термин?]</small>" .. category
		end
	end
	
(contracted; show full)	text = text:gsub("%[%[[^|%]]-|", "")
	text = text:gsub("%[%[", "")
	text = text:gsub("%]%]", "")

	return text
end

return export