Modul:Citát

Dobrý den, přišli jste sem a hledáte význam slova Modul:Citát. V DICTIOUS najdete nejen všechny slovníkové významy slova Modul:Citát, ale dozvíte se také o jeho etymologii, charakteristice a o tom, jak se říká Modul:Citát v jednotném a množném čísle. Vše, co potřebujete vědět o slově Modul:Citát, najdete zde. Definice slova Modul:Citát vám pomůže být přesnější a správnější při mluvení nebo psaní textů. Znalost definiceModul:Citát, stejně jako definice dalších slov, obohacuje vaši slovní zásobu a poskytuje vám více a lepších jazykových zdrojů.

Dokumentaci tohoto modulu lze vytvořit na stránce Nápověda:Modul:Citát

local p = {}

local function IsLanguageCode (code)
	local Language = require( 'Modul:Languages' )
	if Language ~= nil then
		return true
	else
		return false
	end
end

function p.print (frame)
	local out = ""
	local arg = frame:getParent().args
	local languageCode = false
	if arg then
		if IsLanguageCode(arg) then
			languageCode = arg
		else
			return "CHYBA! Špatný kód jazyka!"
		end
	else
		if arg and arg ~= "" then
			if IsLanguageCode (arg) then
				languageCode = arg
			else
				return "CHYBA! Špatný kód jazyka!"
			end
		end
	end

	local text = false
	if arg then
		if arg ~= "" then
			text = arg
		else
			return "CHYBA! Nezadán text citace!"
		end
		if arg and arg ~= "" then
			return "CHYBA! Citace zadána dvakrát!"
		end
	else
		if arg then
			if arg ~= "" then
				text = arg
			else
				return "CHYBA! Nezadán text citace!"
			end
		end
	end
	local translation = false
	if arg then
		if arg ~= "" then
			translation = arg
		else
			return "CHYBA! Nezadán text překladu!"
		end
		if arg and arg ~= "" then
			return "CHYBA! Překlad zadán dvakrát!"
		end
	else
		if arg then
			if arg ~= "" then
				translation = arg
			else
				return "CHYBA! Nezadán text překladu!"
			end
		end
	end
	
	
	local autor = arg or ""
	
	local dilo = arg or ""
	
	if arg and arg ~= "" then
		dilo = " .. "|" .. dilo .. "]]"
	end
	
	local priznak = false
	if arg and arg ~= "" then
		priznak = arg
	end
	
	local rok = arg or ""
	
	if text then
		out = out .. "''"
		if priznak == "zast." then
			out = out .. "<span style=\"color:#72777d\">"
		end
		out = out .. text 
		if priznak then
			out = out .. "</span>"
		end
		
		out = out .. "''"
		if dilo ~= "" then
			out = out .. "<br />"
			out = out .. "<small>— ("
			if autor ~= "" then
				out = out .. autor .. ": " 
			end
			out = out .. dilo .. ". " 
			if rok ~= "" then
				out = out .. rok .. "."
			end
			out = out .. ")</small>"
		end
	end

	return out
end
return p