From d02a51525f6373d612826b7ab9fc94e77a76e3b2 Mon Sep 17 00:00:00 2001 From: Johann150 Date: Sat, 19 Nov 2022 20:24:28 +0100 Subject: [PATCH] client: improve account deletion question The message may be confusing when used by an adminstrator because it said "your account". --- locales/en-US.yml | 2 +- packages/client/src/pages/settings/delete-account.vue | 4 ++-- packages/client/src/pages/user-info.vue | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/locales/en-US.yml b/locales/en-US.yml index c8cca2f4f..0476484aa 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -879,7 +879,7 @@ ffVisibility: "Follows/Followers Visibility" ffVisibilityDescription: "Allows you to configure who can see who you follow and who\ \ follows you." continueThread: "View thread continuation" -deleteAccountConfirm: "This will irreversibly delete your account. Proceed?" +deleteAccountConfirm: "This will irreversibly delete the account {handle}. Proceed?" incorrectPassword: "Incorrect password." voteConfirm: "Confirm your vote for \"{choice}\"?" hide: "Hide" diff --git a/packages/client/src/pages/settings/delete-account.vue b/packages/client/src/pages/settings/delete-account.vue index fe45b0d28..a25f4d49f 100644 --- a/packages/client/src/pages/settings/delete-account.vue +++ b/packages/client/src/pages/settings/delete-account.vue @@ -11,7 +11,7 @@ import FormInfo from '@/components/ui/info.vue'; import FormButton from '@/components/ui/button.vue'; import * as os from '@/os'; -import { signout } from '@/account'; +import { $i, signout } from '@/account'; import { i18n } from '@/i18n'; import { definePageMetadata } from '@/scripts/page-metadata'; @@ -19,7 +19,7 @@ async function deleteAccount() { { const { canceled } = await os.confirm({ type: 'warning', - text: i18n.ts.deleteAccountConfirm, + text: i18n.t('deleteAccountConfirm', { handle: '@' + $i.username }), }); if (canceled) return; } diff --git a/packages/client/src/pages/user-info.vue b/packages/client/src/pages/user-info.vue index c95dc524c..8ccffccd8 100644 --- a/packages/client/src/pages/user-info.vue +++ b/packages/client/src/pages/user-info.vue @@ -239,7 +239,7 @@ async function deleteAllFiles() { async function deleteAccount() { const confirm = await os.confirm({ type: 'warning', - text: i18n.ts.deleteAccountConfirm, + text: i18n.t('deleteAccountConfirm', { handle: acct(user) }), }); if (confirm.canceled) return;