local PD = require('Module:PD')

return {
	['Argentina'] = {
		['image_r'] = 'Flag of Argentina.svg',
		['text'] = table.concat({
			PD.license_scope() .. " in the '''[[w:public domain|public domain]] in [[:w:Argentina|Argentina]]''' because " .. PD.license_grammar({"it was", "they were"}) .. " created in Argentina and the term of copyright has expired. According to [https://servicios.infoleg.gob.ar/infolegInternet/anexos/40000-44999/42755/texact.htm Law No. 11.723 as amended up to Law No. 26.570 of November 25, 2009], the following works are public domain:",
			"* sound recordings published more than 70 years ago (before January 1, ".. PD.currentyear - 70 .. "),",
			"* photographs published more than 20 years ago (before ".. PD.currentyear - 20 .. ") and created more than 25 years ago (before " .. PD.currentyear - 25 .. "),",
			"* cinematographic works whose author, producer, director and composer died over 50 years ago (before " .. PD.currentyear - 50 .. "),",
			"* other anonymous works published over 50 years ago (before January 1, " .. PD.currentyear - 50 .. "), and",
			"* other works whose author died over 70 years ago (before January 1, " .. PD.currentyear - 70 .. ").",
		}, '\n'),
		['uraa_text'] = "Because the Argentine p.m.a. term in 1996 was 50 years, the critical date for copyright in the United States under the URAA is '''January 1, 1946'''.",
		['uraa_date'] = 'January 1, 1996',
		['berne_year'] = 1967
	},
	['Australia'] = {
		['image_r'] = 'Flag of Australia.svg',
		['text'] = table.concat({
			PD.license_scope() .. " in the '''[[w:public domain|public domain]] in [[:w:Australia|Australia]]''' because " .. PD.license_grammar({"it was", "they were"}) .. " created in Australia and the term of copyright has expired. According to [https://www.copyright.org.au/browse/book/ACC-Duration-of-Copyright-INFO023 Australian Copyright Council - Duration of Copyright], the following works are public domain:",
			"* published non-government works whose author died before January 1, " .. math.max(1955, PD.currentyear - 70) .. ",",
			"* anonymous or pseudonymous works and photographs published before January 1, " .. math.max(1955, PD.currentyear - 70) .. ", and",
			"* government works published more than 50 years ago (before January 1, " .. PD.currentyear - 50 .. ")."
		}, '\n'),
		['uraa_text'] = "Because the Australian copyright term in 1996 was 50 years, the critical date for copyright in the United States under the URAA is '''January 1, 1946'''.",
		['uraa_date'] = 'January 1, 1996',
		['berne_year'] = 1928
	},
	['India'] = {
		['image_r'] = 'Flag of India.svg',
		['text'] = PD.license_scope() .. " in the '''[[w:public domain|public domain]] in India''' because " .. PD.license_grammar({"it originates", "they originate"}) .. " from [[w:India|India]] and " .. PD.license_grammar({"its term of copyright has", "their terms of copyright have"}) .. " expired. According to [https://copyright.gov.in/Documents/CopyrightRules1957.pdf The Indian Copyright Act, 1957], all documents enter the public domain after 60 years counted from the beginning of the following calendar year after the death of the author (i.e. as of " .. PD.currentyear .. ", prior to January 1, " .. PD.currentyear - 60 .. "). Film, sound recordings, government works, anonymous works, and works first published over 60 years after the death of the author are protected for 60 years after publication.\n\nWorks by authors who died before 1941 entered the public domain after 50 years (before 1991) and copyright has not been restored.",
		['uraa_text'] = "The critical date for copyright in the United States under the URAA is '''January 1, 1941'''.",
		['uraa_date'] = 'January 1, 1996',
		['berne_year'] = 1928
	},
	['Israel'] = {
		['image_r'] = 'Flag of Israel.svg',
		['text'] = PD.license_scope() .. " in the [[Help:public domain|public domain]] in Israel because " .. PD.license_grammar({"its term of copyright has", "their terms of copyright have"}) .. " expired. According to [https://www.tau.ac.il/law/members/birnhack/IsraeliCopyrightAct2007.pdf Israel's copyright statute from 2007], a work is released to the public domain 70 years after the death of its last surviving author, except for in these cases:\n#For photographs, if created '''before''' 25 May 2008—the [https://www.wipo.int/clea/en/text_html.jsp?lang=EN&id=2376 old British Mandate act] applies, i.e. 50 years after creation (paragraph 78(i) of the 2007 statute, and paragraph 21 of the old British Mandate act).\n#If owned by the State, and there is no special agreement between the State and the creator—50 years after creation (paragraphs 36 and 42 in the 2007 statute).",
		['uraa_text'] = "For most works, the critical date for copyright in the United States under the URAA is '''January 1, 1926'''; the critical date for photographs created before is '''May 25, 2008'''; and the critical date for works owned by the state is '''January 1, 1946'''.",
		['uraa_date'] = 'January 1, 1996',
		['berne_year'] = 1950
	},
	['South Africa'] = {
		['image_r'] = "Flag of South Africa.svg",
		['text'] = PD.license_scope({past = true}) .. " created and first published in [[w:South Africa|South Africa]] and " .. PD.license_grammar({"is", "are"}) .. " now in the '''[[w:public domain|public domain]]''' ''in South Africa'', because " .. PD.license_grammar({"its term of copyright has", "their terms of copyright have"}) .. " expired. According to the [https://www.nlsa.ac.za/downloads/Copyright%20Act.pdf Copyright Act, 1978], texts enter the public domain after 50 years counted from the end of the year of the death of the author, or in the case of works of the government, from the end of the year of publication (i.e. as of " .. PD.currentyear .. ", prior to January 1, " .. PD.currentyear - 50 .. ").",
		['uraa_text'] = "The critical date for copyright in the United States is '''January 1, 1946'''.",
		['uraa_date'] = 'January 1, 1996',
		['berne_year'] = 1928
	},
	['South Africa speech'] = {
		['image_r'] = "Flag of South Africa.svg",
		['text'] = PD.license_scope({past = true}) .. " created and first published '''before January 1, 1989''' in [[w:South Africa|South Africa]] and " .. PD.license_grammar({"is", "are"}) .. " in the '''[[w:public domain|public domain]]''' there because " .. PD.license_grammar({"it is a speech", "they are speeches"}) .. " of a political nature or " .. PD.license_grammar({"a speech", "speeches"}) .. " delivered in the course of legal proceedings.\n\nAccording to the [https://www.cipc.co.za/Copyright_files/Copyright_Act.pdf Copyright Act, 1978], § 12 (8) (''a''), ''"No copyright shall subsist [...] in speeches of a political nature or in speeches delivered in the course of legal proceedings."''",
		['warning'] = "'''South African speeches published since 1989 are not necessarily in the public domain in the United States'''; further information is required to determine their status in US copyright law.",
		['uraa_text'] = "The critical date for copyright in the United States is '''January 1, 1989'''.",
		['uraa_date'] = 'January 1, 1996',
		['berne_year'] = 1928
	},
	['Russia'] = {
		['image_r'] = "Flag of Russia.svg",
		['text'] = table.concat({
			PD.license_scope() .. " in the [[w:WP:PD|public domain]] '''in [[w:Russia|Russia]]''' (Article 1281 of the Russian Civil Code; Article 6 of Federal Law 231-FZ from December 18, 2006) because:",
			"* " .. PD.license_grammar({"it was", "they were"}) .. " published anonymously or under a pseudonym before January 1, 1943 and the name of the author did not become known during 50 years after publication (before January 1, 1993), or",
			"* " .. PD.license_grammar({"it was", "they were"}) .. " published anonymously or under a pseudonym after January 1, 1943, and the name of the author did not become known during 70 years after publication (as of " .. PD.currentyear .. ", this applies to works published before January 1, " .. PD.currentyear - 70 .. "), or",
			"* the work is non-amateur cinema or television film (or shots or fragments from it), which was first shown between January 1, 1929 and January 1, " .. PD.currentyear - 70 .. " (over 70 years ago), or",
			"* the creator died over 74 years ago (before January 1, " .. PD.currentyear - 74 .. "), or",
			"* the creator died over 70 years ago (before January 1, " .. PD.currentyear - 70 .. ") and did not fight in or work during the [[w:Great Patriotic War (term)|Great Patriotic War]] (June 22, 1941–May 9, 1945).",
			"\nIf the author was subjected to repression and [[w:Rehabilitation (Soviet)|rehabilitated]] posthumously, countdown of copyright protection begins not from the death date, but from the rehabilitation date. If the work was first published posthumously, the copyright term is counted from the date of that first publication, unless the author was later rehabilitated, in which case it runs again from that later rehabilitation date."
		}, '\n'),
		['uraa_text'] = "The critical dates for copyright in the United States are '''January 1, 1943''' for anonymous works; '''January 1, 1922''' if the creator fought in the Great Patriotic War; '''January 1, 1926''' otherwise.",
		['uraa_date'] = 'January 1, 1996',
		['berne_year'] = 1995,
		['error_text'] = function(args)
			if args and args.anon and args.pubyear and args.pubyear >= 1943 then
				return "Anonymous works published after 1942 were not in the public domain in Russia in 1996."
			else
				return nil
			end
		end
	},
	['Ukraine'] = {
		['image_r'] = "Flag of Ukraine.svg",
		['text'] = table.concat({
			PD.license_scope() .. " a Ukrainian or Ukrainian SSR work and " .. PD.license_grammar({"is", "are"}) .. " presently in the [[w:WP:PD|public domain]] ''in Ukraine''. Due to the retroactive [https://www.wipo.int/tk/en/laws/pdf/ukraine_copyright.pdf Ukrainian copyright law] of 1993, a work is in the public domain ''in Ukraine'' according to the following criteria:",
			"* Copyright in a work arises from the fact of its creation and takes effect from the date of creation.",
			"* Copyright is valid throughout the life of the author and for 70 years after the author's death, except as provided below.",
			"* For works published anonymously or under a pseudonym, copyright expires 70 years after the work was released. If the pseudonym adopted by the author leaves no doubt as to the identity of the author or the author is revealed no later than 70 years after the publication of the work, copyright lasts for the author's life plus 70 years.",
			"* Copyright in collaborative works is valid for life and 70 years after the death of the last co-author.",
			"* Copyright in works of posthumously [[w:Rehabilitation (Soviet)|rehabilitated]] authors is valid for 70 years after their rehabilitation.",
			"* Copyright in a work first published within 30 years after the author's death is valid for 70 years from the date of its lawful publication.",
			"* Persons who first publish an unpublished work after its copyright protection expires enjoy protection for 25 years from the time when the work was first published.",
			"* Calculation of the terms of copyright starts from January 1 of the year following the relevant event.",
			"\nCopyright protection under the 1993 act applied to all works where the copyright had not expired before the act became effective. A Ukrainian or Ukrainian SSR work is in the public domain in Ukraine if it was published before January 1, 1951, and the creator (if known) died before that date, or if another event listed above occurred before January 1, 1951. This is the effect of the copyright term extension from 50 to 70 years in 2001."
		}, '\n'),
		['uraa_text'] = "Because the Ukrainian copyright term in 1996 was 50 years, the critical date for copyright in the United States is '''January 1, 1946'''.",
		['uraa_date'] = 'January 1, 1996',
		['berne_year'] = 1995
	}
}