Module:Departments of France/sandbox

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Lua

CodeDiscussionEditHistoryLinksLink count Subpages:DocumentationTestsResultsSandboxLive code All modules

{{#invoke:Countries/sandbox|main|Module:Departments of France|showcode=yes}}
  • {{Departments of France/sandbox|prefix=:Category:}} gives:
  • {{Departments of France/sandbox|prefix=:Category:|showcode=}} gives:

See also

[edit]

Code

--[=[
Data defining countries for {{#invoke:Countries|main|Module:Departments of France}}.

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.
Where XYZ must consist of en alphabetic characters [A-Za-z].
]=]
return {
	titles = {
		met = {
			['be-tarask'] = 'Дэпартамэнты мэтрапольнай Францыі',
			de = 'Departements von Metropolitan-Frankreich',
			en = 'Departments of Metropolitan France',
			es = 'Departamentos de Francia metropolitana',
			fr = 'Départements de France métropolitaine',
			it = 'Dipartimenti della Francia metropolitana',
			mk = 'Департмани во митрополитот Франција',
			nl = 'Departementen van metropolitaans Frankrijk',
			no = 'Departement i France métropolitaine',
			pt = 'Departamentos da França metropolitana',
			sl = 'Departmaji metropolitanske Francije',
			sr = 'Департмани метрополитенске Француске',
			['sr-latn'] = 'Departmani metropolitenske Francuske',
			['zh-hans'] = '法国本土省',
			['zh-hant'] = '法國本土省',
		},
	--[[Disabled:
		ovs = {
			['be-tarask'] = 'Заморская Францыя',
			de = 'Übersee Frankreich',
			en = 'Overseas France',
			es = 'Francia de ultramar',
			fr = 'France d’outre-mer',
			it = 'Francia d’oltremare',
			mk = 'Прекуморска Франција',
			nl = 'Overzees Frankrijk',
			no = 'Oversjøiske Frankrike',
			pt = 'França ultramarina',
			sl = 'Čezmorska Francija',
			sr = 'Прекоморска Француска',
			['sr-latn'] = 'Prekomorska Francuska',
			['zh-hans'] = '法国海外部分',
			['zh-hant'] = '法國海外部分',
		},
	--]]
		dom = {
			['be-tarask'] = 'Заморскія дэпартамэнты і рэгіёны',
			de = 'Überseeische Departements und Regionen',
			en = 'Overseas departments and regions',
			es = 'Departamentos y regiones de ultramar',
			fr = 'Départements et régions d’outre-mer',
			it = 'Dipartimenti e regioni d’oltremare',
			mk = 'Прекуморски департмани и региони',
			nl = 'Overzeese departementen en regio’s',
			no = 'Oversjøiske departement og regioner',
			pt = 'Departamentos e regiões ultramarinas',
			sl = 'Čezmorski departmaji in regije',
			sr = 'Прекоморски департмани и региони',
			['sr-latn'] = 'Prekomorski departmani i regioni',
			['zh-hans'] = '海外省及大区',
			['zh-hant'] = '海外省及大區',
		},
		com = {
			['be-tarask'] = 'Заморскія тэрыторыі',
			de = 'Überseeische Kollektivitäten',
			en = 'Overseas collectivities',
			es = 'Colectividades de ultramar',
			fr = 'Collectivités d’outre-mer',
			it = 'Collettività d’oltremare',
			mk = 'Прекуморски заедници',
			nl = 'Overzeese gemeenschappen',
			no = 'Oversjøiske kollektiviteter',
			pt = 'Coletividades ultramarinas',
			sl = 'Čezmorske kolektivitete',
			sr = 'Прекоморски колективитети',
			['sr-latn'] = 'Prekomorski kolektiviteti',
			['zh-hans'] = '海外集体',
			['zh-hant'] = '海外集體',
		},
		sgt = {
			['be-tarask'] = 'Тэрыторыі sui generis',
			de = 'Sui-generis-Gebiete',
			en = 'Sui generis territories',
			es = 'Territorios sui generis',
			fr = 'Territoires sui generis',
			it = 'Territori sui generis',
			mk = 'Своевидни територии',
			nl = 'Sui generis-gebieden',
			no = 'Sui generis territorier',
			pt = 'Territórios sui generis',
			sl = 'Ozemlja sui generis',
			sr = 'Територије sui generis',
			['sr-latn'] = 'Teritorije sui generis',
			['zh-hans'] = '特殊集体',
			['zh-hant'] = '特殊集體',
		},
	},
	pattern = {
		{	'<div lang="{lang}" dir="{dir}" class="catlinks"' ..
			' style="clear:none;display:table;box-sizing:border-box;max-width:100%;font-size:88%;line-height:normal;margin:2px 0;padding:2px"><div style="display:table-cell;width:100%">',
				'metlist',
				'domlist',
				'comlist',
				'sgtlist',
		},
		{	'<em>{mettitle}{colon}</em>',
				{ 'mettitle','metlist', },
		},
			'{metlist}',
                {	'<br /> ',
				{ 'metlist', 'domlist', },
				{ 'metlist', 'comlist', },
				{ 'metlist', 'sgtlist', },
		},
	--[[Disabled:
		{	'<em>{ovstitle}{colon}</em><br /> ',
				'domlist',
				'comlist',
				'sgtlist',
		},
	--]]
		{	'<em>{domtitle}{colon}</em>',
				{ 'domtitle', 'domlist', },
		},
			'{domlist}',
		{	'<br /> ',
				{ 'domlist', 'comlist', },
				{ 'domlist', 'sgtlist', },
		},
		{	'<em>{comtitle}{colon}</em>',
				{ 'comtitle', 'comlist', },
		},
			'{comlist}',
		{	'<br /> ',
				{ 'comlist', 'sgtlist', },
		},
		{	'<em>{sgttitle}{colon}</em>',
				{ 'sgttitle', 'sgtlist', },
		},
			'{sgtlist}',
		{
			'</div></div>',
				'metlist',
				'domlist',
				'comlist',
				'sgtlist',
		},
	},
	lists = { -- ordered by code, independantly of languages for translated names from Wikidata
		met = {
			default = '01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19' ..
				' 2A 2B 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39' ..
				' 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59' ..
				' 60 61 62 63 64 65 66 67 68 69 69D 69M 70 71 72 73 74 75 76 77 78 79' ..
				' 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95',
		},
	--[[Disabled:
		ovs = {
			default = '',
		},
	--]]
		dom = {
			default = '971 972 973 974 976',
		},
		com = {
			default = '975 977 978 986 987 984',
		},
		sgt = {
			default = '988 989',
		},
	},
	infos = {
		['01' ] = { 'Ain',                                         qid = 'Q3083', },
		['02' ] = { 'Aisne',                                       qid = 'Q3093', },
		['03' ] = { 'Allier',                                      qid = 'Q3113', },
		['04' ] = { 'Alpes-de-Haute-Provence',                     qid = 'Q3131', },
		['05' ] = { 'Hautes-Alpes',                                qid = 'Q3125', },
		['06' ] = { 'Alpes-Maritimes',                             qid = 'Q3139', },
		['07' ] = { 'Ardèche',                                     qid = 'Q3148', },
		['08' ] = { 'Ardennes (department)',
		            'Ardennes',                                    qid = 'Q3164', },
		['09' ] = { 'Ariège (department)',
		            'Ariège',                                      qid = 'Q3184', },
		['10' ] = { 'Aube (department)',
		            'Aube',                                        qid = 'Q3194', },
		['11' ] = { 'Aude',                                        qid = 'Q3207', },
		['12' ] = { 'Aveyron',                                     qid = 'Q3216', },
		['13' ] = { 'Bouches-du-Rhône',                            qid = 'Q3240', },
		['14' ] = { 'Calvados',                                    qid = 'Q3249', },
		['15' ] = { 'Cantal',                                      qid = 'Q3259', },
		['16' ] = { 'Charente',                                    qid = 'Q3266', },
		['17' ] = { 'Charente-Maritime',                           qid = 'Q3278', },
		['18' ] = { 'Cher (department)',
		            'Cher',                                        qid = 'Q3286', },
		['19' ] = { 'Corrèze',                                     qid = 'Q3326', },
		['2A' ] = { 'Corse-du-Sud',                                qid = 'Q3336', mark = '†', },
		['2B' ] = { 'Haute-Corse',                                 qid = 'Q3334', mark = '†', },
		['21' ] = { "Côte-d'Or",                                   qid = 'Q3342', },
		['22' ] = { "Côtes-d'Armor",
                            "Côtes-du-Nord",                               qid = 'Q3349', },
		['23' ] = { 'Creuse (department)',
		            'Creuse',                                      qid = 'Q3353', },
		['24' ] = { 'Dordogne',                                    qid = 'Q3357', },
		['25' ] = { 'Doubs',                                       qid = 'Q3361', },
		['26' ] = { 'Drôme',                                       qid = 'Q3364', },
		['27' ] = { 'Eure',                                        qid = 'Q3372', },
		['28' ] = { 'Eure-et-Loir',                                qid = 'Q3377', },
		['29' ] = { 'Finistère',                                   qid = 'Q3389', },
		['30' ] = { 'Gard',                                        qid = 'Q12515', },
		['31' ] = { 'Haute-Garonne',                               qid = 'Q12538', },
		['32' ] = { 'Gers (department)',
		            'Gers',                                        qid = 'Q12517', },
		['33' ] = { 'Gironde',                                     qid = 'Q12526', },
		['34' ] = { 'Hérault',                                     qid = 'Q12545', },
		['35' ] = { 'Ille-et-Vilaine',                             qid = 'Q12549', },
		['36' ] = { 'Indre (department)',
		            'Indre',                                       qid = 'Q12553', },
		['37' ] = { 'Indre-et-Loire',                              qid = 'Q12556', },
		['38' ] = { 'Isère (department)',
		            'Isère',                                       qid = 'Q12559', },
		['39' ] = { 'Jura (department)',
		            'Jura',                                        qid = 'Q3120', },
		['40' ] = { 'Landes (department)',
		            'Landes',                                      qid = 'Q12563', },
		['41' ] = { 'Loir-et-Cher',                                qid = 'Q12564', },
		['42' ] = { 'Loire (department)',
		            'Loire',                                       qid = 'Q12569', },
		['43' ] = { 'Haute-Loire',                                 qid = 'Q12572', },
		['44' ] = { 'Loire-Atlantique',                            qid = 'Q3068', },
		['45' ] = { 'Loiret',                                      qid = 'Q12574', },
		['46' ] = { 'Lot (department)',
		            'Lot',                                         qid = 'Q12576', },
		['47' ] = { 'Lot-et-Garonne',                              qid = 'Q12578', },
		['48' ] = { 'Lozère',                                      qid = 'Q12580', },
		['49' ] = { 'Maine-et-Loire',                              qid = 'Q12584', },
		['50' ] = { 'Manche',                                      qid = 'Q12589', },
		['51' ] = { 'Marne (department)',
		            'Marne',                                       qid = 'Q12594', },
		['52' ] = { 'Haute-Marne',                                 qid = 'Q12607', },
		['53' ] = { 'Mayenne',                                     qid = 'Q12620', },
		['54' ] = { 'Meurthe-et-Moselle',                          qid = 'Q12626', },
		['55' ] = { 'Meuse (department)',
		            'Meuse',                                       qid = 'Q12631', },
		['56' ] = { 'Morbihan',                                    qid = 'Q12642', },
		['57' ] = { 'Moselle (department)',
		            'Moselle',                                     qid = 'Q12652', },
		['58' ] = { 'Nièvre',                                      qid = 'Q12657', },
		['59' ] = { 'Nord (French department)',
		            'Nord (department)',
		            'Nord',                                        qid = 'Q12661', },
		['60' ] = { 'Oise (department)',
		            'Oise',                                        qid = 'Q12675', },
		['61' ] = { 'Orne',                                        qid = 'Q12679', },
		['62' ] = { 'Pas-de-Calais',                               qid = 'Q12689', },
		['63' ] = { 'Puy-de-Dôme',                                 qid = 'Q12694', },
		['64' ] = { 'Pyrénées-Atlantiques',                        qid = 'Q12703', },
		['65' ] = { 'Hautes-Pyrénées',                             qid = 'Q12700', },
		['66' ] = { 'Pyrénées-Orientales',                         qid = 'Q12709', },
		['67' ] = { 'Bas-Rhin',                                    qid = 'Q12717', },
		['68' ] = { 'Haut-Rhin',                                   qid = 'Q12722', },
		['69' ] = { 'Rhône',                                       qid = 'Q18914778',
				note = {
 			        ['be-tarask'] = '<abbr title="дэпартамэнцкі раён">р-н</abbr>',
					en = '<abbr title="departmental district">distr.</abbr>',
					fr = '<abbr title="circonscription départementale">circ.</abbr>',
					mk = '<abbr title="департмански округ">окр.</abbr>',
					sr = '<abbr title="департмански округ">окр.</abbr>',
					['sr-latn'] = '<abbr title="departmanski okrug">okr.</abbr>',
				},
			},
		['69D'] = { 'Rhône (department)',                          qid = 'Q46130', mark = '‡',
				note = {
 			        ['be-tarask'] = '<abbr title="дэпартамэнт">дэп.</abbr>',
					en = '<abbr title="department">dept.</abbr>',
					fr = '<abbr title="département">dép.</abbr>',
					mk = '<abbr title="департман">деп.</abbr>',
					sr = '<abbr title="департман">деп.</abbr>',
					['sr-latn'] = '<abbr title="departman">dep.</abbr>',
				},
			},
		['69M'] = { 'Métropole de Lyon',                           qid = 'Q16665897', mark = '‡', },
		['70' ] = { 'Haute-Saône',                                 qid = 'Q12730', },
		['71' ] = { 'Saône-et-Loire',                              qid = 'Q12736', },
		['72' ] = { 'Sarthe',                                      qid = 'Q12740', },
		['73' ] = { 'Savoie',                                      qid = 'Q12745', },
		['74' ] = { 'Haute-Savoie',                                qid = 'Q12751', },
		['75' ] = { 'Paris',                                       qid = 'Q90', },
		['76' ] = { 'Seine-Maritime',                              qid = 'Q12758', },
		['77' ] = { 'Seine-et-Marne',                              qid = 'Q12753', },
		['78' ] = { 'Yvelines',                                    qid = 'Q12820', },
		['79' ] = { 'Deux-Sèvres',                                 qid = 'Q12765', },
		['80' ] = { 'Somme (department)',
		            'Somme',                                       qid = 'Q12770', },
		['81' ] = { 'Tarn (department)',
		            'Tarn',                                        qid = 'Q12772', },
		['82' ] = { 'Tarn-et-Garonne',                             qid = 'Q12779', },
		['83' ] = { 'Var (department)',
		            'Var',                                         qid = 'Q12789', },
		['84' ] = { 'Vaucluse',                                    qid = 'Q12792', },
		['85' ] = { 'Vendée (department)',
		            'Vendée',                                      qid = 'Q12798', },
		['86' ] = { 'Vienne',                                      qid = 'Q12804', },
		['87' ] = { 'Haute-Vienne',                                qid = 'Q12808', },
		['88' ] = { 'Vosges (department)',                           
		            'Vosges',                                      qid = 'Q3105',  },
		['89' ] = { 'Yonne',                                       qid = 'Q12816', },
		['90' ] = { 'Territoire de Belfort',
		            'Territoire-de-Belfort',                       qid = 'Q12782', },
		['91' ] = { 'Essonne (department)',
		            'Essonne',                                     qid = 'Q3368', },
		['92' ] = { 'Hauts-de-Seine',                              qid = 'Q12543', },
		['93' ] = { 'Seine-Saint-Denis',                           qid = 'Q12761', },
		['94' ] = { 'Val-de-Marne',                                qid = 'Q12788', },
		['95' ] = { "Val-d'Oise",                                  qid = 'Q12784', },
		['971'] = { 'Guadeloupe',                                  qid = 'Q17012', },
		['972'] = { 'Martinique',                                  qid = 'Q17054', },
		['973'] = { 'French Guiana',
		            'Guyane',                                      qid = 'Q3769', },
		['974'] = { 'Réunion',
		            'La Réunion',                                  qid = 'Q17070', },
		['975'] = { 'Saint-Pierre and Miquelon',
		            'Saint-Pierre-et-Miquelon',                    qid = 'Q34617', },
		['976'] = { 'Mayotte',                                     qid = 'Q17063', },
		['977'] = { 'Saint-Barthélemy',
		            'Saint Barthélemy',                            qid = 'Q25362', },
		['978'] = { 'Saint-Martin (France)',
		            'Saint Martin (France)',                       qid = 'Q126125', },
		['984'] = { 'French Southern and Antarctic Lands', the = true,
		            'Terres australes et antarctiques françaises', qid = 'Q129003', mark = '+', },
		['986'] = { 'Wallis and Futuna',                           
		            'Wallis-et-Futuna',                            qid = 'Q35555', },
		['987'] = { 'French Polynesia',                            
		            'Polynésie française',                         qid = 'Q30971', },
		['988'] = { 'New Caledonia',                               
		            'Nouvelle-Calédonie',                          qid = 'Q33788', },
		['989'] = { 'Clipperton Island',                           
		            'Île Clipperton',                              qid = 'Q161258', mark = '+', }
		},
	}