Wrap intl in span identifying translation

This commit is contained in:
Jamie Curnow committed 2025-10-02 23:06:51 +10:00
1 parent fcb08d3003
commit 227e818040
68 files changed
+1076 -510

No files matched your search

+11 -5
View File
@@ -1,6 +1,6 @@
import type { Table as ReactTable } from "@tanstack/react-table";
import { Button } from "src/components";
import { intl } from "src/locale";
import { T } from "src/locale";
interface Props {
tableInstance: ReactTable<any>;
@@ -13,13 +13,19 @@ export default function Empty({ tableInstance, onNew, isFiltered }: Props) {
<td colSpan={tableInstance.getVisibleFlatColumns().length}>
<div className="text-center my-4">
{isFiltered ? (
<h2>{intl.formatMessage({ id: "empty-search" })}</h2>
<h2>
<T id="empty.search" />
</h2>
) : (
<>
<h2>{intl.formatMessage({ id: "streams.empty" })}</h2>
<p className="text-muted">{intl.formatMessage({ id: "empty-subtitle" })}</p>
<h2>
<T id="streams.empty" />
</h2>
<p className="text-muted">
<T id="empty-subtitle" />
</p>
<Button className="btn-blue my-3" onClick={onNew}>
{intl.formatMessage({ id: "streams.add" })}
<T id="streams.add" />
</Button>
</>
)}