From f4af040db049fdf180a7e2de0c6d4c9f0a207cd1 Mon Sep 17 00:00:00 2001 From: Sendou <38327916+Sendouc@users.noreply.github.com> Date: Sat, 27 Jun 2020 00:12:43 +0300 Subject: [PATCH] freeagents translated --- .../public/locales/en/translation.json | 57 ++++++++ frontend-react/src/assets/questionMark.jpg | Bin 0 -> 2426 bytes .../src/components/elements/RadioGroup.tsx | 12 +- .../src/components/elements/Select.tsx | 3 +- .../src/components/freeagents/FAPostModal.tsx | 84 ++++++------ .../components/freeagents/FreeAgentCard.tsx | 14 +- .../components/freeagents/FreeAgentsPage.tsx | 56 +++++--- .../src/components/freeagents/Matches.tsx | 126 ++++++++---------- .../src/components/freeagents/Posts.tsx | 18 ++- .../src/components/freeagents/RoleIcons.tsx | 8 +- .../src/components/freeagents/VCIcon.tsx | 24 ++-- 11 files changed, 240 insertions(+), 162 deletions(-) create mode 100644 frontend-react/src/assets/questionMark.jpg diff --git a/frontend-react/public/locales/en/translation.json b/frontend-react/public/locales/en/translation.json index 7850488dd..4fa64514d 100644 --- a/frontend-react/public/locales/en/translation.json +++ b/frontend-react/public/locales/en/translation.json @@ -1411,5 +1411,62 @@ "Number of placements": "Number of placements", "Best placement / power": "Best placement / power", "noPlacementsPrompt": "If you have reached Top 500 in a <1>finished X Rank season you can have it displayed here! Make sure your Twitter account is verified on Discord to get it showing on your sendou.ink profile and then contact Sendou#0043 on Discord with your in-game nick. Once set up new results are added automatically and no further action is needed unless you change your name on Twitter." + }, + "freeagents": { + "loginPrompt": "Log in to make your own free agent post and start matching!", + "pleaseWaitPrompt": "You need to wait a week after deleting your old free agent post before making a new one", + "Hide filters": "Hide filters", + "Show filters": "Show filters", + "Playstyle": "Playstyle", + "Region": "Region", + "Any": "Any", + "Frontline/Slayer": "Frontline/Slayer", + "Midline/Support": "Midline/Support", + "Backline/Anchor": "Backline/Anchor", + "Europe": "Europe", + "The Americas": "The Americas", + "Oceania": "Oceania", + "Other": "Other", + "Weapon": "Weapon", + "Edit free agent post": "Edit free agent post", + "New free agent post": "New free agent post", + "MATCHES": "MATCHES", + "youHaveAMatch": "You have a match with <1>{{matchFullName}}! Contact them to see if you can get a team going", + "getLiking": "This match is revealed when you like them back!", + "getLiking_plural": "These matches are revealed when you like them back!", + "No free agents found with the current filter": "No free agents found with the current filter", + "No more free agents to show": "No more free agents to show", + "Return to the top": "Return to the top", + "Can VC": "Can VC", + "Can VC usually": "Can VC usually", + "Can VC sometimes": "Can VC sometimes", + "Can't VC": "Can't VC", + "Show more information": "Show more information", + "Activity": "Activity", + "Looking for": "Looking for", + "Past experience": "Past experience", + "Description": "Description", + "Free agent post added": "Free agent post added", + "Free agent post edited": "Free agent post edited", + "Free agent post deleted": "Free agent post deleted", + "Adding a new free agent post": "Adding a new free agent post", + "Editing a free agent post": "Editing a free agent post", + "Delete free agent post": "Delete free agent post", + "deleteNotif": "Note that if you decide to delete your post you need to wait a week before posting a new one.", + "Confirm deletion": "Confirm deletion", + "theyAreSynced": "Profile picture, Discord name, Twitter user, weapon pool and Top 500 history are automatically synced up with your profile. Also please note that the post automatically sent to Discord can't be edited afterwards so you want to set these before making a post.", + "Playstyles": "Playstyles", + "Required field": "Required field", + "Value too long": "Value too long", + "Free agent has reached Top 500 in X Rank": "Free agent has reached Top 500 in X Rank", + "Can you voice chat?": "Can you voice chat?", + "Yes": "Yes", + "Usually": "Usually", + "Sometimes": "Sometimes", + "No": "No", + "Past competitive experience": "Past competitive experience", + "What is your activity like on a typical week?": "What is your activity like on a typical week?", + "What are you looking from a team?": "What are you looking from a team?", + "Free word": "Free word" } } diff --git a/frontend-react/src/assets/questionMark.jpg b/frontend-react/src/assets/questionMark.jpg new file mode 100644 index 0000000000000000000000000000000000000000..816e8be721e91dc8d0f7e9dfcae8cab5069ab51c GIT binary patch literal 2426 zcmbtVc~}$I7Qd4{0T)78U04Mw2u4H{DnThAT2Ne|rD_Bbh`c1oV~K(dA|OIF1r(6? za6?g4A zW&ooDVRay+5tyLt@pJSvBIXRjU~zZ?5v8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r5|8w z48|RLa;6ot*U>duWU?q!F{=zzd9wL?l*SSkEIyb!UBE7=T=mU2VneOP!G-_0>qrj^ S3-N(#|Kgc4cPK4DB) void @@ -29,14 +29,14 @@ const RadioGroup: React.FC = ({ onChange={(e) => setValue(e.target.value)} value={value} > - {options.map((option) => ( + {options.map(({ label, value }) => ( - {option} + {label} ))} diff --git a/frontend-react/src/components/elements/Select.tsx b/frontend-react/src/components/elements/Select.tsx index ed1a1247e..e1b2913e3 100644 --- a/frontend-react/src/components/elements/Select.tsx +++ b/frontend-react/src/components/elements/Select.tsx @@ -115,7 +115,7 @@ const Select: React.FC = ({ } return ( - + {label && } = ({ color: getOptionColor(isFocused), } }, + menu: (styles) => ({ ...styles, zIndex: 999 }), }} /> diff --git a/frontend-react/src/components/freeagents/FAPostModal.tsx b/frontend-react/src/components/freeagents/FAPostModal.tsx index 1f0ba6e76..6219c990b 100644 --- a/frontend-react/src/components/freeagents/FAPostModal.tsx +++ b/frontend-react/src/components/freeagents/FAPostModal.tsx @@ -26,6 +26,7 @@ import { UPDATE_FREE_AGENT_POST } from "../../graphql/mutations/updateFreeAgentP import { HIDE_FREE_AGENT_POST } from "../../graphql/mutations/hideFreeAgentPost" import Alert from "../elements/Alert" import { FREE_AGENT_MATCHES } from "../../graphql/queries/freeAgentMatches" +import { useTranslation } from "react-i18next" interface FAPostModalProps { closeModal: () => void @@ -33,6 +34,7 @@ interface FAPostModalProps { } const FAPostModal: React.FC = ({ closeModal, post }) => { + const { t } = useTranslation() const [form, setForm] = useState>( post ? post : {} ) @@ -49,7 +51,7 @@ const FAPostModal: React.FC = ({ closeModal, post }) => { onCompleted: (data) => { closeModal() toast({ - description: `Free agent post added`, + description: t("freeagents;Free agent post added"), position: "top-right", status: "success", duration: 10000, @@ -57,7 +59,7 @@ const FAPostModal: React.FC = ({ closeModal, post }) => { }, onError: (error) => { toast({ - title: "An error occurred", + title: t("users;An error occurred"), description: error.message, position: "top-right", status: "error", @@ -75,7 +77,7 @@ const FAPostModal: React.FC = ({ closeModal, post }) => { onCompleted: (data) => { closeModal() toast({ - description: `Free agent post edited`, + description: t("freeagents;Free agent post edited"), position: "top-right", status: "success", duration: 10000, @@ -83,7 +85,7 @@ const FAPostModal: React.FC = ({ closeModal, post }) => { }, onError: (error) => { toast({ - title: "An error occurred", + title: t("users;An error occurred"), description: error.message, position: "top-right", status: "error", @@ -101,7 +103,7 @@ const FAPostModal: React.FC = ({ closeModal, post }) => { onCompleted: (data) => { closeModal() toast({ - description: `Free agent post deleted`, + description: t("freeagents;Free agent post deleted"), position: "top-right", status: "success", duration: 10000, @@ -109,7 +111,7 @@ const FAPostModal: React.FC = ({ closeModal, post }) => { }, onError: (error) => { toast({ - title: "An error occurred", + title: t("users;An error occurred"), description: error.message, position: "top-right", status: "error", @@ -149,8 +151,8 @@ const FAPostModal: React.FC = ({ closeModal, post }) => { @@ -162,41 +164,33 @@ const FAPostModal: React.FC = ({ closeModal, post }) => { cursor="pointer" onClick={() => setDeleting(true)} > - Delete free agent post + {t("freeagents;Delete free agent post")} )} {deleting && ( <> - - Note that if you decide to delete your post you need to wait a week - before posting a new one. - + {t("freeagents;deleteNotif")} )} {actionType === "NEW" && ( - - Profile picture, Discord name, Twitter user, weapon pool and Top 500 - history are automatically synced up with your profile. Also please - note that the post automatically sent to Discord can't be edited - afterwards so you want to set these before making a post. - + {t("freeagents;theyAreSynced")} )} - Playstyles + {t("freeagents;Playstyles")} = ({ closeModal, post }) => { }) } > - Frontline/Slayer - Midline/Support - Backline/Anchor + + {t("freeagents;Frontline/Slayer")} + + {t("freeagents;Midline/Support")} + + {t("freeagents;Backline/Anchor")} + - Required field + {t("freeagents;Required field")} - Can you voice chat? + + {t("freeagents;Can you voice chat?")} + = ({ closeModal, post }) => { }) } > - Yes - Usually - Sometimes - No + {t("freeagents;Yes")} + {t("freeagents;Usually")} + {t("freeagents;Sometimes")} + {t("freeagents;No")} - Required field + {t("freeagents;Required field")} = ({ closeModal, post }) => { mt="1em" > - Past competitive experience + {t("freeagents;Past competitive experience")}