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