diff --git a/app/scenes/DocumentDelete.tsx b/app/scenes/DocumentDelete.tsx
index 774a4fa1d..82537a6f5 100644
--- a/app/scenes/DocumentDelete.tsx
+++ b/app/scenes/DocumentDelete.tsx
@@ -24,6 +24,9 @@ function DocumentDelete({ document, onSubmit }: Props) {
const { showToast } = useToasts();
const canArchive = !document.isDraft && !document.isArchived;
const collection = collections.get(document.collectionId);
+ const nestedDocumentsCount = collection
+ ? collection.getDocumentChildren(document.id).length
+ : 0;
const handleSubmit = React.useCallback(
async (ev: React.SyntheticEvent) => {
ev.preventDefault();
@@ -94,9 +97,9 @@ function DocumentDelete({ document, onSubmit }: Props) {
em: ,
}}
/>
- ) : (
+ ) : nestedDocumentsCount < 1 ? (
,
}}
/>
+ ) : (
+ ,
+ }}
+ />
)}
{canArchive && (
diff --git a/shared/i18n/locales/en_US/translation.json b/shared/i18n/locales/en_US/translation.json
index 78e52a662..c532d18cd 100644
--- a/shared/i18n/locales/en_US/translation.json
+++ b/shared/i18n/locales/en_US/translation.json
@@ -432,7 +432,9 @@
"Nested documents are not shared": "Nested documents are not shared",
"{{ teamName }} is using Outline to share documents, please login to continue.": "{{ teamName }} is using Outline to share documents, please login to continue.",
"Are you sure you want to delete the {{ documentTitle }} template?": "Are you sure you want to delete the {{ documentTitle }} template?",
- "Are you sure about that? Deleting the {{ documentTitle }} document will delete all of its history and any nested documents.": "Are you sure about that? Deleting the {{ documentTitle }} document will delete all of its history and any nested documents.",
+ "Are you sure about that? Deleting the {{ documentTitle }} document will delete all of its history.": "Are you sure about that? Deleting the {{ documentTitle }} document will delete all of its history.",
+ "Are you sure about that? Deleting the {{ documentTitle }} document will delete all of its history and {{ any }} nested document.": "Are you sure about that? Deleting the {{ documentTitle }} document will delete all of its history and one nested document.",
+ "Are you sure about that? Deleting the {{ documentTitle }} document will delete all of its history and {{ any }} nested document._plural": "Are you sure about that? Deleting the {{ documentTitle }} document will delete all of its history and {{ any }} nested documents.",
"If you’d like the option of referencing or restoring the {{noun}} in the future, consider archiving it instead.": "If you’d like the option of referencing or restoring the {{noun}} in the future, consider archiving it instead.",
"Archiving": "Archiving",
"Document moved": "Document moved",