diff --git a/src/components/AppHighlightAlert/GeolocationTrackingAppHighlightAlert.jsx b/src/components/AppHighlightAlert/GeolocationTrackingAppHighlightAlert.jsx index 0e90815276..604e5c8398 100644 --- a/src/components/AppHighlightAlert/GeolocationTrackingAppHighlightAlert.jsx +++ b/src/components/AppHighlightAlert/GeolocationTrackingAppHighlightAlert.jsx @@ -1,7 +1,6 @@ import React, { useState } from 'react' import flag from 'cozy-flags' -import { isFlagshipApp } from 'cozy-device-helper' import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n' import AppHighlightAlert from 'components/AppHighlightAlert/AppHighlightAlert' @@ -15,12 +14,12 @@ const isAvailable = () => { const bikegoalSettings = flag('coachco2.bikegoal.settings') return ( - isFlagshipApp() && flag('home.push.coachco2.opencount') && flag('home.push.coachco2.opencount') >= 0 && (!bikegoalSettings || - bikegoalSettings.sourceId === null || - (bikegoalSettings.sourceId !== null && flag('coachco2.bikegoal.enabled'))) + bikegoalSettings.sourceOffer === null || + (bikegoalSettings.sourceOffer !== null && + flag('coachco2.bikegoal.enabled'))) ) } @@ -67,13 +66,13 @@ const onDisplayed = () => { const getAlertDescription = t => { const bikegoalSettings = flag('coachco2.bikegoal.settings') - if (bikegoalSettings?.sourceId) { - if (bikegoalSettings.sourceId === 'employer') { + if (bikegoalSettings?.sourceOffer) { + if (bikegoalSettings.sourceOffer === 'employer') { return t( 'appHighlightAlert.geolocationTracking.bikegoalSourceEmployerDescription', { sourceType: bikegoalSettings.sourceType, - sourceIdentity: bikegoalSettings.sourceIdentity + sourceName: bikegoalSettings.sourceName } ) } else { @@ -81,7 +80,7 @@ const getAlertDescription = t => { 'appHighlightAlert.geolocationTracking.bikegoalSourceDefaultDescription', { sourceType: bikegoalSettings.sourceType, - sourceIdentity: bikegoalSettings.sourceIdentity + sourceName: bikegoalSettings.sourceName } ) } diff --git a/src/locales/en.json b/src/locales/en.json index 23bf7a1dc0..758ece1c48 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -590,8 +590,8 @@ "appHighlightAlert": { "geolocationTracking": { "defaultDescription": "Track your travel and carbon footprint with the CO2 Coach", - "bikegoalSourceEmployerDescription": "Your %{sourceType} %{sourceIdentity} invites you to take part in improving the area and benefit from the \"prime vélo\", this application will help you measure its progress, and much more!", - "bikegoalSourceDefaultDescription": "Your %{sourceType} %{sourceIdentity} invites you to play your part in improving the region. Save and analyse your journeys!" + "bikegoalSourceEmployerDescription": "Your %{sourceType} %{sourceName} invites you to take part in improving the area and benefit from the \"prime vélo\", this application will help you measure its progress, and much more!", + "bikegoalSourceDefaultDescription": "Your %{sourceType} %{sourceName} invites you to play your part in improving the region. Save and analyse your journeys!" } } } diff --git a/src/locales/fr.json b/src/locales/fr.json index 51c8acb523..0ab003d168 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -590,8 +590,8 @@ "appHighlightAlert": { "geolocationTracking": { "defaultDescription": "Suivez vos déplacements et votre empreinte carbone avec le Coach CO2", - "bikegoalSourceEmployerDescription": "Votre %{sourceType} %{sourceIdentity} vous invite à participer à l’amélioration du territoire et bénéficier de la \"prime vélo\", cette application vous aidera à mesurer son avancement, et bien plus !", - "bikegoalSourceDefaultDescription": "Votre %{sourceType} %{sourceIdentity} vous invite à participer à l'amélioration du territoire, mémorisez et analysez vos déplacements !" + "bikegoalSourceEmployerDescription": "Votre %{sourceType} %{sourceName} vous invite à participer à l’amélioration du territoire et bénéficier de la \"prime vélo\", cette application vous aidera à mesurer son avancement, et bien plus !", + "bikegoalSourceDefaultDescription": "Votre %{sourceType} %{sourceName} vous invite à participer à l'amélioration du territoire, mémorisez et analysez vos déplacements !" } } }