Module:Countries/CRT other/sandbox

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Lua
CodeDiscussionEditHistoryLinksLink count Subpages:DocumentationTestsResultsSandboxLive code All modules

Documentation for this module may be created at Module:Countries/CRT other/sandbox/doc

Code

-- Data defining countries for {{#invoke:Countries|main|CRT other}}.
-- Used for "Copyright rules by territory" (CRT) where "other" means economic/political unions, and former countries.

--[=[ Output is pattern after making these substitutes:
{lang}		User's language from {{int:lang}} such as 'en' or 'de'.
{dir}		Language direction 'ltr' or 'rtl'.
{colon}		Language equivalent of ": " from {{colon|lang}}.
{XYZtitle}	Title for lang from XYZ section of defined titles.
{XYZlist}	List of countries for lang from XYZ section of defined lists.
			XYZ must consist of en alphabetic characters [A-Za-z].
]=]
return {
	titles = {
		main = {
			default     = 'Unions',
			['be-tarask'] = 'Зьвязы',
			bn          = 'ইউনিয়ন',
			en          = 'Unions',
			fa          = 'اتحادیه‌ها',
			fr          = 'Unions',
			ml          = 'യൂണിയനുകൾ',
			sr          = 'Уније',
			['sr-latn'] = 'Unije',
			['zh-hans'] = '联盟',
			['zh-hant'] = '聯盟',
		},
		other = {
			default     = 'Former countries',
			['be-tarask'] = 'Колішнія краіны',
			bn          = 'প্রাক্তন দেশ',
			en          = 'Former countries',
			fa          = 'کشورهای سابق',
			fr          = 'Anciens pays',
			ml          = 'മുമ്പുണ്ടായിരുന്ന രാജ്യങ്ങൾ',
			sr          = 'Бивше државе',
			['sr-latn'] = 'Bivše države',
			['zh-hans'] = '曾经的国家',
			['zh-hant'] = '曾經的國家',
		},
	},
	pattern = {
		{	'<div lang="{lang}" dir="{dir}" class="catlinks"' ..
			' style="clear:none;margin:2px 0;padding:2px;font-size:88%;line-height:normal">',
				'mainlist',
				'otherlist',
		},
		{	'<em>{maintitle}{colon}</em>',
				{ 'maintitle', 'mainlist', },
		},
			'{mainlist}',
		{	'<br /> ',
				{ 'mainlist', 'otherlist', },
		},
		{	'<em>{othertitle}{colon}</em>',
				{ 'othertitle', 'otherlist', },
		},
			'{otherlist}',
		{	'</div>',
				'mainlist',
				'otherlist',
		},
	},
	simple = {
		pattern = {
			{	'<div lang="{lang}" dir="{dir}" class="catlinks"' ..
				' style="margin:2px 0;padding:2px;font-size:88%;line-height:normal">',
					'mainlist',
			},
			{	'<em>{maintitle}{colon}</em>',
					{ 'maintitle', 'mainlist', },
			},
				'{mainlist}',
			{	'</div>',
					'mainlist',
			},
		},
		sections = {
			-- List of sections to be displayed if simple=yes.
			-- Each value is a table identifying any country codes that are
			-- displayed only if simple=yes.
			main = { CSHH = true, XDAZ = true, XMAN = true, XOTT = true, SU = true, YU = true, },
		},
	},
	lists = {
		-- List of countries in an order suitable for display in the specified language.
		main = {
			english     = 'automatic', -- this applies with uselang=en
			default     = 'automatic sorted', -- currently unused because en is defined
			en          = 'automatic sorted', -- this applies with uselang=XX where XX is not defined here
			automatic   = 'XANC CSHH EU XDAZ XMAN XOTT SU UN YU',
			fa          = 'SU EU XOTT CSHH XANC UN XDAZ XMAN YU',
			fr          = 'XANC XOTT XMAN UN CSHH SU EU XDAZ YU',
			['zh-hans'] = 'XANC XOTT XDAZ CSHH UN XMAN YU EU SU',
			['zh-hant'] = 'XANC XOTT XDAZ CSHH UN XMAN YU EU SU',
		},
		other = {
			english     = 'automatic', -- this applies with uselang=en
			default     = 'automatic sorted', -- currently unused because en is defined
			en          = 'automatic sorted', -- this applies with uselang=XX where XX is not defined here
			automatic   = 'CSHH XDAZ XMAN XOTT SU YU',
			fa          = 'SU XOTT CSHH XDAZ XMAN YU',
			fr          = 'XOTT XMAN CSHH SU XDAZ YU',
			['zh-hans'] = 'XOTT XDAZ CSHH XMAN YU SU',
			['zh-hant'] = 'XOTT XDAZ CSHH XMAN YU SU',
		},
	},
	countries = {
		-- Codes should come from ISO 3166 if possible, possibly suffixed for subregions or former entities.
		-- Others should be arbitrarily chosen using ISO 3166-1 codes for private-use (AA, QM to QZ, XA to XZ, or ZZ).
		-- Please avoid using any code or prefix assigned by ISO 3166 to unrelated entities.
		CSHH = { 'Czechoslovakia',      qid = 'Q33946', },
		EU   = { 'European Union',      qid = 'Q458', the = true, },
		SU   = { 'Soviet Union',        qid = 'Q15180', the = true, },
		UN   = { 'United Nations',      qid = 'Q1065', the = true, },
		XANC = { 'Andean Community',    qid = 'Q471690', the = true, },
		XDAZ = { 'Free City of Danzig', qid = 'Q216173', the = true, },
		XMAN = { 'Manchukuo',           qid = 'Q30623', },
		XOTT = { 'Ottoman Empire',      qid = 'Q12560', the = true, },
		YU   = { 'Yugoslavia',          qid = 'Q36704', },
	},
}