diff --git a/plugins/export-assets/lang/cs.json b/plugins/export-assets/lang/cs.json index a15bc7d4a9..30347ceac0 100644 --- a/plugins/export-assets/lang/cs.json +++ b/plugins/export-assets/lang/cs.json @@ -46,6 +46,7 @@ "SelectWorkspaceToExportSpace": "Vybrat pracovní prostor pro export dokumentů z prostoru", "SelectSpace": "Vybrat prostor", "NoSelectedDocuments": "Žádné dokumenty nevybrány", + "NoDocumentsMatchedFilters": "Pro export nebyly nalezeny žádné dokumenty odpovídající aktuálním filtrům. Upravte filtry nebo výběr a zkuste to znovu.", "RequestPermissionToImport": "Prosím, požádejte vlastníka cílového pracovního prostoru o povolení k importu dokumentů.", "ExportOnlyEffective": "Exportovat pouze dokumenty s platným stavem", "ExportFilterMode": "Dokumenty k exportu", diff --git a/plugins/export-assets/lang/de.json b/plugins/export-assets/lang/de.json index 0a72517540..3bf5a0a5f9 100644 --- a/plugins/export-assets/lang/de.json +++ b/plugins/export-assets/lang/de.json @@ -46,6 +46,7 @@ "SelectWorkspaceToExportSpace": "Arbeitsbereich zum Exportieren von Dokumenten aus dem Bereich auswählen", "SelectSpace": "Bereich auswählen", "NoSelectedDocuments": "Keine Dokumente ausgewählt", + "NoDocumentsMatchedFilters": "Es wurden keine Dokumente zum Export gefunden, die den aktuellen Filtern entsprechen. Passen Sie Ihre Filter oder Auswahl an und versuchen Sie es erneut.", "RequestPermissionToImport": "Bitte fordern Sie die Berechtigung vom Eigentümer des Ziel-Arbeitsbereichs an, um Dokumente zu importieren.", "ExportOnlyEffective": "Nur Dokumente mit wirksamem Status exportieren", "ExportFilterMode": "Zu exportierende Dokumente", diff --git a/plugins/export-assets/lang/en.json b/plugins/export-assets/lang/en.json index be72165319..6fa7655b78 100644 --- a/plugins/export-assets/lang/en.json +++ b/plugins/export-assets/lang/en.json @@ -46,6 +46,7 @@ "SelectWorkspaceToExportSpace": "Select workspace to export documents from space", "SelectSpace": "Select space", "NoSelectedDocuments": "No documents selected", + "NoDocumentsMatchedFilters": "No documents were found to export with the current filters. Try adjusting your filters or selection and try again.", "RequestPermissionToImport": "Please request permission from the target workspace owner to import documents.", "ExportOnlyEffective": "Export only documents with effective status", "ExportFilterMode": "Documents to export", diff --git a/plugins/export-assets/lang/es.json b/plugins/export-assets/lang/es.json index 3f1bf090a3..e9440afee9 100644 --- a/plugins/export-assets/lang/es.json +++ b/plugins/export-assets/lang/es.json @@ -46,6 +46,7 @@ "SelectWorkspaceToExportSpace": "Seleccionar espacio de trabajo para exportar documentos del espacio", "SelectSpace": "Seleccionar espacio", "NoSelectedDocuments": "No hay documentos seleccionados", + "NoDocumentsMatchedFilters": "No se encontraron documentos para exportar con los filtros actuales. Ajusta los filtros o la selección y vuelve a intentarlo.", "RequestPermissionToImport": "Por favor, solicite permiso al propietario del espacio de trabajo de destino para importar documentos.", "ExportOnlyEffective": "Exportar solo documentos con estado efectivo", "ExportFilterMode": "Documentos a exportar", diff --git a/plugins/export-assets/lang/fr.json b/plugins/export-assets/lang/fr.json index 22326d6980..0f083aa6f7 100644 --- a/plugins/export-assets/lang/fr.json +++ b/plugins/export-assets/lang/fr.json @@ -46,6 +46,7 @@ "SelectWorkspaceToExportSpace": "Sélectionner l'espace de travail pour exporter les documents de l'espace", "SelectSpace": "Sélectionner l'espace", "NoSelectedDocuments": "Aucun document sélectionné", + "NoDocumentsMatchedFilters": "Aucun document à exporter ne correspond aux filtres actuels. Modifiez vos filtres ou votre sélection puis réessayez.", "RequestPermissionToImport": "Veuillez demander l'autorisation au propriétaire de l'espace de travail cible pour importer des documents.", "ExportOnlyEffective": "Exporter uniquement les documents avec statut effectif", "ExportFilterMode": "Documents à exporter", diff --git a/plugins/export-assets/lang/it.json b/plugins/export-assets/lang/it.json index 94c2013cf4..9f7c310d6a 100644 --- a/plugins/export-assets/lang/it.json +++ b/plugins/export-assets/lang/it.json @@ -46,6 +46,7 @@ "SelectWorkspaceToExportSpace": "Seleziona spazio di lavoro per esportare documenti dallo spazio", "SelectSpace": "Seleziona spazio", "NoSelectedDocuments": "Nessun documento selezionato", + "NoDocumentsMatchedFilters": "Nessun documento da esportare corrisponde ai filtri attuali. Modifica i filtri o la selezione e riprova.", "RequestPermissionToImport": "Si prega di richiedere l'autorizzazione al proprietario dello spazio di lavoro di destinazione per importare documenti.", "ExportOnlyEffective": "Esporta solo documenti con stato effettivo", "ExportFilterMode": "Documenti da esportare", diff --git a/plugins/export-assets/lang/ja.json b/plugins/export-assets/lang/ja.json index b15874f950..bb086ffcbf 100644 --- a/plugins/export-assets/lang/ja.json +++ b/plugins/export-assets/lang/ja.json @@ -46,6 +46,7 @@ "SelectWorkspaceToExportSpace": "スペースからドキュメントをエクスポートするワークスペースを選択", "SelectSpace": "スペースを選択", "NoSelectedDocuments": "ドキュメントが選択されていません", + "NoDocumentsMatchedFilters": "現在のフィルターではエクスポート対象のドキュメントが見つかりませんでした。フィルターまたは選択内容を変更して、もう一度お試しください。", "RequestPermissionToImport": "ドキュメントをインポートするには、対象ワークスペースの所有者に許可をリクエストしてください。", "ExportOnlyEffective": "有効なステータスのドキュメントのみエクスポート", "ExportFilterMode": "エクスポートするドキュメント", diff --git a/plugins/export-assets/lang/pt-br.json b/plugins/export-assets/lang/pt-br.json index 630107a15d..c352b0458c 100644 --- a/plugins/export-assets/lang/pt-br.json +++ b/plugins/export-assets/lang/pt-br.json @@ -46,6 +46,7 @@ "SelectWorkspaceToExportSpace": "Selecionar espaço de trabalho para exportar documentos do espaço", "SelectSpace": "Selecionar espaço", "NoSelectedDocuments": "Nenhum documento selecionado", + "NoDocumentsMatchedFilters": "Nenhum documento foi encontrado para exportação com os filtros atuais. Ajuste os filtros ou a seleção e tente novamente.", "RequestPermissionToImport": "Por favor, solicite permissão ao proprietário do espaço de trabalho de destino para importar documentos.", "SkipDeletedObsolete": "Pular documentos arquivados ou obsoletos", "ExportOnlyEffective": "Exportar apenas documentos com status efetivo", diff --git a/plugins/export-assets/lang/pt.json b/plugins/export-assets/lang/pt.json index e148938256..bc03f5650e 100644 --- a/plugins/export-assets/lang/pt.json +++ b/plugins/export-assets/lang/pt.json @@ -46,6 +46,7 @@ "SelectWorkspaceToExportSpace": "Selecionar espaço de trabalho para exportar documentos do espaço", "SelectSpace": "Selecionar espaço", "NoSelectedDocuments": "Nenhum documento selecionado", + "NoDocumentsMatchedFilters": "Nenhum documento foi encontrado para exportação com os filtros atuais. Ajuste os filtros ou a seleção e tente novamente.", "RequestPermissionToImport": "Por favor, solicite permissão ao proprietário do espaço de trabalho de destino para importar documentos.", "ExportOnlyEffective": "Exportar apenas documentos com status efetivo", "ExportFilterMode": "Documentos a exportar", diff --git a/plugins/export-assets/lang/ru.json b/plugins/export-assets/lang/ru.json index adf647921c..ddb258391b 100644 --- a/plugins/export-assets/lang/ru.json +++ b/plugins/export-assets/lang/ru.json @@ -46,6 +46,7 @@ "SelectWorkspaceToExportSpace": "Выбрать рабочее пространство для экспорта документов из пространства", "SelectSpace": "Выбрать пространство", "NoSelectedDocuments": "Документы не выбраны", + "NoDocumentsMatchedFilters": "Не удалось найти документы для экспорта с текущими фильтрами. Измените фильтры или выбор и попробуйте снова.", "RequestPermissionToImport": "Пожалуйста, запросите разрешение у владельца рабочего пространства, куда вы хотите экспортировать документы.", "ExportOnlyEffective": "Экспортировать только документы с действующим статусом", "ExportFilterMode": "Документы для экспорта", diff --git a/plugins/export-assets/lang/tr.json b/plugins/export-assets/lang/tr.json index 3cee74529b..2c4757eede 100644 --- a/plugins/export-assets/lang/tr.json +++ b/plugins/export-assets/lang/tr.json @@ -46,6 +46,7 @@ "SelectWorkspaceToExportSpace": "Alanın belgelerini dışa aktarmak için çalışma alanı seç", "SelectSpace": "Alan seç", "NoSelectedDocuments": "Seçili belge yok", + "NoDocumentsMatchedFilters": "Geçerli filtrelerle dışa aktarılacak belge bulunamadı. Filtreleri veya seçimi düzenleyip tekrar deneyin.", "RequestPermissionToImport": "Belgeleri içe aktarmak için lütfen hedef çalışma alanı sahibinden izin isteyin.", "ExportOnlyEffective": "Yalnızca geçerli durumdaki belgeleri dışa aktar", "ExportFilterMode": "Dışa aktarılacak belgeler", diff --git a/plugins/export-assets/lang/zh.json b/plugins/export-assets/lang/zh.json index 799696dd54..42e38a540b 100644 --- a/plugins/export-assets/lang/zh.json +++ b/plugins/export-assets/lang/zh.json @@ -46,6 +46,7 @@ "SelectWorkspaceToExportSpace": "选择工作区以从空间导出文档", "SelectSpace": "选择空间", "NoSelectedDocuments": "未选择文档", + "NoDocumentsMatchedFilters": "使用当前筛选条件未找到可导出的文档。请调整筛选条件或选择后重试。", "RequestPermissionToImport": "请向目标工作区所有者请求导入文档的权限。", "ExportOnlyEffective": "仅导出具有有效状态的文档", "ExportFilterMode": "要导出的文档", diff --git a/plugins/export-resources/src/export.ts b/plugins/export-resources/src/export.ts index 0116431f8f..60a9fff065 100644 --- a/plugins/export-resources/src/export.ts +++ b/plugins/export-resources/src/export.ts @@ -92,14 +92,23 @@ export async function exportToWorkspace ( if (!res.ok) { let errorMessage = 'Unknown error occurred' + let noDocuments = false try { const errorData = await res.json() errorMessage = errorData.message ?? errorData.error ?? `HTTP ${res.status}: ${res.statusText}` + if (res.status === 400 && errorMessage === 'No documents found to export') { + noDocuments = true + } } catch { errorMessage = `HTTP ${res.status}: ${res.statusText}` } console.error('Export request failed:', errorMessage) - await showFailureNotification(errorMessage) + + if (noDocuments) { + await showNoDocumentsNotification() + } else { + await showFailureNotification(errorMessage) + } return } @@ -117,6 +126,17 @@ export async function exportToWorkspace ( } } +async function showNoDocumentsNotification (): Promise { + const lang = getCurrentLanguage() + addNotification( + await translate(plugin.string.ExportToWorkspaceFailed, {}, lang), + await translate(plugin.string.NoDocumentsMatchedFilters, {}, lang), + ExportNotification, + undefined, + NotificationSeverity.Error + ) +} + async function showFailureNotification (errorDetails?: string): Promise { const lang = getCurrentLanguage() const message = diff --git a/plugins/export-resources/src/plugin.ts b/plugins/export-resources/src/plugin.ts index 93c8e19051..34f8804ce0 100644 --- a/plugins/export-resources/src/plugin.ts +++ b/plugins/export-resources/src/plugin.ts @@ -50,6 +50,7 @@ export default mergeIds(exportId, exportPlugin, { SelectWorkspaceToExportSpace: '' as IntlString, SelectSpace: '' as IntlString, NoSelectedDocuments: '' as IntlString, + NoDocumentsMatchedFilters: '' as IntlString, RequestPermissionToImport: '' as IntlString, ExportOnlyEffective: '' as IntlString, ExportFilterMode: '' as IntlString, diff --git a/services/export/pod-export/src/server.ts b/services/export/pod-export/src/server.ts index c461a861ca..e5c9ae4a72 100644 --- a/services/export/pod-export/src/server.ts +++ b/services/export/pod-export/src/server.ts @@ -539,7 +539,11 @@ export function createServer ( const exportResult: ExportResult = await exporter.export(options) - if (exportResult.success && exportResult.exportedCount > 0) { + if (exportResult.exportedCount === 0) { + res.status(400).send({ message: 'No documents found to export' }) + } + + if (exportResult.success) { await sendExportCompletionNotification( measureCtx, targetTxOps,