본문으로 이동

모듈:PD-anon-US

위키문헌, 우리 모두의 도서관.
모듈 설명문서[보기] [편집] [역사] [새로 고침]

{{PD-anon-US}}를 생성합니다.

--[=[
Implements [[Template:PD-anon-US]]
]=]

require('strict')

local p = {} --p stands for package

local getArgs = require('Module:Arguments').getArgs
local PD = require('Module:PD')

function p._PD_anon_US(args)
	local pubyear = PD.getPublicationYear({args[1], args['공표연도'], args.pubyear})
	local category = args['분류'] or args.category
	local template = "PD-anon-US"
	
	-- Is this template appropriate?
	if pubyear and pubyear >= PD.PD_US_cutoff then
		return PD.error_text(template .. " 틀은 " .. PD.PD_US_cutoff - 1 .. "년 후에 공표된 저작물에 사용할 수 없습니다.", template)
	end
	
	local published_in
	local protection_term
	if pubyear then
		published_in = pubyear .. "년에"
		protection_term = PD.currentyear - (pubyear + 1)
	else
		published_in = PD.PD_US_cutoff .. "년 1월 1일 전에"
		protection_term = PD.currentyear - PD.PD_US_cutoff
	end
	local text = PD.license_scope() .. " " .. published_in .. " 공표되었으며, 무명이나 이명의 이유로 저자를 알 수 없습니다. 이 저작물은 미국을 포함하여 무명이나 이명으로 공표된 저작물의 [[w:저작권 보호 기간|저작권 보호 기간]]이 '''공표 이후 " .. protection_term .. "년 이하'''인 국가와 지역에서 '''[[위키문헌:퍼블릭 도메인|퍼블릭 도메인]]'''입니다."
	
	return PD.license({
		['image'] = PD.PD_image,
--		['image_r'] = PD.US_flag_image,
		['text'] = text,
		['category'] = category or template
	})
end

function p.PD_anon_US(frame)
	return p._PD_anon_US(getArgs(frame))
end

return p