use Trans as much as possible to ease lingui upgrade to 4.0

This commit is contained in:
Athou
2023-05-08 12:36:58 +02:00
parent 3d1a1cd033
commit 8b5735f521
27 changed files with 159 additions and 122 deletions

View File

@@ -42,15 +42,17 @@ export function LoginPage() {
<form onSubmit={form.onSubmit(login.execute)}>
<Stack>
<TextInput
label={t`User Name or E-mail`}
label={<Trans>User Name or E-mail</Trans>}
placeholder={t`User Name or E-mail`}
{...form.getInputProps("name")}
description={serverInfos?.demoAccountEnabled ? t`Try out CommaFeed with the demo account: demo/demo` : ""}
description={
serverInfos?.demoAccountEnabled ? <Trans>Try out CommaFeed with the demo account: demo/demo</Trans> : ""
}
size="md"
required
/>
<PasswordInput
label={t`Password`}
label={<Trans>Password</Trans>}
placeholder={t`Password`}
{...form.getInputProps("password")}
size="md"

View File

@@ -53,7 +53,7 @@ export function PasswordRecoveryPage() {
<Stack>
<TextInput
type="email"
label={t`E-mail`}
label={<Trans>E-mail</Trans>}
placeholder={t`E-mail`}
{...form.getInputProps("email")}
size="md"

View File

@@ -53,14 +53,14 @@ export function RegistrationPage() {
<TextInput label="User Name" placeholder="User Name" {...form.getInputProps("name")} size="md" required />
<TextInput
type="email"
label={t`E-mail address`}
label={<Trans>E-mail address</Trans>}
placeholder={t`E-mail address`}
{...form.getInputProps("email")}
size="md"
required
/>
<PasswordInput
label={t`Password`}
label={<Trans>Password</Trans>}
placeholder={t`Password`}
{...form.getInputProps("password")}
size="md"