From 36976d17f7784019d5c3377ef7cfcfeb07bfc46d Mon Sep 17 00:00:00 2001 From: Beto Dealmeida Date: Wed, 9 Dec 2020 14:40:07 -0800 Subject: [PATCH] fix: make "DELETE" confirmation work in other languages (#11987) * Confirm delete i18n * Make DELETE a parameter --- superset-frontend/src/components/DeleteModal.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/superset-frontend/src/components/DeleteModal.tsx b/superset-frontend/src/components/DeleteModal.tsx index ad58aff54cc..37a9ca580c5 100644 --- a/superset-frontend/src/components/DeleteModal.tsx +++ b/superset-frontend/src/components/DeleteModal.tsx @@ -65,7 +65,9 @@ export default function DeleteModal({ > {description} - {t('type "delete" to confirm')} + + {t('Type "%s" to confirm', t('DELETE'))} + , ) => { const targetValue = (event.currentTarget?.value as string) ?? ''; - setDisableChange(targetValue.toUpperCase() !== 'DELETE'); + setDisableChange(targetValue.toUpperCase() !== t('DELETE')); }} />