diff --git a/web/apps/accounts/src/pages/passkeys/index.tsx b/web/apps/accounts/src/pages/passkeys/index.tsx index fa6ecde21d..f9ba48e90f 100644 --- a/web/apps/accounts/src/pages/passkeys/index.tsx +++ b/web/apps/accounts/src/pages/passkeys/index.tsx @@ -91,12 +91,11 @@ const Page: React.FC = () => { // If the user cancels the operation, then an error with name // "NotAllowedError" is thrown. // - // Ignore this, but in other cases add an error indicator to the add - // passkey text field. The browser is expected to already have shown - // an error dialog to the user. + // Ignore these, but in other cases add an error indicator to the + // add passkey text field. The browser is expected to already have + // shown an error dialog to the user. if (!(e instanceof Error && e.name == "NotAllowedError")) { - // TODO-PK: localize - setFieldError("Could not add passkey"); + setFieldError(t("passkey_add_failed")); } return; } @@ -232,8 +231,7 @@ const ManagePasskeyDrawer: React.FC = ({ = ({ setShowRenameDialog(true); }} startIcon={} - label={"Rename Passkey"} + label={t("RENAME_PASSKEY")} /> = ({ setShowDeleteDialog(true); }} startIcon={} - label={"Delete Passkey"} + label={t("DELETE_PASSKEY")} color="critical" /> diff --git a/web/apps/accounts/src/pages/passkeys/verify.tsx b/web/apps/accounts/src/pages/passkeys/verify.tsx index 94ff3e4481..97de676d1f 100644 --- a/web/apps/accounts/src/pages/passkeys/verify.tsx +++ b/web/apps/accounts/src/pages/passkeys/verify.tsx @@ -152,8 +152,7 @@ const UnknownRedirect: React.FC = () => { }; const WebAuthnNotSupported: React.FC = () => { - // TODO-PK(MR): Translate - return ; + return ; }; const UnrecoverableFailure: React.FC = () => { diff --git a/web/packages/next/locales/en-US/translation.json b/web/packages/next/locales/en-US/translation.json index 7111380d29..0cef58dfeb 100644 --- a/web/packages/next/locales/en-US/translation.json +++ b/web/packages/next/locales/en-US/translation.json @@ -610,6 +610,7 @@ "APPLY_CROP": "Apply Crop", "PHOTO_EDIT_REQUIRED_TO_SAVE": "At least one transformation or color adjustment must be performed before saving.", "PASSKEYS": "Passkeys", + "manage_passkey": "Manage passkey", "DELETE_PASSKEY": "Delete passkey", "DELETE_PASSKEY_CONFIRMATION": "Are you sure you want to delete this passkey? This action is irreversible.", "RENAME_PASSKEY": "Rename passkey", @@ -617,9 +618,11 @@ "ENTER_PASSKEY_NAME": "Enter passkey name", "PASSKEYS_DESCRIPTION": "Passkeys are a modern and secure second-factor for your Ente account. They use on-device biometric authentication for convenience and security.", "CREATED_AT": "Created at", + "passkey_add_failed": "Could not add passkey", "PASSKEY_LOGIN_FAILED": "Passkey login failed", "PASSKEY_LOGIN_URL_INVALID": "The login URL is invalid.", "PASSKEY_LOGIN_ERRORED": "An error occurred while logging in with passkey.", + "passkeys_not_supported": "Passkeys are not supported in this browser", "TRY_AGAIN": "Try again", "PASSKEY_FOLLOW_THE_STEPS_FROM_YOUR_BROWSER": "Follow the steps from your browser to continue logging in.", "LOGIN_WITH_PASSKEY": "Login with passkey",