From 1cdc8dfeb2ff944b05519082587f523e3d20775b Mon Sep 17 00:00:00 2001 From: Erik Michelson Date: Sun, 14 Aug 2022 21:42:23 +0200 Subject: [PATCH] fix(access-tokens): Use label instead of placeholder in translation Signed-off-by: Erik Michelson --- locales/en.json | 2 +- .../access-tokens/access-token-deletion-modal.tsx | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/locales/en.json b/locales/en.json index 213b3bc29..5246956a3 100644 --- a/locales/en.json +++ b/locales/en.json @@ -213,7 +213,7 @@ }, "deleteAccessToken": { "title": "Really delete token?", - "message": "When deleting an access token, the applications that used it won't have access to your account anymore. You eventually need a new token to continue using those applications.", + "message": "When deleting the access token '{{label}}', the applications that used it won't have access to your account anymore. You eventually need a new token to continue using those applications.", "notificationTitle": "Access token deleted", "notificationText": "The access token '{{label}}' has been deleted.", "failed": "There was an error deleting the access token. Please try it again or contact your instance's administrator." diff --git a/src/components/profile-page/access-tokens/access-token-deletion-modal.tsx b/src/components/profile-page/access-tokens/access-token-deletion-modal.tsx index 42aa7c25d..acbfff8cd 100644 --- a/src/components/profile-page/access-tokens/access-token-deletion-modal.tsx +++ b/src/components/profile-page/access-tokens/access-token-deletion-modal.tsx @@ -34,7 +34,11 @@ export const AccessTokenDeletionModal: React.FC = return dispatchUiNotification( 'profile.modal.deleteAccessToken.notificationTitle', 'profile.modal.deleteAccessToken.notificationText', - {} + { + contentI18nOptions: { + label: token.label + } + } ) }) .catch(showErrorNotification('profile.modal.deleteAccessToken.failed')) @@ -48,7 +52,7 @@ export const AccessTokenDeletionModal: React.FC = title={'profile.modal.deleteAccessToken.title'} {...cypressId('access-token-modal-delete')}> - +