diff --git a/public/locales/en-US/common.json b/public/locales/en-US/common.json index 31ecea2d..87ca314c 100644 --- a/public/locales/en-US/common.json +++ b/public/locales/en-US/common.json @@ -10,7 +10,8 @@ "breadcrumb": { "honkai-3rd": "Honkai 3rd", "battlesuits": "Battlesuits", - "stigmata": "Stigmata" + "stigmata": "Stigmata", + "weapons": "Weapons" }, "battlesuits-list": { "heading": "Battlesuits", @@ -34,5 +35,9 @@ "top": "Top", "mid": "Mid", "bot": "Bot" + }, + "weapons-list": { + "weapons": "Weapons", + "filter-by-category": "Filter by Category" } } diff --git a/public/locales/ko-KR/common.json b/public/locales/ko-KR/common.json index 2e93a218..facc07a6 100644 --- a/public/locales/ko-KR/common.json +++ b/public/locales/ko-KR/common.json @@ -13,7 +13,8 @@ "stigmata": "성흔", "top": "(상)", "mid": "(중)", - "bot": "(하)" + "bot": "(하)", + "weapons": "무기" }, "battlesuits-list": { "heading": "발키리", @@ -37,5 +38,9 @@ "top": "(상)", "mid": "(중)", "bot": "(하)" + }, + "weapons-list": { + "weapons": "무기", + "filter-by-category": "카테고리 필터" } } diff --git a/src/components/molecules/WeaponCard.tsx b/src/components/molecules/WeaponCard.tsx index 9ac7cf56..eabfce79 100644 --- a/src/components/molecules/WeaponCard.tsx +++ b/src/components/molecules/WeaponCard.tsx @@ -1,15 +1,20 @@ /** @jsxImportSource theme-ui */ import { Box, Card, Text } from '@theme-ui/components' +import { useRouter } from 'next/router' import { WeaponData } from '../../lib/honkai3rd/weapons' +import { translate } from '../../lib/i18n' import PageLink from '../atoms/PageLink' import SquareImageBox from '../atoms/SquareImageBox' interface WeaponCardProps { - weapon: Pick + weapon: Pick hidden?: boolean } const WeaponCard = ({ weapon, hidden }: WeaponCardProps) => { + const { locale } = useRouter() + const weaponName = translate(locale, { 'ko-KR': weapon.krName }, weapon.name) + return (