From d020b645f6302d07c61ab479610b5a52202a02f8 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 16 Jun 2020 11:10:06 +0200 Subject: [PATCH] Fix event places left indicator Signed-off-by: Thomas Citharel --- js/src/i18n/en_US.json | 2 +- js/src/i18n/es.json | 2 +- js/src/i18n/fr_FR.json | 2 +- js/src/views/Event/Event.vue | 26 ++++++++++++++++++-------- 4 files changed, 21 insertions(+), 11 deletions(-) diff --git a/js/src/i18n/en_US.json b/js/src/i18n/en_US.json index c5fc3871d..801674cd2 100644 --- a/js/src/i18n/en_US.json +++ b/js/src/i18n/en_US.json @@ -504,7 +504,7 @@ "You need to create the group before you create an event.": "You need to create a group before you create an event.", "This identity is not a member of any group.": "This identity is not a member of any group.", "(Masked)": "(Masked)", - "{going}/{capacity} available places": "No places left|{going}/{capacity} available places", + "{available}/{capacity} available places": "No places left|{available}/{capacity} available places", "No one is going to this event": "No one is going to this event|One person going|{going} persons going", "By @{group}": "By @{group}", "Date and time": "Date and time", diff --git a/js/src/i18n/es.json b/js/src/i18n/es.json index 175bf1643..b9db35c20 100644 --- a/js/src/i18n/es.json +++ b/js/src/i18n/es.json @@ -583,7 +583,7 @@ "{approved} / {total} seats": "Asientos {approved}/{total}", "{count} participants": "Aún no hay participantes|Un participante|{count} participantes", "{count} requests waiting": "{count} solicitudes en espera", - "{going}/{capacity} available places": "No quedan plazas|{going}/{capacity} plazas disponibles", + "{available}/{capacity} available places": "No quedan plazas|{available}/{capacity} plazas disponibles", "{license} guarantees {respect} of the people who will use it. Since {source}, anyone can audit it, which guarantees its transparency.": "{license} garantiza {respect} de las personas que lo usarán. Desde {source}, cualquiera puede auditarlo, lo que garantiza su transparencia.", "{title} ({count} todos)": "{title} ({count} trabajos pendientes)", "© The Mobilizon Contributors {date} - Made with Elixir, Phoenix, VueJS & with some love and some weeks": "© The Mobilizon Contributors {date} - Hecho con Elixir, Phoenix, VueJS y con un poco de amor y algunas semanas", diff --git a/js/src/i18n/fr_FR.json b/js/src/i18n/fr_FR.json index f24878b2d..81d7112ea 100644 --- a/js/src/i18n/fr_FR.json +++ b/js/src/i18n/fr_FR.json @@ -588,7 +588,7 @@ "{approved} / {total} seats": "{approved} / {total} places", "{count} participants": "Aucun⋅e participant⋅e | Un⋅e participant⋅e | {count} participant⋅e⋅s", "{count} requests waiting": "Une demande en attente|{count} demandes en attente", - "{going}/{capacity} available places": "Pas de places restantes|{going}/{capacity} places restantes", + "{available}/{capacity} available places": "Pas de places restantes|{available}/{capacity} places restantes|{available}/{capacity} places restantes", "{license} guarantees {respect} of the people who will use it. Since {source}, anyone can audit it, which guarantees its transparency.": "{license} garantit {respect} des personnes qui l'utiliseront. Puisque {source}, il est publiquement auditable, ce qui garantit sa transparence.", "{title} ({count} todos)": "{title} ({count} todos)", "© The OpenStreetMap Contributors": "© Les Contributeur⋅ices OpenStreetMap", diff --git a/js/src/views/Event/Event.vue b/js/src/views/Event/Event.vue index 7ddff6962..675172c9a 100644 --- a/js/src/views/Event/Event.vue +++ b/js/src/views/Event/Event.vue @@ -169,10 +169,15 @@ > {{ - $tc("{going}/{capacity} available places", event.participantStats.going, { - approved: event.participantStats.going, - capacity: event.options.maximumAttendeeCapacity, - }) + $tc( + "{available}/{capacity} available places", + event.options.maximumAttendeeCapacity - event.participantStats.going, + { + available: + event.options.maximumAttendeeCapacity - event.participantStats.going, + capacity: event.options.maximumAttendeeCapacity, + } + ) }} @@ -186,10 +191,15 @@ {{ - $tc("{going}/{capacity} available places", event.participantStats.going, { - approved: event.participantStats.going, - capacity: event.options.maximumAttendeeCapacity, - }) + $tc( + "{available}/{capacity} available places", + event.options.maximumAttendeeCapacity - event.participantStats.going, + { + available: + event.options.maximumAttendeeCapacity - event.participantStats.going, + capacity: event.options.maximumAttendeeCapacity, + } + ) }}