mirror of
https://github.com/lukevella/rallly.git
synced 2025-04-30 18:56:45 +02:00
Add missing translation (#227)
* Add missing translation * Add more missing translations
This commit is contained in:
parent
bfb14b0e02
commit
800af20132
4 changed files with 24 additions and 13 deletions
|
@ -1,7 +1,9 @@
|
||||||
{
|
{
|
||||||
"12h": "12-hour",
|
"12h": "12-hour",
|
||||||
"24h": "24-hour",
|
"24h": "24-hour",
|
||||||
|
"addTimeOption": "Add time option",
|
||||||
"admin": "Admin",
|
"admin": "Admin",
|
||||||
|
"applyToAllDates": "Apply to all dates",
|
||||||
"areYouSure": "Are you sure?",
|
"areYouSure": "Are you sure?",
|
||||||
"back": "Back",
|
"back": "Back",
|
||||||
"blog": "Blog",
|
"blog": "Blog",
|
||||||
|
@ -9,10 +11,7 @@
|
||||||
"calendarHelpTitle": "Forget something?",
|
"calendarHelpTitle": "Forget something?",
|
||||||
"cancel": "Cancel",
|
"cancel": "Cancel",
|
||||||
"comment": "Comment",
|
"comment": "Comment",
|
||||||
"applyToAllDates": "Apply to all dates",
|
|
||||||
"commentPlaceholder": "Leave a comment on this poll (visible to everyone)",
|
"commentPlaceholder": "Leave a comment on this poll (visible to everyone)",
|
||||||
"deleteDate": "Delete date",
|
|
||||||
"addTimeOption": "Add time option",
|
|
||||||
"comments": "Comments",
|
"comments": "Comments",
|
||||||
"continue": "Continue",
|
"continue": "Continue",
|
||||||
"copied": "Copied",
|
"copied": "Copied",
|
||||||
|
@ -22,6 +21,7 @@
|
||||||
"creatingDemo": "Creating demo poll…",
|
"creatingDemo": "Creating demo poll…",
|
||||||
"delete": "Delete",
|
"delete": "Delete",
|
||||||
"deleteComment": "Delete comment",
|
"deleteComment": "Delete comment",
|
||||||
|
"deleteDate": "Delete date",
|
||||||
"deletedPoll": "Deleted poll",
|
"deletedPoll": "Deleted poll",
|
||||||
"deletedPollInfo": "this poll doesn't exist anymore.",
|
"deletedPollInfo": "this poll doesn't exist anymore.",
|
||||||
"deletePoll": "Delete poll",
|
"deletePoll": "Delete poll",
|
||||||
|
@ -55,7 +55,14 @@
|
||||||
"locationPlaceholder": "Joe's Coffee Shop",
|
"locationPlaceholder": "Joe's Coffee Shop",
|
||||||
"lockPoll": "Lock poll",
|
"lockPoll": "Lock poll",
|
||||||
"login": "Login",
|
"login": "Login",
|
||||||
|
"loginCheckInbox": "Please check your inbox.",
|
||||||
|
"loginMagicLinkSent": "A magic link has been sent to:",
|
||||||
|
"loginSendMagicLink": "Send me a magic link",
|
||||||
|
"loginViaMagicLink": "Login via magic link",
|
||||||
|
"loginViaMagicLinkDescription": "We'll send you an email with a magic link that you can use to login.",
|
||||||
|
"loginWithValidEmail": "Please enter a valid email address",
|
||||||
"logout": "Logout",
|
"logout": "Logout",
|
||||||
|
"manage": "Manage",
|
||||||
"menu": "Menu",
|
"menu": "Menu",
|
||||||
"mixedOptionsDescription": "You can't have both time and date options in the same poll. Which would you like to keep?",
|
"mixedOptionsDescription": "You can't have both time and date options in the same poll. Which would you like to keep?",
|
||||||
"mixedOptionsKeepDates": "Keep date options",
|
"mixedOptionsKeepDates": "Keep date options",
|
||||||
|
@ -113,6 +120,7 @@
|
||||||
"voteCount": "{{count}} vote",
|
"voteCount": "{{count}} vote",
|
||||||
"weekStartsOn": "Week starts on",
|
"weekStartsOn": "Week starts on",
|
||||||
"weekView": "Week view",
|
"weekView": "Week view",
|
||||||
|
"whatsThis": "What's this?",
|
||||||
"yes": "Yes",
|
"yes": "Yes",
|
||||||
"yourDetails": "Your details",
|
"yourDetails": "Your details",
|
||||||
"yourPolls": "Your polls"
|
"yourPolls": "Your polls"
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import clsx from "clsx";
|
import clsx from "clsx";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
|
import { useTranslation } from "next-i18next";
|
||||||
import { usePlausible } from "next-plausible";
|
import { usePlausible } from "next-plausible";
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { useForm } from "react-hook-form";
|
import { useForm } from "react-hook-form";
|
||||||
|
@ -11,6 +12,7 @@ import { validEmail } from "@/utils/form-validation";
|
||||||
import { trpc } from "../utils/trpc";
|
import { trpc } from "../utils/trpc";
|
||||||
|
|
||||||
const LoginForm: React.VoidFunctionComponent = () => {
|
const LoginForm: React.VoidFunctionComponent = () => {
|
||||||
|
const { t } = useTranslation("app");
|
||||||
const { register, formState, handleSubmit, getValues } =
|
const { register, formState, handleSubmit, getValues } =
|
||||||
useForm<{ email: string }>();
|
useForm<{ email: string }>();
|
||||||
|
|
||||||
|
@ -24,7 +26,9 @@ const LoginForm: React.VoidFunctionComponent = () => {
|
||||||
<Magic className="h-24 text-slate-300" />
|
<Magic className="h-24 text-slate-300" />
|
||||||
</div>
|
</div>
|
||||||
<div className="max-w-sm p-6">
|
<div className="max-w-sm p-6">
|
||||||
<div className="mb-2 text-xl font-semibold">Login via magic link</div>
|
<div className="mb-2 text-xl font-semibold">
|
||||||
|
{t("loginViaMagicLink")}
|
||||||
|
</div>
|
||||||
{!formState.isSubmitSuccessful ? (
|
{!formState.isSubmitSuccessful ? (
|
||||||
<form
|
<form
|
||||||
onSubmit={handleSubmit(async ({ email }) => {
|
onSubmit={handleSubmit(async ({ email }) => {
|
||||||
|
@ -33,8 +37,7 @@ const LoginForm: React.VoidFunctionComponent = () => {
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<div className="mb-2 text-slate-500">
|
<div className="mb-2 text-slate-500">
|
||||||
We'll send you an email with a magic link that you can use to
|
{t("loginViaMagicLinkDescription")}
|
||||||
login.
|
|
||||||
</div>
|
</div>
|
||||||
<div className="mb-4">
|
<div className="mb-4">
|
||||||
<input
|
<input
|
||||||
|
@ -48,7 +51,7 @@ const LoginForm: React.VoidFunctionComponent = () => {
|
||||||
/>
|
/>
|
||||||
{formState.errors.email ? (
|
{formState.errors.email ? (
|
||||||
<div className="mt-1 text-sm text-rose-500">
|
<div className="mt-1 text-sm text-rose-500">
|
||||||
Please enter a valid email address
|
{t("loginWithValidEmail")}
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
|
@ -58,17 +61,17 @@ const LoginForm: React.VoidFunctionComponent = () => {
|
||||||
loading={formState.isSubmitting}
|
loading={formState.isSubmitting}
|
||||||
type="primary"
|
type="primary"
|
||||||
>
|
>
|
||||||
Send me a magic link
|
{t("loginSendMagicLink")}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
) : (
|
) : (
|
||||||
<div>
|
<div>
|
||||||
<div className="text-slate-500">A magic link has been sent to:</div>
|
<div className="text-slate-500">{t("loginMagicLinkSent")}</div>
|
||||||
<div className="text-primary-500 font-mono">
|
<div className="font-mono text-primary-500">
|
||||||
{getValues("email")}
|
{getValues("email")}
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-2 text-slate-500">Please check you inbox.</div>
|
<div className="mt-2 text-slate-500">{t("loginCheckInbox")}</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -177,7 +177,7 @@ const ManagePoll: React.VoidFunctionComponent<{
|
||||||
{changePollDetailsModalContextHolder}
|
{changePollDetailsModalContextHolder}
|
||||||
<Dropdown
|
<Dropdown
|
||||||
placement={placement}
|
placement={placement}
|
||||||
trigger={<Button icon={<Cog />}>Manage</Button>}
|
trigger={<Button icon={<Cog />}>{t("manage")}</Button>}
|
||||||
>
|
>
|
||||||
<DropdownItem
|
<DropdownItem
|
||||||
icon={Pencil}
|
icon={Pencil}
|
||||||
|
|
|
@ -160,7 +160,7 @@ const UserDropdown: React.VoidFunctionComponent<
|
||||||
{user.isGuest ? (
|
{user.isGuest ? (
|
||||||
<DropdownItem
|
<DropdownItem
|
||||||
icon={Question}
|
icon={Question}
|
||||||
label="What's this?"
|
label={t("whatsThis")}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
modalContext.render({
|
modalContext.render({
|
||||||
showClose: true,
|
showClose: true,
|
||||||
|
|
Loading…
Add table
Reference in a new issue