feat: web i18n (#1286)

This commit is contained in:
David Nguyen
2024-08-27 20:34:39 +09:00
committed by GitHub
parent 0829311214
commit 75c8772a02
294 changed files with 14846 additions and 2229 deletions

View File

@@ -2,6 +2,7 @@
import React, { useMemo } from 'react';
import { Trans } from '@lingui/macro';
import type {
ColumnDef,
PaginationState,
@@ -130,7 +131,7 @@ export function DataTable<TData, TValue>({
<TableRow>
{error.component ?? (
<TableCell colSpan={columns.length} className="h-32 text-center">
Something went wrong.
<Trans>Something went wrong.</Trans>
</TableCell>
)}
</TableRow>
@@ -141,14 +142,16 @@ export function DataTable<TData, TValue>({
) : (
<TableRow>
<TableCell colSpan={columns.length} className="h-32 text-center">
<p>No results found</p>
<p>
<Trans>No results found</Trans>
</p>
{hasFilters && onClearFilters !== undefined && (
<button
onClick={() => onClearFilters()}
className="text-foreground mt-1 text-sm"
>
Clear filters
<Trans>Clear filters</Trans>
</button>
)}
</TableCell>