From f52a27f218d739ac09ce258ae16e6245ecef4c73 Mon Sep 17 00:00:00 2001 From: natoromano Date: Fri, 16 Jan 2026 13:21:05 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8(front)=20i18n=20and=20standardize=20p?= =?UTF-8?q?df=20parsing=20display?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix: align i18n key 🌐fix: keep filename Signed-off-by: Laurent Paoletti --- CHANGELOG.md | 1 + .../chat/components/ToolInvocationItem.tsx | 32 ++++++++++--------- .../conversations/src/i18n/translations.json | 12 ++++++- 3 files changed, 29 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c829790..b0fc692 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to ### Fixed - ⚡️(front) performance improvements on chat input +- 💄(front) i18n and standardize pdf parsing display ### Removed diff --git a/src/frontend/apps/conversations/src/features/chat/components/ToolInvocationItem.tsx b/src/frontend/apps/conversations/src/features/chat/components/ToolInvocationItem.tsx index a77905c..1f5a231 100644 --- a/src/frontend/apps/conversations/src/features/chat/components/ToolInvocationItem.tsx +++ b/src/frontend/apps/conversations/src/features/chat/components/ToolInvocationItem.tsx @@ -18,7 +18,10 @@ export const ToolInvocationItem: React.FC = ({ const { t } = useTranslation(); if (toolInvocation.toolName === 'document_parsing') { - if (toolInvocation.state === 'partial-call') { + if ( + toolInvocation.state === 'partial-call' || + toolInvocation.state === 'result' + ) { return null; } @@ -32,24 +35,23 @@ export const ToolInvocationItem: React.FC = ({ ) ? documents.map((doc) => doc.identifier) : []; + return ( - {toolInvocation.state === 'result' ? ( - {`Parsing done: ${documentIdentifiers.join(', ')}`} - ) : ( - - - {`Parsing documents: ${documentIdentifiers.join(', ')} ...`} - - )} + + + {t('Extracting documents: {{documents}} ...', { + documents: documentIdentifiers.join(', '), + })} + ); } diff --git a/src/frontend/apps/conversations/src/i18n/translations.json b/src/frontend/apps/conversations/src/i18n/translations.json index 78a9203..7b00fa6 100644 --- a/src/frontend/apps/conversations/src/i18n/translations.json +++ b/src/frontend/apps/conversations/src/i18n/translations.json @@ -1,6 +1,12 @@ { "de": { "translation": { "ABC-1234-XY": "ABC-1234-XY" } }, - "en": { "translation": { "Login": "Login", "Logout": "Logout" } }, + "en": { + "translation": { + "Login": "Login", + "Logout": "Logout", + "Extracting documents {{documents}} ...": "Extracting documents {{documents}} ..." + } + }, "fr": { "translation": { "30 sec to tell us what you think or report a bug": "Prenez 30 secondes pour partager votre avis ou signaler un bug", @@ -43,6 +49,7 @@ "Direct exchange with our team": "Échange direct avec notre équipe", "Enter your message or a question": "Entrez votre message ou une question", "Explore other LaSuite apps": "Explorer les autres applications de LaSuite", + "Extracting documents: {{documents}} ...": "Extraction des documents: {{documents}} ...", "Failed to activate account. Please try again.": "Échec de l'activation du compte. Veuillez réessayer.", "Failed to copy": "Échec de la copie", "Failed to register for notifications. Please try again.": "Échec de l'inscription aux notifications. Veuillez réessayer.", @@ -176,6 +183,7 @@ "Direct exchange with our team": "Directe uitwisseling met ons team", "Enter your message or a question": "Voer uw bericht of een vraag in", "Explore other LaSuite apps": "Ontdek andere LaSuite-apps", + "Extracting documents: {{documents}} ...": "Documenten extraheren: {{documents}} ...", "Failed to activate account. Please try again.": "Account activeren mislukt. Probeer het opnieuw.", "Failed to copy": "Kopiëren mislukt", "Failed to register for notifications. Please try again.": "Registratie voor meldingen mislukt. Probeer het opnieuw.", @@ -309,6 +317,7 @@ "Direct exchange with our team": "Прямое общение с нашей командой", "Enter your message or a question": "Введите сообщение или вопрос", "Explore other LaSuite apps": "Посмотреть другие приложения LaSuite", + "Extracting documents: {{documents}} ...": "Извлечение документов: {{documents}} ...", "Failed to activate account. Please try again.": "Не удалось активировать учётную запись. Пожалуйста, попробуйте снова.", "Failed to copy": "Не удалось скопировать", "Failed to register for notifications. Please try again.": "Не удалось зарегистрироваться для получения уведомлений. Пожалуйста, попробуйте ещё раз.", @@ -442,6 +451,7 @@ "Direct exchange with our team": "Пряме спілкування з нашою командою", "Enter your message or a question": "Введіть ваше повідомлення або питання", "Explore other LaSuite apps": "Ознайомтесь з іншими застосунками LaSuite", + "Extracting documents: {{documents}} ...": "Вилучення документів: {{documents}} ...", "Failed to activate account. Please try again.": "Не вдалося активувати обліковий запис. Спробуйте ще раз.", "Failed to copy": "Не вдалось скопіювати", "Failed to register for notifications. Please try again.": "Не вдалося виконати реєстрацію для повідомлень. Будь ласка, спробуйте ще раз.",