refac: i18n (#244)

This commit is contained in:
Patrick Thoelken
2025-01-16 16:10:00 +01:00
committed by GitHub
parent 430bfabfb4
commit 5073113568
20 changed files with 141 additions and 42 deletions

View File

@@ -11,6 +11,9 @@ import { useSubscription } from '../hooks/observable'
import { useToast } from '../hooks/toast'
import { ffetch } from '../lib/httpClient'
import { useAtomValue } from 'jotai'
import { useI18n } from '../hooks/useI18n'
const { i18n } = useI18n()
const validateCookie = (cookie: string) => pipe(
cookie,
@@ -164,7 +167,7 @@ const CookiesTextField: React.FC = () => {
defaultValue={savedCookies}
onChange={(e) => cookies$.next(e.currentTarget.value)}
/>
<Button onClick={deleteCookies}>Delete cookies</Button>
<Button onClick={deleteCookies}>{i18n.t('deleteCookies')}</Button>
</>
)
}

View File

@@ -34,7 +34,7 @@ const HomeSpeedDial: React.FC<Props> = ({ onDownloadOpen, onEditorOpen }) => {
>
<SpeedDialAction
icon={listView ? <ViewAgendaIcon /> : <FormatListBulleted />}
tooltipTitle={listView ? 'Card view' : 'Table view'}
tooltipTitle={listView ? 'Card view' : i18n.t('tableView')}
onClick={() => setListView(state => !state)}
/>
<SpeedDialAction

View File

@@ -31,7 +31,7 @@ export default function NoLivestreams() {
</SvgIcon>
</Title>
<Title fontWeight={'500'} fontSize={36} color={'gray'}>
No livestreams monitored
{i18n.t('livestreamNoMonitoring')}
</Title>
</FlexContainer>
)