Module:Infobox/Fiction/Lieu
Aller à la navigation
Aller à la recherche
La documentation pour ce module peut être créée à Module:Infobox/Fiction/Lieu/doc
local general = require "Module:Infobox/Fonctions" local wikidata = require "Module:Wikidata" local linguistic = require "Module:Linguistique" local function italics(query) local val = wikidata.formatAndCat(query) if val then return '<i>' .. val .. '</i>' end end return { maincolor = '#DFDFDF', parts = { general.title(), general.mainimage('Article à illustrer Fiction'), --rajouter upright -- rajouter image drapeau P41 et blason P94 {type = 'table', title = 'Univers de fiction', rows = { {type = 'row', label = 'Nom original', value = 'nom original', property = 'P1448'}, -- propriété à vérifier { type = 'row', label = 'Présent dans lʼœuvre', value = 'œuvre', wikidata = function (item ) return italics({entity = item, property = 'P1441', rank = preferred}) end }, {type = 'row', label = 'Créateur', value = 'créateur', property = 'P170'}, -- créateur de l'œuvre {type = 'row', label = 'Éditeur', value = 'éditeur'}, -- éditeur de l'œuvre, aller chercher P123 dans l'œuvre { type = 'row', label = 'Première apparition', value = 'première apparition', wikidata = function (item ) -- récupère la première œuvre selon la chronologie des qualifieurs date sur P1441 dans Wikidata return italics{ entity = item, property = 'P1441', qualifier = 'P585', sorttype = 'chronological', numval = 1, showdate = 1 } end }, --[[ { type = 'row', label = 'Dernière apparition ', value = 'dernière apparition', wikidata = function ( item ) return '<i>' .. wikidata._formatStatements({ item = item, property = 'P1441', qualifier = 'P585', sorttype = 'inverted', numval = 1 }) .. '</i> end }, ]] -- pas de propriété Wikidata correspondant, jongler avec P1441 ? --{type = 'row', label = 'Première apparition ', value = 'première apparition'}, -- pas de propriété Wikidata correspondant, jongler avec P1441 ? {type = 'row', label = 'Dernière apparition ', value = 'dernière apparition'}, -- pas de propriété Wikidata correspondant, jongler avec P1441 ? {type = 'row', label = 'Autre apparition ', value = 'autre apparition'}, -- pas de propriété Wikidata correspondant, jongler avec P1441 ? {type = 'row', label = 'Personnages', value = 'personnages'}, -- éditeur de l'œuvre }}, {type = 'table', title = 'Astronomie', rows = { {type = 'row', label = 'Noyau', value = 'noyau'}, {type = 'row', label = 'Ordre', value = 'ordre'}, {type = 'row', label = 'Étoile(s)', value = 'étoile'}, {type = 'row', label = 'Satellite(s)', value = 'satellite'}, {type = 'row', label = 'Anneau(x)', value = 'anneau'}, {type = 'row', label = 'Révolution', value = 'révolution'}, {type = 'row', label = 'Rotation', value = 'rotation'}, {type = 'row', label = 'Dimension', value = 'dimension'}, {type = 'row', label = 'Gravité', value = 'gravité'}, }}, {type = 'table', title = ' Caractéristiques', rows = { {type = 'row', label = 'Atmosphère', value = 'atmosphère'}, {type = 'row', label = 'Température', value = 'température'}, {type = 'row', label = 'Climat', value = 'climat'}, {type = 'row', label = 'Continent(s)', value = 'continents'}, {type = 'row', label = 'Paysages', value = 'paysages'}, {type = 'row', label = 'Surface immergée', value = 'surface immergée'}, {type = 'row', label = 'Classe', value = 'classe'}, {type = 'row', label = 'Intérêt', value = 'intérêt'}, {type = 'row', label = 'Affiliation', value = 'affiliation'}, {type = 'row', label = 'Évènements', value = 'évènements', property = 'P793'}, {type = 'row', label = 'Type', value = 'type'}, -- bidouiller avec P31 ? {type = 'row', label = 'Localisation', value = 'localisation', property = 'P706'}, -- localisation {type = 'row', label = 'Localisation administrative', blockers = 'localisation', value = 'localisation administrative', property = 'P131'}, {type = 'row', label = 'Population', value = 'population', property = 'P1082'}, {type = 'row', label = 'Devise', value = 'devise', property = 'P1451'}, {type = 'row', label = 'Régime politique', value = 'régime politique', property = 'P122'}, {type = 'row', label = 'Capitale', value = 'capitale', property = 'P36'}, {type = 'row', label = 'Langue', value = 'langue', property = 'P37'}, {type = 'row', label = 'Monnaie', value = 'monnaie', property = 'P38'}, {type = 'row', label = 'Dirigeant(e)', value = 'dirigeant', property = 'P6'}, {type = 'row', label = 'Autre(s) caractéristique(s)', value = 'caractéristiques'}, { type = 'row', label = function ( localdata ) return localdata['paramètre libre 1'] end, value = 'valeur libre 1' }, { type = 'row', label = function ( localdata ) return localdata['paramètre libre 2'] end, value = 'valeur libre 2' }, --[[ { type = 'row', label = function ( localdata ) return localdata['titre services'] or 'Services' end, value = 'services' }, ]] }}, } }