From b03950d0f7221fc8ed624c7184f0a16a547fffc9 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Thu, 11 Aug 2022 17:33:58 +0200 Subject: [PATCH] improve translations for treating agent --- .../SocialWorkAggregators/JobAggregator.php | 2 +- .../SocialWorkAggregators/ScopeAggregator.php | 2 +- .../Filter/SocialWorkFilters/JobFilter.php | 16 ++++++++-------- .../Filter/SocialWorkFilters/ScopeFilter.php | 6 +++--- .../translations/messages.fr.yml | 18 +++++++++++++----- 5 files changed, 26 insertions(+), 18 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/JobAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/JobAggregator.php index c8aa368b1..ddab1f7cd 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/JobAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/JobAggregator.php @@ -64,7 +64,7 @@ final class JobAggregator implements AggregatorInterface */ public function getTitle(): string { - return 'Group by user job'; + return 'Group by treating agent job'; } /** diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ScopeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ScopeAggregator.php index ca968f20e..74a73537c 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ScopeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ScopeAggregator.php @@ -64,7 +64,7 @@ final class ScopeAggregator implements AggregatorInterface */ public function getTitle(): string { - return 'Group by user scope'; + return 'Group by treating agent scope'; } /** diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php index 7eb7d6142..0202a9be0 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php @@ -39,7 +39,7 @@ class JobFilter implements FilterInterface public function buildForm(FormBuilderInterface $builder) { - $builder->add('userjob', EntityType::class, [ + $builder->add('job', EntityType::class, [ 'class' => UserJob::class, 'choice_label' => function (UserJob $j) { return $this->translatableStringHelper->localize( @@ -55,13 +55,13 @@ class JobFilter implements FilterInterface { $userjobs = []; - foreach ($data['userjob'] as $j) { + foreach ($data['job'] as $j) { $userjobs[] = $this->translatableStringHelper->localize( $j->getLabel()); } - return ['Filtered by the following jobs: only %userjobs%', [ - '%userjobs%' => implode(', ou ', $userjobs) + return ['Filtered by treating agent job: only %jobs%', [ + '%jobs%' => implode(', ou ', $userjobs) ]]; } @@ -75,7 +75,7 @@ class JobFilter implements FilterInterface $qb->join('acpw.referrers', 'r'); $where = $qb->getDQLPart('where'); - $clause = $qb->expr()->in('r.userJob', ':userjob'); + $clause = $qb->expr()->in('r.userJob', ':job'); if ($where instanceof Andx) { $where->add($clause); @@ -84,7 +84,7 @@ class JobFilter implements FilterInterface } $qb->add('where', $where); - $qb->setParameter('userjob', $data['userjob']); + $qb->setParameter('job', $data['job']); } public function applyOn() @@ -93,8 +93,8 @@ class JobFilter implements FilterInterface } - public function getTitle() + public function getTitle(): string { - return 'Filter by user job'; + return 'Filter by treating agent job'; } } \ No newline at end of file diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php index a91344645..228c3ea92 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php @@ -59,8 +59,8 @@ class ScopeFilter implements FilterInterface $s->getName()); } - return ['Filtered by the following scopes: only %scope%', [ - '%scope%' => implode(', ou ', $scopes) + return ['Filtered by treating agent scope: only %scopes%', [ + '%scopes%' => implode(', ou ', $scopes) ]]; } @@ -94,6 +94,6 @@ class ScopeFilter implements FilterInterface public function getTitle() { - return 'Filter by scope'; + return 'Filter by treating agent scope'; } } \ No newline at end of file diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index 9812a9293..cf14100e7 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -513,16 +513,24 @@ Accepted referrers: Référents "Filtered by referrer: only %referrers%": "Filtré par référent: uniquement %referrers%" Group by referrers: Grouper par référent -Filter by treating agent: Filtrer par agent traitant -Accepted agents: Agent traitant -"Filtered by treating agent: only %agents%": "Filtré par agent traitant: uniquement %agents%" -Group by treating agent: Grouper par agent traitant - Filter by opened between dates: Filtrer les parcours ouverts entre deux dates Date from: Date de début Date to: Date de fin "Filtered by opening dates: between %datefrom% and %dateto%": "Filtrer les parcours ouverts entre deux dates: entre le %datefrom% et le %dateto%" +Filter by treating agent scope: Filtrer par service de l'agent traitant +"Filtered by treating agent scope: only %scopes%": "Filtré par service de l'agent traitant: uniquement %scopes%" +Group by treating agent scope: Grouper par service de l'agent traitant + +Filter by treating agent job: Filtrer par métier de l'agent traitant +"Filtered by treating agent job: only %jobs%": "Filtré par métier de l'agent traitant: uniquement %jobs%" +Group by treating agent job: Grouper par métier de l'agent traitant + +Filter by treating agent: Filtrer par agent traitant +Accepted agents: Agent traitant +"Filtered by treating agent: only %agents%": "Filtré par agent traitant: uniquement %agents%" +Group by treating agent: Grouper par agent traitant + Filter by evaluation type: Filtrer par type d'évaluation Accepted evaluationtype: Évaluations "Filtered by evaluation type: only %evals%": "Filtré par type d'évaluation: uniquement %evals%"