mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-26 10:45:57 +08:00
chore: replace all "favourite" with "favorite" (#927)
This commit is contained in:
@@ -37,12 +37,12 @@ const PopoverContent = () => {
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
toggleFavoritePage(id);
|
toggleFavoritePage(id);
|
||||||
toast(
|
toast(
|
||||||
favorite ? t('Removed from Favourites') : t('Added to Favourites')
|
favorite ? t('Removed from Favorites') : t('Added to Favorites')
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
icon={favorite ? <FavouritedIcon /> : <FavouritesIcon />}
|
icon={favorite ? <FavouritedIcon /> : <FavouritesIcon />}
|
||||||
>
|
>
|
||||||
{favorite ? t('Remove from favourites') : t('Add to favourites')}
|
{favorite ? t('Remove from favorites') : t('Add to favorites')}
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
icon={mode === 'page' ? <EdgelessIcon /> : <PaperIcon />}
|
icon={mode === 'page' ? <EdgelessIcon /> : <PaperIcon />}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export const PageListEmpty = (props: { listType?: string }) => {
|
|||||||
sx={{ marginTop: '100px', marginBottom: '30px' }}
|
sx={{ marginTop: '100px', marginBottom: '30px' }}
|
||||||
/>
|
/>
|
||||||
{listType === 'all' && <p>{t('emptyAllPages')}</p>}
|
{listType === 'all' && <p>{t('emptyAllPages')}</p>}
|
||||||
{listType === 'favorite' && <p>{t('emptyFavourite')}</p>}
|
{listType === 'favorite' && <p>{t('emptyFavorite')}</p>}
|
||||||
{listType === 'trash' && <p>{t('emptyTrash')}</p>}
|
{listType === 'trash' && <p>{t('emptyTrash')}</p>}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -27,12 +27,12 @@ export const OperationCell = ({ pageMeta }: { pageMeta: PageMeta }) => {
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
toggleFavoritePage(id);
|
toggleFavoritePage(id);
|
||||||
toast(
|
toast(
|
||||||
favorite ? t('Removed from Favourites') : t('Added to Favourites')
|
favorite ? t('Removed from Favorites') : t('Added to Favorites')
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
icon={favorite ? <FavouritedIcon /> : <FavouritesIcon />}
|
icon={favorite ? <FavouritedIcon /> : <FavouritesIcon />}
|
||||||
>
|
>
|
||||||
{favorite ? t('Remove from favourites') : t('Add to favourites')}
|
{favorite ? t('Remove from favorites') : t('Add to favorites')}
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ const FavoriteTag = ({
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
return (
|
return (
|
||||||
<Tooltip
|
<Tooltip
|
||||||
content={favorite ? t('Favourited') : t('Favourite')}
|
content={favorite ? t('Favorited') : t('Favorite')}
|
||||||
placement="top-start"
|
placement="top-start"
|
||||||
>
|
>
|
||||||
<IconButton
|
<IconButton
|
||||||
@@ -51,7 +51,7 @@ const FavoriteTag = ({
|
|||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
toggleFavoritePage(id);
|
toggleFavoritePage(id);
|
||||||
toast(
|
toast(
|
||||||
favorite ? t('Removed from Favourites') : t('Added to Favourites')
|
favorite ? t('Removed from Favorites') : t('Added to Favorites')
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
style={{
|
style={{
|
||||||
@@ -60,7 +60,7 @@ const FavoriteTag = ({
|
|||||||
className={favorite ? '' : 'favorite-button'}
|
className={favorite ? '' : 'favorite-button'}
|
||||||
>
|
>
|
||||||
{favorite ? (
|
{favorite ? (
|
||||||
<FavouritedIcon data-testid="favourited-icon" />
|
<FavouritedIcon data-testid="favorited-icon" />
|
||||||
) : (
|
) : (
|
||||||
<FavouritesIcon />
|
<FavouritesIcon />
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export const useSwitchToConfig = (
|
|||||||
icon: AllPagesIcon,
|
icon: AllPagesIcon,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('Favourites'),
|
title: t('Favorites'),
|
||||||
href: currentWorkspaceId
|
href: currentWorkspaceId
|
||||||
? `/workspace/${currentWorkspaceId}/favorite`
|
? `/workspace/${currentWorkspaceId}/favorite`
|
||||||
: '',
|
: '',
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ export const WorkSpaceSliderBar = () => {
|
|||||||
<StyledListItem active={router.asPath === paths.favorite}>
|
<StyledListItem active={router.asPath === paths.favorite}>
|
||||||
<StyledLink href={{ pathname: paths.favorite }}>
|
<StyledLink href={{ pathname: paths.favorite }}>
|
||||||
<FavouritesIcon />
|
<FavouritesIcon />
|
||||||
{t('Favourites')}
|
{t('Favorites')}
|
||||||
</StyledLink>
|
</StyledLink>
|
||||||
<IconButton
|
<IconButton
|
||||||
darker={true}
|
darker={true}
|
||||||
|
|||||||
@@ -12,10 +12,10 @@ export const Favorite = () => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Head>
|
<Head>
|
||||||
<title>{t('Favourites')} - AFFiNE</title>
|
<title>{t('Favorites')} - AFFiNE</title>
|
||||||
</Head>
|
</Head>
|
||||||
<PageListHeader icon={<FavouritesIcon />}>
|
<PageListHeader icon={<FavouritesIcon />}>
|
||||||
{t('Favourites')}
|
{t('Favorites')}
|
||||||
</PageListHeader>
|
</PageListHeader>
|
||||||
<PageList
|
<PageList
|
||||||
pageList={pageList.filter(p => p.favorite && !p.trash)}
|
pageList={pageList.filter(p => p.favorite && !p.trash)}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ docker run -it --name affine -d -v [YOUR_PATH]:/app/data -p 3000:3000 ghcr.io/to
|
|||||||
|
|
||||||
### In this release, you can now:
|
### In this release, you can now:
|
||||||
|
|
||||||
- Manage your pages from the collapsible **sidebar**, which allows you to add **favourites** and restore deleted files from the **trash**
|
- Manage your pages from the collapsible **sidebar**, which allows you to add **favorites** and restore deleted files from the **trash**
|
||||||
- Search through all your content with the quick search - activate with `Ctrl/⌘ + K`
|
- Search through all your content with the quick search - activate with `Ctrl/⌘ + K`
|
||||||
- A friendly Reminder:
|
- A friendly Reminder:
|
||||||
- In the case of unselected text, `Ctrl/⌘ + K` activates quick search;
|
- In the case of unselected text, `Ctrl/⌘ + K` activates quick search;
|
||||||
@@ -53,7 +53,7 @@ console.log('Hello world');
|
|||||||
|
|
||||||
[] Send a page to trash
|
[] Send a page to trash
|
||||||
|
|
||||||
[] Favourite a page
|
[] Favorite a page
|
||||||
|
|
||||||
**Have an enjoyable editing experience !!!** 😃
|
**Have an enjoyable editing experience !!!** 😃
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"Quick search": "Quick search",
|
"Quick search": "Quick search",
|
||||||
"All pages": "All pages",
|
"All pages": "All pages",
|
||||||
"Favourites": "Favourites",
|
"Favorites": "Favorites",
|
||||||
"No item": "No item",
|
"No item": "No item",
|
||||||
"Import": "Import",
|
"Import": "Import",
|
||||||
"Trash": "Trash",
|
"Trash": "Trash",
|
||||||
@@ -11,8 +11,8 @@
|
|||||||
"Find results": "Find {{number}} results",
|
"Find results": "Find {{number}} results",
|
||||||
"Collapse sidebar": "Collapse sidebar",
|
"Collapse sidebar": "Collapse sidebar",
|
||||||
"Expand sidebar": "Expand sidebar",
|
"Expand sidebar": "Expand sidebar",
|
||||||
"Added to Favourites": "Added to Favourites",
|
"Added to Favorites": "Added to Favorites",
|
||||||
"Add to favourites": "Add to favourites",
|
"Add to favorites": "Add to favorites",
|
||||||
"Paper": "Paper",
|
"Paper": "Paper",
|
||||||
"Edgeless": "Edgeless",
|
"Edgeless": "Edgeless",
|
||||||
"Convert to ": "Convert to ",
|
"Convert to ": "Convert to ",
|
||||||
@@ -26,8 +26,8 @@
|
|||||||
"Created": "Created",
|
"Created": "Created",
|
||||||
"Updated": "Updated",
|
"Updated": "Updated",
|
||||||
"Open in new tab": "Open in new tab",
|
"Open in new tab": "Open in new tab",
|
||||||
"Favourite": "Favourite",
|
"Favorite": "Favorite",
|
||||||
"Favourited": "Favourited",
|
"Favorited": "Favorited",
|
||||||
"Delete page?": "Delete page?",
|
"Delete page?": "Delete page?",
|
||||||
"Delete permanently?": "Delete permanently?",
|
"Delete permanently?": "Delete permanently?",
|
||||||
"will be moved to Trash": "{{title}} will be moved to Trash",
|
"will be moved to Trash": "{{title}} will be moved to Trash",
|
||||||
@@ -60,15 +60,15 @@
|
|||||||
"Once deleted, you can't undo this action": {
|
"Once deleted, you can't undo this action": {
|
||||||
"": "Once deleted, you can't undo this action."
|
"": "Once deleted, you can't undo this action."
|
||||||
},
|
},
|
||||||
"Remove from favourites": "Remove from favourites",
|
"Remove from favorites": "Remove from favorites",
|
||||||
"Removed from Favourites": "Removed from Favourites",
|
"Removed from Favorites": "Removed from Favorites",
|
||||||
"Jump to": "Jump to",
|
"Jump to": "Jump to",
|
||||||
"404 - Page Not Found": "404 - Page Not Found",
|
"404 - Page Not Found": "404 - Page Not Found",
|
||||||
"Once deleted, you can't undo this action": {
|
"Once deleted, you can't undo this action": {
|
||||||
"": "Once deleted, you can't undo this action."
|
"": "Once deleted, you can't undo this action."
|
||||||
},
|
},
|
||||||
"Remove from favourites": "Remove from favourites",
|
"Remove from favorites": "Remove from favorites",
|
||||||
"Removed from Favourites": "Removed from Favourites",
|
"Removed from Favorites": "Removed from Favorites",
|
||||||
"New Workspace": "New Workspace",
|
"New Workspace": "New Workspace",
|
||||||
"Workspace description": "A workspace is your virtual space to capture, create and plan as just one person or together as a team.",
|
"Workspace description": "A workspace is your virtual space to capture, create and plan as just one person or together as a team.",
|
||||||
"Create": "Create",
|
"Create": "Create",
|
||||||
@@ -105,7 +105,7 @@
|
|||||||
"mobile device description": "We are still working on mobile support and recommend you use a desktop device.",
|
"mobile device description": "We are still working on mobile support and recommend you use a desktop device.",
|
||||||
"Got it": "Got it",
|
"Got it": "Got it",
|
||||||
"emptyAllPages": "This workspace is empty. Create a new page to begin editing.",
|
"emptyAllPages": "This workspace is empty. Create a new page to begin editing.",
|
||||||
"emptyFavourite": "Click Add to Favourites and the page will appear here.",
|
"emptyFavorite": "Click Add to Favorites and the page will appear here.",
|
||||||
"emptyTrash": "Click Add to Trash and the page will appear here.",
|
"emptyTrash": "Click Add to Trash and the page will appear here.",
|
||||||
"still designed": "(This page is still being designed.)",
|
"still designed": "(This page is still being designed.)",
|
||||||
"My Workspaces": "My Workspaces",
|
"My Workspaces": "My Workspaces",
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ test.describe('Local first delete page', () => {
|
|||||||
// show empty tip
|
// show empty tip
|
||||||
expect(
|
expect(
|
||||||
page.getByText(
|
page.getByText(
|
||||||
'Tips: Click Add to Favourites/Trash and the page will appear here.'
|
'Tips: Click Add to Favorites/Trash and the page will appear here.'
|
||||||
)
|
)
|
||||||
).not.toBeUndefined();
|
).not.toBeUndefined();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ test.describe('Local first export page', () => {
|
|||||||
await cell.click();
|
await cell.click();
|
||||||
await clickPageMoreActions(page);
|
await clickPageMoreActions(page);
|
||||||
const exportParentBtn = page.getByRole('tooltip', {
|
const exportParentBtn = page.getByRole('tooltip', {
|
||||||
name: 'Add to favourites Convert to Edgeless Export Delete',
|
name: 'Add to favorites Convert to Edgeless Export Delete',
|
||||||
});
|
});
|
||||||
await exportParentBtn.click();
|
await exportParentBtn.click();
|
||||||
const [download] = await Promise.all([
|
const [download] = await Promise.all([
|
||||||
@@ -48,7 +48,7 @@ test.describe('Local first export page', () => {
|
|||||||
await cell.click();
|
await cell.click();
|
||||||
await clickPageMoreActions(page);
|
await clickPageMoreActions(page);
|
||||||
const exportParentBtn = page.getByRole('tooltip', {
|
const exportParentBtn = page.getByRole('tooltip', {
|
||||||
name: 'Add to favourites Convert to Edgeless Export Delete',
|
name: 'Add to favorites Convert to Edgeless Export Delete',
|
||||||
});
|
});
|
||||||
await exportParentBtn.click();
|
await exportParentBtn.click();
|
||||||
const [download] = await Promise.all([
|
const [download] = await Promise.all([
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ test.describe('Local first favorite and cancel favorite page', () => {
|
|||||||
await favoriteBtn.click();
|
await favoriteBtn.click();
|
||||||
|
|
||||||
// expect it in favorite list
|
// expect it in favorite list
|
||||||
await page.getByRole('link', { name: 'Favourites' }).click();
|
await page.getByRole('link', { name: 'Favorites' }).click();
|
||||||
expect(
|
expect(
|
||||||
page.getByRole('cell', { name: 'this is a new page to favorite' })
|
page.getByRole('cell', { name: 'this is a new page to favorite' })
|
||||||
).not.toBeUndefined();
|
).not.toBeUndefined();
|
||||||
@@ -52,13 +52,13 @@ test.describe('Local first favorite and cancel favorite page', () => {
|
|||||||
//hover table record
|
//hover table record
|
||||||
await page.mouse.move((box?.x ?? 0) + 10, (box?.y ?? 0) + 10);
|
await page.mouse.move((box?.x ?? 0) + 10, (box?.y ?? 0) + 10);
|
||||||
|
|
||||||
await page.getByTestId('favourited-icon').click();
|
await page.getByTestId('favorited-icon').click();
|
||||||
|
|
||||||
// expect it not in favorite list
|
// expect it not in favorite list
|
||||||
await page.getByRole('link', { name: 'Favourites' }).click();
|
await page.getByRole('link', { name: 'Favorites' }).click();
|
||||||
expect(
|
expect(
|
||||||
page.getByText(
|
page.getByText(
|
||||||
'Tips: Click Add to Favourites/Trash and the page will appear here.'
|
'Tips: Click Add to Favorites/Trash and the page will appear here.'
|
||||||
)
|
)
|
||||||
).not.toBeUndefined();
|
).not.toBeUndefined();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ test.describe('Local first favorite items ui', () => {
|
|||||||
const favoriteBtn = page.getByTestId('editor-option-menu-favorite');
|
const favoriteBtn = page.getByTestId('editor-option-menu-favorite');
|
||||||
await favoriteBtn.click();
|
await favoriteBtn.click();
|
||||||
|
|
||||||
await page.getByRole('link', { name: 'Favourites' }).click();
|
await page.getByRole('link', { name: 'Favorites' }).click();
|
||||||
expect(
|
expect(
|
||||||
page.getByRole('cell', { name: 'this is a new page to favorite' })
|
page.getByRole('cell', { name: 'this is a new page to favorite' })
|
||||||
).not.toBeUndefined();
|
).not.toBeUndefined();
|
||||||
|
|||||||
Reference in New Issue
Block a user