mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-11 07:06:28 +08:00
chore: replace all "favourite" with "favorite" (#927)
This commit is contained in:
@@ -37,12 +37,12 @@ const PopoverContent = () => {
|
||||
onClick={() => {
|
||||
toggleFavoritePage(id);
|
||||
toast(
|
||||
favorite ? t('Removed from Favourites') : t('Added to Favourites')
|
||||
favorite ? t('Removed from Favorites') : t('Added to Favorites')
|
||||
);
|
||||
}}
|
||||
icon={favorite ? <FavouritedIcon /> : <FavouritesIcon />}
|
||||
>
|
||||
{favorite ? t('Remove from favourites') : t('Add to favourites')}
|
||||
{favorite ? t('Remove from favorites') : t('Add to favorites')}
|
||||
</MenuItem>
|
||||
<MenuItem
|
||||
icon={mode === 'page' ? <EdgelessIcon /> : <PaperIcon />}
|
||||
|
||||
@@ -12,7 +12,7 @@ export const PageListEmpty = (props: { listType?: string }) => {
|
||||
sx={{ marginTop: '100px', marginBottom: '30px' }}
|
||||
/>
|
||||
{listType === 'all' && <p>{t('emptyAllPages')}</p>}
|
||||
{listType === 'favorite' && <p>{t('emptyFavourite')}</p>}
|
||||
{listType === 'favorite' && <p>{t('emptyFavorite')}</p>}
|
||||
{listType === 'trash' && <p>{t('emptyTrash')}</p>}
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -27,12 +27,12 @@ export const OperationCell = ({ pageMeta }: { pageMeta: PageMeta }) => {
|
||||
onClick={() => {
|
||||
toggleFavoritePage(id);
|
||||
toast(
|
||||
favorite ? t('Removed from Favourites') : t('Added to Favourites')
|
||||
favorite ? t('Removed from Favorites') : t('Added to Favorites')
|
||||
);
|
||||
}}
|
||||
icon={favorite ? <FavouritedIcon /> : <FavouritesIcon />}
|
||||
>
|
||||
{favorite ? t('Remove from favourites') : t('Add to favourites')}
|
||||
{favorite ? t('Remove from favorites') : t('Add to favorites')}
|
||||
</MenuItem>
|
||||
<MenuItem
|
||||
onClick={() => {
|
||||
|
||||
@@ -41,7 +41,7 @@ const FavoriteTag = ({
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<Tooltip
|
||||
content={favorite ? t('Favourited') : t('Favourite')}
|
||||
content={favorite ? t('Favorited') : t('Favorite')}
|
||||
placement="top-start"
|
||||
>
|
||||
<IconButton
|
||||
@@ -51,7 +51,7 @@ const FavoriteTag = ({
|
||||
e.stopPropagation();
|
||||
toggleFavoritePage(id);
|
||||
toast(
|
||||
favorite ? t('Removed from Favourites') : t('Added to Favourites')
|
||||
favorite ? t('Removed from Favorites') : t('Added to Favorites')
|
||||
);
|
||||
}}
|
||||
style={{
|
||||
@@ -60,7 +60,7 @@ const FavoriteTag = ({
|
||||
className={favorite ? '' : 'favorite-button'}
|
||||
>
|
||||
{favorite ? (
|
||||
<FavouritedIcon data-testid="favourited-icon" />
|
||||
<FavouritedIcon data-testid="favorited-icon" />
|
||||
) : (
|
||||
<FavouritesIcon />
|
||||
)}
|
||||
|
||||
@@ -22,7 +22,7 @@ export const useSwitchToConfig = (
|
||||
icon: AllPagesIcon,
|
||||
},
|
||||
{
|
||||
title: t('Favourites'),
|
||||
title: t('Favorites'),
|
||||
href: currentWorkspaceId
|
||||
? `/workspace/${currentWorkspaceId}/favorite`
|
||||
: '',
|
||||
|
||||
@@ -131,7 +131,7 @@ export const WorkSpaceSliderBar = () => {
|
||||
<StyledListItem active={router.asPath === paths.favorite}>
|
||||
<StyledLink href={{ pathname: paths.favorite }}>
|
||||
<FavouritesIcon />
|
||||
{t('Favourites')}
|
||||
{t('Favorites')}
|
||||
</StyledLink>
|
||||
<IconButton
|
||||
darker={true}
|
||||
|
||||
@@ -12,10 +12,10 @@ export const Favorite = () => {
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<title>{t('Favourites')} - AFFiNE</title>
|
||||
<title>{t('Favorites')} - AFFiNE</title>
|
||||
</Head>
|
||||
<PageListHeader icon={<FavouritesIcon />}>
|
||||
{t('Favourites')}
|
||||
{t('Favorites')}
|
||||
</PageListHeader>
|
||||
<PageList
|
||||
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:
|
||||
|
||||
- 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`
|
||||
- A friendly Reminder:
|
||||
- In the case of unselected text, `Ctrl/⌘ + K` activates quick search;
|
||||
@@ -53,7 +53,7 @@ console.log('Hello world');
|
||||
|
||||
[] Send a page to trash
|
||||
|
||||
[] Favourite a page
|
||||
[] Favorite a page
|
||||
|
||||
**Have an enjoyable editing experience !!!** 😃
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"Quick search": "Quick search",
|
||||
"All pages": "All pages",
|
||||
"Favourites": "Favourites",
|
||||
"Favorites": "Favorites",
|
||||
"No item": "No item",
|
||||
"Import": "Import",
|
||||
"Trash": "Trash",
|
||||
@@ -11,8 +11,8 @@
|
||||
"Find results": "Find {{number}} results",
|
||||
"Collapse sidebar": "Collapse sidebar",
|
||||
"Expand sidebar": "Expand sidebar",
|
||||
"Added to Favourites": "Added to Favourites",
|
||||
"Add to favourites": "Add to favourites",
|
||||
"Added to Favorites": "Added to Favorites",
|
||||
"Add to favorites": "Add to favorites",
|
||||
"Paper": "Paper",
|
||||
"Edgeless": "Edgeless",
|
||||
"Convert to ": "Convert to ",
|
||||
@@ -26,8 +26,8 @@
|
||||
"Created": "Created",
|
||||
"Updated": "Updated",
|
||||
"Open in new tab": "Open in new tab",
|
||||
"Favourite": "Favourite",
|
||||
"Favourited": "Favourited",
|
||||
"Favorite": "Favorite",
|
||||
"Favorited": "Favorited",
|
||||
"Delete page?": "Delete page?",
|
||||
"Delete permanently?": "Delete permanently?",
|
||||
"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."
|
||||
},
|
||||
"Remove from favourites": "Remove from favourites",
|
||||
"Removed from Favourites": "Removed from Favourites",
|
||||
"Remove from favorites": "Remove from favorites",
|
||||
"Removed from Favorites": "Removed from Favorites",
|
||||
"Jump to": "Jump to",
|
||||
"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",
|
||||
"Remove from favorites": "Remove from favorites",
|
||||
"Removed from Favorites": "Removed from Favorites",
|
||||
"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.",
|
||||
"Create": "Create",
|
||||
@@ -105,7 +105,7 @@
|
||||
"mobile device description": "We are still working on mobile support and recommend you use a desktop device.",
|
||||
"Got it": "Got it",
|
||||
"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.",
|
||||
"still designed": "(This page is still being designed.)",
|
||||
"My Workspaces": "My Workspaces",
|
||||
|
||||
@@ -43,7 +43,7 @@ test.describe('Local first delete page', () => {
|
||||
// show empty tip
|
||||
expect(
|
||||
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();
|
||||
});
|
||||
|
||||
@@ -21,7 +21,7 @@ test.describe('Local first export page', () => {
|
||||
await cell.click();
|
||||
await clickPageMoreActions(page);
|
||||
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();
|
||||
const [download] = await Promise.all([
|
||||
@@ -48,7 +48,7 @@ test.describe('Local first export page', () => {
|
||||
await cell.click();
|
||||
await clickPageMoreActions(page);
|
||||
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();
|
||||
const [download] = await Promise.all([
|
||||
|
||||
@@ -37,7 +37,7 @@ test.describe('Local first favorite and cancel favorite page', () => {
|
||||
await favoriteBtn.click();
|
||||
|
||||
// expect it in favorite list
|
||||
await page.getByRole('link', { name: 'Favourites' }).click();
|
||||
await page.getByRole('link', { name: 'Favorites' }).click();
|
||||
expect(
|
||||
page.getByRole('cell', { name: 'this is a new page to favorite' })
|
||||
).not.toBeUndefined();
|
||||
@@ -52,13 +52,13 @@ test.describe('Local first favorite and cancel favorite page', () => {
|
||||
//hover table record
|
||||
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
|
||||
await page.getByRole('link', { name: 'Favourites' }).click();
|
||||
await page.getByRole('link', { name: 'Favorites' }).click();
|
||||
expect(
|
||||
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();
|
||||
});
|
||||
|
||||
@@ -43,7 +43,7 @@ test.describe('Local first favorite items ui', () => {
|
||||
const favoriteBtn = page.getByTestId('editor-option-menu-favorite');
|
||||
await favoriteBtn.click();
|
||||
|
||||
await page.getByRole('link', { name: 'Favourites' }).click();
|
||||
await page.getByRole('link', { name: 'Favorites' }).click();
|
||||
expect(
|
||||
page.getByRole('cell', { name: 'this is a new page to favorite' })
|
||||
).not.toBeUndefined();
|
||||
|
||||
Reference in New Issue
Block a user