chore: update i18n keys
This commit is contained in:
@@ -20,9 +20,7 @@ export const SyncPage = ({ workspace }: { workspace: Workspace }) => {
|
|||||||
{currentWorkspace?.type === 'local' ? (
|
{currentWorkspace?.type === 'local' ? (
|
||||||
<>
|
<>
|
||||||
<StyledPublishExplanation>
|
<StyledPublishExplanation>
|
||||||
{currentWorkspace.name} is Local Workspace. All data is stored on
|
{t('Sync Description', { workspaceName: currentWorkspace.name })}
|
||||||
the current device. You can enable AFFiNE Cloud for this workspace
|
|
||||||
to keep data in sync with the cloud.
|
|
||||||
</StyledPublishExplanation>
|
</StyledPublishExplanation>
|
||||||
|
|
||||||
<StyledPublishCopyContainer>
|
<StyledPublishCopyContainer>
|
||||||
@@ -35,15 +33,20 @@ export const SyncPage = ({ workspace }: { workspace: Workspace }) => {
|
|||||||
type="primary"
|
type="primary"
|
||||||
shape="circle"
|
shape="circle"
|
||||||
>
|
>
|
||||||
Enable AFFiNE Cloud
|
{t('Enable AFFiNE Cloud')}
|
||||||
</Button>
|
</Button>
|
||||||
</StyledPublishCopyContainer>
|
</StyledPublishCopyContainer>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<StyledPublishExplanation>
|
<StyledPublishExplanation>
|
||||||
<code>{currentWorkspace && currentWorkspace.name}</code> is Cloud
|
<Trans i18nKey="Sync Description2">
|
||||||
Workspace. All data will be synchronized and saved to the AFFiNE
|
<code>
|
||||||
|
{{ workspaceName: currentWorkspace && currentWorkspace.name }}
|
||||||
|
</code>
|
||||||
|
is Cloud Workspace. All data will be synchronized and saved to
|
||||||
|
the AFFiNE
|
||||||
|
</Trans>
|
||||||
</StyledPublishExplanation>
|
</StyledPublishExplanation>
|
||||||
<StyledPublishCopyContainer>
|
<StyledPublishCopyContainer>
|
||||||
<Menu
|
<Menu
|
||||||
@@ -55,7 +58,7 @@ export const SyncPage = ({ workspace }: { workspace: Workspace }) => {
|
|||||||
}}
|
}}
|
||||||
icon={<DownloadIcon />}
|
icon={<DownloadIcon />}
|
||||||
>
|
>
|
||||||
Download core data to device
|
{t('Download data to device', { CoreOrAll: 'core' })}
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@@ -63,14 +66,16 @@ export const SyncPage = ({ workspace }: { workspace: Workspace }) => {
|
|||||||
}}
|
}}
|
||||||
icon={<DownloadIcon />}
|
icon={<DownloadIcon />}
|
||||||
>
|
>
|
||||||
Download all data to device
|
{t('Download data to device', { CoreOrAll: 'all' })}
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
placement="bottom-end"
|
placement="bottom-end"
|
||||||
disablePortal={true}
|
disablePortal={true}
|
||||||
>
|
>
|
||||||
<Button>Download all data to device</Button>
|
<Button>
|
||||||
|
{t('Download data to device', { CoreOrAll: 'all' })}
|
||||||
|
</Button>
|
||||||
</Menu>
|
</Menu>
|
||||||
</StyledPublishCopyContainer>
|
</StyledPublishCopyContainer>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import { PublishPage } from './PublishPage';
|
|||||||
import { ExportPage } from './ExportPage';
|
import { ExportPage } from './ExportPage';
|
||||||
import { SyncPage } from './SyncPage';
|
import { SyncPage } from './SyncPage';
|
||||||
import { useAppState } from '@/providers/app-state-provider';
|
import { useAppState } from '@/providers/app-state-provider';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
enum ActiveTab {
|
enum ActiveTab {
|
||||||
'general' = 'general',
|
'general' = 'general',
|
||||||
@@ -41,6 +42,7 @@ type WorkspaceSettingProps = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const WorkspaceSettingTab = ({ activeTab, onTabChange }: SettingTabProps) => {
|
const WorkspaceSettingTab = ({ activeTab, onTabChange }: SettingTabProps) => {
|
||||||
|
const { t } = useTranslation();
|
||||||
return (
|
return (
|
||||||
<StyledSettingTabContainer>
|
<StyledSettingTabContainer>
|
||||||
<WorkspaceSettingTagItem
|
<WorkspaceSettingTagItem
|
||||||
@@ -52,7 +54,7 @@ const WorkspaceSettingTab = ({ activeTab, onTabChange }: SettingTabProps) => {
|
|||||||
<StyledSettingTagIconContainer>
|
<StyledSettingTagIconContainer>
|
||||||
<EditIcon />
|
<EditIcon />
|
||||||
</StyledSettingTagIconContainer>
|
</StyledSettingTagIconContainer>
|
||||||
General
|
{t('General')}
|
||||||
</WorkspaceSettingTagItem>
|
</WorkspaceSettingTagItem>
|
||||||
|
|
||||||
<WorkspaceSettingTagItem
|
<WorkspaceSettingTagItem
|
||||||
@@ -64,7 +66,7 @@ const WorkspaceSettingTab = ({ activeTab, onTabChange }: SettingTabProps) => {
|
|||||||
<StyledSettingTagIconContainer>
|
<StyledSettingTagIconContainer>
|
||||||
<CloudInsyncIcon />
|
<CloudInsyncIcon />
|
||||||
</StyledSettingTagIconContainer>
|
</StyledSettingTagIconContainer>
|
||||||
Sync
|
{t('Sync')}
|
||||||
</WorkspaceSettingTagItem>
|
</WorkspaceSettingTagItem>
|
||||||
|
|
||||||
<WorkspaceSettingTagItem
|
<WorkspaceSettingTagItem
|
||||||
@@ -76,7 +78,7 @@ const WorkspaceSettingTab = ({ activeTab, onTabChange }: SettingTabProps) => {
|
|||||||
<StyledSettingTagIconContainer>
|
<StyledSettingTagIconContainer>
|
||||||
<UsersIcon />
|
<UsersIcon />
|
||||||
</StyledSettingTagIconContainer>
|
</StyledSettingTagIconContainer>
|
||||||
Collaboration
|
{t('Collaboration')}
|
||||||
</WorkspaceSettingTagItem>
|
</WorkspaceSettingTagItem>
|
||||||
<WorkspaceSettingTagItem
|
<WorkspaceSettingTagItem
|
||||||
isActive={activeTab === ActiveTab.publish}
|
isActive={activeTab === ActiveTab.publish}
|
||||||
@@ -87,7 +89,7 @@ const WorkspaceSettingTab = ({ activeTab, onTabChange }: SettingTabProps) => {
|
|||||||
<StyledSettingTagIconContainer>
|
<StyledSettingTagIconContainer>
|
||||||
<PublishIcon />
|
<PublishIcon />
|
||||||
</StyledSettingTagIconContainer>
|
</StyledSettingTagIconContainer>
|
||||||
Publish
|
{t('Publish')}
|
||||||
</WorkspaceSettingTagItem>
|
</WorkspaceSettingTagItem>
|
||||||
|
|
||||||
<WorkspaceSettingTagItem
|
<WorkspaceSettingTagItem
|
||||||
@@ -99,7 +101,7 @@ const WorkspaceSettingTab = ({ activeTab, onTabChange }: SettingTabProps) => {
|
|||||||
<StyledSettingTagIconContainer>
|
<StyledSettingTagIconContainer>
|
||||||
<PublishIcon />
|
<PublishIcon />
|
||||||
</StyledSettingTagIconContainer>
|
</StyledSettingTagIconContainer>
|
||||||
Export
|
{t('Export')}
|
||||||
</WorkspaceSettingTagItem>
|
</WorkspaceSettingTagItem>
|
||||||
</StyledSettingTabContainer>
|
</StyledSettingTabContainer>
|
||||||
);
|
);
|
||||||
@@ -114,7 +116,7 @@ export const WorkspaceSetting = ({
|
|||||||
const handleTabChange = (tab: ActiveTab) => {
|
const handleTabChange = (tab: ActiveTab) => {
|
||||||
setActiveTab(tab);
|
setActiveTab(tab);
|
||||||
};
|
};
|
||||||
|
const { t } = useTranslation();
|
||||||
const { currentMetaWorkSpace } = useAppState();
|
const { currentMetaWorkSpace } = useAppState();
|
||||||
const handleClickClose = () => {
|
const handleClickClose = () => {
|
||||||
onClose && onClose();
|
onClose && onClose();
|
||||||
@@ -133,7 +135,7 @@ export const WorkspaceSetting = ({
|
|||||||
{isOwner ? (
|
{isOwner ? (
|
||||||
<StyledSettingSidebar>
|
<StyledSettingSidebar>
|
||||||
<StyledSettingSidebarHeader>
|
<StyledSettingSidebarHeader>
|
||||||
Workspace Settings
|
{t('Workspace Settings')}
|
||||||
</StyledSettingSidebarHeader>
|
</StyledSettingSidebarHeader>
|
||||||
<WorkspaceSettingTab
|
<WorkspaceSettingTab
|
||||||
activeTab={activeTab}
|
activeTab={activeTab}
|
||||||
|
|||||||
@@ -132,5 +132,12 @@
|
|||||||
"Publishing Description": "After publishing to the web, everyone can view the content of this workspace through the link.",
|
"Publishing Description": "After publishing to the web, everyone can view the content of this workspace through the link.",
|
||||||
"Stop publishing": "Stop publishing",
|
"Stop publishing": "Stop publishing",
|
||||||
"Publish to web": "Publish to web",
|
"Publish to web": "Publish to web",
|
||||||
"Sync Description": "{{workspaceName}} is Local Workspace. All data is stored on the current device. You can enable AFFiNE Cloud for this workspace to keep data in sync with the cloud."
|
"Sync Description": "{{workspaceName}} is Local Workspace. All data is stored on the current device. You can enable AFFiNE Cloud for this workspace to keep data in sync with the cloud.",
|
||||||
|
"Sync Description2": "<1>{{workspaceName}}</1> is Cloud Workspace. All data will be synchronized and saved to the AFFiNE",
|
||||||
|
"Download data to device": "Download {{CoreOrAll}} data to device",
|
||||||
|
"General": "General",
|
||||||
|
"Sync": "Sync",
|
||||||
|
"Collaboration": "Collaboration",
|
||||||
|
"Publish": "Publish",
|
||||||
|
"Workspace Settings": "Workspace Settings"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user