Files
KanbanGit/resources/js/lib/notification-labels.ts
Twyco 538b17b9b8
CI/CD / preconditions (pull_request) Canceled after 0s
CI/CD / test_and_check_app (pull_request) Canceled after 0s
CI/CD / Publish immutable image (pull_request) Canceled after 0s
feat(KAN-45): rebuild project notification settings
2026-09-16 09:32:05 +02:00

14 lines
411 B
TypeScript

import type { Localization } from '@/lib/localization';
import { en } from '@/locales/en';
import type { TranslationKey } from '@/types/localization';
export function notificationLabel(
t: Localization['t'],
group: string,
value: string,
fallback: string,
): string {
const key = `notifications.${group}.${value}`;
return Object.hasOwn(en, key) ? t(key as TranslationKey) : fallback;
}