Skip to content

ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.

Translate inline copy in ds and shared modules

Juan Denis23d950b5286a
diff --git a/frontend/scripts/I18N_LITERAL_CEILING b/frontend/scripts/I18N_LITERAL_CEILING
index c739b42c..45a4fb75 100644
--- a/frontend/scripts/I18N_LITERAL_CEILING
+++ b/frontend/scripts/I18N_LITERAL_CEILING
@@ -1 +1 @@
-44
+8
diff --git a/frontend/src/components/ds/DataTableFooter.jsx b/frontend/src/components/ds/DataTableFooter.jsx
index 976f8fb2..744b50e3 100644
--- a/frontend/src/components/ds/DataTableFooter.jsx
+++ b/frontend/src/components/ds/DataTableFooter.jsx
@@ -73,7 +73,7 @@ export function DataTableFooter({
)}
{onLoadMore && hasMore && (
<Button variant="outline" size="sm" onClick={onLoadMore} disabled={loading}>
- {loading ? 'Loading…' : 'Load more'}
+ {loading ? t('common.loading', 'Loading…') : t('common.actions.loadMore', 'Load more')}
</Button>
)}
{paged && totalPages > 1 && (
diff --git a/frontend/src/components/ds/FilterDrawer.jsx b/frontend/src/components/ds/FilterDrawer.jsx
index 6a2cd3f5..429f23c3 100644
--- a/frontend/src/components/ds/FilterDrawer.jsx
+++ b/frontend/src/components/ds/FilterDrawer.jsx
@@ -101,7 +101,7 @@ export function FilterDrawer({
open={open}
onOpenChange={onOpenChange}
title={title}
- subtitle={active ? `${active} active` : t('app.filterDrawer.noFilters', 'no filters')}
+ subtitle={active ? t('app.filterDrawer.activeCount', '{{count}} active', { count: active }) : t('app.filterDrawer.noFilters', 'no filters')}
icon={<SlidersHorizontal size={16} />}
width={width}
>
@@ -137,8 +137,8 @@ export function FilterDrawer({
</Button>
<Button size="sm" onClick={() => onOpenChange(false)}>
{resultCount == null
- ? 'Done'
- : `Show ${resultCount} ${resultNoun}${resultCount === 1 ? '' : 's'}`}
+ ? t('common.actions.done', 'Done')
+ : t('app.filterDrawer.showResults', { count: resultCount, noun: resultNoun, defaultValue_one: 'Show {{count}} {{noun}}', defaultValue_other: 'Show {{count}} {{noun}}s' })}
</Button>
</div>
</div>
diff --git a/frontend/src/components/ds/GroupMenu.jsx b/frontend/src/components/ds/GroupMenu.jsx
index 3e3601b4..ead6a66e 100644
--- a/frontend/src/components/ds/GroupMenu.jsx
+++ b/frontend/src/components/ds/GroupMenu.jsx
@@ -29,7 +29,7 @@ export function GroupMenu({ columns = [], groupBy = null, onChange, className })
className={cn('sk-filter-btn', active && 'sk-filter-btn--active', className)}
>
<Group aria-hidden="true" />
- {active ? labelFor(active) : 'Group'}
+ {active ? labelFor(active) : t('app.groupMenu.group', 'Group')}
</Button>
</PopoverTrigger>
<PopoverContent align="end" className="sk-tablemenu">
diff --git a/frontend/src/components/ds/KpiBand.jsx b/frontend/src/components/ds/KpiBand.jsx
index 8557ef2b..de31b05b 100644
--- a/frontend/src/components/ds/KpiBand.jsx
+++ b/frontend/src/components/ds/KpiBand.jsx
@@ -1,4 +1,5 @@
import { Children, useState } from 'react';
+import { useTranslation } from 'react-i18next';
import { cn } from '@/lib/utils';
import { Button as SharedButton } from '@/components/ui/button';
@@ -36,6 +37,7 @@ export function KpiBand({
className,
children,
}) {
+ const { t } = useTranslation();
const [expanded, setExpanded] = useState(false);
const cap = Math.min(dense ? 5 : max, 5);
@@ -93,7 +95,9 @@ export function KpiBand({
aria-expanded={expanded}
onClick={() => setExpanded((v) => !v)}
>
- {expanded ? 'Fewer stats' : `More stats (${secondary.length})`}
+ {expanded
+ ? t('app.kpiBand.fewerStats', 'Fewer stats')
+ : t('app.kpiBand.moreStats', 'More stats ({{count}})', { count: secondary.length })}
</SharedButton>
{expanded && (
<div className="sk-kpiband__strip">
diff --git a/frontend/src/components/ds/PageTopbar.jsx b/frontend/src/components/ds/PageTopbar.jsx
index 077a91be..efde96d5 100644
--- a/frontend/src/components/ds/PageTopbar.jsx
+++ b/frontend/src/components/ds/PageTopbar.jsx
@@ -87,7 +87,7 @@ function TopbarTabs({ tabs, label }) {
// The nav is the flex-fill measurement region (kept right-aligned so a
// changing page title never shoves the tabs sideways); the inner bar is
// the visible segmented control that actually holds the tabs.
- <nav ref={containerRef} className="sk-topbar__tabs" aria-label={`${label} sections`}>
+ <nav ref={containerRef} className="sk-topbar__tabs" aria-label={t('app.pageTopbar.sections', '{{label}} sections', { label })}>
<div className="sk-topbar__tabs-inner">
{safeTabs.map((tab, i) => {
const isHidden = hiddenSet.has(i);
diff --git a/frontend/src/components/ds/ViewMenu.jsx b/frontend/src/components/ds/ViewMenu.jsx
index f07a0ccb..a6552bab 100644
--- a/frontend/src/components/ds/ViewMenu.jsx
+++ b/frontend/src/components/ds/ViewMenu.jsx
@@ -110,7 +110,7 @@ export function ViewMenu({ views, className }) {
className={cn('sk-filter-btn', activeView && 'sk-filter-btn--active', className)}
>
<LayoutList aria-hidden="true" />
- {activeView ? activeView.name : 'Views'}
+ {activeView ? activeView.name : t('app.viewMenu.views', 'Views')}
{isDirty && <span className="sk-viewmenu__dot" title={t('app.viewMenu.modifiedNotSavedToThisView', 'Modified (not saved to this view)')} />}
</Button>
</PopoverTrigger>
diff --git a/frontend/src/components/ds/grid/ColumnMenu.jsx b/frontend/src/components/ds/grid/ColumnMenu.jsx
index f3c21d8b..67fc059b 100644
--- a/frontend/src/components/ds/grid/ColumnMenu.jsx
+++ b/frontend/src/components/ds/grid/ColumnMenu.jsx
@@ -128,7 +128,7 @@ export function ColumnMenu({
onClick={() => { onSort(column.key, 'asc'); onOpenChange(false); }}
>
<ArrowUp size={13} />
- {ordered ? 'Sort low to high' : 'Sort A to Z'}
+ {ordered ? t('app.columnMenu.sortLowToHigh', 'Sort low to high') : t('app.columnMenu.sortAToZ', 'Sort A to Z')}
</SharedButton>
<SharedButton variant="unstyled"
type="button"
@@ -136,7 +136,7 @@ export function ColumnMenu({
onClick={() => { onSort(column.key, 'desc'); onOpenChange(false); }}
>
<ArrowDown size={13} />
- {ordered ? 'Sort high to low' : 'Sort Z to A'}
+ {ordered ? t('app.columnMenu.sortHighToLow', 'Sort high to low') : t('app.columnMenu.sortZToA', 'Sort Z to A')}
</SharedButton>
</>
)}
@@ -148,14 +148,14 @@ export function ColumnMenu({
onClick={() => { onToggleGroup(column.key); onOpenChange(false); }}
>
<Rows3 size={13} />
- {grouped ? 'Remove grouping' : 'Group by this field'}
+ {grouped ? t('app.columnMenu.removeGrouping', 'Remove grouping') : t('app.columnMenu.groupByThisField', 'Group by this field')}
</SharedButton>
)}
{filterable && (
<>
{(canSort || canGroup) && <div className="sk-gridmenu__sep" />}
- <div className="sk-gridmenu__head">{`Filter by ${label}`}</div>
+ <div className="sk-gridmenu__head">{t('app.columnMenu.filterBy', 'Filter by {{label}}', { label })}</div>
{isEnumish ? (
<div className="sk-gridmenu__scroll">
diff --git a/frontend/src/components/ds/grid/GridToolsMenu.jsx b/frontend/src/components/ds/grid/GridToolsMenu.jsx
index a43651d7..8a6ed752 100644
--- a/frontend/src/components/ds/grid/GridToolsMenu.jsx
+++ b/frontend/src/components/ds/grid/GridToolsMenu.jsx
@@ -65,9 +65,9 @@ export function GridToolsMenu({
}}
>
{copied === 'ok' ? <Check size={13} /> : <Link2 size={13} />}
- {copied === 'ok' ? 'Link copied'
- : copied === 'fail' ? 'Copy failed — check permissions'
- : 'Copy link to this view'}
+ {copied === 'ok' ? t('app.gridToolsMenu.linkCopied', 'Link copied')
+ : copied === 'fail' ? t('app.gridToolsMenu.copyFailed', "Couldn't copy the link. Check clipboard permissions.")
+ : t('app.gridToolsMenu.copyLinkToThisView', 'Copy link to this view')}
</SharedButton>
)}
<SharedButton variant="unstyled" type="button" className="sk-gridmenu__opt" onClick={() => setPane('export')}>
diff --git a/frontend/src/components/ds/grid/GridViewPicker.jsx b/frontend/src/components/ds/grid/GridViewPicker.jsx
index d4d6ada1..7be8f431 100644
--- a/frontend/src/components/ds/grid/GridViewPicker.jsx
+++ b/frontend/src/components/ds/grid/GridViewPicker.jsx
@@ -65,7 +65,7 @@ export function GridViewPicker({ views, counts, onCreate, label = 'items', actio
onOpenChange={(o) => setMenuFor(o ? key : null)}
>
<PopoverTrigger asChild>
- <SharedButton variant="unstyled" type="button" className="sk-viewpick__cog" aria-label={`${view.name} options`}>
+ <SharedButton variant="unstyled" type="button" className="sk-viewpick__cog" aria-label={t('app.gridViewPicker.viewOptions', '{{name}} options', { name: view.name })}>
<MoreVertical size={14} />
</SharedButton>
</PopoverTrigger>
@@ -75,7 +75,7 @@ export function GridViewPicker({ views, counts, onCreate, label = 'items', actio
className="sk-gridmenu__opt"
onClick={() => { views.toggleDefault(view); setMenuFor(null); }}
>
- <Star size={13} />{view.is_default ? 'Unset as default' : 'Make default'}
+ <Star size={13} />{view.is_default ? t('app.gridViewPicker.unsetAsDefault', 'Unset as default') : t('app.gridViewPicker.makeDefault', 'Make default')}
</SharedButton>
<SharedButton variant="unstyled"
type="button"
@@ -171,7 +171,7 @@ export function GridViewPicker({ views, counts, onCreate, label = 'items', actio
else setOpen(true);
}}
>
- {active && !active.builtin ? 'Save' : 'Save as…'}
+ {active && !active.builtin ? t('common.actions.save', 'Save') : t('app.gridViewPicker.saveAs', 'Save as…')}
</SharedButton>
</div>
)}
diff --git a/frontend/src/contexts/AIContext.jsx b/frontend/src/contexts/AIContext.jsx
index 90d7d591..19096a3b 100644
--- a/frontend/src/contexts/AIContext.jsx
+++ b/frontend/src/contexts/AIContext.jsx
@@ -1,5 +1,6 @@
import { useCallback, useEffect, useMemo, useReducer, useRef } from 'react';
import api from '../services/api';
+import { t } from '../i18n/t';
import usePageContext from '../hooks/ai/usePageContext';
import {
addAttachment as appendAttachment,
@@ -308,7 +309,7 @@ export function AIProvider({ children }) {
case 'tool_result': dispatch({ type: 'TOOL_RESULT', id: data.id, output: data.output, isError: !!data.is_error }); break;
case 'pending_action': dispatch({ type: 'SET_PENDING_CONFIRM', payload: data }); break;
case 'attachment_warning': dispatch({ type: 'ATTACHMENT_WARNING', warning: data }); break;
- case 'error': dispatch({ type: 'SET_ERROR', message: data.message || 'The assistant hit an error.' }); break;
+ case 'error': dispatch({ type: 'SET_ERROR', message: data.message || t('app.aiContext.assistantError', 'The assistant hit an error.') }); break;
case 'run_start': dispatch({ type: 'RUN_START', selection: data }); break;
case 'done': dispatch({ type: 'TURN_DONE', conversationId: data.conversation_id, usage: data.usage }); break;
default: break;
@@ -357,7 +358,7 @@ export function AIProvider({ children }) {
await api.aiStreamChat(payload, { signal: controller.signal, onEvent: handleEvent });
} catch (e) {
if (e.name !== 'AbortError') {
- dispatch({ type: 'SET_ERROR', message: e.message || 'AI request failed' });
+ dispatch({ type: 'SET_ERROR', message: e.message || t('app.aiContext.requestFailed', "Couldn't reach the assistant.") });
} else {
dispatch({ type: 'SET_STREAMING', value: false });
}
@@ -391,7 +392,7 @@ export function AIProvider({ children }) {
});
// The worker resumes on the SAME open stream — no new request needed.
} catch (e) {
- dispatch({ type: 'SET_ERROR', message: e.message || 'Could not submit your decision' });
+ dispatch({ type: 'SET_ERROR', message: e.message || t('app.aiContext.decisionFailed', "Couldn't submit your decision.") });
}
}, [state.pendingConfirm]);
diff --git a/frontend/src/i18n/locales/en.json b/frontend/src/i18n/locales/en.json
index f471129c..09ed0a7a 100644
--- a/frontend/src/i18n/locales/en.json
+++ b/frontend/src/i18n/locales/en.json
@@ -355,6 +355,11 @@
"ai": {
"assistant": "Assistant"
},
+ "aiContext": {
+ "assistantError": "The assistant hit an error.",
+ "decisionFailed": "Couldn't submit your decision.",
+ "requestFailed": "Couldn't reach the assistant."
+ },
"alertsTab": {
"acknowledged": "Acknowledged",
"allClear": "All clear",
@@ -957,11 +962,18 @@
"clearFilter": "Clear filter",
"columnOptions": "{{label}} column options",
"enterValue": "Enter value",
+ "filterBy": "Filter by {{label}}",
"filterOperator": "{{label}} filter operator",
"filterValue": "{{label}} filter value",
+ "groupByThisField": "Group by this field",
"hideThisField": "Hide this field",
"moveLeft": "Move left",
- "moveRight": "Move right"
+ "moveRight": "Move right",
+ "removeGrouping": "Remove grouping",
+ "sortAToZ": "Sort A to Z",
+ "sortHighToLow": "Sort high to low",
+ "sortLowToHigh": "Sort low to high",
+ "sortZToA": "Sort Z to A"
},
"columnsMenu": {
"columns": "Columns",
@@ -2575,6 +2587,7 @@
},
"extensionBoundary": {
"extensionCrashed": "Extension crashed",
+ "failedToLoad": "Couldn't load the extension.",
"itsOtherPagesAndTheRest": "Its other pages and the rest of the panel are unaffected. Try reinstalling or updating it from the Marketplace.",
"theExtensionCouldNotBeLoaded": "The extension <0>{{slug}}</0> could not be loaded"
},
@@ -2834,8 +2847,11 @@
"files": "Files"
},
"filterDrawer": {
+ "activeCount": "{{count}} active",
"clearAll": "Clear all",
- "noFilters": "no filters"
+ "noFilters": "no filters",
+ "showResults_one": "Show {{count}} {{noun}}",
+ "showResults_other": "Show {{count}} {{noun}}s"
},
"firewallTab": {
"1921681100Or10": "192.168.1.100 or 10.0.0.0/24",
@@ -3040,10 +3056,13 @@
"sortedBy": "sorted by"
},
"gridToolsMenu": {
+ "copyFailed": "Couldn't copy the link. Check clipboard permissions.",
+ "copyLinkToThisView": "Copy link to this view",
"downloadCsv": "Download CSV",
"export": "Export…",
"export2": "Export",
"includeHiddenFields": "Include hidden fields",
+ "linkCopied": "Link copied",
"moreTableOptions": "More table options",
"refreshData": "Refresh data",
"resetViewChanges": "Reset view changes",
@@ -3056,14 +3075,19 @@
"deleteView": "Delete view",
"duplicateView": "Duplicate view",
"eGCloudflareProd": "e.g. Cloudflare prod",
+ "makeDefault": "Make default",
"myViews": "My views",
"noPersonalViewsYetTuneThe": "No personal views yet. Tune the grid, then save it here.",
"reset": "Reset",
+ "saveAs": "Save as…",
"saveCurrentView": "Save current view…",
"startFromCurrentFiltersColumns": "Start from current filters and columns",
- "unsaved": "Unsaved"
+ "unsaved": "Unsaved",
+ "unsetAsDefault": "Unset as default",
+ "viewOptions": "{{name}} options"
},
"groupMenu": {
+ "group": "Group",
"groupBy": "Group by",
"noGrouping": "No grouping"
},
@@ -3433,6 +3457,10 @@
"notice": "Notice",
"priority": "Priority"
},
+ "kpiBand": {
+ "fewerStats": "Fewer stats",
+ "moreStats": "More stats ({{count}})"
+ },
"linkAppModal": {
"appFirstOrEnsureExistingApps": "service first, or ensure existing services are not already linked.",
"applicationsAvailableToLinkCreateAnother": "services available to link. Create another",
@@ -4259,6 +4287,12 @@
"stepOf": "Step {{step}} of {{total}}",
"validate": "Validate"
},
+ "operations": {
+ "deployTarget": "Deploy {{target}}",
+ "serverFallback": "Server {{id}}",
+ "serviceDeployment": "Service deployment",
+ "serviceFallback": "Service {{id}}"
+ },
"operationsDock": {
"actionFailed": "Couldn't run that action on the operation.",
"active": "Active",
@@ -4374,6 +4408,9 @@
"pageLoader": {
"loading": "Loading"
},
+ "pageTopbar": {
+ "sections": "{{label}} sections"
+ },
"palettePages": {
"alertRules": "Alert rules",
"capacityForecast": "Capacity forecast",
@@ -5823,6 +5860,7 @@
"rolledBack": "Rolled back",
"static": "Static",
"stopped": "Stopped",
+ "unknown": "Unknown",
"wordpress": "WordPress"
},
"services": {
@@ -7617,6 +7655,7 @@
"viewDeleted": "View \"{{name}}\" deleted",
"viewSaved": "View \"{{trimmed}}\" saved",
"viewUpdated": "View \"{{name}}\" updated",
+ "views": "Views",
"withChanges": "\" with changes"
},
"volumesPanel": {
@@ -8279,6 +8318,7 @@
}
},
"gui": {
+ "cpuPercent": "{{value}}% CPU",
"fps": "{{rate}} fps",
"frameAlt": "Remote desktop frame",
"launcher": {
@@ -8287,6 +8327,7 @@
"title": "Desktop view"
},
"loadingSynthetic": "Loading synthetic desktop…",
+ "memPercent": "{{value}}% memory",
"mode": {
"auto": "Auto",
"noDisplay": "no display",
diff --git a/frontend/src/plugins/runtime/ExtensionBoundary.jsx b/frontend/src/plugins/runtime/ExtensionBoundary.jsx
index 61a13e9c..626e4127 100644
--- a/frontend/src/plugins/runtime/ExtensionBoundary.jsx
+++ b/frontend/src/plugins/runtime/ExtensionBoundary.jsx
@@ -21,7 +21,7 @@ export function ExtensionFailureCard({ slug, title, message }) {
<div className="sk-ext-failcard__icon" aria-hidden="true">⚠</div>
<div className="sk-ext-failcard__body">
<h2 className="sk-ext-failcard__title">
- {title || 'Extension failed to load'}
+ {title || t('app.extensionBoundary.failedToLoad', "Couldn't load the extension.")}
</h2>
<p className="sk-ext-failcard__desc">
{/* One key with a component slot, not prefix/suffix
diff --git a/frontend/src/plugins/serverkit-gui/components/SyntheticDesktop.jsx b/frontend/src/plugins/serverkit-gui/components/SyntheticDesktop.jsx
index 9745f445..26b47f40 100644
--- a/frontend/src/plugins/serverkit-gui/components/SyntheticDesktop.jsx
+++ b/frontend/src/plugins/serverkit-gui/components/SyntheticDesktop.jsx
@@ -76,14 +76,15 @@ function SynthWindow({ win }) {
}
function WindowBody({ body }) {
+ const { t } = useTranslation();
if (Array.isArray(body)) {
return (
<ul className="sk-synth__list">
{body.map((row, i) => (
<li key={i}>
<span>{row.name}</span>
- <span>{row.cpu != null ? `${row.cpu.toFixed?.(1) ?? row.cpu}% cpu` : ''}</span>
- <span>{row.mem != null ? `${row.mem.toFixed?.(1) ?? row.mem}% mem` : ''}</span>
+ <span>{row.cpu != null ? t('gui.cpuPercent', '{{value}}% CPU', { value: row.cpu.toFixed?.(1) ?? row.cpu }) : ''}</span>
+ <span>{row.mem != null ? t('gui.memPercent', '{{value}}% memory', { value: row.mem.toFixed?.(1) ?? row.mem }) : ''}</span>
</li>
))}
</ul>
diff --git a/frontend/src/services/__tests__/operations.test.mjs b/frontend/src/services/__tests__/operations.test.mjs
index 7b4ad81a..c683fd48 100644
--- a/frontend/src/services/__tests__/operations.test.mjs
+++ b/frontend/src/services/__tests__/operations.test.mjs
@@ -1,5 +1,6 @@
import assert from 'node:assert/strict';
import test from 'node:test';
+import i18next from 'i18next';
import {
boundOperationHistory,
@@ -10,6 +11,9 @@ import {
reconcileOperationStatus,
} from '../operations.js';
+// Uninitialised i18next returns undefined; the app initialises it in i18n/index.js.
+await i18next.init({ lng: 'en', resources: {} });
+
test('normalizes deployment progress, resource, and detail route', () => {
const operation = normalizeDeploymentOperation({
id: 'dep-1',
@@ -58,7 +62,7 @@ test('normalizes proof job kinds and keeps deploy queue mirrors out', () => {
assert.deepEqual(
Object.fromEntries(operations.map((operation) => [operation.id, operation.title])),
{
- 'dep-1': 'Application deployment',
+ 'dep-1': 'Service deployment',
backup: 'Backup policy run',
doctor: 'Doctor repair',
security: 'Security scan',
diff --git a/frontend/src/services/operations.js b/frontend/src/services/operations.js
index fc00828b..d12386b9 100644
--- a/frontend/src/services/operations.js
+++ b/frontend/src/services/operations.js
@@ -1,4 +1,5 @@
import { isTerminalRunStatus } from '../hooks/runStream.js';
+import { t } from '../i18n/t.js';
// A Recipe waiting on a human handoff is still an active run. It belongs in
// the active list and the Needs attention filter, not buried in history.
@@ -66,7 +67,7 @@ function deploymentResource(job) {
return {
type: 'app',
id: stringId(job.app_id),
- label: job.app_name || `App ${job.app_id}`,
+ label: job.app_name || t('app.operations.serviceFallback', 'Service {{id}}', { id: job.app_id }),
status: null,
capabilities: [],
scope: {},
@@ -76,7 +77,7 @@ function deploymentResource(job) {
return {
type: 'server',
id: stringId(job.target_server_id),
- label: job.target_server_name || `Server ${job.target_server_id}`,
+ label: job.target_server_name || t('app.operations.serverFallback', 'Server {{id}}', { id: job.target_server_id }),
status: null,
capabilities: [],
scope: {},
@@ -103,7 +104,9 @@ export function normalizeDeploymentOperation(job) {
runKind: 'deploy',
kind: job.kind || 'deploy',
status: job.status || 'pending',
- title: job.title || (target ? `Deploy ${target}` : 'Application deployment'),
+ title: job.title || (target
+ ? t('app.operations.deployTarget', 'Deploy {{target}}', { target })
+ : t('app.operations.serviceDeployment', 'Service deployment')),
resource: deploymentResource(job),
progress: normalizeProgress(job),
currentStepName: job.current_step_name || job.currentStepName || null,
diff --git a/frontend/src/utils/serviceTypes.js b/frontend/src/utils/serviceTypes.js
index c42ab657..9b7eb00e 100644
--- a/frontend/src/utils/serviceTypes.js
+++ b/frontend/src/utils/serviceTypes.js
@@ -77,7 +77,9 @@ const DEPLOY_STATUS = {
export function getServiceType(appType) {
return SERVICE_TYPES[appType] || {
- label: appType?.charAt(0).toUpperCase() + appType?.slice(1) || 'Unknown',
+ ...(appType
+ ? { label: appType.charAt(0).toUpperCase() + appType.slice(1) }
+ : { labelKey: 'app.serviceTypes.unknown', label: 'Unknown' }),
color: '#646b7a',
bgColor: 'rgba(100, 107, 122, 0.1)',
borderColor: 'rgba(100, 107, 122, 0.2)',