Skip to content

Commit 61c9c87

Browse files
committed
⚡️(frontend) inject i18n.language into PDF instead of raw FR
change language=fr-FR to i18next.language to ensure proper screen reader support Signed-off-by: Cyril <[email protected]>
1 parent f202cc7 commit 61c9c87

File tree

1 file changed

+2
-1
lines changed
  • src/frontend/apps/impress/src/features/docs/doc-export/components

1 file changed

+2
-1
lines changed

src/frontend/apps/impress/src/features/docs/doc-export/components/ModalExport.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import { TemplatesOrdering, useTemplates } from '../api/useTemplates';
2323
import { docxDocsSchemaMappings } from '../mappingDocx';
2424
import { pdfDocsSchemaMappings } from '../mappingPDF';
2525
import { downloadFile } from '../utils';
26+
import i18next from 'i18next';
2627

2728
enum DocDownloadFormat {
2829
PDF = 'pdf',
@@ -98,7 +99,7 @@ export const ModalExport = ({ onClose, doc }: ModalExportProps) => {
9899

99100
// Inject language="fr-FR" for screen reader support
100101
const pdfDocument = isValidElement(rawPdfDocument)
101-
? cloneElement(rawPdfDocument, { language: 'fr-FR' })
102+
? cloneElement(rawPdfDocument, { language: i18next.language })
102103
: rawPdfDocument;
103104

104105
blobExport = await pdf(pdfDocument).toBlob();

0 commit comments

Comments
 (0)