diff options
| author | Haishan <[email protected]> | 2020-12-06 14:57:59 +0800 |
|---|---|---|
| committer | Haishan <[email protected]> | 2020-12-06 20:19:51 +0800 |
| commit | 8a50ef4ef2f6f6044d36ea2f4fe06e663083972e (patch) | |
| tree | da098c1434b5f745f391330dde37b6468deec45b /src/components/Logs.tsx | |
| parent | a8c6cd23ce2b585362f515080b2167990c554fed (diff) | |
feat: initial Chinese UI language support
Diffstat (limited to 'src/components/Logs.tsx')
| -rw-r--r-- | src/components/Logs.tsx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/components/Logs.tsx b/src/components/Logs.tsx index 5bc1f5d..3a4dabd 100644 --- a/src/components/Logs.tsx +++ b/src/components/Logs.tsx @@ -1,5 +1,6 @@ import cx from 'clsx'; -import React from 'react'; +import * as React from 'react'; +import { useTranslation } from 'react-i18next'; import { areEqual, FixedSizeList as List } from 'react-window'; import { fetchLogs } from '../api/logs'; @@ -73,10 +74,11 @@ function Logs({ dispatch, logLevel, apiConfig, logs }) { fetchLogs({ ...apiConfig, logLevel }, appendLogInternal); }, [apiConfig, logLevel, appendLogInternal]); const [refLogsContainer, containerHeight] = useRemainingViewPortHeight(); + const { t } = useTranslation(); return ( <div> - <ContentHeader title="Logs" /> + <ContentHeader title={t('Logs')} /> <LogSearch /> {/* @ts-expect-error ts-migrate(2322) FIXME: Type 'number | MutableRefObject<any>' is not assig... Remove this comment to see the full error message */} <div ref={refLogsContainer} style={{ paddingBottom }}> @@ -89,7 +91,7 @@ function Logs({ dispatch, logLevel, apiConfig, logs }) { <div className={s0.logPlaceholderIcon}> <SvgYacd width={200} height={200} /> </div> - <div>No logs yet, hang tight...</div> + <div>{t('no_logs')}</div> </div> ) : ( <div className={s0.logsWrapper}> |
