(key: TextEntryKey, locale?: string)
| 23 | type TextEntryKey = keyof typeof i18nTexts |
| 24 | |
| 25 | export function t(key: TextEntryKey, locale?: string): string { |
| 26 | const text = i18nTexts[key] |
| 27 | if (typeof text === 'object' && 'zh' in text && 'en' in text) { |
| 28 | return isChineseLocale(locale) ? text.zh : text.en |
| 29 | } |
| 30 | return '' |
| 31 | } |
| 32 | |
| 33 | export function formatTimeRange( |
| 34 | timeFilter?: { startTs: number; endTs: number }, |
no test coverage detected