mirror of
https://github.com/lukevella/rallly.git
synced 2025-07-19 09:18:01 +02:00
✨ Translations for Email Notifications (#1278)
Co-authored-by: Niko Heller <hellerniko@gmail.com>
This commit is contained in:
parent
aa52a0f26f
commit
f4218c3115
51 changed files with 1071 additions and 970 deletions
|
@ -2,9 +2,15 @@ import { Trans as BaseTrans } from "react-i18next";
|
|||
|
||||
import { useTranslation } from "@/app/i18n/client";
|
||||
|
||||
type TransWithContextProps = Omit<React.ComponentProps<typeof BaseTrans>, "t">;
|
||||
import { I18nNamespaces } from "../../declarations/i18next";
|
||||
|
||||
export const Trans = (props: TransWithContextProps) => {
|
||||
const { t } = useTranslation();
|
||||
return <BaseTrans t={t} {...props} />;
|
||||
export const Trans = (props: {
|
||||
i18nKey: keyof I18nNamespaces["app"];
|
||||
defaults?: string;
|
||||
values?: Record<string, string | number | boolean | undefined>;
|
||||
children?: React.ReactNode;
|
||||
components?: Record<string, React.ReactElement> | React.ReactElement[];
|
||||
}) => {
|
||||
const { t } = useTranslation("app");
|
||||
return <BaseTrans ns="app" t={t} {...props} />;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue