diff --git a/app/src/App/hooks.ts b/app/src/App/hooks.ts index d01082d8dc1..737393f7a99 100644 --- a/app/src/App/hooks.ts +++ b/app/src/App/hooks.ts @@ -31,7 +31,7 @@ export function useSoftwareUpdatePoll(): void { export function useProtocolReceiptToast(): void { const host = useHost() - const { t } = useTranslation('protocol_info') + const { t, i18n } = useTranslation(['protocol_info', 'shared']) const { makeToast } = useToaster() const queryClient = useQueryClient() const protocolIdsQuery = useAllProtocolIdsQuery( @@ -83,7 +83,7 @@ export function useProtocolReceiptToast(): void { }) as string, 'success', { - closeButton: true, + buttonText: i18n.format(t('shared:close'), 'capitalize'), disableTimeout: true, displayType: 'odd', } diff --git a/app/src/organisms/ErrorRecoveryFlows/hooks/useRecoveryToasts.ts b/app/src/organisms/ErrorRecoveryFlows/hooks/useRecoveryToasts.ts index 533b9877f72..a722e6d566d 100644 --- a/app/src/organisms/ErrorRecoveryFlows/hooks/useRecoveryToasts.ts +++ b/app/src/organisms/ErrorRecoveryFlows/hooks/useRecoveryToasts.ts @@ -27,6 +27,7 @@ export function useRecoveryToasts({ ...rest }: BuildToast): RecoveryToasts { const { currentStepNumber, hasRunDiverged } = stepCounts + const { i18n, t } = useTranslation('shared') const { makeToast } = useToaster() const displayType = isOnDevice ? 'odd' : 'desktop' @@ -53,6 +54,10 @@ export function useRecoveryToasts({ const makeSuccessToast = (): void => { if (selectedRecoveryOption !== RECOVERY_MAP.CANCEL_RUN.ROUTE) { makeToast(bodyText, 'success', { + buttonText: + displayType === 'odd' + ? i18n.format(t('shared:close'), 'capitalize') + : undefined, closeButton: true, disableTimeout: true, displayType, diff --git a/app/src/organisms/ODD/QuickTransferFlow/SelectDestWells.tsx b/app/src/organisms/ODD/QuickTransferFlow/SelectDestWells.tsx index 41dcf155fb7..16102451ebc 100644 --- a/app/src/organisms/ODD/QuickTransferFlow/SelectDestWells.tsx +++ b/app/src/organisms/ODD/QuickTransferFlow/SelectDestWells.tsx @@ -123,7 +123,7 @@ export function SelectDestWells(props: SelectDestWellsProps): JSX.Element { }) as string, 'error', { - closeButton: true, + buttonText: i18n.format(t('shared:close'), 'capitalize'), disableTimeout: true, displayType: 'odd', linkText: t('learn_more'),