Skip to content

armgit / ente

Public Imported from GitHub
0

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

feat: i18n for add passkey form

httpjamesm66234bd18ab7
diff --git a/apps/accounts/public/locales/en/translation.json b/apps/accounts/public/locales/en/translation.json
index ff15fd5634..30bedec271 100644
--- a/apps/accounts/public/locales/en/translation.json
+++ b/apps/accounts/public/locales/en/translation.json
@@ -628,5 +628,6 @@
"DELETE_PASSKEY": "Delete passkey",
"DELETE_PASSKEY_CONFIRMATION": "Are you sure you want to delete this passkey? This action is irreversible.",
"RENAME_PASSKEY": "Rename passkey",
+ "ADD_PASSKEY": "Add passkey",
"ENTER_PASSKEY_NAME": "Enter passkey name"
}
diff --git a/apps/accounts/src/pages/passkeys/index.tsx b/apps/accounts/src/pages/passkeys/index.tsx
index a460278e32..781d06843f 100644
--- a/apps/accounts/src/pages/passkeys/index.tsx
+++ b/apps/accounts/src/pages/passkeys/index.tsx
@@ -11,6 +11,7 @@ import { Dispatch, SetStateAction, createContext, useState } from 'react';
import { Passkey } from 'types/passkey';
import PasskeysList from './PasskeysList';
import ManagePasskeyDrawer from './ManagePasskeyDrawer';
+import { t } from 'i18next';
export const PasskeysContext = createContext(
{} as {
@@ -57,13 +58,11 @@ const Passkeys = () => {
return logError(e, 'Error creating credential');
}
- const finishResponse = await finishPasskeyRegistration(
+ await finishPasskeyRegistration(
inputValue,
newCredential,
response.sessionID
);
-
- console.log(finishResponse);
};
return (
@@ -78,8 +77,8 @@ const Passkeys = () => {
<Box>
<SingleInputForm
fieldType="text"
- placeholder="Passkey Name"
- buttonText="Add Passkey"
+ placeholder={t('ENTER_PASSKEY_NAME')}
+ buttonText={t('ADD_PASSKEY')}
initialValue={''}
blockButton
callback={handleSubmit}