Skip to content

Commit adbbaa3

Browse files
committed
♿(frontend) localize LaGaufre label fallback in Docs
We pass a translated fallback label so the waffle follows the app locale.
1 parent 1673752 commit adbbaa3

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/frontend/apps/impress/src/features/header/components/Waffle.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { LaGaufreV2, LaGaufreV2Props } from '@gouvfr-lasuite/ui-kit';
22
import React from 'react';
3+
import { useTranslation } from 'react-i18next';
34
import { css } from 'styled-components';
45

56
import { Box } from '@/components';
@@ -27,6 +28,7 @@ const LaGaufreV2Fixed = LaGaufreV2 as React.ComponentType<WaffleType>;
2728

2829
export const Waffle = () => {
2930
const { data: conf } = useConfig();
31+
const { t } = useTranslation();
3032

3133
const waffleConfig = conf?.theme_customization?.waffle;
3234

@@ -42,7 +44,12 @@ export const Waffle = () => {
4244
}
4345
`}
4446
>
45-
<LaGaufreV2Fixed {...waffleConfig} />
47+
<div style={{ display: 'flex' }}>
48+
<LaGaufreV2Fixed
49+
{...waffleConfig}
50+
label={waffleConfig.label ?? t('LaSuite digital services')}
51+
/>
52+
</div>
4653
</Box>
4754
);
4855
};

src/frontend/apps/impress/src/i18n/translations.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@
267267
"Approve": "Freigeben",
268268
"As this is a sub-document, please request access to the parent document to enable these features.": "Dies ist ein untergeordnetes Dokument, fordern Sie bitte den Zugriff auf das übergeordnete Dokument an, um diese Funktionen zu ermöglichen.",
269269
"Available soon": "Bald verfügbar",
270+
"LaSuite digital services": "Digitale Dienste von LaSuite",
270271
"Back to homepage": "Zurück zur Startseite",
271272
"Banner image": "Bannerbild",
272273
"Beautify": "Verschönern",
@@ -517,6 +518,7 @@
517518
"en": {
518519
"translation": {
519520
"Contains {{count}} sub-documents_one": "Contains {{count}} sub-document",
521+
"LaSuite digital services": "LaSuite digital services",
520522
"Share with {{count}} users_one": "Share with {{count}} user",
521523
"Shared with {{count}} users_many": "Shared with {{count}} users",
522524
"Shared with {{count}} users_one": "Shared with {{count}} user",
@@ -548,6 +550,7 @@
548550
"Anyone with the link can see the document": "Cualquiera con el enlace puede ver el documento",
549551
"Anyone with the link can view the document if they are logged in": "Cualquiera con el enlace puede ver el documento si ha iniciado sesión",
550552
"Available soon": "Próximamente disponible",
553+
"LaSuite digital services": "Servicios digitales de LaSuite",
551554
"Banner image": "Imagen de portada",
552555
"Beautify": "Embellecer",
553556
"Callout": "Destacado",
@@ -733,6 +736,7 @@
733736
"Ask anything...": "Posez n'importe quelle question...",
734737
"Available soon": "Disponible prochainement",
735738
"Back to homepage": "Retour à la page d'accueil",
739+
"LaSuite digital services": "Services LaSuite Numérique",
736740
"Banner image": "Image de la bannière",
737741
"Beautify": "Embellir",
738742
"By moving this document to <strong>{{targetDocumentTitle}}</strong>, it will lose its current access rights and inherit the permissions of that document. <strong>This access change cannot be undone.</strong>": "En déplaçant ce document vers <strong>{{targetDocumentTitle}}</strong>, il perdra ses droits d'accès actuels et héritera les permissions de ce document. <strong>Ce changement d'accès ne peut pas être annulé.</strong>",

0 commit comments

Comments
 (0)