From 15366c4a37289bfeef08cd69a2786ff2b312d312 Mon Sep 17 00:00:00 2001 From: "Kalle (Sendou)" <38327916+Sendouc@users.noreply.github.com> Date: Wed, 4 Nov 2020 15:41:31 +0200 Subject: [PATCH] i18n profile page --- lib/components/MarkdownTextarea.tsx | 13 +- lib/components/WeaponImage.tsx | 8 +- lib/components/WeaponSelector.tsx | 10 +- lib/lists/temp.ts | 0 lib/lists/weaponsWithHero.ts | 300 ++++---- lingui.config.js | 5 +- locale/de/messages.po | 660 ++++++++++++++++- locale/el/messages.po | 666 ++++++++++++++++- locale/en/messages.po | 680 +++++++++++++++++- locale/es/messages.po | 666 ++++++++++++++++- locale/fr/messages.po | 666 ++++++++++++++++- locale/it/messages.po | 666 ++++++++++++++++- locale/ja/messages.po | 666 ++++++++++++++++- locale/ko/messages.po | 666 ++++++++++++++++- locale/nl/messages.po | 666 ++++++++++++++++- locale/pt/messages.po | 666 ++++++++++++++++- locale/ru/messages.po | 666 ++++++++++++++++- locale/sv/messages.po | 666 ++++++++++++++++- locale/zh/messages.po | 666 ++++++++++++++++- scenes/Layout/components/LanguageSelector.tsx | 6 +- scenes/Profile/components/ProfileModal.tsx | 14 +- 21 files changed, 8501 insertions(+), 521 deletions(-) create mode 100644 lib/lists/temp.ts diff --git a/lib/components/MarkdownTextarea.tsx b/lib/components/MarkdownTextarea.tsx index 4bf68e154..5999ad6a7 100644 --- a/lib/components/MarkdownTextarea.tsx +++ b/lib/components/MarkdownTextarea.tsx @@ -6,7 +6,7 @@ import { FormLabel, Textarea, } from "@chakra-ui/core"; -import { useTranslation } from "lib/useMockT"; +import { Trans } from "@lingui/macro"; import { FieldError } from "react-hook-form"; import LimitProgress from "./LimitProgress"; @@ -29,7 +29,6 @@ const MarkdownTextarea: React.FC = ({ register, placeholder, }) => { - const { t } = useTranslation(); return ( @@ -48,10 +47,12 @@ const MarkdownTextarea: React.FC = ({ mr={3} /> - {t("users;markdownPrompt")}{" "} - - https://sendou.ink/markdown - + + Markdown is supported -{" "} + + https://sendou.ink/markdown + + {error?.message} diff --git a/lib/components/WeaponImage.tsx b/lib/components/WeaponImage.tsx index f1defaf9f..97b752805 100644 --- a/lib/components/WeaponImage.tsx +++ b/lib/components/WeaponImage.tsx @@ -1,4 +1,4 @@ -import { useTranslation } from "lib/useMockT"; +import { useLingui } from "@lingui/react"; import Image from "next/image"; import React from "react"; @@ -15,14 +15,14 @@ const WeaponImage: React.FC = ({ noTitle, isInline, }) => { - const { t } = useTranslation(); + const { i18n } = useLingui(); return ( <> {t(`game;${name}`)} = ({ name, value, onChange }) => { + const { i18n } = useLingui(); return ( <>