본문으로 이동

모듈:PD-old

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

{{PD-old}}를 생성합니다.

--[=[
Implements [[Template:PD-old]]
]=]

require('strict')

local p = {} --p stands for package

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

function p._PD_old(args)
	local text = PD.license_scope() .. " " .. PD.PD_US_cutoff .. "년 1월 1일 전에 공표되었으며, 저자가 사망한 지 100년이 지났으므로 전 세계적으로 '''[[위키문헌:퍼블릭 도메인|퍼블릭 도메인]]'''입니다."
	
	local edition_warning = yesno(args['판본경고']) or yesno(args.edition_warning) or PD.namespace == "저자" or PD.namespace == '저자토론'
	local posthumous_warning = yesno(args['사후경고']) or yesno(args.posthumous_warning) or PD.namespace == "저자" or PD.namespace == '저자토론'
	
	if edition_warning then
		text = text .. ' 나중에 출판된 판본이나 번역물은 저작권의 보호를 받을 수 있습니다.'
	end
	if posthumous_warning then
		text = text .. " 사후 저작물은 일부 국가와 지역에서 [[w:저작권 보호 기간|공표된 기간에 따라]] 저작권의 보호를 받을 수 있습니다."
	end
	
	return PD.license({
		['image'] = PD.PD_image,
		['text'] = text,
		['category'] = args['분류'] or args.category or "PD-old",
	})
end

function p.PD_old(frame)
	return p._PD_old(getArgs(frame))
end

return p