alexandrusoare commented on code in PR #43967:
URL: https://github.com/apache/superset/pull/43967#discussion_r3977944162
##########
superset-frontend/src/pages/DatasetList/index.tsx:
##########
@@ -1552,31 +1620,82 @@ const DatasetList: FunctionComponent<DatasetListProps>
= ({
: t('Please confirm')
}
description={
- softDelete ? (
- bulkIsRecoverable ? (
- archiveConfirmDescription(datasetsLabelLower(), true)
+ <>
+ {softDelete ? (
+ bulkIsRecoverable ? (
+ archiveConfirmDescription(datasetsLabelLower(), true)
+ ) : (
+ <>
+ {tn(
+ '%s of the selected items is a semantic view, which cannot
be archived: it will be deleted permanently and cannot be recovered.',
+ '%s of the selected items are semantic views, which cannot
be archived: they will be deleted permanently and cannot be recovered.',
+ pendingBulkSemanticCount,
+ pendingBulkSemanticCount,
+ )}{' '}
+ {t(
+ 'The remaining %s will be moved to Recently Archived.',
+ datasetsLabelLower(),
+ )}
+ </>
+ )
) : (
- <>
+ t(
+ 'Are you sure you want to delete the selected %s?',
+ datasetsLabelLower(),
+ )
+ )}
+ {bulkRelatedLookup.status === 'loading' && (
+ <p>{t('Checking for affected charts and dashboards…')}</p>
+ )}
+ {bulkRelatedLookup.status === 'failed' && (
+ <p>
+ {t(
+ 'Could not check which charts and dashboards depend on the
selected %s. Deleting them may break charts and dashboards.',
+ datasetsLabelLower(),
+ )}
+ </p>
+ )}
+ {bulkRelatedLookup.status === 'done' &&
+ (bulkRelatedLookup.related.charts.count > 0 ||
+ bulkRelatedLookup.related.dashboards.count > 0 ? (
+ <>
+ <p>
+ {t(
+ 'The selected %s are linked to %s charts that appear on
%s dashboards. Deleting them will break those objects.',
Review Comment:
"linked to %s charts that appear on %s dashboards" — hardcoded plurals;
reads "1 charts" / "1 dashboards" when either count is 1. You could use tn() or
split the template.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]