templates/includes/common/js-config.html.twig line 1

Open in your IDE?
  1. {% set contactUrl = (portal_url is defined and portal_url is not empty) ? portal_url ~ 'portal-contact-us' | trans : baseUrl ~ path('contact') %}
  2. {% if custom_feedback_url_redirect_list is defined and custom_feedback_url_redirect_list is not empty and app.request.locale in custom_feedback_url_redirect_list|keys %}
  3. {% set contactUrl = (portal_url is defined and portal_url is not empty) ? portal_url ~ custom_feedback_url_redirect_list[app.request.locale] : custom_feedback_url_redirect_list[app.request.locale] %}
  4. {% endif %}
  5. window.oConfig = {
  6. shortCommit: '{{ short_commit }}',
  7. subjectsInformationZou: '{{ getSubjectsInformationFormZou(true)|raw }}',
  8. subjectsClaimZou: '{{ getSubjectsClaimFormZou(true)|raw }}',
  9. baseUrl: {% if isPdfDownloaded is defined and isPdfDownloaded == true %}'{{ wkhtmltopdf_host }}'{% else %}'{{ baseUrl }}'{% endif %},
  10. locale: '{{ app.request.get('_locale') }}',
  11. networkId: '{{ network_id }}',
  12. networkTimezone: '{{ networkTimezone }}',
  13. deviceType: '{{ deviceType is defined ? deviceType : 'desktop' }}',
  14. deviceOS: '{{ deviceOS is defined ? deviceOS : 'unknown' }}',
  15. networkTimezone: '{{ networkTimezone }}',
  16. {% if external is defined %}external: {{ external == true ? 1 : 0 }},{% endif %}
  17. {% if fromSEO is defined %}fromSEO: {{ fromSEO == true ? 1 : 0 }},{% endif %}
  18. {% if fromWidget is defined %}fromWidget: {{ fromWidget == true ? 1 : 0}},{% endif %}
  19. {% if sim_module is defined %}simModule: {{ sim_module == true ? 1 : 0}},{% endif %}
  20. {% if ticketing_module is defined %}ticketingModule: {{ ticketing_module == true ? 1 : 0}},{% endif %}
  21. {% if widget_module is defined %}widgetModule: {{ widget_module == true ? 1 : 0}},{% endif %}
  22. refererBaseDir: '{{ asset('./') }}',
  23. homeUrl: '/',
  24. outdatedBrowserUrl: '{{ path('outdated_browser') }}',
  25. defaultColor: '#666',
  26. brandColor: '{{ brand_color }}',
  27. hideNavLabelsBreakpoint: {{ hide_nav_labels_breakpoint }},
  28. maxDate: '{%if maxDate is defined %}{{ maxDate }}{%else%}{%endif%}',
  29. enableIsochrones: '{{ enable_isochrones }}',
  30. linesRedirectToSchedules: '{{ lines_redirect_to_schedules }}',
  31. useLatencyInPlacesSearch: {{ use_latency_in_places_search ? 'true' : 'false' }},
  32. faviconUrl: '{{ favicon_base_url() }}',
  33. boundariesUrl: '{{ boundaries_url() }}',
  34. events: {
  35. resultsLoaded: 'is.results.loaded'
  36. },
  37. trans: {
  38. line: '{{ 'journey.line'|trans }}',
  39. departure_stop: '{{ 'booking.transport.departure_stoparea_placeholder'|trans }}',
  40. arrival_stop: '{{ 'booking.transport.arrival_stoparea_placeholder'|trans }}',
  41. no_destination_stoparea: '{{ 'booking.no_destination_stoparea'|trans }}',
  42. journey_not_reservable: '{{ 'booking.journey_not_reservable'|trans }}',
  43. booking_date_unavailable: '{{ 'booking.date.unavailable'|trans }}',
  44. validate_btn: '{{ 'booking.transport.validate'|trans }}',
  45. validate_in_progress_btn: '{{ 'booking.transport.validate_in_progress'|trans }}',
  46. unknown_remaining_seats: '{{ 'booking.transport.unknown_remaining_seats'|trans }}',
  47. remaining_seat: '{{ 'booking.transport.remaining_seat'|trans|raw }}',
  48. remaining_seats: '{{ 'booking.transport.remaining_seats'|trans|raw }}',
  49. amount_error: '{{ 'ticketing.amount_to_topup_error'|trans }}',
  50. and: '{{ 'schedule.and'|trans }}',
  51. modes: {
  52. bus: '{{ 'mode.bus'|trans }}',
  53. transport: '{{ 'mode.transport'|trans }}',
  54. airport: '{{ 'mode.airport'|trans }}',
  55. walk: '{{ 'mode.walk'|trans }}',
  56. metro: '{{ 'mode.metro'|trans }}',
  57. tram: '{{ 'mode.tram'|trans }}',
  58. coach: '{{ 'mode.coach'|trans }}',
  59. bike: '{{ 'mode.bike'|trans }}',
  60. bikepark: '{{ 'mode.bikepark'|trans }}',
  61. bikesharing: '{{ 'mode.bikesharing'|trans }}',
  62. car: '{{ 'mode.car'|trans }}',
  63. train: '{{ 'mode.train'|trans }}',
  64. railshuttle: '{{ 'mode.railshuttle'|trans }}',
  65. rapidtransit: '{{ 'mode.rapidtransit'|trans }}',
  66. train_rapidtransit: '{{ 'mode.train_rapidtransit'|trans }}',
  67. shuttle: '{{ 'mode.shuttle'|trans }}',
  68. parkandride: '{{ 'mode.parkandride'|trans }}',
  69. park: '{{ 'mode.park'|trans }}',
  70. airpark: '{{ 'mode.airpark'|trans }}',
  71. flight: '{{ 'mode.flight'|trans }}',
  72. ridesharing: '{{ 'mode.ridesharing'|trans }}',
  73. ridesharing_external: '{{ 'mode.ridesharing_external'|trans }}',
  74. ridesharingad: '{{ 'mode.ridesharingad'|trans }}',
  75. bikesharingstation: '{{ 'mode.bikesharingstation'|trans }}',
  76. carrental: '{{ 'mode.carrental'|trans }}',
  77. carrentalcheckin: '{{ 'mode.carrentalcheckin'|trans }}',
  78. carrentalcheckout: '{{ 'mode.carrentalcheckout'|trans }}',
  79. ridesharingcheckin: '{{ 'mode.ridesharingcheckin'|trans }}',
  80. ridesharingcheckout: '{{ 'mode.ridesharingcheckout'|trans }}'
  81. },
  82. pendingSearch: '{{ 'journey.pending_search'|trans }}',
  83. pdfGenerating: '{{ 'journey.pdf_generating'|trans }}',
  84. pdfGenerationError: '{{ 'journey.pdf_generation_error'|trans }}',
  85. back: '{{ 'nav.back'|trans }}',
  86. datetimeChosenValue: '{{ 'date.datetime_chosen_value'|trans }}',
  87. dateChosenValue: '{{ 'date.date_chosen_value'|trans }}',
  88. timeChosenValue: '{{ 'date.time_chosen_value'|trans }}',
  89. selectYear: '{{ 'date.select_year'|trans }}',
  90. selectMonth: '{{ 'date.select_month'|trans }}',
  91. selectDay: '{{ 'date.select_day'|trans }}',
  92. selectHour: '{{ 'date.select_hour'|trans }}',
  93. selectMinute: '{{ 'date.select_minute'|trans }}',
  94. months: {
  95. january: '{{ 'date.months.january'|trans }}',
  96. february: '{{ 'date.months.february'|trans }}',
  97. march: '{{ 'date.months.march'|trans }}',
  98. april: '{{ 'date.months.april'|trans }}',
  99. may: '{{ 'date.months.may'|trans }}',
  100. june: '{{ 'date.months.june'|trans }}',
  101. july: '{{ 'date.months.july'|trans }}',
  102. august: '{{ 'date.months.august'|trans }}',
  103. september: '{{ 'date.months.september'|trans }}',
  104. october: '{{ 'date.months.october'|trans }}',
  105. november: '{{ 'date.months.november'|trans }}',
  106. december: '{{ 'date.months.december'|trans }}'
  107. },
  108. autocomplete: {
  109. searchLoading: '{{ 'autocomplete.search_loading'|trans }}',
  110. defaultNotice: '{{ 'autocomplete.default_notice'|trans }}',
  111. selectedValue: '{{ 'autocomplete.selected_value'|trans }}',
  112. noSuggestion: "{{ 'autocomplete.no_suggestions_new_format'|trans({ 'contactUrl': contactUrl })|raw|escape('js') }}",
  113. noExactSuggestion: '{{ 'autocomplete.no_exact_suggestion_new_format'|trans({ 'contactUrl': contactUrl })|raw|escape('js') }}',
  114. suggestionsFound: '{{ 'autocomplete.suggestions_found'|trans }}',
  115. resetLabel: '{{ 'autocomplete.reset'|trans }}',
  116. checkLabel: '{{ 'autocomplete.check'|trans }}',
  117. resultsFound: '{{ 'autocomplete.found_results'|trans }}',
  118. noSuggestionSelected: '{{ 'autocomplete.no_suggestion_selected'|trans }}',
  119. notice: '{{ 'autocomplete.notice'|trans }}',
  120. my_position: '{{ 'my_position'|trans }}'
  121. },
  122. loader: {
  123. search: '{{ 'loader.search'|trans }}',
  124. journeySearch: '{{ 'loader.journey_search'|trans }}',
  125. localitySearch: '{{ 'loader.locality_search'|trans }}',
  126. stopareaSearch: '{{ 'loader.stoparea_search'|trans }}',
  127. lineSearch: '{{ 'loader.line_search'|trans }}',
  128. stoppointSearch: '{{ 'loader.stoppoint_search'|trans }}'
  129. },
  130. error: {
  131. ticketing_download: '{{ 'ticketing.download_error' | trans }}',
  132. journey_same_address: '{{ 'journey.same_address' | trans }}',
  133. select_payment_card: '{{ 'payment.tokens.error.select_payment_card' | trans }}',
  134. outward_return_dates_error: '{{ 'outward_return_dates_error' | trans }}'
  135. },
  136. direction: '{{ 'schedule.direction' | trans }}',
  137. ticketing: {
  138. payment: {
  139. success: '{{ 'ticketing.payment.operator.success' | trans }}',
  140. failure: '{{ 'ticketing.payment.operator.failure' | trans }}',
  141. error_select: '{{ 'ticketing.payment.operator.error_select' | trans }}'
  142. }
  143. },
  144. forms: {
  145. agreeTerms: "{{ 'messagesErrors.forms.agreeTerms' | trans }}",
  146. selectAddress: "{{ 'messagesErrors.forms.selectAddress' | trans }}",
  147. captcha: "{{ 'messagesErrors.forms.captcha' | trans }}",
  148. error: "{{ 'get.data.error.message' | trans }}"
  149. },
  150. loading: '{{ 'ticketing.loading' | trans }}',
  151. crop_empty: '{{ 'ticketing.order.crop_empty' | trans }}'
  152. },
  153. switchMapMobile: '{{switch_map_mobile is defined ? switch_map_mobile }}',
  154. enableHurryTraveler: '{{enable_hurry_traveler is defined ? enable_hurry_traveler }}',
  155. limitPlacesResults: '{{ limit_places_results is defined ? limit_places_results }}',
  156. autocompleteMinChars: {{ autocomplete_min_chars is defined ? autocomplete_min_chars : 3 }},
  157. };
  158. var journeyConfig = null,
  159. ticketingConfig = null,
  160. schedulesConfig = null,
  161. disruptionConfig = null,
  162. mapConfig = null,
  163. accountConfig = null,
  164. newsConfig = null,
  165. alertingConfig = null,
  166. widgetConfig;
  167. journeyConfig = {
  168. placeListPath: oConfig.baseUrl + '{{ path('place.list') }}',
  169. journeyListPath: oConfig.baseUrl + '{{ path('journey.list') }}',
  170. journeyFarePath: oConfig.baseUrl + '{{ path('journey.fare') }}',
  171. placeFavoritePostPath: oConfig.baseUrl + '{{ path('place.favorite.post') }}',
  172. placeFavoriteDeletePath: oConfig.baseUrl + '{{ path('place.favorite.post') }}',
  173. journeySchedulePath: oConfig.baseUrl + '{{ path('journey.schedule') }}',
  174. contactUrl: '{{ contactUrl }}',
  175. transitPassListPath: '{{ path('transitpass.list') }}',
  176. transitPassPostPath: '{{ path('transitpass.post') }}',
  177. isTransitPassEnabled: {% if isTransitPassEnabled is defined and true == isTransitPassEnabled%}1{% else %}0{% endif %},
  178. sendLogUrl: oConfig.baseUrl + '{{ path('sendlog') }}',
  179. autocompleteMinChars: {{ autocomplete_min_chars is defined ? autocomplete_min_chars : 3 }},
  180. };
  181. disruptionConfig = {
  182. disruptionPath: oConfig.baseUrl + '{{ path('homepage.traffic') }}',
  183. linesAndPoiPath: oConfig.baseUrl + '{{ path('homepage.linesandpoi') }}'
  184. };
  185. alertingConfig = {
  186. alertingCreateSubscriptionsPath: oConfig.baseUrl + '{{ path('alerting.create.subscription') }}',
  187. alertingDeleteSubscriptionsPath: oConfig.baseUrl + '{{ path('alerting.delete.subscription') }}'
  188. };
  189. maasConfig = {
  190. libeloCheckPasswordUrl: '{{ url('bikesharing.check_password', {'bikeSharingType':'libelo'}) }}',
  191. libeloValidateGiftCertificate: '{{ url('bikesharing.validate_gift_certificate', {'bikeSharingType':'libelo'}) }}'
  192. };
  193. schedulesConfig = {
  194. schedulesPath: oConfig.baseUrl + '{{ path('schedule') }}',
  195. lineDirectionListPath: oConfig.baseUrl + '{{ path('line.direction.list') }}',
  196. lineSchedulesPath: oConfig.baseUrl + '{{ path('line.schedule.list.generic') }}',
  197. stopareaSchedulesPath: oConfig.baseUrl + '{{ path('stoparea.schedule.list.generic') }}',
  198. lineSchedulesTodPath: oConfig.baseUrl + '{{ path('line.schedule.tod_list.generic') }}',
  199. localityLinesPath: oConfig.baseUrl + '{{ path('line.locality.list.generic') }}',
  200. getStopPointSchedules: oConfig.baseUrl + '{{ path('stoppoint.schedule.list.generic') }}',
  201. scheduleListPath: oConfig.baseUrl + '{{ path('schedule.list') }}',
  202. bookingStopAreasListPath: oConfig.baseUrl + '{{ path('booking.stoparea.list') }}',
  203. bookingStopAreasDestinationListPath: oConfig.baseUrl + '{{ path('booking.stoparea.destination') }}',
  204. bookingStopAreasTimeSheetsListPath: oConfig.baseUrl + '{{ path('booking.stoparea.timesheets') }}',
  205. createLineStoppointDirectionSchedulePath: oConfig.baseUrl + '{{ path('schedule.favorite.line_stoppoint_direction.post') }}',
  206. scheduleFavoriteListPath: oConfig.baseUrl + '{{ path('schedule.favorite.list') }}',
  207. scheduleFavoriteDeletePath: oConfig.baseUrl + '{{ path('schedule.favorite.post') }}',
  208. scheduleFavoriteLinelistPath: oConfig.baseUrl + '{{ path('schedule.favorite.line.list') }}',
  209. scheduleFavoriteLinePostPath: oConfig.baseUrl + '{{ path('schedule.favorite.line.post') }}',
  210. scheduleFavoriteLineDeletePath: oConfig.baseUrl + '{{ path('schedule.favorite.line.post') }}',
  211. displayAllLinesOnEmptyInputFocus: {{ (app.session is defined and app.session.get('layoutScheduleLine')) ? 'true' : 'false' }}
  212. };
  213. mapConfig = {
  214. zoomDelta: 0,
  215. maxZoom: {{ default_max_zoom }},
  216. minZoom: {{ default_min_zoom }},
  217. geoserver: '{{ geoserver_url }}',
  218. defaultTileLayer: '{{ default_tile_layer }}',
  219. vectorTiles: '{{ vector_tiles }}',
  220. vectorStyle: '{{ vector_style }}',
  221. defaultLatLon: {{ (customLatLon is defined and customLatLon is not empty) ? customLatLon : ((default_latlon is defined and default_latlon is not empty) ? default_latlon : "``") }},
  222. defaultZoom: {{ (customZoom is defined and customZoom is not empty) ? customZoom : default_zoom }},
  223. defaultPoiZoom: {{ default_poi_zoom }},
  224. stoppointUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/map/stop',
  225. addressUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/map/address',
  226. tramUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/map/stop',
  227. aerialliftUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/map/stop',
  228. metroUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/map/stop',
  229. busUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/map/stop',
  230. coachUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/map/stop',
  231. trainUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/map/stop',
  232. parkUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/map/park',
  233. markersUrl: oConfig.baseUrl + '{{ path('map.markers') }}',
  234. checkCustomIconUrl: oConfig.baseUrl + '{{ path('map.checkCustomIcon') }}',
  235. linesShapeUrl: oConfig.baseUrl + '{{ path('map.linesShape') }}',
  236. getAllLinesUrl: oConfig.baseUrl + '{{ path('homepage.getAllLines') }}',
  237. getLinesBySubnetworkUrl: oConfig.baseUrl + '{{ path('homepage.getLinesBySubnetwork') }}',
  238. isochronesUrl: oConfig.baseUrl + '{{ path('map.isochrones') }}',
  239. parkandrideUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/carte/parkandrides',
  240. bikesharingstationUrl: oConfig.baseUrl + '/{{ app.request.attributes.get('_locale') }}/carte/bikesharingstation',
  241. carsharingstationUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/carte/carsharingstation',
  242. securebikeparkUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/carte/securebikepark',
  243. bikeparkUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/carte/bikepark',
  244. chargingstationUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/carte/chargingstation',
  245. bikerentalagencyUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/carte/bikerentalagency',
  246. ridesharingparkUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/map/rideSharingPark',
  247. pointofsaleUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/carte/pointdeventes',
  248. pointofinterestUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/map/pointofinterest',
  249. taxistationUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/map/taxistation',
  250. vehicleUrl: oConfig.baseUrl + '{{ path('map.vehicle') }}',
  251. stopAreaUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/map/stopArea',
  252. lineByStopPointUrl: oConfig.baseUrl + '{{ path('map.lineByStopPoint') }}',
  253. getRideSharingParksUrl: oConfig.baseUrl + '{{ path('map.ridesharingparks') }}',
  254. userPosition: {
  255. latitude: '',
  256. longitude: ''
  257. },
  258. networkPosition: {
  259. latitude: {{ (network_lat is defined and network_lat is not empty) ? network_lat : "''" }},
  260. longitude: {{ (network_lon is defined and network_lon is not empty) ? network_lon : "''" }},
  261. },
  262. widgetPosition: {
  263. latitude: {{ (islat is defined and islat is not empty) ? islat : "''" }},
  264. longitude: {{ (islon is defined and islon is not empty) ? islon : "''" }}
  265. },
  266. operators: {% if operators is defined %}{{ operators | raw }}{% else %}''{% endif %},
  267. icons: {{ icons | json_encode | raw }},
  268. assetsBucketUrl: '{{ cdn_public_url ~ cdn_public_name ~ '/' }}'
  269. };
  270. {% if referer is not defined %}
  271. {% set referer = '' %}
  272. {% endif %}
  273. accountConfig = {
  274. putAccountAddress: '{{ path('account.global.informations') }}',
  275. addAddress: '{{ path('account.global.add_address') }}',
  276. deleteAddress: '{{ path('account.global.delete_address') }}',
  277. saveAddress: '{{ path('account.global.save_address') }}',
  278. homeUserAccountUrl : '{{ path('account') }}',
  279. loginUrl: '{{ absolute_url(path('user_login', {isModal: 'true'})) }}',
  280. resetPasswordUrl: '{{ absolute_url(path('user_reset_password')) }}',
  281. referer: '{{ referer }}',
  282. updateAccountImagePath: oConfig.baseUrl + '{{ path('account.image') }}',
  283. loginMode: '{{ login_mode }}',
  284. isLoggedIn: {{ is_granted('IS_AUTHENTICATED_REMEMBERED') ? 'true' : 'false' }},
  285. {% if userData is defined %}
  286. userMail: '{% if userData.email is defined %}{{ userData.email }}{% endif %}',
  287. userFirstName: '{% if userData.firstname is defined %}{{ userData.firstname }}{% endif %}',
  288. userPhone: '{% if userData.phone is defined %}{{ userData.phone }}{% endif %}'
  289. {% endif %}
  290. };
  291. {% set widgetParamsProvided = (widgetParams is defined and widgetParams is not empty) ? true : false %}
  292. widgetConfig = {
  293. isWidget: {% if isWidget is defined and isWidget is same as(true) %}true{% else %}false{% endif %},
  294. widgetRequestReferer: '{% if requestReferer is defined and requestReferer is not empty %}{{ requestReferer | raw }}{% endif %}',
  295. isRedirection: {% if isRedirection is defined and isRedirection is same as(true) %}true{% else %}false{% endif %},
  296. isInternal: {% if isInternal is defined and isInternal is same as(true) %}true{% else %}false{% endif %},
  297. isSplit: {% if isSplit is defined and isSplit is same as(false) %}false{% else %}true{% endif %},
  298. widgetTarget: '{% if widgetTarget is defined %}{{ widgetTarget }}{% endif %}',
  299. isPartner: '{% if isPartner is defined %}{{ isPartner }}{% endif %}',
  300. istoken: '{% if istoken is defined %}{{ istoken }}{% endif %}',
  301. isfid: "{% if isfid is defined %}{{ isfid | raw }}{% endif %}",
  302. isfv: "{% if isfv is defined %}{{ isfv | raw }}{% endif %}",
  303. istid: "{% if istid is defined %}{{ istid | raw }}{% endif %}",
  304. istv: "{% if istv is defined %}{{ istv | raw }}{% endif %}",
  305. isflat: "{% if isflat is defined %}{{ isflat }}{% endif %}",
  306. isflon: "{% if isflon is defined %}{{ isflon }}{% endif %}",
  307. istlat: "{% if istlat is defined %}{{ istlat }}{% endif %}",
  308. istlon: "{% if istlon is defined %}{{ istlon }}{% endif %}",
  309. islid: '{% if islid is defined %}{{ islid }}{% endif %}',
  310. isdir: '{% if isdir is defined %}{{ isdir }}{% endif %}',
  311. issaid: '{% if issaid is defined %}{{ issaid }}{% endif %}',
  312. issav: '{% if issav is defined %}{{ issav }}{% endif %}',
  313. islocid: '{% if islocid is defined %}{{ islocid }}{% endif %}',
  314. isspid: '{% if isspid is defined %}{{ isspid }}{% endif %}',
  315. issubnet: '{% if issubnet is defined %}{{ issubnet }}{% endif %}',
  316. ismode: '{% if ismode is defined %}{{ ismode }}{% endif %}',
  317. islsn: '{% if islsn is defined %}{{ islsn }}{% endif %}',
  318. issubnetworks: '{% if issubnetworks is defined %}{{ issubnetworks }}{% endif %}',
  319. widgetParams: {
  320. css: {{ ((isWidget is not defined or (isWidget is defined and isWidget is not same as(true))) and (widgetParamsProvided and widgetParams['css'] is defined and not widgetParams['css'])) ? 'false' : 'true' }},
  321. autocompleteModal: {{ network_id == 22 ? 'true' : 'false' }}
  322. },
  323. {% if widgetType is defined and widgetType is not empty %}
  324. widgetType: '{{ widgetType }}',
  325. {% endif %}
  326. };
  327. window.i18n = {
  328. showMenu: "{{ 'nav.show_menu' | trans }}",
  329. hideMenu: "{{ 'nav.hide_menu' | trans }}",
  330. datetimeFormat: "{{ 'date.datetimeFormat' | trans }}",
  331. dateFormat: "{{ 'date.dateFormat' | trans }}",
  332. displayedDateFormat: "{{ 'date.displayedDateFormat' | trans }}",
  333. labelDateFormat: "{{ 'date.labelDateFormat' | trans }}",
  334. timeFormat: "{{ 'date.timeFormat' | trans }}",
  335. displayedTimeFormat: "{{ 'date.displayedTimeFormat' | trans }}",
  336. prevDateButtonLabel: "{{ 'date.prevDateButtonLabel' | trans }}",
  337. nextDateButtonLabel: "{{ 'date.nextDateButtonLabel' | trans }}",
  338. prevTimeButtonLabel: "{{ 'date.prevTimeButtonLabel' | trans }}",
  339. nextTimeButtonLabel: "{{ 'date.nextTimeButtonLabel' | trans }}",
  340. departureTime: "{{ 'date.departureTime' | trans }}",
  341. close: "{{ 'close' | trans }}",
  342. leaveFrom: "{{ 'map.context-menu.start' | trans }}",
  343. goTo: "{{ 'map.context-menu.arrival' | trans }}",
  344. centerHere: "{{ 'map.context-menu.center-here' | trans }}",
  345. accessTime: "{{ 'isochrones.access_time' | trans }}",
  346. address: "{{ 'isochrones.address' | trans }}",
  347. zoomIn: '{{ 'map.context-menu.zoom-in' | trans }}',
  348. zoomOut: '{{ 'map.context-menu.zoom-out' | trans }}',
  349. start: '{{ 'journey.departure' | trans | lower }}',
  350. arrival: '{{ 'journey.arrival' | trans | lower }}',
  351. stage_placeholder: '{{ 'journey.stage_placeholder' | trans }}',
  352. from : '{{ 'from' | trans | capitalize }}',
  353. deleteAccountSuccess: '{{ 'user.account_delete.success' | trans }}',
  354. label: {
  355. dateNotAvailable: "{{ 'schedule.label.date_not_available' | trans }}"
  356. },
  357. popup: {
  358. leave: "{{ 'map.popup.leave' | trans }}",
  359. goTo: "{{ 'map.popup.go-to' | trans }}",
  360. stepVia: "{{ 'map.popup.step-via' | trans }}",
  361. streetView: "{{ 'map.popup.street-view' | trans }}",
  362. favorite: "{{ 'map.popup.favorite' | trans }}"
  363. },
  364. messagesErrors: {
  365. errorInternetConnection: "{{ 'messagesErrors.errorInternetConnection' | trans }}",
  366. refreshBrowser: "{{ 'messagesErrors.refreshBrowser' | trans }}",
  367. errorServer: "{{ 'messagesErrors.errorServer' | trans }}",
  368. itineraryNotAvailable: "{{ 'itinerary.not_available' | trans }}",
  369. tryLater: "{{ 'try_later' | trans }}",
  370. emptyVia: "{{ 'messagesErrors.place.empty.via' | trans }}",
  371. emptySchedule: "{{ 'messagesErrors.schedule.empty.emptySchedule' | trans }}",
  372. invalidSchedule: "{{ 'messagesErrors.schedule.invalid.invalidSchedule' | trans }}",
  373. emptyModes: "{{ 'messagesErrors.place.empty.modes' | trans }}",
  374. emptyDeparture: "{{ 'messagesErrors.place.empty.from' | trans }}",
  375. emptyArrival: "{{ 'messagesErrors.place.empty.to' | trans }}",
  376. emptyDepartureArrival: "{{ 'messagesErrors.place.empty.emptyDepartureAndArrival' | trans}}",
  377. invalidDeparture: "{{ 'messagesErrors.place.invalid.departure' | trans }}",
  378. invalidArrival: "{{ 'messagesErrors.place.invalid.arrival' | trans }}",
  379. invalidVia: "{{ 'messagesErrors.place.invalid.via' | trans }}",
  380. emptyUsername: "{{ 'messagesErrors.userAccount.emptyUsername' | trans }}",
  381. emptyPassword: "{{ 'messagesErrors.userAccount.emptyPassword' | trans }}",
  382. wrongUsername: "{{ 'messagesErrors.userAccount.wrongUsername' | trans }}",
  383. infoPassword: "{{ 'subscription.password_min_characters' | trans }}",
  384. Email: "{{ 'messagesErrors.userAccount.emptyEmail' | trans }}",
  385. emptyCode: "{{ 'messagesErrors.userAccount.emptyCode' | trans }}",
  386. emptyFirstname: "{{ 'messagesErrors.userAccount.emptyFirstname' | trans }}",
  387. emptyLastname: "{{ 'messagesErrors.userAccount.emptyLastname' | trans }}",
  388. emptyPassword: "{{ 'messagesErrors.userAccount.emptyPassword' | trans }}",
  389. emptyPasswordConfirm: "{{ 'messagesErrors.userAccount.emptyPasswordConfirm' | trans }}",
  390. wrongPasswordAndConfirm: "{{ 'subscription.wrong_passwords' | trans }}",
  391. helpMessageItinerary: "{{ 'messagesError.place.chooseFromList' | trans}}",
  392. errorOccured: "{{ 'error.occured' | trans }}"
  393. },
  394. positive_elevation: "{{ 'positive_elevation' | trans }} ",
  395. distance_km: "{{ 'distance_km' | trans }} ",
  396. altitude_m: "{{ 'altitude_m' | trans }} ",
  397. geolocation_not_supported_by_browser: "{{ 'geolocation_not_supported_by_browser' | trans }} ",
  398. favoriteAddButton: "{{ 'place.favorite.action.add' | trans }}",
  399. favoriteEditButton: "{{ 'place.favorite.action.edit' | trans }}",
  400. favorite: {
  401. addModalLabel: "{{ 'place.favorite.add_modal.label' | trans }}",
  402. addModalValidate: "{{ 'place.favorite.add_modal.validate' | trans }}",
  403. editModalLabel: "{{ 'place.favorite.edit_modal.label' | trans }}",
  404. deleteConfirm: "{{ 'place.favorite.delete_confirm' | trans }}",
  405. deleteLabel: "{{ 'place.favorite.delete_label' | trans }}",
  406. deleteValidate: "{{ 'place.favorite.delete_validate' | trans }}",
  407. picto: {
  408. 'home': "{{ 'place.favorite.picto.home' | trans }}",
  409. 'work': "{{ 'place.favorite.picto.work' | trans }}",
  410. 'unset': "{{ 'place.favorite.picto.unset' | trans }}"
  411. },
  412. editModalTitle: {
  413. 'home': "{{ 'place.favorite.edit_modal.homeTitle' | trans }}",
  414. 'work': "{{ 'place.favorite.edit_modal.workTitle' | trans }}"
  415. },
  416. editModalSave: "{{ 'place.favorite.edit_modal.save' | trans }}",
  417. editModalUpdate: "{{ 'place.favorite.edit_modal.update' | trans }}",
  418. editModalCancel: "{{ 'place.favorite.edit_modal.cancel' | trans }}",
  419. editModalPlaceholder: "{{ 'place.favorite.edit_modal.placeholder' | trans }}",
  420. subscribeAlert: "{{ 'place.favorite.action.subscribe_alert' | trans }}",
  421. unsubscribeAlert: "{{ 'place.favorite.action.unsubscribe_alert' | trans }}",
  422. subscribeAlertSuccess: "{{ 'place.favorite.info.favorite_success' | trans}}",
  423. subscribeAlertError: "{{ 'place.favorite.info.favorite_error' | trans}}",
  424. unsubscribeAlertSuccess: "{{ 'place.favorite.info.unsubscribe_favorite_success' | trans}}",
  425. unsubscribeAlertError: "{{ 'place.favorite.info.unsubscribe_favorite_error' | trans}}",
  426. scheduleSubscribeAlertSuccess: "{{ 'schedule.favorite.info.favorite_success' | trans}}",
  427. scheduleSubscribeAlertError: "{{ 'schedule.favorite.info.favorite_error' | trans}}",
  428. scheduleUnsubscribeAlertSuccess: "{{ 'schedule.favorite.info.unsubscribe_favorite_success' | trans}}",
  429. scheduleUnsubscribeAlertError: "{{ 'schedule.favorite.info.unsubscribe_favorite_error' | trans}}",
  430. noResultMessage: "{{ 'place.favorite.no_result_message' | trans}}",
  431. schedule: {
  432. addModalLabel: "{{ 'schedule.favorite.add_modal' | trans }}",
  433. deleteConfirm: "{{ 'schedule.favorite.delete_confirm' | trans }}",
  434. linePlaceholder: "{{ 'schedule.favorite.inputs.line.placeholder' | trans }}",
  435. directionPlaceholder: "{{ 'schedule.favorite.inputs.direction.placeholder' | trans }}",
  436. stoppointPlaceholder: "{{ 'schedule.favorite.inputs.stoppoint.placeholder' | trans }}",
  437. lineLabel: "{{ 'schedule.favorite.inputs.line.label' | trans }}",
  438. directionLabel: "{{ 'schedule.favorite.inputs.direction.label' | trans }}",
  439. stoppointLabel: "{{ 'schedule.favorite.inputs.stoppoint.label' | trans }}",
  440. addModalSave: "{{ 'schedule.favorite.action.add' | trans }}",
  441. addModalCancel: "{{ 'schedule.favorite.action.cancel' | trans }}",
  442. addNewButton: "{{ 'schedule.favorite.add_new_button' | trans }}",
  443. noResultMessage: "{{ 'schedule.favorite.no_result_message' | trans }}"
  444. }
  445. },
  446. schedules: {
  447. modalInputLabel: '{{ 'widgets_tabs.schedules' | trans }}',
  448. nextDepartures: '{{ 'schedule.next_departures' | trans }}',
  449. stopAreaLines: '{{ 'schedule.lines_in_this_stoparea' | trans }}',
  450. direction: '{{ 'schedule.direction' | trans }}',
  451. add_to_favorites: "{{ 'schedule.add_to_favorites' | trans }}",
  452. remove_from_favorites: "{{ 'schedule.remove_from_favorites' | trans }}"
  453. },
  454. poi: {
  455. totalPark: '{{ 'poi.totalPark' | trans }}',
  456. covered: '{{ 'poi.covered' | trans }}',
  457. notCovered: '{{ 'poi.notCovered' | trans }}',
  458. network: '{{ 'poi.network' | trans }}',
  459. availableParks: "{{ 'journey.available_parks' | trans | raw }}",
  460. bikesAvailable: "{{ 'journey.available_bikes' | trans | raw }}",
  461. bikeChance: "{{ 'journey.available_bikes_chance' | trans | raw }}",
  462. standChance: "{{ 'journey.available_stands_chance' | trans | raw }}",
  463. capacity: '{{ 'journey.park_capacity' | trans | raw }}',
  464. bikepark: '{{ 'poi.bikepark' | trans}}',
  465. bikerentalagency: '{{ 'poi.bikerentalagency' | trans }}',
  466. plateNumber: '{{ 'journey.freefloatingvehiclecheckin.plate_number' | trans }}',
  467. parkAndRide: ' {{ 'PARKANDRIDE' | trans }}',
  468. ridesharingpark: '{{ 'mode.ridesharingpark' | trans }}',
  469. carsharingstation: ' {{ 'place.favorite.type.carsharingstation' | trans }}',
  470. parking: ' {{ 'poi.parking' | trans }}',
  471. securebikepark: ' {{ 'mode.securebikepark' | trans }}',
  472. taxistation: ' {{ 'poi.taxistation' | trans }}',
  473. chargingstation: ' {{ 'poi.chargingstation' | trans }}',
  474. bikesharingstation: '{{ 'mode.bikesharingstation'|trans }}',
  475. parkandride: '{{ 'mode.parkandride'|trans }}'
  476. },
  477. alt: {
  478. park: '{{ 'poi.alt.park' | trans }}',
  479. parkandride: '{{ 'poi.alt.parkandride' | trans }}',
  480. bikesharingstation: '{{ 'poi.alt.bikesharingstation' | trans }}',
  481. bikepark: '{{ 'poi.alt.bikepark' | trans }}',
  482. chargingstation: '{{ 'poi.alt.chargingstation' | trans }}',
  483. freefloatingvehiclecheckin: '{{ 'poi.alt.freefloatingvehiclecheckin' | trans }}'
  484. },
  485. disruption: {
  486. network: '{{ 'traffic_infos.network' | trans}}'
  487. },
  488. addToCalendar: {
  489. addToMyCalendar: '{{ 'user.add_to_my_calendar'|trans }}',
  490. journey: {
  491. title: '{{ 'journey.add_to_calendar.title'|trans }}',
  492. desc: {
  493. departure: '{{ 'journey.add_to_calendar.desc.departure'|trans }}',
  494. arrival: '{{ 'journey.add_to_calendar.desc.arrival'|trans }}',
  495. from: '{{ 'journey.add_to_calendar.desc.from'|trans|raw }}',
  496. to: '{{ 'journey.add_to_calendar.desc.to'|trans|raw }}'
  497. }
  498. }
  499. },
  500. travellerProfile: {
  501. noSubscription: '{{ 'journey.traveller_profile.no_subscriptions'|trans }}',
  502. emptySubscriptionListError: '{{ 'journey.traveller_profile.subscriptions_modal.error.empty_subscriptions_list'|trans }}',
  503. mySubscriptions: '{{ 'journey.traveller_profile.my_subscriptions'|trans }}',
  504. publicTransportsTitle: '{{ 'journey.traveller_profile.subscriptions_modal.public_transports.title'|trans }}',
  505. publicTransportsSubtitle: '{{ 'journey.traveller_profile.subscriptions_modal.public_transports.subtitle'|trans }}',
  506. othersModesTitle: '{{ 'journey.traveller_profile.subscriptions_modal.others_modes.title'|trans }}',
  507. othersModesSubtitle: '{{ 'journey.traveller_profile.subscriptions_modal.others_modes.subtitle'|trans }}',
  508. saveAndLeave: '{{ 'journey.traveller_profile.subscriptions_modal.save_and_leave'|trans }}',
  509. continue: '{{ 'journey.traveller_profile.subscriptions_modal.continue'|trans }}',
  510. back: '{{ 'journey.traveller_profile.subscriptions_modal.back'|trans }}',
  511. leave: '{{ 'journey.traveller_profile.subscriptions_modal.leave'|trans }}',
  512. i_understood: '{{ 'journey.traveller_profile.subscriptions_infos_modal.i_understood'|trans }}',
  513. configurationRecordingError: '{{ 'journey.traveller_profile.subscriptions_modal.error.configuration_recording_failed'|trans }}',
  514. configurationSavedTitle: '{{ 'journey.traveller_profile.subscriptions_modal.configuration_saved'|trans }}',
  515. configurationSavedMessage: '{{ 'journey.traveller_profile.subscriptions_modal.configuration_saved_message'|trans }}'
  516. },
  517. ticketing: {
  518. refundConfirmationTitle: '{{ 'ticketing.account.etickets.refund.modal.success.title' | trans }}',
  519. arrival_city: '{{ 'ticketing.zou_etudes.informations_form.journey.arrival_city.label' | trans }}',
  520. departure_city: '{{ 'ticketing.zou_etudes.informations_form.journey.departure_city.label' | trans }}',
  521. arrival_station: '{{ 'ticketing.zou_etudes.informations_form.journey.arrival_station.label' | trans }}',
  522. departure_station: '{{ 'ticketing.zou_etudes.informations_form.journey.departure_station.label' | trans }}',
  523. choose: '{{ 'ticketing.filters.choose' | trans }}'
  524. },
  525. meta: {
  526. appTitle: "{{ 'app_title'| trans | raw }}",
  527. journeyTitle: "{{ 'meta.journey.title' | trans | raw }}",
  528. journeyDescription: "{{ 'meta.journey.description' | trans | raw }}",
  529. journeyKeywords: "{{ 'meta.home.keywords' | trans | raw }}",
  530. scheduleTitle: "{{ 'meta.schedule.schedule.title_new_format' | trans | raw}}",
  531. scheduleDescription: "{{ 'meta.schedule.line-schedules.description_new_format' | trans | raw }}",
  532. scheduleKeywords: "{{ 'meta.schedule.keywords' | trans | raw }}",
  533. scheduleText: "{{ 'meta.schedule.schedule.keyword'| trans }}",
  534. disruptionTitle: "{{ 'meta.disruption.title' | trans | raw }}",
  535. disruptionDescription: "{{ 'meta.disruption.description' | trans | raw }}",
  536. disruptionKeywords: "{{ 'meta.disruption.keywords' | trans | raw }}",
  537. disruptionText: "{{ 'disruptions.line'| trans }}",
  538. mapTitle: "{{ 'meta.map.title' | trans | raw }}",
  539. mapDescription: "{{ 'meta.map.description' | trans | raw }}",
  540. mapKeywords: "{{ 'meta.map.keywords' | trans | raw }}",
  541. scheduleText: "{{ 'meta.schedule.schedule.keyword'| trans }}"
  542. }
  543. };
  544. var extend = function(out) {
  545. out = out || {};
  546. for (var i = 1; i < arguments.length; i++) {
  547. var obj = arguments[i];
  548. if (!obj) {
  549. continue;
  550. }
  551. for (var key in obj) {
  552. if (obj.hasOwnProperty(key)) {
  553. out[key] = obj[key];
  554. }
  555. }
  556. }
  557. return out;
  558. };
  559. {#{% if isWidget is defined and isWidget %}#}
  560. extend(window.oConfig, window.oConfig, newsConfig, journeyConfig, ticketingConfig, schedulesConfig, alertingConfig, maasConfig, disruptionConfig, mapConfig, accountConfig, widgetConfig);
  561. {#{% endif %}#}