From fbf2531dbbd1cfb463f3f4717aaeb02e0722befc Mon Sep 17 00:00:00 2001 From: s33g Date: Thu, 20 Feb 2025 00:08:18 +0000 Subject: [PATCH] Make unexpected error localizable --- web/src/components/main-error.tsx | 5 +++-- web/src/i18n/locales/en.ts | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/web/src/components/main-error.tsx b/web/src/components/main-error.tsx index 4957027..ca40fcf 100644 --- a/web/src/components/main-error.tsx +++ b/web/src/components/main-error.tsx @@ -1,4 +1,5 @@ import { Button } from 'antd'; +import { t } from 'i18next'; export const MainError = () => { return ( @@ -7,10 +8,10 @@ export const MainError = () => { role="alert" >

- Sorry, there seems to be some problems :( + {t('error.title')}

); diff --git a/web/src/i18n/locales/en.ts b/web/src/i18n/locales/en.ts index a0780d0..cab3863 100644 --- a/web/src/i18n/locales/en.ts +++ b/web/src/i18n/locales/en.ts @@ -254,6 +254,10 @@ const en = { updateBtn: 'Change', logoutBtn: 'Logout' } + }, + error: { + title: 'We\'ve ran into an issue', + refresh: 'Refresh', } } };