Improve page titles
This commit is contained in:
@@ -7,7 +7,8 @@
|
||||
"weapons": "Weapons",
|
||||
"stigmata": "Stigmata",
|
||||
"elfs": "ELFs",
|
||||
"elysian-realm": "Elysian Realm (WIP)"
|
||||
"elysian-realm": "Elysian Realm",
|
||||
"wip": "WIP"
|
||||
},
|
||||
"nav": {},
|
||||
"index": {
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
{
|
||||
"common": {
|
||||
"elysian-realm": "과거의 낙원 (작업중)",
|
||||
"elysian-realm": "과거의 낙원",
|
||||
"battlesuits": "발키리",
|
||||
"abyss-lab": "어비스랩",
|
||||
"honkai-3rd": "붕괴 3rd",
|
||||
"versions": "업데이트",
|
||||
"weapons": "무기",
|
||||
"stigmata": "성흔",
|
||||
"elfs": "인형"
|
||||
"elfs": "인형",
|
||||
"wip": "작업중"
|
||||
},
|
||||
"battlesuits-list": {
|
||||
"heading": "발키리",
|
||||
|
||||
@@ -124,6 +124,7 @@ const NavItem = ({ target }: NavItemProps) => {
|
||||
}}
|
||||
>
|
||||
{t(`common.${target}`)}
|
||||
{target === 'elysian-realm' ? ` (${t('common.wip')})` : ''}
|
||||
</Text>
|
||||
</NavLink>
|
||||
</NextLink>
|
||||
|
||||
@@ -50,7 +50,7 @@ const SingleStigmataPage = ({
|
||||
return (
|
||||
<Honkai3rdLayout>
|
||||
<Head
|
||||
title={`${t('common.honkai-3rd')}: ${stigmataName} - ${t(
|
||||
title={`${stigmataName} - ${t('common.honkai-3rd')} - ${t(
|
||||
'common.abyss-lab'
|
||||
)}`}
|
||||
description={`${t('common.honkai-3rd')} ${t('stigmata-show.stigmata')} /
|
||||
|
||||
@@ -38,8 +38,8 @@ const StigmataSetPage = ({
|
||||
return (
|
||||
<Honkai3rdLayout>
|
||||
<Head
|
||||
title={`${t('common.honkai-3rd')}: ${stigmataSetName} ${t(
|
||||
'stigmata-show.stigmata-set'
|
||||
title={`${stigmataSetName} ${t('stigmata-show.stigmata-set')} - ${t(
|
||||
'common.honkai-3rd'
|
||||
)} - ${t('common.abyss-lab')}`}
|
||||
description={`${t('common.honkai-3rd')} ${t(
|
||||
'stigmata-show.stigmata-set'
|
||||
|
||||
@@ -85,7 +85,7 @@ const BattlesuitShowPage = ({
|
||||
return (
|
||||
<Honkai3rdLayout>
|
||||
<Head
|
||||
title={`${t('common.honkai-3rd')}: ${battlesuitName} - ${t(
|
||||
title={`${battlesuitName} - ${t('common.honkai-3rd')} - ${t(
|
||||
'common.abyss-lab'
|
||||
)}`}
|
||||
description={`${t('common.honkai-3rd')} ${t(
|
||||
|
||||
@@ -79,7 +79,7 @@ const BattlesuitListPage = ({ battlesuits }: BattlesuitListPageProps) => {
|
||||
return (
|
||||
<Honkai3rdLayout>
|
||||
<Head
|
||||
title={`${t('common.honkai-3rd')}: ${t('common.battlesuits')} - ${t(
|
||||
title={`${t('common.battlesuits')} - ${t('common.honkai-3rd')} - ${t(
|
||||
'common.abyss-lab'
|
||||
)}`}
|
||||
description={t('battlesuits-list.description')}
|
||||
|
||||
@@ -21,7 +21,7 @@ const ElfListPage = ({ elfs }: ElfListPageProps) => {
|
||||
return (
|
||||
<Honkai3rdLayout>
|
||||
<Head
|
||||
title={`${t('common.honkai-3rd')}: ${t('common.elfs')} - ${t(
|
||||
title={`${t('common.elfs')} - ${t('common.honkai-3rd')} - ${t(
|
||||
'common.abyss-lab'
|
||||
)}`}
|
||||
description={t('elfs-list.description')}
|
||||
|
||||
@@ -2,18 +2,12 @@
|
||||
import { Box, Heading, Image } from '@theme-ui/components'
|
||||
import { NextPageContext } from 'next'
|
||||
import Breadcrumb from '../../../../components/organisms/Breadcrumb'
|
||||
import {
|
||||
BattlesuitData,
|
||||
battlesuitFeatures,
|
||||
battlesuitTypes,
|
||||
valkyries,
|
||||
} from '../../../../lib/honkai3rd/battlesuits'
|
||||
import { BattlesuitData } from '../../../../lib/honkai3rd/battlesuits'
|
||||
import { generateI18NPaths, getI18NProps } from '../../../../server/i18n'
|
||||
import { getBattlesuitById } from '../../../../server/data/honkai3rd/battlesuits'
|
||||
import { translate, useTranslation } from '../../../../lib/i18n'
|
||||
import { useRouter } from 'next/router'
|
||||
import Head from '../../../../components/atoms/Head'
|
||||
import { capitalize } from '../../../../lib/string'
|
||||
import { assetsBucketBaseUrl } from '../../../../lib/consts'
|
||||
import Honkai3rdLayout from '../../../../components/layouts/Honkai3rdLayout'
|
||||
import { WeaponData } from '../../../../lib/honkai3rd/weapons'
|
||||
@@ -52,45 +46,15 @@ const BattlesuitShowPage = ({
|
||||
battlesuit.name
|
||||
)
|
||||
|
||||
const { label: valkyrieLabel, krLabel } = valkyries.find(
|
||||
(aValkyrie) => aValkyrie.value === battlesuit.valkyrie
|
||||
) || { label: battlesuit.valkyrie, krLabel: battlesuit.valkyrie }
|
||||
|
||||
const valkyrieName = translate(locale, { 'ko-KR': krLabel }, valkyrieLabel)
|
||||
|
||||
const battlesuitType = battlesuitTypes.find(
|
||||
(aType) => aType.value === battlesuit.type
|
||||
)
|
||||
const battlesuitTypeLabel = battlesuitType
|
||||
? translate(
|
||||
locale,
|
||||
{ 'ko-KR': battlesuitType.krLabel },
|
||||
battlesuitType.label
|
||||
)
|
||||
: capitalize(battlesuit.type)
|
||||
|
||||
return (
|
||||
<Honkai3rdLayout>
|
||||
<Head
|
||||
title={`${t('common.honkai-3rd')}: ${battlesuitName} - ${t(
|
||||
'common.abyss-lab'
|
||||
)}`}
|
||||
title={`${battlesuitName} (${t('common.elysian-realm')}) - ${t(
|
||||
'common.honkai-3rd'
|
||||
)} - ${t('common.abyss-lab')}`}
|
||||
description={`${t('common.honkai-3rd')} ${t(
|
||||
'battlesuit-show.battlesuit'
|
||||
)} / ${valkyrieName} / ${battlesuitTypeLabel} / ${battlesuit.features
|
||||
.map((feature) => {
|
||||
const featureData = battlesuitFeatures.find(
|
||||
(aFeature) => aFeature.value === feature
|
||||
)
|
||||
if (featureData == null) {
|
||||
return feature
|
||||
}
|
||||
|
||||
const { label, krLabel } = featureData
|
||||
|
||||
return translate(locale, { 'ko-KR': krLabel }, label)
|
||||
})
|
||||
.join(', ')}`}
|
||||
'common.elysian-realm'
|
||||
)} ${t('battlesuit-show.battlesuit')}`}
|
||||
/>
|
||||
|
||||
<Box p={3}>
|
||||
|
||||
@@ -39,7 +39,7 @@ const ElysianRealmIndexPage = ({
|
||||
return (
|
||||
<Honkai3rdLayout>
|
||||
<Head
|
||||
title={`${t('common.honkai-3rd')}: ${t('common.elysian-realm')} - ${t(
|
||||
title={`${t('common.elysian-realm')} - ${t('common.honkai-3rd')} - ${t(
|
||||
'common.abyss-lab'
|
||||
)}`}
|
||||
description={t('common.elysian-realm')}
|
||||
@@ -56,7 +56,9 @@ const ElysianRealmIndexPage = ({
|
||||
]}
|
||||
/>
|
||||
|
||||
<Heading as='h1'>{t('common.elysian-realm')}</Heading>
|
||||
<Heading as='h1'>
|
||||
{t('common.elysian-realm')} ({t('common.wip')})
|
||||
</Heading>
|
||||
|
||||
<Heading as='h2'>{t('common.battlesuits')}</Heading>
|
||||
|
||||
|
||||
@@ -29,10 +29,12 @@ const SignetShowPage = ({ signetId, signetGroup }: SignetShowPageProps) => {
|
||||
return (
|
||||
<Honkai3rdLayout>
|
||||
<Head
|
||||
title={`${t('common.honkai-3rd')}: ${signetGroup.name} - ${t(
|
||||
'common.abyss-lab'
|
||||
title={`${signetGroup.name} ${t('elysian-realm.signets')} (${t(
|
||||
'common.elysian-realm'
|
||||
)}) - ${t('common.honkai-3rd')} - ${t('common.abyss-lab')}`}
|
||||
description={`${t('common.honkai-3rd')} ${signetGroup.name} ${t(
|
||||
'elysian-realm.signets'
|
||||
)}`}
|
||||
description={`${t('common.honkai-3rd')} ${t('elysian-realm.signet')}`}
|
||||
/>
|
||||
|
||||
<Box p={3}>
|
||||
|
||||
@@ -31,9 +31,9 @@ const ElysianRealmIndexPage = ({
|
||||
return (
|
||||
<Honkai3rdLayout>
|
||||
<Head
|
||||
title={`${t('common.honkai-3rd')}: ${t('common.elysian-realm')} ${t(
|
||||
'elysian-realm.supports'
|
||||
)} - ${t('common.abyss-lab')}`}
|
||||
title={`${t('elysian-realm.supports')} (${t(
|
||||
'common.elysian-realm'
|
||||
)}) - ${t('common.honkai-3rd')} - ${t('common.abyss-lab')}`}
|
||||
description={`${t('common.elysian-realm')} ${t(
|
||||
'elysian-realm.supports'
|
||||
)}`}
|
||||
|
||||
@@ -112,7 +112,7 @@ const Honkai3rdIndexPage = () => {
|
||||
return (
|
||||
<Honkai3rdLayout>
|
||||
<Head
|
||||
title={`${t('common.honkai-3rd')}: Home - ${t('common.abyss-lab')}`}
|
||||
title={`Enemies - ${t('common.honkai-3rd')} - ${t('common.abyss-lab')}`}
|
||||
description={t('index.description')}
|
||||
/>
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ const StigmataListPage = ({
|
||||
return (
|
||||
<Honkai3rdLayout>
|
||||
<Head
|
||||
title={`${t('common.honkai-3rd')}: ${t('common.stigmata')} - ${t(
|
||||
title={`${t('common.stigmata')} - ${t('common.honkai-3rd')} - ${t(
|
||||
'common.abyss-lab'
|
||||
)}`}
|
||||
description={t('stigmata-list.description')}
|
||||
|
||||
@@ -42,16 +42,20 @@ const VersionShowPage = ({
|
||||
}: VersionShowPageProps) => {
|
||||
const { t } = useTranslation()
|
||||
const { locale } = useRouter()
|
||||
|
||||
const versionName = translate(
|
||||
locale,
|
||||
{ 'ko-KR': versionData.krName },
|
||||
versionData.name
|
||||
)
|
||||
return (
|
||||
<Honkai3rdLayout>
|
||||
<Head
|
||||
title={`${t('common.honkai-3rd')}: v${versionData.version} - ${t(
|
||||
'common.abyss-lab'
|
||||
)}`}
|
||||
description={`${t('common.honkai-3rd')} ${t('versions.version')} / ${t(
|
||||
'versions.new-battlesuits'
|
||||
)}: ${battlesuits
|
||||
title={`v${versionData.version} ${versionName} - ${t(
|
||||
'common.honkai-3rd'
|
||||
)} - ${t('common.abyss-lab')}`}
|
||||
description={`${t('common.honkai-3rd')} ${t(
|
||||
'versions.version'
|
||||
)} ${versionName} / ${t('versions.new-battlesuits')}: ${battlesuits
|
||||
.map((battlesuit) => {
|
||||
return translate(
|
||||
locale,
|
||||
@@ -94,12 +98,7 @@ const VersionShowPage = ({
|
||||
)}
|
||||
</Box>
|
||||
<Heading as='h1'>
|
||||
v{versionData.version} :{' '}
|
||||
{translate(
|
||||
locale,
|
||||
{ 'ko-KR': versionData.krName },
|
||||
versionData.name
|
||||
)}
|
||||
v{versionData.version} : {versionName}
|
||||
</Heading>
|
||||
<Box mb={4}>
|
||||
{formatDate(new Date(versionData.duration[0]), 'PP')} -{' '}
|
||||
|
||||
@@ -48,7 +48,7 @@ const VersionIndexPage = ({
|
||||
return (
|
||||
<Honkai3rdLayout>
|
||||
<Head
|
||||
title={`${t('common.honkai-3rd')}: ${t('common.versions')} - ${t(
|
||||
title={`${t('common.versions')} - ${t('common.honkai-3rd')} - ${t(
|
||||
'common.abyss-lab'
|
||||
)}`}
|
||||
description={t('versions.list-page-description')}
|
||||
|
||||
@@ -42,7 +42,7 @@ const WeaponShowPage = ({
|
||||
return (
|
||||
<Honkai3rdLayout>
|
||||
<Head
|
||||
title={`${t('common.honkai-3rd')}: ${weaponName} - ${t(
|
||||
title={`${weaponName} - ${t('common.honkai-3rd')} - ${t(
|
||||
'common.abyss-lab'
|
||||
)}`}
|
||||
description={`${t('common.honkai-3rd')} ${t(
|
||||
|
||||
@@ -60,7 +60,7 @@ const WeaponListPage = ({ weaponDataList }: WeaponListPageProps) => {
|
||||
<Honkai3rdLayout>
|
||||
<Box>
|
||||
<Head
|
||||
title={`${t('common.honkai-3rd')}: ${t('common.weapons')} - ${t(
|
||||
title={`${t('common.weapons')} - ${t('common.honkai-3rd')} - ${t(
|
||||
'common.abyss-lab'
|
||||
)}`}
|
||||
description={t('weapons-list.description')}
|
||||
|
||||
Reference in New Issue
Block a user