MCPcopy
hub / github.com/koala73/worldmonitor / getLocalizedPanelName

Function getLocalizedPanelName

src/settings-window.ts:12–20  ·  view source on GitHub ↗
(panelKey: string, fallback: string)

Source from the content-addressed store, hash-verified

10import { isDesktopRuntime } from '@/services/runtime';
11
12function getLocalizedPanelName(panelKey: string, fallback: string): string {
13 if (panelKey === 'runtime-config') {
14 return t('modals.runtimeConfig.title');
15 }
16 const key = panelKey.replace(/-([a-z])/g, (_match, group: string) => group.toUpperCase());
17 const lookup = `panels.${key}`;
18 const localized = t(lookup);
19 return localized === lookup ? fallback : localized;
20}
21
22export function initSettingsWindow(): void {
23 const appEl = document.getElementById('app');

Callers 1

renderFunction · 0.85

Calls 1

tFunction · 0.90

Tested by

no test coverage detected