hezarfen_frontend
Clone
https://git.tahinli.com/archive/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiB5fcd955Burak Boduroğlu2 months ago730 commits
| 1 | import type { MessageKey } from "@/i18n/messages"; |
| 2 | |
| 3 | // `kind` is an open string on the wire, so a value this build has no copy for |
| 4 | // falls back to itself rather than rendering a missing translation key. |
| 5 | const KNOWN_KINDS = new Set(["course", "study", "club"]); |
| 6 | |
| 7 | export function courseKindLabel(kind: string, t: (key: MessageKey) => string): string { |
| 8 | return KNOWN_KINDS.has(kind) ? t(`courses.kind.${kind}Singular` as MessageKey) : kind; |
| 9 | } |