« Module:Stations voisines WD/Bac à sable » : différence entre les versions
Contenu supprimé Contenu ajouté
Eru (discuter | contributions) optimisation des concaténations |
Eru (discuter | contributions) https://commons.wikimedia.org/wiki/Data:I18n/Template:Graphs.tab |
||
Ligne 3 :
local Outils = require 'Module:Outils'
local wikidata = require 'Module:Wikidata'
local TNT = require 'Module:TNT'
local defaultLang = 'fr'
local taille_logo = 12
local debug = false
local ignoreCoordinate = false
local linkback
function getMessage(key)
return TNT.formatInLanguage(defaultLang, 'I18n/Template:Stations-voisines.tab', key)
end
function p.Stations_voisines( id, onlyLineService, rows )
Ligne 31 ⟶ 37 :
textAfter[ #textAfter + 1] = lineDetail.after
if lineDetail.afterDestination and lineDetail.afterDestination ~= '-' then
textAfter[ #textAfter + 1] = " <br /> <small>
textAfter[ #textAfter + 1] = getMessage( 'towards' )
textAfter[ #textAfter + 1] = " ''"
textAfter[ #textAfter + 1] = lineDetail.afterDestination
textAfter[ #textAfter + 1] = "'' </small>"
Ligne 44 ⟶ 52 :
lineDetail.colorAfter = ''
else
textAfter[ #textAfter + 1] = "
textAfter[ #textAfter + 1] = getMessage( 'terminus' )
textAfter[ #textAfter + 1] = "''"
lineDetail.colorAfter = ''
end
Ligne 50 ⟶ 60 :
textBefore[ #textBefore + 1] = lineDetail.before
if lineDetail.beforeDestination and lineDetail.beforeDestination ~= '-' then
textBefore[ #textBefore + 1] = " <br /> <small>
textBefore[ #textBefore + 1] = getMessage( 'towards' )
textBefore[ #textBefore + 1] = " ''"
textBefore[ #textBefore + 1] = lineDetail.beforeDestination
textBefore[ #textBefore + 1] = "'' </small>"
Ligne 61 ⟶ 73 :
lineDetail.colorBefore = lineDetail.color
else
textBefore[ #
textBefore[ #textBefore + 1] = getMessage( 'terminus' )
textBefore[ #textBefore + 1] = "''"
lineDetail.colorBefore = ''
end
Ligne 277 ⟶ 291 :
rows[ #rows + 1 ] = '{| class="wikitable stations-voisines"'
rows[ #rows + 1 ] = '! scope=col |
rows[ #rows + 1 ] = '! scope=col colspan="3" | ' .. titre
rows[ #rows + 1 ] = '! scope=col |
local found = p.Stations_voisines( id, onlyLineService, rows )
|