mirror of
https://github.com/henrygd/beszel.git
synced 2025-12-17 18:56:17 +01:00
i18n: update language files and fix strings for new lingui version
This commit is contained in:
@@ -229,7 +229,7 @@ function AlertContent({ data }: { data: AlertData }) {
|
||||
)}
|
||||
<Trans>
|
||||
For <strong className="text-foreground">{min}</strong>{" "}
|
||||
<Plural value={min} one=" minute" other=" minutes" />
|
||||
<Plural value={min} one="minute" other="minutes" />
|
||||
</Trans>
|
||||
</p>
|
||||
<div className="flex gap-3">
|
||||
|
||||
@@ -135,6 +135,12 @@ export default function SystemsTable() {
|
||||
}, [filter])
|
||||
|
||||
const columns = useMemo(() => {
|
||||
// Create status translations for filtering
|
||||
const statusTranslations = {
|
||||
"up": t`Up`.toLowerCase(),
|
||||
"down": t`Down`.toLowerCase(),
|
||||
"paused": t`Paused`.toLowerCase()
|
||||
};
|
||||
return [
|
||||
{
|
||||
// size: 200,
|
||||
@@ -143,10 +149,13 @@ export default function SystemsTable() {
|
||||
accessorKey: "name",
|
||||
id: t`System`,
|
||||
filterFn: (row, _, filterVal) => {
|
||||
// allow filtering by name or status via input field
|
||||
const { name, status } = row.original
|
||||
filterVal = filterVal.toLowerCase()
|
||||
return name.toLowerCase().includes(filterVal) || t`${status}`.toLowerCase().includes(filterVal)
|
||||
const filterLower = filterVal.toLowerCase();
|
||||
const { name, status } = row.original;
|
||||
// Check if the filter matches the name or status for this row
|
||||
if (name.toLowerCase().includes(filterLower) || statusTranslations[status as keyof typeof statusTranslations]?.includes(filterLower)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
enableHiding: false,
|
||||
icon: ServerIcon,
|
||||
|
||||
Reference in New Issue
Block a user