dry-wash-pl/__mocks__/react-i18next.ts
2025-02-15 19:45:37 +03:00

14 lines
295 B
TypeScript

import localeRu from '../locales/ru.json';
module.exports = {
useTranslation: (_, options) => {
const { keyPrefix } = options ?? {};
return {
t: keyPrefix ? (key: string) => localeRu[`${keyPrefix}.${key}`] : undefined,
i18n: {
language: 'ru'
}
};
}
};