diff --git a/packages/app/src/components/header/Header.tsx b/packages/app/src/components/header/Header.tsx index 9db8149d5e..41fced5907 100644 --- a/packages/app/src/components/header/Header.tsx +++ b/packages/app/src/components/header/Header.tsx @@ -7,7 +7,7 @@ import { StyledCloseButton, } from './styles'; import CloseIcon from '@mui/icons-material/Close'; -import { getWarningMessage, shouldShowWarning } from './utils'; +import { useWarningMessage, shouldShowWarning } from './utils'; import EditorOptionMenu from './header-right-items/EditorOptionMenu'; import TrashButtonGroup from './header-right-items/TrashButtonGroup'; import ThemeModeSwitch from './header-right-items/theme-mode-switch'; @@ -22,7 +22,7 @@ const BrowserWarning = ({ }) => { return ( - {getWarningMessage()} + {useWarningMessage()} diff --git a/packages/app/src/components/header/QuickSearchButton.tsx b/packages/app/src/components/header/QuickSearchButton.tsx index ffe1fe7e14..a1c68ffba8 100644 --- a/packages/app/src/components/header/QuickSearchButton.tsx +++ b/packages/app/src/components/header/QuickSearchButton.tsx @@ -25,7 +25,7 @@ export const QuickSearchButton = ({ const { triggerQuickSearchModal } = useModal(); const { t } = useTranslation(); return ( - + { const raw = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./); @@ -19,20 +20,20 @@ export const shouldShowWarning = () => { ); }; -export const getWarningMessage = () => { +export const useWarningMessage = () => { + const { t } = useTranslation(); if (!getIsChrome()) { return ( - We recommend the Chrome browser for optimal experience. + + We recommend the Chrome browser for optimal + experience. + ); } if (getChromeVersion() < minimumChromeVersion) { - return ( - - Please upgrade to the latest version of Chrome for the best experience. - - ); + return {t('upgradeBrowser')}; } return ''; }; diff --git a/packages/app/src/components/loading/PageLoading.tsx b/packages/app/src/components/loading/PageLoading.tsx index 025eba7687..ef853c4d61 100644 --- a/packages/app/src/components/loading/PageLoading.tsx +++ b/packages/app/src/components/loading/PageLoading.tsx @@ -1,5 +1,6 @@ import { styled } from '@/styles'; import Loading from './Loading'; +import { useTranslation } from '@affine/i18n'; // Used for the full page loading const StyledLoadingContainer = styled('div')(() => { @@ -17,12 +18,13 @@ const StyledLoadingContainer = styled('div')(() => { }; }); -export const PageLoading = ({ text = 'Loading...' }: { text?: string }) => { +export const PageLoading = ({ text }: { text?: string }) => { + const { t } = useTranslation(); return (
-

{text}

+

{text ? text : t('Loading')}

); diff --git a/packages/app/src/components/login-modal/LoginOptionButton.tsx b/packages/app/src/components/login-modal/LoginOptionButton.tsx index c1384bc8eb..dd1d51cc66 100644 --- a/packages/app/src/components/login-modal/LoginOptionButton.tsx +++ b/packages/app/src/components/login-modal/LoginOptionButton.tsx @@ -3,9 +3,10 @@ import { styled } from '@/styles'; import { Button } from '@/ui/button'; // import { useModal } from '@/providers/GlobalModalProvider'; import { GoogleIcon, StayLogOutIcon } from './Icons'; - +import { useTranslation } from '@affine/i18n'; export const GoogleLoginButton = () => { // const { triggerLoginModal } = useModal(); + const { t } = useTranslation(); return ( { @@ -24,8 +25,10 @@ export const GoogleLoginButton = () => { - Continue with Google - Set up an AFFiNE account to sync data + {t('Continue with Google')} + + {t('Set up an AFFiNE account to sync data')} + @@ -33,6 +36,7 @@ export const GoogleLoginButton = () => { }; export const StayLogOutButton = () => { + const { t } = useTranslation(); return ( @@ -40,8 +44,8 @@ export const StayLogOutButton = () => { - Stay logged out - All changes are saved locally + {t('Stay logged out')} + {t('All changes are saved locally')} diff --git a/packages/app/src/components/login-modal/index.tsx b/packages/app/src/components/login-modal/index.tsx index f398383196..a754c76191 100644 --- a/packages/app/src/components/login-modal/index.tsx +++ b/packages/app/src/components/login-modal/index.tsx @@ -3,13 +3,14 @@ import { styled } from '@/styles'; import { Modal, ModalWrapper, ModalCloseButton } from '@/ui/modal'; import { TextButton } from '@/ui/button'; import { GoogleLoginButton, StayLogOutButton } from './LoginOptionButton'; - +import { useTranslation } from '@affine/i18n'; interface LoginModalProps { open: boolean; onClose: () => void; } export const LoginModal = ({ open, onClose }: LoginModalProps) => { + const { t } = useTranslation(); return ( @@ -23,12 +24,12 @@ export const LoginModal = ({ open, onClose }: LoginModalProps) => { /> - Currently not logged in + {t('NotLoggedIn')}
- }>Clear local data + }>{t('ClearData')}
diff --git a/packages/app/src/components/mobile-modal/index.tsx b/packages/app/src/components/mobile-modal/index.tsx index ff9796359b..b568c2697d 100644 --- a/packages/app/src/components/mobile-modal/index.tsx +++ b/packages/app/src/components/mobile-modal/index.tsx @@ -3,8 +3,10 @@ import Modal, { ModalCloseButton, ModalWrapper } from '@/ui/modal'; import getIsMobile from '@/utils/get-is-mobile'; import { StyledButton, StyledContent, StyledTitle } from './styles'; import bg from './bg.png'; +import { useTranslation } from '@affine/i18n'; export const MobileModal = () => { const [showModal, setShowModal] = useState(getIsMobile()); + const { t } = useTranslation(); return ( { }} /> - Ooops! + {t('Ooops!')} -

Looks like you are browsing on a mobile device.

-

- We are still working on mobile support and recommend you use a - desktop device. -

+

{t('mobile device')}

+

{t('mobile device description')}

{ setShowModal(false); }} > - Got it + {t('Got it')}
diff --git a/packages/app/src/components/page-list/Empty.tsx b/packages/app/src/components/page-list/Empty.tsx index ef13e1b117..4430b8f1a9 100644 --- a/packages/app/src/components/page-list/Empty.tsx +++ b/packages/app/src/components/page-list/Empty.tsx @@ -1,6 +1,9 @@ import React from 'react'; import { Empty } from '@/ui/empty'; -export const PageListEmpty = () => { +import { useTranslation } from '@affine/i18n'; +export const PageListEmpty = (props: { listType?: string }) => { + const { listType } = props; + const { t } = useTranslation(); return (
{ height={300} sx={{ marginTop: '100px', marginBottom: '30px' }} /> -

Tips: Click Add to Favourites/Trash and the page will appear here.

-

(Designer is grappling with designing)

+ {listType === 'all' &&

{t('emptyAllPages')}

} + {listType === 'favorite' &&

{t('emptyFavourite')}

} + {listType === 'trash' &&

{t('emptyTrash')}

} +

{t('still designed')}

); }; diff --git a/packages/app/src/components/page-list/index.tsx b/packages/app/src/components/page-list/index.tsx index c275e8295b..7623eb4895 100644 --- a/packages/app/src/components/page-list/index.tsx +++ b/packages/app/src/components/page-list/index.tsx @@ -68,17 +68,19 @@ export const PageList = ({ showFavoriteTag = false, isTrash = false, isPublic = false, + listType, }: { pageList: PageMeta[]; showFavoriteTag?: boolean; isTrash?: boolean; isPublic?: boolean; + listType?: 'all' | 'trash' | 'favorite'; }) => { const router = useRouter(); const { currentWorkspace } = useAppState(); const { t } = useTranslation(); if (pageList.length === 0) { - return ; + return ; } return ( diff --git a/packages/app/src/components/quick-search/Input.tsx b/packages/app/src/components/quick-search/Input.tsx index 83ff131f71..6d96d239b0 100644 --- a/packages/app/src/components/quick-search/Input.tsx +++ b/packages/app/src/components/quick-search/Input.tsx @@ -9,6 +9,7 @@ import { SearchIcon } from '@blocksuite/icons'; import { StyledInputContent, StyledLabel } from './style'; import { Command } from 'cmdk'; import { useAppState } from '@/providers/app-state-provider'; +import { useTranslation } from '@affine/i18n'; export const Input = (props: { query: string; setQuery: Dispatch>; @@ -18,7 +19,7 @@ export const Input = (props: { const [inputValue, setInputValue] = useState(''); const inputRef = useRef(null); const { currentWorkspace } = useAppState(); - + const { t } = useTranslation(); useEffect(() => { inputRef.current?.addEventListener( 'blur', @@ -78,8 +79,10 @@ export const Input = (props: { }} placeholder={ currentWorkspace?.isPublish - ? `Search in ${currentWorkspace?.blocksuiteWorkspace?.meta.name}` - : 'Quick Search...' + ? t('Quick search placeholder2', { + workspace: currentWorkspace?.blocksuiteWorkspace?.meta.name, + }) + : t('Quick search placeholder') } /> diff --git a/packages/app/src/components/quick-search/Results.tsx b/packages/app/src/components/quick-search/Results.tsx index fe9cc5d883..9e23c5f7c6 100644 --- a/packages/app/src/components/quick-search/Results.tsx +++ b/packages/app/src/components/quick-search/Results.tsx @@ -79,7 +79,7 @@ export const Results = (props: { ) ) : ( - + {List.map(link => { return ( { const { workspaceList, currentWorkspace, login, user, logout } = useAppState(); const router = useRouter(); + const { t } = useTranslation(); return (
@@ -34,7 +36,7 @@ export const WorkspaceModal = ({ open, onClose }: WorkspaceModalProps) => { style={{ padding: '10px', display: 'flex', flexDirection: 'column' }} >
- My Workspaces + {t('My Workspaces')} {/* */} { marginRight: '10px', }} /> - Create Or Import + {t('Create Or Import')}

- Tips:Workspace is your virtual space to capture, create and plan - as just one person or together as a team. + {t('Tips')} + {t('Workspace description')}

@@ -137,10 +139,10 @@ export const WorkspaceModal = ({ open, onClose }: WorkspaceModalProps) => { ) : ( )}
diff --git a/packages/app/src/components/workspace-setting/ExportPage.tsx b/packages/app/src/components/workspace-setting/ExportPage.tsx index e3bde461f9..83830f1777 100644 --- a/packages/app/src/components/workspace-setting/ExportPage.tsx +++ b/packages/app/src/components/workspace-setting/ExportPage.tsx @@ -1,6 +1,6 @@ import { styled } from '@/styles'; import { WorkspaceUnit } from '@affine/datacenter'; - +import { Trans } from '@affine/i18n'; export const ExportPageTitleContainer = styled('div')(() => { return { display: 'flex', @@ -12,8 +12,13 @@ export const ExportPageTitleContainer = styled('div')(() => { export const ExportPage = ({ workspace }: { workspace: WorkspaceUnit }) => { return ( - Export Workspace{' '} - {workspace.name} Is Comming + + Export Workspace + + {{ workspace: workspace.name }} + + Is Comming + ); }; diff --git a/packages/app/src/components/workspace-setting/PublishPage.tsx b/packages/app/src/components/workspace-setting/PublishPage.tsx index 6cc17f68f2..86fbf399f9 100644 --- a/packages/app/src/components/workspace-setting/PublishPage.tsx +++ b/packages/app/src/components/workspace-setting/PublishPage.tsx @@ -12,11 +12,11 @@ import { toast } from '@/ui/toast'; // import { useAppState } from '@/providers/app-state-provider3'; import { WorkspaceUnit } from '@affine/datacenter'; import { useWorkspaceHelper } from '@/hooks/use-workspace-helper'; - +import { useTranslation } from '@affine/i18n'; export const PublishPage = ({ workspace }: { workspace: WorkspaceUnit }) => { const shareUrl = window.location.host + '/public-workspace/' + workspace.id; const { publishWorkspace, enableWorkspace } = useWorkspaceHelper(); - + const { t } = useTranslation(); const togglePublic = async (flag: boolean) => { await publishWorkspace(workspace.id.toString(), flag); }; @@ -37,22 +37,21 @@ export const PublishPage = ({ workspace }: { workspace: WorkspaceUnit }) => { {workspace?.published ? ( <> - Publishing to web requires AFFiNE Cloud service . + {t('Publishing')} - Share with link + {t('Share with link')} ) : ( - After publishing to the web, everyone can view the content of - this workspace through the link. + {'Publishing Description'} )} @@ -64,7 +63,7 @@ export const PublishPage = ({ workspace }: { workspace: WorkspaceUnit }) => { type="primary" shape="circle" > - Stop publishing + {t('Stop publishing')} ) : ( )}
@@ -82,7 +81,7 @@ export const PublishPage = ({ workspace }: { workspace: WorkspaceUnit }) => { <> - Publishing to web requires AFFiNE Cloud service. + {t('Publishing')} @@ -93,7 +92,7 @@ export const PublishPage = ({ workspace }: { workspace: WorkspaceUnit }) => { type="primary" shape="circle" > - Enable AFFiNE Cloud + {t('Enable AFFiNE Cloud')} diff --git a/packages/app/src/components/workspace-setting/SyncPage.tsx b/packages/app/src/components/workspace-setting/SyncPage.tsx index d6345a294b..fe677b33a1 100644 --- a/packages/app/src/components/workspace-setting/SyncPage.tsx +++ b/packages/app/src/components/workspace-setting/SyncPage.tsx @@ -8,17 +8,19 @@ import { Button } from '@/ui/button'; import { Menu, MenuItem } from '@/ui/menu'; import { WorkspaceUnit } from '@affine/datacenter'; import { useWorkspaceHelper } from '@/hooks/use-workspace-helper'; +import { Trans, useTranslation } from '@affine/i18n'; export const SyncPage = ({ workspace }: { workspace: WorkspaceUnit }) => { const { enableWorkspace } = useWorkspaceHelper(); + const { t } = useTranslation(); return (
{workspace?.provider === 'local' ? ( <> - {workspace.name ?? 'Affine'} 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: workspace.name ?? 'Affine', + })} @@ -29,15 +31,18 @@ export const SyncPage = ({ workspace }: { workspace: WorkspaceUnit }) => { type="primary" shape="circle" > - Enable AFFiNE Cloud + {t('Enable AFFiNE Cloud')} ) : ( <> - {workspace.name ?? 'Affine'} is Cloud Workspace. All - data will be synchronized and saved to the AFFiNE + + {{ workspaceName: workspace.name ?? 'Affine' }} + is Cloud Workspace. All data will be synchronised and saved to + the AFFiNE + { }} icon={} > - Download core data to device + {t('Download data to device', { CoreOrAll: 'core' })} { @@ -57,14 +62,16 @@ export const SyncPage = ({ workspace }: { workspace: WorkspaceUnit }) => { }} icon={} > - Download all data to device + {t('Download data to device', { CoreOrAll: 'all' })} } placement="bottom-end" disablePortal={true} > - + diff --git a/packages/app/src/components/workspace-setting/general/General.tsx b/packages/app/src/components/workspace-setting/general/General.tsx index 65e87496d0..4ba205c8cf 100644 --- a/packages/app/src/components/workspace-setting/general/General.tsx +++ b/packages/app/src/components/workspace-setting/general/General.tsx @@ -16,6 +16,7 @@ import { Upload } from '@/components/file-upload'; import { WorkspaceAvatar } from '@/components/workspace-avatar'; import { WorkspaceUnit } from '@affine/datacenter'; import { useWorkspaceHelper } from '@/hooks/use-workspace-helper'; +import { useTranslation } from '@affine/i18n'; export const GeneralPage = ({ workspace }: { workspace: WorkspaceUnit }) => { const [showDelete, setShowDelete] = useState(false); const [showLeave, setShowLeave] = useState(false); @@ -23,6 +24,8 @@ export const GeneralPage = ({ workspace }: { workspace: WorkspaceUnit }) => { const [workspaceName, setWorkspaceName] = useState(workspace.name); const { currentWorkspace } = useAppState(); const { updateWorkspace } = useWorkspaceHelper(); + const { t } = useTranslation(); + const isOwner = true; const handleChangeWorkSpaceName = (newName: string) => { setWorkspaceName(newName); @@ -56,7 +59,7 @@ export const GeneralPage = ({ workspace }: { workspace: WorkspaceUnit }) => { return workspace ? (
- Workspace Icon + {t('Workspace Icon')}
{ accept="image/gif,image/jpeg,image/jpg,image/png,image/svg" fileChange={fileChange} > - + {/* TODO: add upload logic */} - Workspace Name + {t('Workspace Name')} { ✔️ - Workspace Type + {t('Workspace Type')} {workspace.provider} @@ -105,7 +108,7 @@ export const GeneralPage = ({ workspace }: { workspace: WorkspaceUnit }) => { {isOwner ? ( <> { ) : ( <> void; @@ -31,6 +31,7 @@ export const WorkspaceDelete = ({ workspace, }: WorkspaceDeleteProps) => { const [deleteStr, setDeleteStr] = useState(''); + const { t } = useTranslation(); const router = useRouter(); const handlerInputChange = (workspaceName: string) => { @@ -55,31 +56,40 @@ export const WorkspaceDelete = ({ - Delete Workspace + {t('Delete Workspace')} {workspace.provider === 'local' ? ( - Deleting ( - {workspace.name}) cannot - be undone, please proceed with caution. along with all its content. + + Deleting ( + + {{ workspace: workspace.name }} + + ) cannot be undone, please proceed with caution. along with all + its content. + ) : ( - Deleting ( - {workspace.name}) will - delete both local and cloud data, this operation cannot be undone, - please proceed with caution. + + Deleting ( + + {{ workspace: workspace.name }} + + ) will delete both local and cloud data, this operation cannot be + undone, please proceed with caution. + )} diff --git a/packages/app/src/components/workspace-setting/general/leave/Leave.tsx b/packages/app/src/components/workspace-setting/general/leave/Leave.tsx index e34b4ac257..a9689cbfda 100644 --- a/packages/app/src/components/workspace-setting/general/leave/Leave.tsx +++ b/packages/app/src/components/workspace-setting/general/leave/Leave.tsx @@ -7,6 +7,7 @@ import { } from './style'; import { ModalCloseButton } from '@/ui/modal'; import { Button } from '@/ui/button'; +import { useTranslation } from '@affine/i18n'; // import { getDataCenter } from '@affine/datacenter'; // import { useAppState } from '@/providers/app-state-provider'; @@ -22,6 +23,7 @@ export const WorkspaceLeave = ({ onClose, workspaceId, }: WorkspaceDeleteProps) => { + const { t } = useTranslation(); console.log('workspaceId: ', workspaceId); // const router = useRouter(); // const { refreshWorkspacesMeta } = useAppState(); @@ -37,14 +39,13 @@ export const WorkspaceLeave = ({ - Leave Workspace + {t('Leave Workspace')} - After you leave, you will not be able to access all the contents of - this workspace. + {t('Leave Workspace Description')} diff --git a/packages/app/src/components/workspace-setting/member/InviteMemberModal.tsx b/packages/app/src/components/workspace-setting/member/InviteMemberModal.tsx index c066908ed0..c965e6c0bf 100644 --- a/packages/app/src/components/workspace-setting/member/InviteMemberModal.tsx +++ b/packages/app/src/components/workspace-setting/member/InviteMemberModal.tsx @@ -7,6 +7,7 @@ import { useState } from 'react'; import { Avatar } from '@mui/material'; import useMembers from '@/hooks/use-members'; import { User } from '@affine/datacenter'; +import { useTranslation } from '@affine/i18n'; interface LoginModalProps { open: boolean; onClose: () => void; @@ -53,6 +54,7 @@ export const InviteMemberModal = ({ const [showTip, setShowTip] = useState(false); const [userData, setUserData] = useState(null); const { inviteMember, getUserByEmail } = useMembers(); + const { t } = useTranslation(); const inputChange = (value: string) => { setShowMember(true); if (gmailReg.test(value)) { @@ -82,7 +84,7 @@ export const InviteMemberModal = ({ /> - Invite members + {t('Invite Members')} { setShowMember(false); }} - placeholder="Search mail (Gmail support only)" + placeholder={t('Invite placeholder')} > {showMember ? ( {showTip ? ( - Non-Gmail is not supported + {t('Non-Gmail')} ) : ( {userData?.avatar ? ( @@ -125,7 +127,7 @@ export const InviteMemberModal = ({ onInviteSuccess(); }} > - Invite + {t('Invite')} diff --git a/packages/app/src/components/workspace-slider-bar/index.tsx b/packages/app/src/components/workspace-slider-bar/index.tsx index 32c7962ebf..4663afa56a 100644 --- a/packages/app/src/components/workspace-slider-bar/index.tsx +++ b/packages/app/src/components/workspace-slider-bar/index.tsx @@ -152,7 +152,7 @@ export const WorkSpaceSliderBar = () => { - Settings + {t('Settings')} diff --git a/packages/app/src/pages/workspace/[workspaceId]/all.tsx b/packages/app/src/pages/workspace/[workspaceId]/all.tsx index 27718d02ef..1a0ba456d7 100644 --- a/packages/app/src/pages/workspace/[workspaceId]/all.tsx +++ b/packages/app/src/pages/workspace/[workspaceId]/all.tsx @@ -14,6 +14,7 @@ const All = () => { !p.trash)} showFavoriteTag={true} + listType="all" /> ); diff --git a/packages/app/src/pages/workspace/[workspaceId]/favorite.tsx b/packages/app/src/pages/workspace/[workspaceId]/favorite.tsx index 5e9e9ad752..cc3f0369a3 100644 --- a/packages/app/src/pages/workspace/[workspaceId]/favorite.tsx +++ b/packages/app/src/pages/workspace/[workspaceId]/favorite.tsx @@ -13,7 +13,10 @@ export const Favorite = () => { }> {t('Favourites')} - p.favorite && !p.trash)} /> + p.favorite && !p.trash)} + listType="favorite" + /> ); }; diff --git a/packages/app/src/pages/workspace/[workspaceId]/trash.tsx b/packages/app/src/pages/workspace/[workspaceId]/trash.tsx index bbcc742a63..d0c2350373 100644 --- a/packages/app/src/pages/workspace/[workspaceId]/trash.tsx +++ b/packages/app/src/pages/workspace/[workspaceId]/trash.tsx @@ -11,7 +11,11 @@ export const Trash = () => { return ( <> }>{t('Trash')} - p.trash)} isTrash={true} /> + p.trash)} + isTrash={true} + listType="trash" + /> ); }; diff --git a/packages/i18n/src/index.ts b/packages/i18n/src/index.ts index 714cc40f31..47b5d3251e 100644 --- a/packages/i18n/src/index.ts +++ b/packages/i18n/src/index.ts @@ -15,6 +15,7 @@ declare module 'react-i18next' { // custom namespace type if you changed it // defaultNS: 'ns1'; // custom resources type + allowObjectInHTMLChildren: true; resources: { en: typeof en_US; }; diff --git a/packages/i18n/src/resources/bn.json b/packages/i18n/src/resources/bn.json deleted file mode 100644 index 0967ef424b..0000000000 --- a/packages/i18n/src/resources/bn.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/packages/i18n/src/resources/en.json b/packages/i18n/src/resources/en.json index 761f649c18..2831a8aafe 100644 --- a/packages/i18n/src/resources/en.json +++ b/packages/i18n/src/resources/en.json @@ -1,11 +1,8 @@ { "Quick search": "Quick search", - "Quick search placeholder": "Quick Search...", - "Quick search placeholder2": "Search in {{workspace}}", "All pages": "All pages", "Favourites": "Favourites", "No item": "No item", - "Settings": "Settings", "Import": "Import", "Trash": "Trash", "New Page": "New Page", @@ -14,13 +11,11 @@ "Find results": "Find {{number}} results", "Collapse sidebar": "Collapse sidebar", "Expand sidebar": "Expand sidebar", - "Removed from Favourites": "Removed from Favourites", - "Remove from favourites": "Remove from favourites", "Added to Favourites": "Added to Favourites", "Add to favourites": "Add to favourites", "Paper": "Paper", "Edgeless": "Edgeless", - "Switch to": "Switch to", + "Jump to": "Jump to", "Convert to ": "Convert to ", "Page": "Page", "Export": "Export", @@ -37,7 +32,6 @@ "Delete page?": "Delete page?", "Delete permanently?": "Delete permanently?", "will be moved to Trash": "{{title}} will be moved to Trash", - "Once deleted, you can't undo this action.": "Once deleted, you can't undo this action.", "Moved to Trash": "Moved to Trash", "Permanently deleted": "Permanently deleted", "restored": "{{title}} restored", @@ -57,7 +51,6 @@ "Strikethrough": "Strikethrough", "Inline code": "Inline code", "Code block": "Code block", - "Link": "Hyperlink (with selected text)", "Body text": "Body text", "Heading": "Heading {{number}}", "Increase indent": "Increase indent", @@ -65,6 +58,11 @@ "Markdown Syntax": "Markdown Syntax", "Divider": "Divider", "404 - Page Not Found": "404 - Page Not Found", + "Once deleted, you can't undo this action": { + "": "Once deleted, you can't undo this action." + }, + "Remove from favourites": "Remove from favourites", + "Removed from Favourites": "Removed from Favourites", "New Workspace": "New Workspace", "Workspace description": "Workspace is your virtual space to capture, create and plan as just one person or together as a team.", "Create": "Create", @@ -79,6 +77,10 @@ "TrashButtonGroupTitle": "Permanently delete", "TrashButtonGroupDescription": "Once deleted, you can't undo this action. Do you confirm?", "Delete permanently": "Delete permanently", + "Link": "Hyperlink (with selected text)", + "Quick search placeholder": "Quick Search...", + "Quick search placeholder2": "Search in {{workspace}}", + "Settings": "Settings", "recommendBrowser": " We recommend the <1>Chrome browser for optimal experience.", "upgradeBrowser": "Please upgrade to the latest version of Chrome for the best experience.", "Invite Members": "Invite Members", @@ -104,19 +106,15 @@ "Create Or Import": "Create Or Import", "Tips": "Tips: ", "login success": "Login success", - "Sign in": "Sign in AFFiNE Cloud", "Sign out": "Sign out of AFFiNE Cloud", "Delete Workspace": "Delete Workspace", - "Delete Workspace Description": "Deleting (<1>{{workspace}}) cannot be undone, please proceed with caution. along with all its content.", "Delete Workspace Description2": "Deleting (<1>{{workspace}}) will delete both local and cloud data, this operation cannot be undone, please proceed with caution.", "Delete Workspace placeholder": "Please type “Delete” to confirm", "Leave Workspace": "Leave Workspace", - "Leave Workspace Description": "After you leave, you will not be able to access all the contents of this workspace.", "Leave": "Leave", "Workspace Icon": "Workspace Icon", "Workspace Name": "Workspace Name", "Workspace Type": "Workspace Type", - "Export Workspace": "Export Workspace <1>{{workspace}} Is Coming", "Users": "Users", "Access level": "Access level", "Pending": "Pending", @@ -132,12 +130,16 @@ "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 Description2": "<1>{{workspaceName}} 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" + "Workspace Settings": "Workspace Settings", + "Export Workspace": "Export Workspace <1>{{workspace}} is coming soon", + "Leave Workspace Description": "After you leave, you will no longer be able to access the contents of this workspace.", + "Sign in": "Sign in to AFFiNE Cloud", + "Sync Description": "{{workspaceName}} is a 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}} is a Cloud Workspace. All data will be synchronised and saved to AFFiNE Cloud.", + "Delete Workspace Description": "Deleting (<1>{{workspace}}) cannot be undone, please proceed with caution. All contents will be lost." } diff --git a/packages/i18n/src/resources/fr.json b/packages/i18n/src/resources/fr.json deleted file mode 100644 index 0967ef424b..0000000000 --- a/packages/i18n/src/resources/fr.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/packages/i18n/src/resources/index.ts b/packages/i18n/src/resources/index.ts index 329fa9c679..2081ad8aaf 100644 --- a/packages/i18n/src/resources/index.ts +++ b/packages/i18n/src/resources/index.ts @@ -1,16 +1,11 @@ // THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. // Run `pnpm run download-resources` to regenerate. -// To overwrite this, please overwrite download.ts +// To overwrite this, please overwrite download.ts script. import en from './en.json'; -import zh_Hans from './zh-Hans.json'; -import zh_Hant from './zh-Hant.json'; -import sr from './sr.json'; -import fr from './fr.json'; -import bn from './bn.json'; export const LOCALES = [ { - id: 1000016008, + id: 1000040001, name: 'English', tag: 'en', originalName: 'English', @@ -19,54 +14,4 @@ export const LOCALES = [ completeRate: 1, res: en, }, - { - id: 1000016009, - name: 'Simplified Chinese', - tag: 'zh-Hans', - originalName: '简体中文', - flagEmoji: '🇨🇳', - base: false, - completeRate: 1, - res: zh_Hans, - }, - { - id: 1000016012, - name: 'Traditional Chinese', - tag: 'zh-Hant', - originalName: '繁體中文', - flagEmoji: '🇭🇰', - base: false, - completeRate: 1, - res: zh_Hant, - }, - { - id: 1000034005, - name: 'Serbian', - tag: 'sr', - originalName: 'српски', - flagEmoji: '🇷🇸', - base: false, - completeRate: 0.9166666666666666, - res: sr, - }, - { - id: 1000034008, - name: 'French', - tag: 'fr', - originalName: 'français', - flagEmoji: '🇫🇷', - base: false, - completeRate: 1, - res: fr, - }, - { - id: 1000034010, - name: 'Bangla', - tag: 'bn', - originalName: 'বাংলা', - flagEmoji: '🇧🇩', - base: false, - completeRate: 0.7083333333333334, - res: bn, - }, ] as const; diff --git a/packages/i18n/src/resources/sr.json b/packages/i18n/src/resources/sr.json deleted file mode 100644 index 0967ef424b..0000000000 --- a/packages/i18n/src/resources/sr.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/packages/i18n/src/resources/zh-Hans.json b/packages/i18n/src/resources/zh-Hans.json deleted file mode 100644 index 0967ef424b..0000000000 --- a/packages/i18n/src/resources/zh-Hans.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/packages/i18n/src/resources/zh-Hant.json b/packages/i18n/src/resources/zh-Hant.json deleted file mode 100644 index 0967ef424b..0000000000 --- a/packages/i18n/src/resources/zh-Hant.json +++ /dev/null @@ -1 +0,0 @@ -{}