mirror of
https://github.com/documenso/documenso.git
synced 2025-11-22 04:31:39 +10:00
fix: translation patterns
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
import type { Table } from '@tanstack/react-table';
|
||||
import { ChevronLeft, ChevronRight, ChevronsLeft, ChevronsRight } from 'lucide-react';
|
||||
|
||||
@ -12,12 +13,16 @@ export function DataTablePagination<TData>({ table }: DataTablePaginationProps<T
|
||||
return (
|
||||
<div className="flex items-center justify-between px-2">
|
||||
<div className="text-muted-foreground flex-1 text-sm">
|
||||
{table.getFilteredSelectedRowModel().rows.length} of{' '}
|
||||
{table.getFilteredRowModel().rows.length} row(s) selected.
|
||||
<Trans>
|
||||
{table.getFilteredSelectedRowModel().rows.length} of{' '}
|
||||
{table.getFilteredRowModel().rows.length} row(s) selected.
|
||||
</Trans>
|
||||
</div>
|
||||
<div className="flex items-center space-x-6 lg:space-x-8">
|
||||
<div className="flex items-center space-x-2">
|
||||
<p className="text-sm font-medium">Rows per page</p>
|
||||
<p className="text-sm font-medium">
|
||||
<Trans>Rows per page</Trans>
|
||||
</p>
|
||||
<Select
|
||||
value={`${table.getState().pagination.pageSize}`}
|
||||
onValueChange={(value) => {
|
||||
@ -37,7 +42,9 @@ export function DataTablePagination<TData>({ table }: DataTablePaginationProps<T
|
||||
</Select>
|
||||
</div>
|
||||
<div className="flex w-[100px] items-center justify-center text-sm font-medium">
|
||||
Page {table.getState().pagination.pageIndex + 1} of {table.getPageCount()}
|
||||
<Trans>
|
||||
Page {table.getState().pagination.pageIndex + 1} of {table.getPageCount()}
|
||||
</Trans>
|
||||
</div>
|
||||
<div className="flex items-center space-x-2">
|
||||
<Button
|
||||
@ -46,7 +53,9 @@ export function DataTablePagination<TData>({ table }: DataTablePaginationProps<T
|
||||
onClick={() => table.setPageIndex(0)}
|
||||
disabled={!table.getCanPreviousPage()}
|
||||
>
|
||||
<span className="sr-only">Go to first page</span>
|
||||
<Trans>
|
||||
<span className="sr-only">Go to first page</span>
|
||||
</Trans>
|
||||
<ChevronsLeft />
|
||||
</Button>
|
||||
<Button
|
||||
@ -55,7 +64,9 @@ export function DataTablePagination<TData>({ table }: DataTablePaginationProps<T
|
||||
onClick={() => table.previousPage()}
|
||||
disabled={!table.getCanPreviousPage()}
|
||||
>
|
||||
<span className="sr-only">Go to previous page</span>
|
||||
<Trans>
|
||||
<span className="sr-only">Go to previous page</span>
|
||||
</Trans>
|
||||
<ChevronLeft />
|
||||
</Button>
|
||||
<Button
|
||||
@ -64,7 +75,9 @@ export function DataTablePagination<TData>({ table }: DataTablePaginationProps<T
|
||||
onClick={() => table.nextPage()}
|
||||
disabled={!table.getCanNextPage()}
|
||||
>
|
||||
<span className="sr-only">Go to next page</span>
|
||||
<Trans>
|
||||
<span className="sr-only">Go to next page</span>
|
||||
</Trans>
|
||||
<ChevronRight />
|
||||
</Button>
|
||||
<Button
|
||||
@ -73,7 +86,9 @@ export function DataTablePagination<TData>({ table }: DataTablePaginationProps<T
|
||||
onClick={() => table.setPageIndex(table.getPageCount() - 1)}
|
||||
disabled={!table.getCanNextPage()}
|
||||
>
|
||||
<span className="sr-only">Go to last page</span>
|
||||
<Trans>
|
||||
<span className="sr-only">Go to last page</span>
|
||||
</Trans>
|
||||
<ChevronsRight />
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user