diff --git a/src/locales/en.json b/src/locales/en.json index 4f2a27b..b36979e 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -4594,7 +4594,8 @@ "vk": "VK" }, "backToAccounts": "Back to accounts" - } + }, + "emailMergePasswordRequired": "This email already belongs to another account. To merge the accounts, enter that account's password." }, "theme": { "colors": "Theme Colors", diff --git a/src/locales/fa.json b/src/locales/fa.json index fd2cc4d..e189012 100644 --- a/src/locales/fa.json +++ b/src/locales/fa.json @@ -4139,7 +4139,8 @@ "vk": "VK" }, "backToAccounts": "بازگشت به فهرست حساب‌ها" - } + }, + "emailMergePasswordRequired": "این ایمیل قبلاً به حساب دیگری تعلق دارد. برای ادغام حساب‌ها، رمز عبور آن حساب را وارد کنید." }, "theme": { "colors": "رنگ‌های تم", diff --git a/src/locales/ru.json b/src/locales/ru.json index 672c5a1..2a9899d 100644 --- a/src/locales/ru.json +++ b/src/locales/ru.json @@ -5146,7 +5146,8 @@ "vk": "VK" }, "backToAccounts": "К списку аккаунтов" - } + }, + "emailMergePasswordRequired": "Этот email уже привязан к другому аккаунту. Чтобы объединить аккаунты, введите пароль от него." }, "theme": { "colors": "Цвета темы", diff --git a/src/locales/zh.json b/src/locales/zh.json index c196113..557fb7c 100644 --- a/src/locales/zh.json +++ b/src/locales/zh.json @@ -4138,7 +4138,8 @@ "vk": "VK" }, "backToAccounts": "返回账户列表" - } + }, + "emailMergePasswordRequired": "该邮箱已属于另一个账户。要合并账户,请输入该账户的密码。" }, "theme": { "colors": "主题颜色", diff --git a/src/pages/ConnectedAccounts.tsx b/src/pages/ConnectedAccounts.tsx index 43df293..0d81f42 100644 --- a/src/pages/ConnectedAccounts.tsx +++ b/src/pages/ConnectedAccounts.tsx @@ -409,7 +409,12 @@ export default function ConnectedAccounts() { }, onError: (err: { response?: { data?: { detail?: string } } }) => { const detail = err.response?.data?.detail; - if (detail?.includes('already registered')) { + // The email belongs to another account and merging it requires proving + // ownership: the backend asks for THAT account's password (account-takeover + // fix). Guide the user to enter it rather than showing a dead-end error. + if (detail?.includes('merge')) { + setEmailError(t('profile.emailMergePasswordRequired')); + } else if (detail?.includes('already registered')) { setEmailError(t('profile.emailAlreadyRegistered')); } else if (detail?.includes('already have a verified email')) { setEmailError(t('profile.alreadyHaveEmail'));