From c72b0b180cd55d9c730ef87fbd548ebd09971e4e Mon Sep 17 00:00:00 2001 From: Anthony LC Date: Tue, 6 Oct 2026 15:08:32 +0200 Subject: [PATCH] =?UTF-8?q?fixup!=20=F0=9F=8C=90(frontend)=20add=20Crowdin?= =?UTF-8?q?=20translator=20context?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + .../components/ConfirmationDuplicateModal.tsx | 2 +- .../docs/doc-management/hooks/useImport.tsx | 26 +++++++++++-------- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6b5005e9..9b93202b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -72,6 +72,7 @@ and this project adheres to offline - 🐛(frontend) stop the service worker from caching the collaboration server's rest api +- 🌐(frontend) add Crowdin translator context #2785 ### Changed diff --git a/src/frontend/apps/impress/src/features/docs/doc-management/components/ConfirmationDuplicateModal.tsx b/src/frontend/apps/impress/src/features/docs/doc-management/components/ConfirmationDuplicateModal.tsx index 850e08b40..6cc48fc34 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-management/components/ConfirmationDuplicateModal.tsx +++ b/src/frontend/apps/impress/src/features/docs/doc-management/components/ConfirmationDuplicateModal.tsx @@ -292,7 +292,7 @@ export const ToastActions = ({ onClick={onCloseToast} > {isTopRoot - ? t('Open', { + ? t('Open document', { description: 'Action to open the duplicated document', }) : t('Back to original', { diff --git a/src/frontend/apps/impress/src/features/docs/doc-management/hooks/useImport.tsx b/src/frontend/apps/impress/src/features/docs/doc-management/hooks/useImport.tsx index d7439543d..37972d278 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-management/hooks/useImport.tsx +++ b/src/frontend/apps/impress/src/features/docs/doc-management/hooks/useImport.tsx @@ -57,17 +57,21 @@ export const useImport = ({ onDragOver, onImportSuccess }: UseImportProps) => { (fileName: string) => { const allowedExtensions = Object.values(ACCEPT).flat().join(', '); toast( - t( - allowedExtensions - ? `The document "{{documentName}}" import has failed (only {{allowedExtensions}} files are allowed)` - : `The document "{{documentName}}" import has failed`, - { - description: - 'Toast shown when a file to import has an unsupported type', - documentName: fileName, - allowedExtensions, - }, - ), + allowedExtensions + ? t( + `The document "{{documentName}}" import has failed (only {{allowedExtensions}} files are allowed)`, + { + description: + 'Toast shown when a file to import has an unsupported type', + documentName: fileName, + allowedExtensions, + }, + ) + : t(`The document "{{documentName}}" import has failed`, { + description: + 'Toast shown when importing a file as a document failed', + documentName: fileName, + }), VariantType.ERROR, ); },