Files
wehub-resource-sync 2114b14ee0
Sync main into demo / sync (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:35:26 +08:00

21 lines
583 B
TypeScript

/**
* useRedBookStrings — RedBook 专用 i18n hook
*
* 简化用法:
* import { useRedBookStrings } from '../hooks/useRedBookStrings';
* const t = useRedBookStrings();
* <span>{t.some_key}</span>
*/
import { resolveAppStrings } from '@/os/useAppStrings';
import { strings } from '../res/strings';
import { stringsEn } from '../res/strings.en';
import { useLocale } from '../locale';
export function useRedBookStrings() {
const locale = useLocale();
return resolveAppStrings(strings, stringsEn, locale);
}
export type RedBookStringKey = keyof typeof strings;