(key: TextEntryKey, locale?: string)
| 29 | type TextEntryKey = Exclude<keyof typeof i18nTexts, 'dailySummary'> |
| 30 | |
| 31 | export function t(key: TextEntryKey, locale?: string): string | string[] { |
| 32 | const text = i18nTexts[key] |
| 33 | if (typeof text === 'object' && 'zh' in text && 'en' in text) { |
| 34 | return isChineseLocale(locale) ? text.zh : text.en |
| 35 | } |
| 36 | return '' |
| 37 | } |
| 38 | |
| 39 | const MAX_MESSAGE_CONTENT_LENGTH = 200 |
| 40 |
no test coverage detected