Add missing translations (#278)

This commit is contained in:
Luke Vella 2022-08-09 08:58:11 +01:00 committed by GitHub
parent 4ebae20a8b
commit cdccfc9180
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 5 deletions

View file

@ -31,6 +31,7 @@
"description": "Description", "description": "Description",
"descriptionPlaceholder": "Hey everyone, please choose the dates that work for you!", "descriptionPlaceholder": "Hey everyone, please choose the dates that work for you!",
"donate": "Donate", "donate": "Donate",
"edit": "Edit",
"editDetails": "Edit details", "editDetails": "Edit details",
"editOptions": "Edit options", "editOptions": "Edit options",
"email": "Email", "email": "Email",
@ -71,6 +72,7 @@
"monthView": "Month view", "monthView": "Month view",
"name": "Name", "name": "Name",
"namePlaceholder": "Jessie Smith", "namePlaceholder": "Jessie Smith",
"new": "New",
"newPoll": "New poll", "newPoll": "New poll",
"next": "Next", "next": "Next",
"nextMonth": "Next month", "nextMonth": "Next month",
@ -81,6 +83,7 @@
"notificationsOn": "Notifications are on", "notificationsOn": "Notifications are on",
"notificationsOnDescription": "An email will be sent to <b>{{email}}</b> when there is activity on this poll.", "notificationsOnDescription": "An email will be sent to <b>{{email}}</b> when there is activity on this poll.",
"notificationsVerifyEmail": "You need to verify your email to turn on notifications", "notificationsVerifyEmail": "You need to verify your email to turn on notifications",
"noVotes": "No one has voted for this option",
"ok": "Ok", "ok": "Ok",
"options": "Options", "options": "Options",
"participant": "Participant", "participant": "Participant",

View file

@ -205,7 +205,7 @@ const MobilePoll: React.VoidFunctionComponent = () => {
reset(); reset();
}} }}
> >
Cancel {t("cancel")}
</Button> </Button>
) : selectedParticipant ? ( ) : selectedParticipant ? (
<div className="flex space-x-3"> <div className="flex space-x-3">
@ -232,7 +232,7 @@ const MobilePoll: React.VoidFunctionComponent = () => {
}); });
}} }}
> >
Edit {t("edit")}
</Button> </Button>
<Button <Button
icon={<Trash />} icon={<Trash />}
@ -268,7 +268,7 @@ const MobilePoll: React.VoidFunctionComponent = () => {
setIsEditing(true); setIsEditing(true);
}} }}
> >
New {t("new")}
</Button> </Button>
)} )}
</div> </div>
@ -317,7 +317,7 @@ const MobilePoll: React.VoidFunctionComponent = () => {
type="primary" type="primary"
loading={formState.isSubmitting} loading={formState.isSubmitting}
> >
Save {t("save")}
</Button> </Button>
</div> </div>
</motion.div> </motion.div>

View file

@ -1,6 +1,7 @@
import { Participant, VoteType } from "@prisma/client"; import { Participant, VoteType } from "@prisma/client";
import clsx from "clsx"; import clsx from "clsx";
import { AnimatePresence, motion } from "framer-motion"; import { AnimatePresence, motion } from "framer-motion";
import { useTranslation } from "next-i18next";
import * as React from "react"; import * as React from "react";
import ChevronDown from "@/components/icons/chevron-down.svg"; import ChevronDown from "@/components/icons/chevron-down.svg";
@ -72,6 +73,7 @@ const PopInOut: React.VoidFunctionComponent<{
const PollOptionVoteSummary: React.VoidFunctionComponent<{ optionId: string }> = const PollOptionVoteSummary: React.VoidFunctionComponent<{ optionId: string }> =
({ optionId }) => { ({ optionId }) => {
const { t } = useTranslation("app");
const { getParticipants } = useParticipants(); const { getParticipants } = useParticipants();
const participantsWhoVotedYes = getParticipants(optionId, "yes"); const participantsWhoVotedYes = getParticipants(optionId, "yes");
const participantsWhoVotedIfNeedBe = getParticipants(optionId, "ifNeedBe"); const participantsWhoVotedIfNeedBe = getParticipants(optionId, "ifNeedBe");
@ -92,7 +94,7 @@ const PollOptionVoteSummary: React.VoidFunctionComponent<{ optionId: string }> =
<div> <div>
{noVotes ? ( {noVotes ? (
<div className="rounded-lg bg-slate-50 p-2 text-center text-slate-400"> <div className="rounded-lg bg-slate-50 p-2 text-center text-slate-400">
No one has voted for this option {t("noVotes")}
</div> </div>
) : ( ) : (
<div className="grid grid-cols-2 gap-x-4"> <div className="grid grid-cols-2 gap-x-4">