## Description Support setting a document language that will control the language used for sending emails to recipients. Additional work has been done to convert all emails to using our i18n implementation so we can later add controls for sending other kinds of emails in a users target language. ## Related Issue N/A ## Changes Made - Added `<Trans>` and `msg` macros to emails - Introduced a new `renderEmailWithI18N` utility in the lib package - Updated all emails to use the `<Tailwind>` component at the top level due to rendering constraints - Updated the `i18n.server.tsx` file to not use a top level await ## Testing Performed - Configured document language and verified emails were sent in the expected language - Created a document from a template and verified that the templates language was transferred to the document
32 lines
974 B
TypeScript
32 lines
974 B
TypeScript
import React from 'react';
|
|
|
|
import { Trans } from '@lingui/macro';
|
|
|
|
import { setupI18nSSR } from '@documenso/lib/client-only/providers/i18n.server';
|
|
|
|
import { DesktopNav } from '~/components/(dashboard)/settings/layout/desktop-nav';
|
|
import { MobileNav } from '~/components/(dashboard)/settings/layout/mobile-nav';
|
|
|
|
export type DashboardSettingsLayoutProps = {
|
|
children: React.ReactNode;
|
|
};
|
|
|
|
export default async function DashboardSettingsLayout({ children }: DashboardSettingsLayoutProps) {
|
|
await setupI18nSSR();
|
|
|
|
return (
|
|
<div className="mx-auto w-full max-w-screen-xl px-4 md:px-8">
|
|
<h1 className="text-4xl font-semibold">
|
|
<Trans>Settings</Trans>
|
|
</h1>
|
|
|
|
<div className="mt-4 grid grid-cols-12 gap-x-8 md:mt-8">
|
|
<DesktopNav className="hidden md:col-span-3 md:flex" />
|
|
<MobileNav className="col-span-12 mb-8 md:hidden" />
|
|
|
|
<div className="col-span-12 md:col-span-9">{children}</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|