Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

chore: replace all "favourite" with "favorite" (#927)

JimmFly718322ec65e9
diff --git a/packages/app/src/components/header/header-right-items/EditorOptionMenu.tsx b/packages/app/src/components/header/header-right-items/EditorOptionMenu.tsx
index 879e6a4117..dc64ae05ce 100644
--- a/packages/app/src/components/header/header-right-items/EditorOptionMenu.tsx
+++ b/packages/app/src/components/header/header-right-items/EditorOptionMenu.tsx
@@ -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 />}
diff --git a/packages/app/src/components/page-list/Empty.tsx b/packages/app/src/components/page-list/Empty.tsx
index 236968bd04..5252e2bbc0 100644
--- a/packages/app/src/components/page-list/Empty.tsx
+++ b/packages/app/src/components/page-list/Empty.tsx
@@ -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>
);
diff --git a/packages/app/src/components/page-list/OperationCell.tsx b/packages/app/src/components/page-list/OperationCell.tsx
index 2bbcbeea73..b6435ece70 100644
--- a/packages/app/src/components/page-list/OperationCell.tsx
+++ b/packages/app/src/components/page-list/OperationCell.tsx
@@ -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={() => {
diff --git a/packages/app/src/components/page-list/index.tsx b/packages/app/src/components/page-list/index.tsx
index 714d6ca11b..7cbcf80c96 100644
--- a/packages/app/src/components/page-list/index.tsx
+++ b/packages/app/src/components/page-list/index.tsx
@@ -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 />
)}
diff --git a/packages/app/src/components/quick-search/config.ts b/packages/app/src/components/quick-search/config.ts
index 9aa284558e..a171ea32e1 100644
--- a/packages/app/src/components/quick-search/config.ts
+++ b/packages/app/src/components/quick-search/config.ts
@@ -22,7 +22,7 @@ export const useSwitchToConfig = (
icon: AllPagesIcon,
},
{
- title: t('Favourites'),
+ title: t('Favorites'),
href: currentWorkspaceId
? `/workspace/${currentWorkspaceId}/favorite`
: '',
diff --git a/packages/app/src/components/workspace-slider-bar/index.tsx b/packages/app/src/components/workspace-slider-bar/index.tsx
index 3df649a8ae..556f560a2b 100644
--- a/packages/app/src/components/workspace-slider-bar/index.tsx
+++ b/packages/app/src/components/workspace-slider-bar/index.tsx
@@ -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}
diff --git a/packages/app/src/pages/workspace/[workspaceId]/favorite.tsx b/packages/app/src/pages/workspace/[workspaceId]/favorite.tsx
index 9c088d9d45..8714857a53 100644
--- a/packages/app/src/pages/workspace/[workspaceId]/favorite.tsx
+++ b/packages/app/src/pages/workspace/[workspaceId]/favorite.tsx
@@ -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)}
diff --git a/packages/app/src/templates/Welcome-to-AFFiNE-Abbey-Alpha-Wood.md b/packages/app/src/templates/Welcome-to-AFFiNE-Abbey-Alpha-Wood.md
index 91e2fe48c0..7417111470 100644
--- a/packages/app/src/templates/Welcome-to-AFFiNE-Abbey-Alpha-Wood.md
+++ b/packages/app/src/templates/Welcome-to-AFFiNE-Abbey-Alpha-Wood.md
@@ -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 !!!** 😃
diff --git a/packages/i18n/src/resources/en.json b/packages/i18n/src/resources/en.json
index f242290f94..8a44ca4c23 100644
--- a/packages/i18n/src/resources/en.json
+++ b/packages/i18n/src/resources/en.json
@@ -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",
diff --git a/tests/local-first-delete-page.spec.ts b/tests/local-first-delete-page.spec.ts
index 7a08ff6166..14fb54d86c 100644
--- a/tests/local-first-delete-page.spec.ts
+++ b/tests/local-first-delete-page.spec.ts
@@ -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();
});
diff --git a/tests/local-first-export-page.spec.ts b/tests/local-first-export-page.spec.ts
index 8e959135b1..08579b3a39 100644
--- a/tests/local-first-export-page.spec.ts
+++ b/tests/local-first-export-page.spec.ts
@@ -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([
diff --git a/tests/local-first-favorite-page.spec.ts b/tests/local-first-favorite-page.spec.ts
index 8e65ec9204..afb30372bc 100644
--- a/tests/local-first-favorite-page.spec.ts
+++ b/tests/local-first-favorite-page.spec.ts
@@ -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();
});
diff --git a/tests/local-first-favorites-items.spec.ts b/tests/local-first-favorites-items.spec.ts
index e7dd0c90d7..8a4b1b9d5d 100644
--- a/tests/local-first-favorites-items.spec.ts
+++ b/tests/local-first-favorites-items.spec.ts
@@ -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();