Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Add some user visible strings to localization table

Manav Rathi39396a520c61
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<ManagePasskeyDrawerProps> = ({
<Stack spacing={"4px"} py={"12px"}>
<Titlebar
onClose={onClose}
- // TODO-PK: Localize (more below too)
- title="Manage Passkey"
+ title={t("manage_passkey")}
onRootClose={onClose}
/>
<InfoItem
@@ -251,7 +249,7 @@ const ManagePasskeyDrawer: React.FC<ManagePasskeyDrawerProps> = ({
setShowRenameDialog(true);
}}
startIcon={<EditIcon />}
- label={"Rename Passkey"}
+ label={t("RENAME_PASSKEY")}
/>
<MenuItemDivider />
<EnteMenuItem
@@ -259,7 +257,7 @@ const ManagePasskeyDrawer: React.FC<ManagePasskeyDrawerProps> = ({
setShowDeleteDialog(true);
}}
startIcon={<DeleteIcon />}
- label={"Delete Passkey"}
+ label={t("DELETE_PASSKEY")}
color="critical"
/>
</MenuItemGroup>
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 <Failed message={"Passkeys are not supported in this browser"} />;
+ return <Failed message={t("passkeys_not_supported")} />;
};
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",