Skip to content

Commit

Permalink
feat: Translate Android native permission popup for geolocation tracking
Browse files Browse the repository at this point in the history
{backgroundPermissionOptionLabel} variable is interpolated by react-native-background-geolocation
  • Loading branch information
zatteo committed Nov 8, 2023
1 parent e74618d commit 3c14929
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app/domain/geolocation/tracking/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
clearAllData,
getFlagFailUpload
} from '/app/domain/geolocation/tracking/storage'
import { t } from '/locales/i18n'

export { Log, getAllLogs, sendLogFile } from '/app/domain/geolocation/helpers'
export { getOrCreateId, updateId } from '/app/domain/geolocation/tracking/user'
Expand Down Expand Up @@ -62,8 +63,9 @@ export const startTracking = async () => {
enableHeadless: true,
foregroundService: true,
backgroundPermissionRationale: {
message:
'Mémoriser vos déplacements nécessite de ≪ {backgroundPermissionOptionLabel} ≫'
message: t(
'services.geolocationTracking.androidBackgroundPermissionMessage'
)
}
})
await BackgroundGeolocation.start()
Expand Down
3 changes: 3 additions & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@
"onProgressMessage": "A file is being uploaded"
}
},
"geolocationTracking": {
"androidBackgroundPermissionMessage": "Recording your movements requires to ≪ {backgroundPermissionOptionLabel} ≫"
},
"osReceive": {
"documentType": "Document Type:",
"submit": "Next",
Expand Down
3 changes: 3 additions & 0 deletions src/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@
"onProgressMessage": "Un fichier est en cours d'envoi"
}
},
"geolocationTracking": {
"androidBackgroundPermissionMessage": "Mémoriser vos déplacements nécessite de ≪ {backgroundPermissionOptionLabel} ≫"
},
"osReceive": {
"documentType": "Type de document :",
"submit": "Suivant",
Expand Down

0 comments on commit 3c14929

Please sign in to comment.