Skip to content

Commit

Permalink
[JN-1294] In-person kit i18n (#1138)
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewBemis authored Oct 11, 2024
1 parent 0071108 commit 5d09127
Show file tree
Hide file tree
Showing 11 changed files with 233 additions and 100 deletions.
35 changes: 34 additions & 1 deletion populate/src/main/resources/seed/i18n/dev/languageTexts.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,38 @@
{"keyName": "pageNotFoundMessage", "text": "DEV_If you believe this is an error, please contact ${studyContactEmail}", "language": "dev"},
{"keyName": "pageNotFoundReturnHome", "text": "DEV_Return to the home page", "language": "dev"},
{"keyName": "authErrorPageTitle", "text": "DEV_Something went wrong", "language": "dev"},
{"keyName": "authErrorPageMessage", "text": "DEV_There was an issue with our authentication service. Please try again. If the problem persists, please contact ${studyContactEmail}.", "language": "dev"}
{"keyName": "authErrorPageMessage", "text": "DEV_There was an issue with our authentication service. Please try again. If the problem persists, please contact ${studyContactEmail}.", "language": "dev"},
{"keyName": "navbarSampleKits", "text": "DEV_Sample Kits", "language": "dev"},
{"keyName": "kitsPageTitle", "text": "DEV_Sample collection kits", "language": "dev"},
{"keyName": "kitsPageDescription", "text": "DEV_Sample collection kits are a valuable part of the study process and can help provide researchers with important insights. Below you will find the status of all kits that have been provided to you.", "language": "dev"},
{"keyName": "kitsPageInPersonTitle", "text": "DEV_Provide a sample in-person", "language": "dev"},
{"keyName": "kitsPageInPersonDescription", "text": "DEV_This study is currently offering the option to complete a sample collection kit in-person.", "language": "dev"},
{"keyName": "kitsPageInPersonCompleteButton", "text": "DEV_Complete a kit in-person", "language": "dev"},
{"keyName": "kitsPageYourKitsTitle", "text": "DEV_Your kits", "language": "dev"},
{"keyName": "kitsPageStatusPreparing", "text": "DEV_Preparing", "language": "dev"},
{"keyName": "kitsPageStatusShipped", "text": "DEV_Shipped", "language": "dev"},
{"keyName": "kitsPageStatusReturned", "text": "DEV_Returned", "language": "dev"},
{"keyName": "kitsPageStatusCreated", "text": "DEV_Created", "language": "dev"},
{"keyName": "kitsPageStatusCollected", "text": "DEV_Collected", "language": "dev"},
{"keyName": "kitsPageNoKits", "text": "DEV_You do not have any sample collection kits at this time.", "language": "dev"},
{"keyName": "kitsInPersonTitle", "text": "DEV_Sample kit instructions", "language": "dev"},
{"keyName": "kitsInPersonDescription", "text": "DEV_If you are completing a sample collection kit in-person, please follow the instructions provided by a member of the study team. Any additional information that you may need, such as your unique participant identifier, will be provided below.", "language": "dev"},
{"keyName": "kitsInPersonSubDescription", "text": "DEV_If you have any questions, please ask a member of the study team.", "language": "dev"},
{"keyName": "kitsInPersonYourKitTitle", "text": "DEV_Your sample collection kit", "language": "dev"},
{"keyName": "kitsInPersonYourKitDescription", "text": "DEV_A member of the team has provided you with a sample collection kit. This sample kit is associated with your account. If you are assisting someone else with their sample collection kit, please ensure that each participant completes the sample collection kit that was assigned to them.", "language": "dev"},
{"keyName": "kitsInPersonYourKitIdentifier", "text": "DEV_Your kit identifier", "language": "dev"},
{"keyName": "kitsInPersonReturnToDashboard", "text": "DEV_Return to dashboard", "language": "dev"},
{"keyName": "kitsInPersonRefreshPage", "text": "DEV_Refresh", "language": "dev"},
{"keyName": "kitsInPersonConsentRequiredTitle", "text": "DEV_Consent Required", "language": "dev"},
{"keyName": "kitsInPersonConsentRequiredDescription", "text": "DEV_Before completing a sample collection kit, you must first be enrolled in the study. If of interest, you may find and sign the consent form via the link below.", "language": "dev"},
{"keyName": "kitsInPersonStartConsent", "text": "DEV_Start Consent", "language": "dev"},
{"keyName": "kitsInPersonError", "text": "DEV_There was an error loading your kit information. Please contact a member of the study team for assistance.", "language": "dev"},
{"keyName": "kitsInPersonCreatedInstructions", "text": "DEV_After you have completed the sample collection kit, please return it to a member of the study team and allow them to scan your participation code below.", "language": "dev"},
{"keyName": "kitsInPersonNoKitInstructions", "text": "DEV_To receive a sample collection kit, a member of the study team will scan your unique participation code below to associate a sample kit with your account.", "language": "dev"},
{"keyName": "kitsInPersonNoKitSubInstructions", "text": "DEV_Once you have received a kit, please refresh this page to view your kit information and receive further instructions.", "language": "dev"},
{"keyName": "kitsInPersonCollectedDescription", "text": "DEV_A member of the study team has received your sample collection kit. You will receive an email notification when your sample has been processed, and you will be able to view the status of the sample on your study dashboard.", "language": "dev"},
{"keyName": "kitsInPersonCollectedThankYou", "text": "DEV_Thank you for your participation.", "language": "dev"},
{"keyName": "kitTypeSaliva", "text": "DEV_Saliva kit", "language": "dev"},
{"keyName": "kitTypeStool", "text": "DEV_Stool kit", "language": "dev"},
{"keyName": "kitTypeBlood", "text": "DEV_Blood kit", "language": "dev"}
]
35 changes: 34 additions & 1 deletion populate/src/main/resources/seed/i18n/en/languageTexts.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,38 @@
{"keyName": "pageNotFoundMessage", "text": "If you believe this is an error, please contact ${studyContactEmail}", "language": "en"},
{"keyName": "pageNotFoundReturnHome", "text": "Return to the home page", "language": "en"},
{"keyName": "authErrorPageTitle", "text": "Something went wrong", "language": "en"},
{"keyName": "authErrorPageMessage", "text": "There was an issue with our authentication service. Please try again. If the problem persists, please contact ${studyContactEmail}.", "language": "en"}
{"keyName": "authErrorPageMessage", "text": "There was an issue with our authentication service. Please try again. If the problem persists, please contact ${studyContactEmail}.", "language": "en"},
{"keyName": "navbarSampleKits", "text": "Sample Kits", "language": "en"},
{"keyName": "kitsPageTitle", "text": "Sample collection kits", "language": "en"},
{"keyName": "kitsPageDescription", "text": "Sample collection kits are a valuable part of the study process and can help provide researchers with important insights. Below you will find the status of all kits that have been provided to you.", "language": "en"},
{"keyName": "kitsPageInPersonTitle", "text": "Provide a sample in-person", "language": "en"},
{"keyName": "kitsPageInPersonDescription", "text": "This study is currently offering the option to complete a sample collection kit in-person.", "language": "en"},
{"keyName": "kitsPageInPersonCompleteButton", "text": "Complete a kit in-person", "language": "en"},
{"keyName": "kitsPageYourKitsTitle", "text": "Your kits", "language": "en"},
{"keyName": "kitsPageStatusPreparing", "text": "Preparing", "language": "en"},
{"keyName": "kitsPageStatusShipped", "text": "Shipped", "language": "en"},
{"keyName": "kitsPageStatusReturned", "text": "Returned", "language": "en"},
{"keyName": "kitsPageStatusCreated", "text": "Created", "language": "en"},
{"keyName": "kitsPageStatusCollected", "text": "Collected", "language": "en"},
{"keyName": "kitsPageNoKits", "text": "You do not have any sample collection kits at this time.", "language": "en"},
{"keyName": "kitsInPersonTitle", "text": "Sample kit instructions", "language": "en"},
{"keyName": "kitsInPersonDescription", "text": "If you are completing a sample collection kit in-person, please follow the instructions provided by a member of the study team. Any additional information that you may need, such as your unique participant identifier, will be provided below.", "language": "en"},
{"keyName": "kitsInPersonSubDescription", "text": "If you have any questions, please ask a member of the study team.", "language": "en"},
{"keyName": "kitsInPersonYourKitTitle", "text": "Your sample collection kit", "language": "en"},
{"keyName": "kitsInPersonYourKitDescription", "text": "A member of the team has provided you with a sample collection kit. This sample kit is associated with your account. If you are assisting someone else with their sample collection kit, please ensure that each participant completes the sample collection kit that was assigned to them.", "language": "en"},
{"keyName": "kitsInPersonYourKitIdentifier", "text": "Your kit identifier", "language": "en"},
{"keyName": "kitsInPersonReturnToDashboard", "text": "Return to dashboard", "language": "en"},
{"keyName": "kitsInPersonRefreshPage", "text": "Refresh", "language": "en"},
{"keyName": "kitsInPersonConsentRequiredTitle", "text": "Consent Required", "language": "en"},
{"keyName": "kitsInPersonConsentRequiredDescription", "text": "Before completing a sample collection kit, you must first be enrolled in the study. If of interest, you may find and sign the consent form via the link below.", "language": "en"},
{"keyName": "kitsInPersonStartConsent", "text": "Start Consent", "language": "en"},
{"keyName": "kitsInPersonError", "text": "There was an error loading your kit information. Please contact a member of the study team for assistance.", "language": "en"},
{"keyName": "kitsInPersonCreatedInstructions", "text": "After you have completed the sample collection kit, please return it to a member of the study team and allow them to scan your participation code below.", "language": "en"},
{"keyName": "kitsInPersonNoKitInstructions", "text": "To receive a sample collection kit, a member of the study team will scan your unique participation code below to associate a sample kit with your account.", "language": "en"},
{"keyName": "kitsInPersonNoKitSubInstructions", "text": "Once you have received a kit, please refresh this page to view your kit information and receive further instructions.", "language": "en"},
{"keyName": "kitsInPersonCollectedDescription", "text": "A member of the study team has received your sample collection kit. You will receive an email notification when your sample has been processed, and you will be able to view the status of the sample on your study dashboard.", "language": "en"},
{"keyName": "kitsInPersonCollectedThankYou", "text": "Thank you for your participation.", "language": "en"},
{"keyName": "kitTypeSaliva", "text": "Saliva kit", "language": "en"},
{"keyName": "kitTypeStool", "text": "Stool kit", "language": "en"},
{"keyName": "kitTypeBlood", "text": "Blood kit", "language": "en"}
]
35 changes: 34 additions & 1 deletion populate/src/main/resources/seed/i18n/es/languageTexts.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,38 @@
{"keyName": "pageNotFoundMessage", "text": "Si cree que se trata de un error, comuníquese con ${studyContactEmail}", "language": "es"},
{"keyName": "pageNotFoundReturnHome", "text": "Regresar a la página de inicio", "language": "es"},
{"keyName": "authErrorPageTitle", "text": "Algo salió mal", "language": "es"},
{"keyName": "authErrorPageMessage", "text": "Hubo un problema con nuestro servicio de autenticación. Inténtalo de nuevo. Si el problema persiste, por favor contacte ${studyContactEmail}", "language": "es"}
{"keyName": "authErrorPageMessage", "text": "Hubo un problema con nuestro servicio de autenticación. Inténtalo de nuevo. Si el problema persiste, por favor contacte ${studyContactEmail}", "language": "es"},
{"keyName": "navbarSampleKits", "text": "Kits de muestra", "language": "es"},
{"keyName": "kitsPageTitle", "text": "Kits de recolección de muestras", "language": "es"},
{"keyName": "kitsPageDescription", "text": "Los kits de recolección de muestras son una parte valiosa del proceso de estudio y pueden ayudar a proporcionar a los investigadores información importante. A continuación, encontrará el estado de todos los kits que se le han proporcionado.", "language": "es"},
{"keyName": "kitsPageInPersonTitle", "text": "Proporcionar una muestra en persona", "language": "es"},
{"keyName": "kitsPageInPersonDescription", "text": "Este estudio ofrece actualmente la opción de completar un kit de recolección de muestras en persona.", "language": "es"},
{"keyName": "kitsPageInPersonCompleteButton", "text": "Completar un kit en persona", "language": "es"},
{"keyName": "kitsPageYourKitsTitle", "text": "Tus kits", "language": "es"},
{"keyName": "kitsPageStatusPreparing", "text": "Preparante", "language": "es"},
{"keyName": "kitsPageStatusShipped", "text": "Enviada", "language": "es"},
{"keyName": "kitsPageStatusReturned", "text": "Devuelto", "language": "es"},
{"keyName": "kitsPageStatusCreated", "text": "Creada", "language": "es"},
{"keyName": "kitsPageStatusCollected", "text": "Coleccionada", "language": "es"},
{"keyName": "kitsPageNoKits", "text": "No disponemos de ningún kit de recolección de muestras en este momento.", "language": "es"},
{"keyName": "kitsInPersonTitle", "text": "Instrucciones del kit de muestra", "language": "es"},
{"keyName": "kitsInPersonDescription", "text": "Si va a completar un kit de recolección de muestras en persona, siga las instrucciones que le proporcione un miembro del equipo del estudio. Cualquier información adicional que pueda necesitar, como su identificador único de participante, se le proporcionará a continuación.", "language": "es"},
{"keyName": "kitsInPersonSubDescription", "text": "Si tiene alguna pregunta, consulte a un miembro del equipo de estudio.", "language": "es"},
{"keyName": "kitsInPersonYourKitTitle", "text": "Su kit de recolección de muestras", "language": "es"},
{"keyName": "kitsInPersonYourKitDescription", "text": "Un miembro del equipo le ha proporcionado un kit de recolección de muestras. Este kit de recolección de muestras está asociado a su cuenta. Si está ayudando a otra persona con su kit de recolección de muestras, asegúrese de que cada participante complete el kit de recolección de muestras que se le asignó.", "language": "es"},
{"keyName": "kitsInPersonYourKitIdentifier", "text": "Su identificador de kit", "language": "es"},
{"keyName": "kitsInPersonReturnToDashboard", "text": "Regresar al panel de control", "language": "es"},
{"keyName": "kitsInPersonRefreshPage", "text": "Refrescar", "language": "es"},
{"keyName": "kitsInPersonConsentRequiredTitle", "text": "Consentimiento requerido", "language": "es"},
{"keyName": "kitsInPersonConsentRequiredDescription", "text": "Antes de completar un kit de recolección de muestras, primero debe inscribirse en el estudio. Si está interesado, puede encontrar y firmar el formulario de consentimiento a través del enlace que aparece a continuación.", "language": "es"},
{"keyName": "kitsInPersonStartConsent", "text": "Iniciar Consentimiento", "language": "es"},
{"keyName": "kitsInPersonError", "text": "Se produjo un error al cargar la información de su kit. Comuníquese con un miembro del equipo de estudio para obtener ayuda.", "language": "es"},
{"keyName": "kitsInPersonCreatedInstructions", "text": "Una vez que haya completado el kit de recolección de muestras, devuélvaselo a un miembro del equipo de estudio y permítale escanear su código de participación a continuación.", "language": "es"},
{"keyName": "kitsInPersonNoKitInstructions", "text": "Para recibir un kit de recolección de muestras, un miembro del equipo de estudio escaneará su código de participación único a continuación para asociar un kit de muestra con su cuenta.", "language": "es"},
{"keyName": "kitsInPersonNoKitSubInstructions", "text": "Una vez que haya recibido un kit, actualice esta página para ver la información de su kit y recibir más instrucciones.", "language": "es"},
{"keyName": "kitsInPersonCollectedDescription", "text": "Un miembro del equipo de estudio ha recibido su kit de recolección de muestras. Recibirá una notificación por correo electrónico cuando se haya procesado su muestra y podrá ver el estado de la misma en el panel de control del estudio.", "language": "es"},
{"keyName": "kitsInPersonCollectedThankYou", "text": "Gracias por su participación.", "language": "es"},
{"keyName": "kitTypeSaliva", "text": "Kit de saliva", "language": "es"},
{"keyName": "kitTypeStool", "text": "Kit de heces", "language": "es"},
{"keyName": "kitTypeBlood", "text": "Kit de sangre", "language": "es"}
]
6 changes: 2 additions & 4 deletions ui-admin/src/study/kits/KitEnrolleeSelection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import { enrolleeKitRequestPath } from 'study/participants/enrolleeView/Enrollee
import { Button } from 'components/forms/Button'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faPaperPlane, faQrcode } from '@fortawesome/free-solid-svg-icons'
import { useUser } from 'user/UserProvider'

