From d6622a8fadf02c60c35ca9057e519f4bce7363a9 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Sat, 24 Dec 2022 23:33:24 -0800 Subject: [PATCH] Add proper localizations to CharacterConflictModal --- components/CharacterConflictModal/index.tsx | 26 +++++++++++---------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/components/CharacterConflictModal/index.tsx b/components/CharacterConflictModal/index.tsx index 4480ef28..0c3ac1b1 100644 --- a/components/CharacterConflictModal/index.tsx +++ b/components/CharacterConflictModal/index.tsx @@ -1,14 +1,10 @@ import React, { useEffect, useState } from 'react' -import { setCookie } from 'cookies-next' -import Router, { useRouter } from 'next/router' -import { useTranslation } from 'react-i18next' -import { AxiosResponse } from 'axios' +import { useRouter } from 'next/router' +import { Trans, useTranslation } from 'react-i18next' import * as Dialog from '@radix-ui/react-dialog' -import api from '~utils/api' import { appState } from '~utils/appState' -import { accountState } from '~utils/accountState' import Button from '~components/Button' @@ -24,7 +20,11 @@ interface Props { } const CharacterConflictModal = (props: Props) => { + // Localization + const router = useRouter() const { t } = useTranslation('common') + const locale = + router.locale && ['en', 'ja'].includes(router.locale) ? router.locale : 'en' // States const [open, setOpen] = useState(false) @@ -75,18 +75,17 @@ const CharacterConflictModal = (props: Props) => { onOpenAutoFocus={(event) => event.preventDefault()} >

- Only one version of a character can be included in each party. Do - you want to change your party members? +

@@ -102,8 +101,11 @@ const CharacterConflictModal = (props: Props) => {