diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json index d76843a27..d265e0283 100644 --- a/apps/client/src/translations/en/translation.json +++ b/apps/client/src/translations/en/translation.json @@ -2024,5 +2024,9 @@ }, "units": { "percentage": "%" + }, + "pagination": { + "page_title": "Page of {{startIndex}} - {{endIndex}}", + "total_notes": "{{count}} notes" } } diff --git a/apps/client/src/widgets/collections/Pagination.tsx b/apps/client/src/widgets/collections/Pagination.tsx index b37824e00..9d4782da4 100644 --- a/apps/client/src/widgets/collections/Pagination.tsx +++ b/apps/client/src/widgets/collections/Pagination.tsx @@ -3,6 +3,7 @@ import { Dispatch, StateUpdater, useEffect, useState } from "preact/hooks"; import FNote from "../../entities/fnote"; import froca from "../../services/froca"; import { useNoteLabel } from "../react/hooks"; +import { t } from "../../services/i18n"; interface PaginationContext { page: number; @@ -29,7 +30,7 @@ export function Pager({ page, pageSize, setPage, pageCount, totalNotes }: Omit
setPage(i)} > {i} @@ -50,6 +51,8 @@ export function Pager({ page, pageSize, setPage, pageCount, totalNotes }: Omit
{children} + + ({t("pagination.total_notes", { count: totalNotes })}) ) } diff --git a/apps/client/src/widgets/view_widgets/list_or_grid_view.ts b/apps/client/src/widgets/view_widgets/list_or_grid_view.ts index 28f4fd53e..8e88ebdcf 100644 --- a/apps/client/src/widgets/view_widgets/list_or_grid_view.ts +++ b/apps/client/src/widgets/view_widgets/list_or_grid_view.ts @@ -49,7 +49,7 @@ class ListOrGridView extends ViewMode<{}> { // no need to distinguish "note" vs "notes" since in case of one result, there's no paging at all - $pager.append(`(${this.filteredNoteIds.length} notes)`); + $pager.append(``); } async renderNote(note: FNote, expand: boolean = false) {