fix: Translate MFA error messages and placeholders #2196
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixorfeaturebranches intodeveloporreleasebranches viaSquash and Merge(to keep clean history)📝 Description
🔗 Jira Ticket M2-10397
🔗 Jira Ticket M2-10399
🔗 Jira Ticket M2-10400
Fixed MFA flows (setup, disable, and view recovery codes) to properly display French translations for placeholder text and error messages when the application language is changed to French.
Changes include:
t(error, { defaultValue: error })MFASetup.const.ts: Updated error messages to use keys likeinvalidMFACode,mfaSessionExpired,networkErrorRemoveMFA.constants.ts: Updated error messages to use keys likeinvalidRecoveryCode,recoveryCodeAlreadyUsed,tooManyAttemptsViewRecoveryCodes.utils.ts: Updated error messages to use translation keysmfaAlreadyEnabledtranslation key in bothapp-en.jsonandapp-fr.jsonmfaSessionExpiredtranslation keyConfirmIdentityVerificationCodeandConfirmIdentityRecoveryCodeproperly translate errors🪤 Peer Testing
Log in to the application
Navigate to Account Settings → MFA section
Change language to French using the language selector
Enable MFA and enter an incorrect verification code
Expected outcome: Error message should appear in French: "Code de vérification invalide"
Try to view recovery codes with an incorrect code
Expected outcome: Error message should appear in French: "Code invalide"
Try to disable MFA with an incorrect recovery code
Expected outcome: Error message should appear in French: "Code de récupération invalide"
Wait for session to expire during any MFA flow
Expected outcome: Error message should appear in French: "Votre session a expiré. Veuillez vous reconnecter."