From e4ffdc330eda0f64b8faaa94c6cec1a97fd99b81 Mon Sep 17 00:00:00 2001
From: Ned Zimmerman
Date: Wed, 29 Nov 2023 12:21:05 -0400
Subject: [PATCH] fix: resolve unsupported use of trans_choice (resolves #2022)
(#2023)
fix: resolve unsupported use of trans_choice
---
resources/lang/en.json | 2 ++
resources/lang/fr.json | 2 ++
.../partials/getting-started-individual.blade.php | 7 ++++++-
.../partials/getting-started-organization.blade.php | 6 +++++-
4 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/resources/lang/en.json b/resources/lang/en.json
index 1df4259bd..376a7b222 100644
--- a/resources/lang/en.json
+++ b/resources/lang/en.json
@@ -1079,6 +1079,8 @@
"Please enter a valid website link under “Accessibility and Inclusion links”.": "Please enter a valid website link under “Accessibility and Inclusion links”.",
"Please enter the email address of the individual you have hired as a Community Connector.": "Please enter the email address of the individual you have hired as a Community Connector.",
"Please enter your own name and email, rather than you organization’s. You will be able to create your organization in a later step.": "Please enter your own name and email, rather than you organization’s. You will be able to create your organization in a later step.",
+ "Please fill out and return your application for your :role and :otherRole roles. You must return this and have it approved before you can attend orientation. You can find the applications in the links below, or in the email we sent you.": "Please fill out and return your application for your :role and :otherRole roles. You must return this and have it approved before you can attend orientation. You can find the applications in the links below, or in the email we sent you.",
+ "Please fill out and return your application for your :role role. You must return this and have it approved before you can attend orientation. You can find the application in the link below, or in the email we sent you.": "Please fill out and return your application for your :role role. You must return this and have it approved before you can attend orientation. You can find the application in the link below, or in the email we sent you.",
"Please identify the type of Regulated Organization yours is:": "Please identify the type of Regulated Organization yours is:",
"Please include any links that describes the accessibility and inclusion initiatives your regulated entity has. This can include reports, case studies, and more.": "Please include any links that describes the accessibility and inclusion initiatives your regulated entity has. This can include reports, case studies, and more.",
"Please indicate how you would like to be notified of a new person or people being added to your engagements.": "Please indicate how you would like to be notified of a new person or people being added to your engagements.",
diff --git a/resources/lang/fr.json b/resources/lang/fr.json
index 3cb4bdaa3..b539539b9 100644
--- a/resources/lang/fr.json
+++ b/resources/lang/fr.json
@@ -1079,6 +1079,8 @@
"Please enter a valid website link under “Accessibility and Inclusion links”.": "Veuillez saisir un lien Internet valide sous \"Liens en lien avec l’accessibilité et l’inclusion\".",
"Please enter the email address of the individual you have hired as a Community Connector.": "Veuillez entrer l’adresse courriel de la personne que vous avez embauchée en tant que personne facilitatrice communautaire.",
"Please enter your own name and email, rather than you organization’s. You will be able to create your organization in a later step.": "Please enter your own name and email, rather than you organization’s. You will be able to create your organization in a later step.",
+ "Please fill out and return your application for your :role and :otherRole roles. You must return this and have it approved before you can attend orientation. You can find the applications in the links below, or in the email we sent you.": "",
+ "Please fill out and return your application for your :role role. You must return this and have it approved before you can attend orientation. You can find the application in the link below, or in the email we sent you.": "",
"Please identify the type of Regulated Organization yours is:": "Veuillez identifier le type d’organisation réglementée que vous êtes :",
"Please include any links that describes the accessibility and inclusion initiatives your regulated entity has. This can include reports, case studies, and more.": "Veuillez inclure tout lien qui décrit les initiatives en matière d’accessibilité et d’inclusion de votre entité réglementée. Cela peut inclure des rapports, des études de cas, et plus encore.",
"Please indicate how you would like to be notified of a new person or people being added to your engagements.": "Veuillez indiquer comment vous souhaitez être informé de l’ajout d’une ou plusieurs nouvelles personnes à vos consultations.",
diff --git a/resources/views/dashboard/partials/getting-started-individual.blade.php b/resources/views/dashboard/partials/getting-started-individual.blade.php
index 3e4a6554d..2f227b983 100644
--- a/resources/views/dashboard/partials/getting-started-individual.blade.php
+++ b/resources/views/dashboard/partials/getting-started-individual.blade.php
@@ -75,7 +75,12 @@
$roles[] = __('Community Connector');
}
@endphp
- {{ trans_choice('Please fill out and return your application for your :role role. You must return this and have it approved before you can attend orientation. You can find the application in the link below, or in the email we sent you.|Please fill out and return your application for your :role and :otherRole roles. You must return this and have it approved before you can attend orientation. You can find the applications in the links below, or in the email we sent you.', count($roles), ['role' => $roles[0], 'otherRole' => $roles[1] ?? '']) }}
+
+ @if (count($roles) == 1)
+ {{ __('Please fill out and return your application for your :role role. You must return this and have it approved before you can attend orientation. You can find the application in the link below, or in the email we sent you.', ['role' => $roles[0]]) }}
+ @elseif(count($roles) == 2)
+ {{ __('Please fill out and return your application for your :role and :otherRole roles. You must return this and have it approved before you can attend orientation. You can find the applications in the links below, or in the email we sent you.', ['role' => $roles[0], 'otherRole' => $roles[1]]) }}
+ @endif
@if (Auth::user()->individual->isConsultant())
diff --git a/resources/views/dashboard/partials/getting-started-organization.blade.php b/resources/views/dashboard/partials/getting-started-organization.blade.php
index 9e7395861..4c8394f12 100644
--- a/resources/views/dashboard/partials/getting-started-organization.blade.php
+++ b/resources/views/dashboard/partials/getting-started-organization.blade.php
@@ -65,7 +65,11 @@
}
@endphp
- {{ trans_choice('Please fill out and return your application for your :role role. You must return this and have it approved before you can attend orientation. You can find the application in the link below, or in the email we sent you.|Please fill out and return your application for your :role and :otherRole roles. You must return this and have it approved before you can attend orientation. You can find the applications in the links below, or in the email we sent you.', count($roles), ['role' => $roles[0], 'otherRole' => $roles[1] ?? '']) }}
+ @if (count($roles) == 1)
+ {{ __('Please fill out and return your application for your :role role. You must return this and have it approved before you can attend orientation. You can find the application in the link below, or in the email we sent you.', ['role' => $roles[0]]) }}
+ @elseif(count($roles) == 2)
+ {{ __('Please fill out and return your application for your :role and :otherRole roles. You must return this and have it approved before you can attend orientation. You can find the applications in the links below, or in the email we sent you.', ['role' => $roles[0], 'otherRole' => $roles[1]]) }}
+ @endif
@if (Auth::user()->organization->isConsultant())