mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Add translations
This commit is contained in:
parent
d23efa7943
commit
33cecb518b
@ -38,17 +38,17 @@ class ListEvents implements ListInterface, GroupedExportInterface
|
|||||||
{
|
{
|
||||||
protected array $fields = [
|
protected array $fields = [
|
||||||
'event_id',
|
'event_id',
|
||||||
|
'event_center',
|
||||||
'event_name',
|
'event_name',
|
||||||
'event_date',
|
'event_date',
|
||||||
'event_type',
|
|
||||||
'event_center',
|
|
||||||
'event_moderator',
|
|
||||||
'event_participants_count',
|
|
||||||
'event_location',
|
'event_location',
|
||||||
|
'event_type',
|
||||||
|
'event_themes',
|
||||||
|
'event_moderator',
|
||||||
|
'event_animators',
|
||||||
|
'event_participants_count',
|
||||||
'event_budget_resources',
|
'event_budget_resources',
|
||||||
'event_budget_charges',
|
'event_budget_charges',
|
||||||
'event_animators',
|
|
||||||
'event_themes',
|
|
||||||
];
|
];
|
||||||
|
|
||||||
private readonly bool $filterStatsByCenters;
|
private readonly bool $filterStatsByCenters;
|
||||||
@ -100,7 +100,7 @@ class ListEvents implements ListInterface, GroupedExportInterface
|
|||||||
|
|
||||||
public function getDescription(): string
|
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
|
public function getGroup(): string
|
||||||
@ -111,11 +111,11 @@ class ListEvents implements ListInterface, GroupedExportInterface
|
|||||||
public function getLabels($key, array $values, $data): \Closure
|
public function getLabels($key, array $values, $data): \Closure
|
||||||
{
|
{
|
||||||
return match ($key) {
|
return match ($key) {
|
||||||
'event_id' => fn ($value) => '_header' === $value ? 'ID' : $value,
|
'event_id' => fn ($value) => '_header' === $value ? 'export.event.list.'.$key : $value,
|
||||||
'event_name' => fn ($value) => '_header' === $value ? 'Name' : $value,
|
'event_name' => fn ($value) => '_header' === $value ? 'export.event.list.'.$key : $value,
|
||||||
'event_date' => function ($value) {
|
'event_date' => function ($value) use ($key) {
|
||||||
if ('_header' === $value) {
|
if ('_header' === $value) {
|
||||||
return 'Date';
|
return 'export.event.list.'.$key;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($value instanceof \DateTime) {
|
if ($value instanceof \DateTime) {
|
||||||
@ -126,21 +126,21 @@ class ListEvents implements ListInterface, GroupedExportInterface
|
|||||||
|
|
||||||
return $date ? $date->format('Y-m-d') : $value;
|
return $date ? $date->format('Y-m-d') : $value;
|
||||||
},
|
},
|
||||||
'event_type' => function ($value) {
|
'event_type' => function ($value) use ($key) {
|
||||||
if ('_header' === $value) {
|
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));
|
return $this->translatableStringHelper->localize(json_decode((string) $value, true, 512, JSON_THROW_ON_ERROR));
|
||||||
},
|
},
|
||||||
'event_center' => fn ($value) => '_header' === $value ? 'Center' : $value,
|
'event_center' => fn ($value) => '_header' === $value ? $key : $value,
|
||||||
'event_moderator' => fn ($value) => '_header' === $value ? 'Moderator' : $value,
|
'event_moderator' => fn ($value) => '_header' === $value ? $key : $value,
|
||||||
'event_participants_count' => fn ($value) => '_header' === $value ? 'Participants Count' : $value,
|
'event_participants_count' => fn ($value) => '_header' === $value ? $key : $value,
|
||||||
'event_location' => fn ($value) => '_header' === $value ? 'Location' : $value,
|
'event_location' => fn ($value) => '_header' === $value ? $key : $value,
|
||||||
'event_animators' => $this->labelThirdPartyHelper->getLabelMulti($key, $values, 'export.list.acp.'.$key),
|
'event_animators' => $this->labelThirdPartyHelper->getLabelMulti($key, $values, $key),
|
||||||
'event_themes' => function ($value) use ($key) {
|
'event_themes' => function ($value) use ($key) {
|
||||||
if ('_header' === $value) {
|
if ('_header' === $value) {
|
||||||
return 'export.event.list.'.$key;
|
return $key;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (null === $value) {
|
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) {
|
if ('_header' === $value) {
|
||||||
return 'Resources Budget';
|
return $key;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$value) {
|
if (!$value) {
|
||||||
@ -176,9 +176,9 @@ class ListEvents implements ListInterface, GroupedExportInterface
|
|||||||
}, $elements));
|
}, $elements));
|
||||||
},
|
},
|
||||||
|
|
||||||
'event_budget_charges' => function ($value) {
|
'event_budget_charges' => function ($value) use ($key) {
|
||||||
if ('_header' === $value) {
|
if ('_header' === $value) {
|
||||||
return 'Charges Budget';
|
return $key;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$value) {
|
if (!$value) {
|
||||||
@ -215,7 +215,7 @@ class ListEvents implements ListInterface, GroupedExportInterface
|
|||||||
|
|
||||||
public function getTitle()
|
public function getTitle()
|
||||||
{
|
{
|
||||||
return 'List events';
|
return 'export.event.list.title';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getType()
|
public function getType()
|
||||||
|
@ -153,3 +153,22 @@ crud:
|
|||||||
index:
|
index:
|
||||||
title: Liste des thématiques
|
title: Liste des thématiques
|
||||||
add_new: Créér une nouvelle thématique
|
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user