mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-05 19:40:30 +08:00
update i18n for layout
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
||||
useShowSettingsSidebar,
|
||||
} from '@toeverything/datasource/state';
|
||||
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { EditorBoardSwitcher } from './EditorBoardSwitcher';
|
||||
import { FileSystem, fsApiSupported } from './FileSystem';
|
||||
import { CurrentPageTitle } from './Title';
|
||||
@@ -20,16 +21,17 @@ export const LayoutHeader = () => {
|
||||
const [isLocalWorkspace] = useLocalTrigger();
|
||||
const { toggleSettingsSidebar: toggleInfoSidebar, showSettingsSidebar } =
|
||||
useShowSettingsSidebar();
|
||||
const { t } = useTranslation();
|
||||
|
||||
const warningTips = useMemo(() => {
|
||||
if (!fsApiSupported()) {
|
||||
return 'Welcome to the AFFiNE demo. To begin saving changes you can SYNC DATA TO DISK with the latest version of Chromium based browser like Chrome/Edge';
|
||||
return t('warningTips.isNotfsApiSupported');
|
||||
} else if (!isLocalWorkspace) {
|
||||
return 'Welcome to the AFFiNE demo. To begin saving changes you can SYNC TO DISK.';
|
||||
return t('warningTips.isNotLocalWorkspace');
|
||||
} else {
|
||||
return 'AFFiNE is under active development and the current version is UNSTABLE. Please DO NOT store information or data';
|
||||
return t('warningTips.DoNotStore');
|
||||
}
|
||||
}, [isLocalWorkspace]);
|
||||
}, [isLocalWorkspace, t]);
|
||||
|
||||
return (
|
||||
<StyledContainerForHeaderRoot>
|
||||
@@ -43,7 +45,7 @@ export const LayoutHeader = () => {
|
||||
<FlexContainer>
|
||||
<StyledHelper>
|
||||
<FileSystem />
|
||||
<StyledShare disabled={true}>Share</StyledShare>
|
||||
<StyledShare disabled={true}>{t('Share')}</StyledShare>
|
||||
<div style={{ margin: '0px 12px' }}>
|
||||
<IconButton
|
||||
size="large"
|
||||
|
||||
Reference in New Issue
Block a user