Skip to content

ERA-11239: track styles: patrol tracks #1244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 21 additions & 26 deletions public/locales/en-US/tracks.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,18 @@
{
"patrolTrackLegend": {
"multiplePatrolsTitle": "{{count}} patrols",
"singlePatrolTitle": "Patrol: {{patrolDisplayTitle}}",
"titleElement": {
"coveredSpan": " covered",
"icon": "Icon for {{title}}",
"lengthCovered": "{{length}} covered",
"removeButton": "remove"
}
"icon": "Icon for {{title}}",
"itemDescription": "{{length}} covered",
"trackLegendItemsName": "patrols"
},
"subjectTrackLegend": {
"description": "{{pointCount}} points over {{trackTime}}",
"itemDescription_one": "{{count}} point",
"itemDescription_other": "{{count}} points",
"itemIcon": "Icon for {{title}}",
"trackLegendItemsName": "subjects"
},
"trackLegend": {
"clearTracksButton": "Clear Tracks",
"icon": "Icon for {{title}}",
"multipleSubjectTracksTitle": "{{count}} subjects",
"pointsOverTime": "{{pointCount}} points over {{trackTime}}",
"subjectTrackList": {
"closeButtonLabel": "Close the list of subjects",
"subjectTracksItem": {
"icon": "Icon for {{title}}",
"pointCount_one": "{{count}} point",
"pointCount_other": "{{count}} points",
"removeButton": "Remove",
"removeButtonLabel": "Remove {{title}}"
},
"title": "Subjects"
},
"subjectTracksListButtonLabel": {
"closed": "Open the list of subjects",
"open": "Close the list of subjects"
},
"timeOfDaySettings": {
"chevronButtonLabel": {
"closed": "Expand the time of day settings",
Expand All @@ -55,6 +39,17 @@
"active": "Deactivate the time of day coloring",
"inactive": "Activate the time of day coloring"
},
"tracksList": {
"closeButtonLabel": "Close the list of {{itemsName}}",
"tracksItem": {
"removeButton": "Remove",
"removeButtonLabel": "Remove {{title}}"
}
},
"tracksListButtonLabel": {
"closed": "Open the list of {{itemsName}}",
"open": "Close the list of {{itemsName}}"
},
"trackSettings": {
"closeButtonLabel": "Close the track settings",
"customLengthErrorMessage": "Please enter a track length between {{min}} and {{max}}.",
Expand Down
47 changes: 21 additions & 26 deletions public/locales/es/tracks.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,18 @@
{
"patrolTrackLegend": {
"multiplePatrolsTitle": "{{count}} patrullas",
"singlePatrolTitle": "Patrulla: {{patrolDisplayTitle}}",
"titleElement": {
"coveredSpan": " cubiertas",
"icon": "Ícono para {{title}}",
"lengthCovered": "{{length}} cubiertos",
"removeButton": "remover"
}
"icon": "Ícono para {{title}}",
"itemDescription": "{{length}} cubiertos",
"trackLegendItemsName": "patrullas"
},
"subjectTrackLegend": {
"description": "{{pointCount}} puntos en {{trackTime}}",
"itemDescription_one": "{{count}} punto",
"itemDescription_other": "{{count}} puntos",
"itemIcon": "Icono para {{title}}",
"trackLegendItemsName": "sujetos"
},
"trackLegend": {
"clearTracksButton": "Limpiar trayectorias",
"icon": "Icono para {{title}}",
"multipleSubjectTracksTitle": "{{count}} sujetos",
"pointsOverTime": "{{pointCount}} puntos en {{trackTime}}",
"subjectTrackList": {
"closeButtonLabel": "Cerrar la lista de sujetos",
"subjectTracksItem": {
"icon": "Icono para {{title}}",
"pointCount_one": "{{count}} punto",
"pointCount_other": "{{count}} puntos",
"removeButton": "Eliminar",
"removeButtonLabel": "Eliminar a {{title}}"
},
"title": "Sujetos"
},
"subjectTracksListButtonLabel": {
"closed": "Abrir la lista de sujetos",
"open": "Cerrar la lista de sujetos"
},
"timeOfDaySettings": {
"chevronButtonLabel": {
"closed": "Expandir la configuración de la hora del día",
Expand All @@ -55,6 +39,17 @@
"active": "Desactivar la coloración por hora del día",
"inactive": "Activar la coloración por hora del día"
},
"tracksList": {
"closeButtonLabel": "Cerrar la lista de {{itemsName}}",
"tracksItem": {
"removeButton": "Eliminar",
"removeButtonLabel": "Eliminar a {{title}}"
}
},
"tracksListButtonLabel": {
"closed": "Abrir la lista de {{itemsName}}",
"open": "Cerrar la lista de {{itemsName}}"
},
"trackSettings": {
"closeButtonLabel": "Cerrar la configuración de trayectorias",
"customLengthErrorMessage": "Por favor, introduce una duración de trayectoria entre {{min}} y {{max}}.",
Expand Down
47 changes: 21 additions & 26 deletions public/locales/fr/tracks.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,18 @@
{
"patrolTrackLegend": {
"multiplePatrolsTitle": "{{count}} patrouilles",
"singlePatrolTitle": "Patrouille: {{patrolDisplayTitle}}",
"titleElement": {
"coveredSpan": "parcourue",
"icon": "Icône pour {{title}}",
"lengthCovered": "{{length}} parcourue",
"removeButton": "retirer"
}
"icon": "Icône pour {{title}}",
"itemDescription": "{{length}} parcourue",
"trackLegendItemsName": "patrouilles"
},
"subjectTrackLegend": {
"description": "{{pointCount}} points sur {{trackTime}}",
"itemDescription_one": "{{count}} point",
"itemDescription_other": "{{count}} points",
"itemIcon": "Icône pour {{title}}",
"trackLegendItemsName": "sujets"
},
"trackLegend": {
"clearTracksButton": "Effacer les trajectoires",
"icon": "Icône pour {{title}}",
"multipleSubjectTracksTitle": "{{count}} sujets",
"pointsOverTime": "{{pointCount}} points sur {{trackTime}}",
"subjectTrackList": {
"closeButtonLabel": "Fermer la liste des sujets",
"subjectTracksItem": {
"icon": "Icône pour {{title}}",
"pointCount_one": "{{count}} point",
"pointCount_other": "{{count}} points",
"removeButton": "Supprimer",
"removeButtonLabel": "Supprimer {{title}}"
},
"title": "Sujets"
},
"subjectTracksListButtonLabel": {
"closed": "Ouvrir la liste des sujets",
"open": "Fermer la liste des sujets"
},
"timeOfDaySettings": {
"chevronButtonLabel": {
"closed": "Développer les paramètres de l'heure de la journée",
Expand All @@ -55,6 +39,17 @@
"active": "Désactiver la coloration par heure de la journée",
"inactive": "Activer la coloration par heure de la journée"
},
"tracksList": {
"closeButtonLabel": "Fermer la liste des {{itemsName}}",
"tracksItem": {
"removeButton": "Supprimer",
"removeButtonLabel": "Supprimer {{title}}"
}
},
"tracksListButtonLabel": {
"closed": "Ouvrir la liste des {{itemsName}}",
"open": "Fermer la liste des {{itemsName}}"
},
"trackSettings": {
"closeButtonLabel": "Fermer les paramètres des trajectoires",
"customLengthErrorMessage": "Veuillez entrer une durée de trajectoire entre {{min}} et {{max}}.",
Expand Down
47 changes: 21 additions & 26 deletions public/locales/ne-NP/tracks.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,18 @@
{
"patrolTrackLegend": {
"multiplePatrolsTitle": "{{count}} गस्तीहरु",
"singlePatrolTitle": "गस्ती: {{patrolDisplayTitle}}",
"titleElement": {
"coveredSpan": "ढाकिएको",
"icon": "{{title}}को लागि आइकन",
"lengthCovered": "{{length}} ढाकिएको",
"removeButton": "हटाउनुहोस्"
}
"icon": "{{title}}को लागि आइकन",
"itemDescription": "{{length}} ढाकिएको",
"trackLegendItemsName": "गस्तीहरु"
},
"subjectTrackLegend": {
"description": "{{trackTime}} मा {{pointCount}} पोइन्टहरू",
"itemDescription_one": "{{count}} पोइन्ट",
"itemDescription_other": "{{count}} पोइन्टहरू",
"itemIcon": "{{title}} को आइकन",
"trackLegendItemsName": "विषयहरू"
},
"trackLegend": {
"clearTracksButton": "ट्र्याकहरू खाली गर्नुहोस्",
"icon": "{{title}} को आइकन",
"multipleSubjectTracksTitle": "{{count}} विषयहरू",
"pointsOverTime": "{{trackTime}} मा {{pointCount}} पोइन्टहरू",
"subjectTrackList": {
"closeButtonLabel": "विषयहरूको सूची बन्द गर्नुहोस्",
"subjectTracksItem": {
"icon": "{{title}} को आइकन",
"pointCount_one": "{{count}} पोइन्ट",
"pointCount_other": "{{count}} पोइन्टहरू",
"removeButton": "हटाउनुहोस्",
"removeButtonLabel": "{{title}} हटाउनुहोस्"
},
"title": "विषयहरू"
},
"subjectTracksListButtonLabel": {
"closed": "विषयहरूको सूची खोल्नुहोस्",
"open": "विषयहरूको सूची बन्द गर्नुहोस्"
},
"timeOfDaySettings": {
"chevronButtonLabel": {
"closed": "दिनको समय सेटिङ विस्तार गर्नुहोस्",
Expand All @@ -55,6 +39,17 @@
"active": "दिनको समय अनुसार रंग निष्क्रिय गर्नुहोस्",
"inactive": "दिनको समय अनुसार रंग सक्रिय गर्नुहोस्"
},
"tracksList": {
"closeButtonLabel": "{{itemsName}} को सूची बन्द गर्नुहोस्",
"tracksItem": {
"removeButton": "हटाउनुहोस्",
"removeButtonLabel": "{{title}} हटाउनुहोस्"
}
},
"tracksListButtonLabel": {
"closed": "{{itemsName}} को सूची खोल्नुहोस्",
"open": "{{itemsName}} को सूची बन्द गर्नुहोस्"
},
"trackSettings": {
"closeButtonLabel": "ट्र्याक सेटिङहरू बन्द गर्नुहोस्",
"customLengthErrorMessage": "कृपया {{min}} देखि {{max}} को बीचमा ट्र्याक लम्बाइ प्रविष्ट गर्नुहोस्।",
Expand Down
47 changes: 21 additions & 26 deletions public/locales/pt/tracks.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,18 @@
{
"patrolTrackLegend": {
"multiplePatrolsTitle": "{{count}} patrulhas",
"singlePatrolTitle": "Patrulha: {{patrolDisplayTitle}}",
"titleElement": {
"coveredSpan": "Percorrido",
"icon": "Ícone para {{title}}",
"lengthCovered": "{{length}} percorridos",
"removeButton": "Remover"
}
"icon": "Ícone para {{title}}",
"itemDescription": "{{length}} percorridos",
"trackLegendItemsName": "patrulhas"
},
"subjectTrackLegend": {
"description": "{{pointCount}} pontos ao longo de {{trackTime}}",
"itemDescription_one": "{{count}} ponto",
"itemDescription_other": "{{count}} pontos",
"itemIcon": "Ícone para {{title}}",
"trackLegendItemsName": "sujeitos"
},
"trackLegend": {
"clearTracksButton": "Limpar trajetórias",
"icon": "Ícone para {{title}}",
"multipleSubjectTracksTitle": "{{count}} sujeitos",
"pointsOverTime": "{{pointCount}} pontos ao longo de {{trackTime}}",
"subjectTrackList": {
"closeButtonLabel": "Fechar a lista de sujeitos",
"subjectTracksItem": {
"icon": "Ícone para {{title}}",
"pointCount_one": "{{count}} ponto",
"pointCount_other": "{{count}} pontos",
"removeButton": "Remover",
"removeButtonLabel": "Remover {{title}}"
},
"title": "Sujeitos"
},
"subjectTracksListButtonLabel": {
"closed": "Abrir a lista de sujeitos",
"open": "Fechar a lista de sujeitos"
},
"timeOfDaySettings": {
"chevronButtonLabel": {
"closed": "Expandir as configurações da hora do dia",
Expand All @@ -55,6 +39,17 @@
"active": "Desativar a coloração por hora do dia",
"inactive": "Ativar a coloração por hora do dia"
},
"tracksList": {
"closeButtonLabel": "Fechar a lista de {{itemsName}}",
"tracksItem": {
"removeButton": "Remover",
"removeButtonLabel": "Remover {{title}}"
}
},
"tracksListButtonLabel": {
"closed": "Abrir a lista de {{itemsName}}",
"open": "Fechar a lista de {{itemsName}}"
},
"trackSettings": {
"closeButtonLabel": "Fechar configurações de trajetórias",
"customLengthErrorMessage": "Por favor, insira uma duração de trajetória entre {{min}} e {{max}}.",
Expand Down
47 changes: 21 additions & 26 deletions public/locales/sw/tracks.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,18 @@
{
"patrolTrackLegend": {
"multiplePatrolsTitle": "{{count}} doria",
"singlePatrolTitle": "Doria: {{patrolDisplayTitle}}",
"titleElement": {
"coveredSpan": " imefunikwa",
"icon": "Ikoni kwa {{title}}",
"lengthCovered": "{{length}} imefunikwa",
"removeButton": "ondoa"
}
"icon": "Ikoni kwa {{title}}",
"itemDescription": "{{length}} imefunikwa",
"trackLegendItemsName": "doria"
},
"subjectTrackLegend": {
"description": "Pointi {{pointCount}} kwa muda wa {{trackTime}}",
"itemDescription_one": "Pointi {{count}}",
"itemDescription_other": "Pointi {{count}}",
"itemIcon": "Ikoni ya {{title}}",
"trackLegendItemsName": "wasanii"
},
"trackLegend": {
"clearTracksButton": "Futa nyimbo",
"icon": "Ikoni ya {{title}}",
"multipleSubjectTracksTitle": "Wasanii {{count}}",
"pointsOverTime": "Pointi {{pointCount}} kwa muda wa {{trackTime}}",
"subjectTrackList": {
"closeButtonLabel": "Funga orodha ya wasanii",
"subjectTracksItem": {
"icon": "Ikoni ya {{title}}",
"pointCount_one": "Pointi {{count}}",
"pointCount_other": "Pointi {{count}}",
"removeButton": "Ondoa",
"removeButtonLabel": "Ondoa {{title}}"
},
"title": "Wasanii"
},
"subjectTracksListButtonLabel": {
"closed": "Fungua orodha ya wasanii",
"open": "Funga orodha ya wasanii"
},
"timeOfDaySettings": {
"chevronButtonLabel": {
"closed": "Panua mipangilio ya wakati wa siku",
Expand All @@ -55,6 +39,17 @@
"active": "Zima rangi kwa wakati wa siku",
"inactive": "Amua rangi kwa wakati wa siku"
},
"tracksList": {
"closeButtonLabel": "Funga orodha ya {{itemsName}}",
"tracksItem": {
"removeButton": "Ondoa",
"removeButtonLabel": "Ondoa {{title}}"
}
},
"tracksListButtonLabel": {
"closed": "Fungua orodha ya {{itemsName}}",
"open": "Funga orodha ya {{itemsName}}"
},
"trackSettings": {
"closeButtonLabel": "Funga mipangilio ya nyimbo",
"customLengthErrorMessage": "Tafadhali ingiza urefu wa wimbo kati ya {{min}} na {{max}}.",
Expand Down
10 changes: 8 additions & 2 deletions src/AddToPatrolModal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,19 @@ import { calcPatrolFilterForRequest } from '../utils/patrol-filter';
import LoadingOverlay from '../LoadingOverlay';
import PatrolListItem from '../PatrolListItem';

import { INITIAL_PATROLS_STATE, PATROLS_API_URL, updatePatrolStore } from '../ducks/patrols';
import { PATROLS_API_URL, updatePatrolStore } from '../ducks/patrols';

import { SocketContext } from '../withSocketConnection';


import styles from './styles.module.scss';

const INITIAL_PATROLS_STATE = {
count: null,
next: null,
previous: null,
results: [],
};

const { Header, Title, Body, Footer } = Modal;

const { get } = axios;
Expand Down
Loading