From fbfe85f2252b6e8f1259e5102f96e3aa9ac88794 Mon Sep 17 00:00:00 2001
From: ValueOn AG
Date: Sat, 11 Apr 2026 00:24:57 +0200
Subject: [PATCH] language fixes
---
src/pages/admin/AdminLanguagesPage.tsx | 41 +++++++++++++++++++++++++-
1 file changed, 40 insertions(+), 1 deletion(-)
diff --git a/src/pages/admin/AdminLanguagesPage.tsx b/src/pages/admin/AdminLanguagesPage.tsx
index e0b15cd..beb771d 100644
--- a/src/pages/admin/AdminLanguagesPage.tsx
+++ b/src/pages/admin/AdminLanguagesPage.tsx
@@ -18,6 +18,7 @@ type LangRow = {
entriesCount: number;
uiCount: number;
gatewayCount: number;
+ updating: boolean;
};
type ProgressInfo = {
@@ -42,7 +43,34 @@ function _getColumns(t: (key: string) => string): ColumnConfig[] {
return [
{ key: 'id', label: t('Code'), type: 'text', sortable: true, filterable: true, width: 90 },
{ key: 'label', label: t('Bezeichnung'), type: 'text', sortable: true, filterable: true, width: 200 },
- { key: 'status', label: t('Status'), type: 'text', sortable: true, filterable: true, width: 120 },
+ {
+ key: 'status',
+ label: t('Status'),
+ type: 'text',
+ sortable: true,
+ filterable: true,
+ width: 160,
+ formatter: (_val: any, row: any) => {
+ const r = row as LangRow;
+ if (r.updating) {
+ return (
+
+
+ {t('wird aktualisiert…')}
+
+ );
+ }
+ if (r.status === 'generating') {
+ return (
+
+
+ {t('wird erzeugt…')}
+
+ );
+ }
+ return r.status;
+ },
+ },
{ key: 'uiCount', label: t('UI'), type: 'number', sortable: true, width: 80 },
{ key: 'gatewayCount', label: t('API'), type: 'number', sortable: true, width: 80 },
{ key: 'entriesCount', label: t('Gesamt'), type: 'number', sortable: true, width: 80 },
@@ -328,6 +356,7 @@ export const AdminLanguagesPage: React.FC = () => {
entriesCount: r.entriesCount ?? 0,
uiCount: r.uiCount ?? 0,
gatewayCount: r.gatewayCount ?? 0,
+ updating: !!r.updating,
})),
);
} catch (e: any) {
@@ -364,6 +393,16 @@ export const AdminLanguagesPage: React.FC = () => {
_load();
}, [_load]);
+ const _hasUpdating = rows.some((r) => r.updating || r.status === 'generating');
+
+ useEffect(() => {
+ if (!_hasUpdating) return;
+ const id = window.setInterval(() => {
+ _load();
+ }, 5000);
+ return () => window.clearInterval(id);
+ }, [_hasUpdating, _load]);
+
const displayRows = useMemo(() => {
const term = search.trim().toLowerCase();
const filtered = term