diff --git a/src/Bundle/ChillEventBundle/Export/Export/ListEvents.php b/src/Bundle/ChillEventBundle/Export/Export/ListEvents.php index c905b4c8f..4fee6b23b 100644 --- a/src/Bundle/ChillEventBundle/Export/Export/ListEvents.php +++ b/src/Bundle/ChillEventBundle/Export/Export/ListEvents.php @@ -38,17 +38,17 @@ class ListEvents implements ListInterface, GroupedExportInterface { protected array $fields = [ 'event_id', + 'event_center', 'event_name', 'event_date', - 'event_type', - 'event_center', - 'event_moderator', - 'event_participants_count', 'event_location', + 'event_type', + 'event_themes', + 'event_moderator', + 'event_animators', + 'event_participants_count', 'event_budget_resources', 'event_budget_charges', - 'event_animators', - 'event_themes', ]; private readonly bool $filterStatsByCenters; @@ -100,7 +100,7 @@ class ListEvents implements ListInterface, GroupedExportInterface public function getDescription(): string { - return 'event.export.list.description.Create a list of events according to various filters.'; + return 'export.event.list.description'; } public function getGroup(): string @@ -111,11 +111,11 @@ class ListEvents implements ListInterface, GroupedExportInterface public function getLabels($key, array $values, $data): \Closure { return match ($key) { - 'event_id' => fn ($value) => '_header' === $value ? 'ID' : $value, - 'event_name' => fn ($value) => '_header' === $value ? 'Name' : $value, - 'event_date' => function ($value) { + 'event_id' => fn ($value) => '_header' === $value ? 'export.event.list.'.$key : $value, + 'event_name' => fn ($value) => '_header' === $value ? 'export.event.list.'.$key : $value, + 'event_date' => function ($value) use ($key) { if ('_header' === $value) { - return 'Date'; + return 'export.event.list.'.$key; } if ($value instanceof \DateTime) { @@ -126,21 +126,21 @@ class ListEvents implements ListInterface, GroupedExportInterface return $date ? $date->format('Y-m-d') : $value; }, - 'event_type' => function ($value) { + 'event_type' => function ($value) use ($key) { if ('_header' === $value) { - return 'event type'; + return 'export.event.list.'.$key; } return $this->translatableStringHelper->localize(json_decode((string) $value, true, 512, JSON_THROW_ON_ERROR)); }, - 'event_center' => fn ($value) => '_header' === $value ? 'Center' : $value, - 'event_moderator' => fn ($value) => '_header' === $value ? 'Moderator' : $value, - 'event_participants_count' => fn ($value) => '_header' === $value ? 'Participants Count' : $value, - 'event_location' => fn ($value) => '_header' === $value ? 'Location' : $value, - 'event_animators' => $this->labelThirdPartyHelper->getLabelMulti($key, $values, 'export.list.acp.'.$key), + 'event_center' => fn ($value) => '_header' === $value ? $key : $value, + 'event_moderator' => fn ($value) => '_header' === $value ? $key : $value, + 'event_participants_count' => fn ($value) => '_header' === $value ? $key : $value, + 'event_location' => fn ($value) => '_header' === $value ? $key : $value, + 'event_animators' => $this->labelThirdPartyHelper->getLabelMulti($key, $values, $key), 'event_themes' => function ($value) use ($key) { if ('_header' === $value) { - return 'export.event.list.'.$key; + return $key; } if (null === $value) { @@ -155,9 +155,9 @@ class ListEvents implements ListInterface, GroupedExportInterface ) ); }, - 'event_budget_resources' => function ($value) { + 'event_budget_resources' => function ($value) use ($key) { if ('_header' === $value) { - return 'Resources Budget'; + return $key; } if (!$value) { @@ -176,9 +176,9 @@ class ListEvents implements ListInterface, GroupedExportInterface }, $elements)); }, - 'event_budget_charges' => function ($value) { + 'event_budget_charges' => function ($value) use ($key) { if ('_header' === $value) { - return 'Charges Budget'; + return $key; } if (!$value) { @@ -215,7 +215,7 @@ class ListEvents implements ListInterface, GroupedExportInterface public function getTitle() { - return 'List events'; + return 'export.event.list.title'; } public function getType() diff --git a/src/Bundle/ChillEventBundle/translations/messages.fr.yml b/src/Bundle/ChillEventBundle/translations/messages.fr.yml index d4078f80d..88fca146c 100644 --- a/src/Bundle/ChillEventBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillEventBundle/translations/messages.fr.yml @@ -153,3 +153,22 @@ crud: index: title: Liste des thématiques add_new: Créér une nouvelle thématique + +export: + event: + list: + title: Liste des évenements + description: Crée la liste des évenements en fonction de différents paramètres. + +event_id: Identifiant +event_name: Nom +event_date: Date +event_type: Type d'évenement +event_center: Centre +event_moderator: Responsable +event_participants_count: Nombre de participants +event_location: Localisation +event_budget_resources: Ressources +event_budget_charges: Charges +event_animators: Animateurs +event_themes: Thématiques