type EnrolleeRow = Enrollee & {
taskCompletionStatus: Record<string, boolean>
Expand All @@ -54,7 +53,6 @@ export default function KitEnrolleeSelection({ studyEnvContext }: { studyEnvCont
{ id: 'requiredSurveysComplete', value: true }
])
const [showRequestKitModal, setShowRequestKitModal] = useState(false)
const { user } = useUser()

const { isLoading, reload } = useLoadingEffect(async () => {
const enrollees = await Api.fetchEnrolleesWithKits(
Expand Down Expand Up @@ -188,9 +186,9 @@ export default function KitEnrolleeSelection({ studyEnvContext }: { studyEnvCont
<RowVisibilityCount table={table}/>
</div>
<div className="d-flex">
{ user?.superuser && <Link to={'../scan'}>
<Link to={'../scan'}>
<Button variant="light" className="border m-1"><FontAwesomeIcon icon={faQrcode}/> Scan kit</Button>
</Link> }
</Link>
<Button onClick={() => { setShowRequestKitModal(true) }}
variant="light" className="border m-1" disabled={!enableActionButtons}
tooltip={enableActionButtons ? 'Send sample collection kit' : 'Select at least one participant'}>
Expand Down
2 changes: 1 addition & 1 deletion ui-core/src/participant/ParticipantNavbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ export const AccountOptionsDropdown = (
{ studyEnv && studyEnv.kitTypes.length > 0 &&
<NavLink to="/hub/kits">
<button className="dropdown-item" aria-label="sample kits">
Sample Kits
{i18n('navbarSampleKits')}
</button>
</NavLink>
}
Expand Down
Loading

0 comments on commit 5d09127

Please sign in to comment.