diff --git a/components/Form.tsx b/components/Form.tsx index 974bc6b..5decc7b 100644 --- a/components/Form.tsx +++ b/components/Form.tsx @@ -163,11 +163,11 @@ function Form(): JSX.Element { if (e.message != undefined) { setFileErrorMessage(e.message); } else { - setFileErrorMessage("Unable to continue."); + setFileErrorMessage('unableToContinue'); } } else { - setFileErrorMessage("Unexpected error. Sorry."); + setFileErrorMessage('unexpected'); } } } @@ -234,7 +234,7 @@ function Form(): JSX.Element { const qrCode = result.getText(); // Check if this was a valid SHC QR code - if it was not, display an error if (!qrCode.startsWith('shc:/')) { - setFileErrorMessage('The scanned QR code was not a valid Smart Health Card QR code!'); + setFileErrorMessage(t('invalidSHC')); } else { _setFileErrorMessages([]); setQrCode(result); @@ -346,11 +346,11 @@ function Form(): JSX.Element { if (e.message) { setAddErrorMessage(e.message); } else { - setAddErrorMessage("Unable to continue."); + setAddErrorMessage('unableToContinue'); } } else { - setAddErrorMessage("Unexpected error. Sorry."); + setAddErrorMessage('unexpected'); } setSaveLoading(false); @@ -507,13 +507,12 @@ function Form(): JSX.Element { } if (isMacOs) { - setAddErrorMessage('Reminder: iOS 15+ is needed for the Apple Wallet functionality to work with Smart Health Card') + setAddErrorMessage('iOSReminder') return; } if (isIOS && !isSafari) { - // setAddErrorMessage('Sorry, only Safari can be used to add a Wallet Pass on iOS'); - setAddErrorMessage('Sorry, only Safari can be used to add a Wallet Pass on iOS'); + setAddErrorMessage('safariSupportOnly'); setIsDisabledAppleWallet(true); return; } @@ -522,7 +521,7 @@ function Form(): JSX.Element { if (Number(osVersion) > 8) { setIsDisabledGooglePay(false); } else { - setAddErrorMessage("Sorry, Add to Google Pay is only available to Android 8.1+.") + setAddErrorMessage('androidVersionError') setIsDisabledGooglePay(true); } } else { @@ -530,11 +529,6 @@ function Form(): JSX.Element { setIsDisabledGooglePay(true); } } - // } else if (!isIOS) { - // setWarningMessage('Only Safari on iOS is officially supported for Wallet import at the moment - ' + - // 'for other platforms, please ensure you have an application which can open Apple Wallet .pkpass files'); - // setIsDisabledAppleWallet(false); - // } } return ( @@ -542,7 +536,8 @@ function Form(): JSX.Element {
-
If you need to download your proof-of-vaccination, please select your province in the drop-down to be redirected to your provincial proof-of-vaccination portal.
IF YOU HAVE YOUR PROOF-OF-VACCINATION, SKIP THIS STEP AND PROCEED DIRECTLY TO STEP 2
+

{t('index:visit')}

+

{t('index:reminderNotToRepeat')}

}/> @@ -641,14 +636,14 @@ function Form(): JSX.Element {
@@ -664,11 +659,13 @@ function Form(): JSX.Element { {addErrorMessages.map((message, i) => )} -