Add korean name of the app
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"nav": {
|
"nav": {
|
||||||
|
"abyss-lab": "Abyss Lab",
|
||||||
"honkai-3rd": "Honkai 3rd",
|
"honkai-3rd": "Honkai 3rd",
|
||||||
"versions": "Versions",
|
"versions": "Versions",
|
||||||
"battlesuits": "Battlesuits",
|
"battlesuits": "Battlesuits",
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"nav": {
|
"nav": {
|
||||||
|
"abyss-lab": "어비스랩",
|
||||||
"honkai-3rd": "붕괴 3rd",
|
"honkai-3rd": "붕괴 3rd",
|
||||||
"versions": "업데이트",
|
"versions": "업데이트",
|
||||||
"battlesuits": "발키리",
|
"battlesuits": "발키리",
|
||||||
|
|||||||
@@ -43,7 +43,9 @@ const SingleStigmataPage = ({
|
|||||||
return (
|
return (
|
||||||
<Box>
|
<Box>
|
||||||
<Head
|
<Head
|
||||||
title={`${t('breadcrumb.honkai-3rd')}: ${stigmataName} - Abyss Lab`}
|
title={`${t('breadcrumb.honkai-3rd')}: ${stigmataName} - ${t(
|
||||||
|
'nav.abyss-lab'
|
||||||
|
)}`}
|
||||||
description={`${t('breadcrumb.honkai-3rd')} ${t(
|
description={`${t('breadcrumb.honkai-3rd')} ${t(
|
||||||
'stigmata-show.stigmata'
|
'stigmata-show.stigmata'
|
||||||
)} /
|
)} /
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ const StigmataSetPage = ({
|
|||||||
<Head
|
<Head
|
||||||
title={`${t('breadcrumb.honkai-3rd')}: ${stigmataSetName} ${t(
|
title={`${t('breadcrumb.honkai-3rd')}: ${stigmataSetName} ${t(
|
||||||
'stigmata-show.stigmata-set'
|
'stigmata-show.stigmata-set'
|
||||||
)} - Abyss Lab`}
|
)} - ${t('nav.abyss-lab')}`}
|
||||||
description={`${t('breadcrumb.honkai-3rd')} ${t(
|
description={`${t('breadcrumb.honkai-3rd')} ${t(
|
||||||
'stigmata-show.stigmata-set'
|
'stigmata-show.stigmata-set'
|
||||||
)} / ${'⭐'.repeat(stigmataSet.rarity)} / ${stigmataSetAltName}`}
|
)} / ${'⭐'.repeat(stigmataSet.rarity)} / ${stigmataSetAltName}`}
|
||||||
|
|||||||
@@ -62,7 +62,9 @@ const BattlesuitShowPage = ({ battlesuit }: BattlesuitShowPageProps) => {
|
|||||||
return (
|
return (
|
||||||
<Box>
|
<Box>
|
||||||
<Head
|
<Head
|
||||||
title={`${t('breadcrumb.honkai-3rd')}: ${battlesuitName} - Abyss Lab`}
|
title={`${t('breadcrumb.honkai-3rd')}: ${battlesuitName} - ${t(
|
||||||
|
'nav.abyss-lab'
|
||||||
|
)}`}
|
||||||
description={`${t('breadcrumb.honkai-3rd')} ${t(
|
description={`${t('breadcrumb.honkai-3rd')} ${t(
|
||||||
'battlesuit-show.battlesuit'
|
'battlesuit-show.battlesuit'
|
||||||
)} / ${valkyrieName} / ${battlesuitTypeLabel} / ${battlesuit.features
|
)} / ${valkyrieName} / ${battlesuitTypeLabel} / ${battlesuit.features
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ const BattlesuitListPage = ({ battlesuits }: BattlesuitListPageProps) => {
|
|||||||
<Head
|
<Head
|
||||||
title={`${t('breadcrumb.honkai-3rd')}: ${t(
|
title={`${t('breadcrumb.honkai-3rd')}: ${t(
|
||||||
'breadcrumb.battlesuits'
|
'breadcrumb.battlesuits'
|
||||||
)} - Abyss Lab`}
|
)} - ${t('nav.abyss-lab')}`}
|
||||||
description={t('battlesuits-list.description')}
|
description={t('battlesuits-list.description')}
|
||||||
/>
|
/>
|
||||||
<Honkai3rdNavigator />
|
<Honkai3rdNavigator />
|
||||||
|
|||||||
@@ -28,7 +28,9 @@ const ElfShowPage = ({ elf }: ElfShowPageProps) => {
|
|||||||
return (
|
return (
|
||||||
<Box>
|
<Box>
|
||||||
<Head
|
<Head
|
||||||
title={`${t('breadcrumb.honkai-3rd')}: ${elfName} - Abyss Lab`}
|
title={`${t('breadcrumb.honkai-3rd')}: ${elfName} - ${t(
|
||||||
|
'nav.abyss-lab'
|
||||||
|
)}`}
|
||||||
description={`${t('breadcrumb.honkai-3rd')} ${t(
|
description={`${t('breadcrumb.honkai-3rd')} ${t(
|
||||||
'elfs-show.elf'
|
'elfs-show.elf'
|
||||||
)} / ${'⭐'.repeat(elf.baseRank)} / ${elf.features
|
)} / ${'⭐'.repeat(elf.baseRank)} / ${elf.features
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ const ElfListPage = ({ elfs }: ElfListPageProps) => {
|
|||||||
return (
|
return (
|
||||||
<Box>
|
<Box>
|
||||||
<Head
|
<Head
|
||||||
title={`${t('breadcrumb.honkai-3rd')}: ${t(
|
title={`${t('breadcrumb.honkai-3rd')}: ${t('breadcrumb.elfs')} - ${t(
|
||||||
'breadcrumb.elfs'
|
'nav.abyss-lab'
|
||||||
)} - Abyss Lab`}
|
)}`}
|
||||||
description={t('elfs-list.description')}
|
description={t('elfs-list.description')}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,181 @@
|
|||||||
|
/** @jsxImportSource theme-ui */
|
||||||
|
import { Box, Heading } from '@theme-ui/components'
|
||||||
|
import Breadcrumb from '../../../components/organisms/Breadcrumb'
|
||||||
|
import Honkai3rdNavigator from '../../../components/organisms/Honkai3rdNavigator'
|
||||||
|
import { NextPageContext } from 'next'
|
||||||
|
import { getI18NProps } from '../../../server/i18n'
|
||||||
|
import { useTranslation } from '../../../lib/i18n'
|
||||||
|
import Head from '../../../components/atoms/Head'
|
||||||
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||||
|
import { times } from 'ramda'
|
||||||
|
|
||||||
|
const enemyIdList = [
|
||||||
|
...times((i) => i + 0, 1000).map((i) => {
|
||||||
|
const stringified = i.toString()
|
||||||
|
return `BOSS_${'0'.repeat(3 - stringified.length) + stringified}`
|
||||||
|
}),
|
||||||
|
// ...times((i) => i + 65, 26)
|
||||||
|
// .reduce<[number, number][]>((array, first) => {
|
||||||
|
// array.push(
|
||||||
|
// ...times((i) => i + 65, 26).map<[number, number]>((second) => [
|
||||||
|
// first,
|
||||||
|
// second,
|
||||||
|
// ])
|
||||||
|
// )
|
||||||
|
// return array
|
||||||
|
// }, [])
|
||||||
|
// .map(([first, second]) => {
|
||||||
|
// return String.fromCharCode(first) + String.fromCharCode(second)
|
||||||
|
// })
|
||||||
|
// .reduce<string[]>((idList, prefix) => {
|
||||||
|
// idList.push(
|
||||||
|
// ...times((i) => i + 12, 1).map((i) => {
|
||||||
|
// const stringified = i.toString()
|
||||||
|
// return `${prefix}_${'0'.repeat(3 - stringified.length) + stringified}`
|
||||||
|
// })
|
||||||
|
// )
|
||||||
|
// return idList
|
||||||
|
// }, []),
|
||||||
|
]
|
||||||
|
|
||||||
|
console.log(
|
||||||
|
times((i) => i + 65, 26)
|
||||||
|
.reduce<[number, number][]>((array, first) => {
|
||||||
|
array.push(
|
||||||
|
...times((i) => i + 65, 26).map<[number, number]>((second) => [
|
||||||
|
first,
|
||||||
|
second,
|
||||||
|
])
|
||||||
|
)
|
||||||
|
return array
|
||||||
|
}, [])
|
||||||
|
.map(([first, second]) => {
|
||||||
|
return String.fromCharCode(first) + String.fromCharCode(second)
|
||||||
|
})
|
||||||
|
.reduce<string[]>((idList, prefix) => {
|
||||||
|
idList.push(
|
||||||
|
...times((i) => i + 10, 1).map((i) => {
|
||||||
|
const stringified = i.toString()
|
||||||
|
return `${prefix}_${'0'.repeat(3 - stringified.length) + stringified}`
|
||||||
|
})
|
||||||
|
)
|
||||||
|
return idList
|
||||||
|
}, [])
|
||||||
|
)
|
||||||
|
|
||||||
|
// console.log(
|
||||||
|
// times(i => i + 65, 26).map(code => {
|
||||||
|
// return [...times((i) => i + 10, 10).map((i) => {
|
||||||
|
// const stringified = i.toString()
|
||||||
|
// return `_${'0'.repeat(3 - stringified.length) + stringified}`
|
||||||
|
// })]
|
||||||
|
// })
|
||||||
|
// )
|
||||||
|
|
||||||
|
const Honkai3rdIndexPage = () => {
|
||||||
|
const { t } = useTranslation()
|
||||||
|
const [validList, setValidList] = useState<string[]>([])
|
||||||
|
const validMap = useMemo(() => {
|
||||||
|
return new Map(validList.map((id) => [id, id]))
|
||||||
|
}, [validList])
|
||||||
|
const initializedRef = useRef(false)
|
||||||
|
|
||||||
|
const appendValidList = useCallback((enemyId: string) => {
|
||||||
|
setValidList((previousList) => {
|
||||||
|
return [...previousList, enemyId]
|
||||||
|
})
|
||||||
|
}, [])
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
let data = validList
|
||||||
|
if (!initializedRef.current) {
|
||||||
|
initializedRef.current = true
|
||||||
|
let rawValidEnemyIdList = localStorage.getItem('valid-enemy-id-list')
|
||||||
|
try {
|
||||||
|
console.log('load')
|
||||||
|
data = JSON.parse(rawValidEnemyIdList || '[]')
|
||||||
|
if (!Array.isArray(data)) {
|
||||||
|
throw new Error('data must be array')
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.warn(error)
|
||||||
|
data = []
|
||||||
|
}
|
||||||
|
setValidList(data)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log('save')
|
||||||
|
localStorage.setItem('valid-enemy-id-list', JSON.stringify(data))
|
||||||
|
}, [validList])
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Box>
|
||||||
|
<Head
|
||||||
|
title={`${t('breadcrumb.honkai-3rd')}: Home - ${t('nav.abyss-lab')}`}
|
||||||
|
description={t('index.description')}
|
||||||
|
/>
|
||||||
|
<Honkai3rdNavigator />
|
||||||
|
|
||||||
|
<Box p={3}>
|
||||||
|
<Breadcrumb
|
||||||
|
items={[{ href: 'honkai3rd', label: t('breadcrumb.honkai-3rd') }]}
|
||||||
|
/>
|
||||||
|
<Heading as='h1'>Enemies </Heading>
|
||||||
|
</Box>
|
||||||
|
|
||||||
|
<Box>
|
||||||
|
{enemyIdList
|
||||||
|
.filter((enemyId) => !validMap.get(enemyId))
|
||||||
|
.map((enemyId) => {
|
||||||
|
return (
|
||||||
|
<Box key={enemyId}>
|
||||||
|
<img
|
||||||
|
alt={enemyId}
|
||||||
|
src={`https://upload-os-bbs.mihoyo.com/game_record/honkai3rd/global/SpriteOutput/OpenWorld/QuestBossIcon/${enemyId}.png`}
|
||||||
|
/>
|
||||||
|
<button
|
||||||
|
onClick={() => {
|
||||||
|
appendValidList(enemyId)
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Add
|
||||||
|
</button>
|
||||||
|
</Box>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</Box>
|
||||||
|
<h2>Valid</h2>
|
||||||
|
<Box>
|
||||||
|
{validList.map((enemyId) => {
|
||||||
|
return (
|
||||||
|
<Box key={enemyId}>
|
||||||
|
<img
|
||||||
|
alt={enemyId}
|
||||||
|
src={`https://upload-os-bbs.mihoyo.com/game_record/honkai3rd/global/SpriteOutput/OpenWorld/QuestBossIcon/${enemyId}.png`}
|
||||||
|
/>
|
||||||
|
{enemyId}
|
||||||
|
<button
|
||||||
|
onClick={() => {
|
||||||
|
appendValidList(enemyId)
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Add
|
||||||
|
</button>
|
||||||
|
</Box>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</Box>
|
||||||
|
</Box>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function getStaticProps({ locale }: NextPageContext) {
|
||||||
|
return {
|
||||||
|
props: {
|
||||||
|
...(await getI18NProps(locale)),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Honkai3rdIndexPage
|
||||||
@@ -45,7 +45,7 @@ const Honkai3rdIndexPage = () => {
|
|||||||
return (
|
return (
|
||||||
<Box>
|
<Box>
|
||||||
<Head
|
<Head
|
||||||
title={`${t('breadcrumb.honkai-3rd')}: Home - Abyss Lab`}
|
title={`${t('breadcrumb.honkai-3rd')}: Home - ${t('nav.abyss-lab')}`}
|
||||||
description={t('index.description')}
|
description={t('index.description')}
|
||||||
/>
|
/>
|
||||||
<Honkai3rdNavigator />
|
<Honkai3rdNavigator />
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ const StigmataListPage = ({
|
|||||||
<Head
|
<Head
|
||||||
title={`${t('breadcrumb.honkai-3rd')}: ${t(
|
title={`${t('breadcrumb.honkai-3rd')}: ${t(
|
||||||
'breadcrumb.stigmata'
|
'breadcrumb.stigmata'
|
||||||
)} - Abyss Lab`}
|
)} - ${t('nav.abyss-lab')}`}
|
||||||
description={t('stigmata-list.description')}
|
description={t('stigmata-list.description')}
|
||||||
/>
|
/>
|
||||||
<Honkai3rdNavigator />
|
<Honkai3rdNavigator />
|
||||||
|
|||||||
@@ -45,9 +45,9 @@ const VersionShowPage = ({
|
|||||||
return (
|
return (
|
||||||
<Box>
|
<Box>
|
||||||
<Head
|
<Head
|
||||||
title={`${t('breadcrumb.honkai-3rd')}: v${
|
title={`${t('breadcrumb.honkai-3rd')}: v${versionData.version} - ${t(
|
||||||
versionData.version
|
'nav.abyss-lab'
|
||||||
} - Abyss Lab`}
|
)}`}
|
||||||
description={`${t('breadcrumb.honkai-3rd')} ${t(
|
description={`${t('breadcrumb.honkai-3rd')} ${t(
|
||||||
'versions.version'
|
'versions.version'
|
||||||
)} / ${t('versions.new-battlesuits')}: ${battlesuits
|
)} / ${t('versions.new-battlesuits')}: ${battlesuits
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ const VersionIndexPage = ({
|
|||||||
<Head
|
<Head
|
||||||
title={`${t('breadcrumb.honkai-3rd')}: ${t(
|
title={`${t('breadcrumb.honkai-3rd')}: ${t(
|
||||||
'breadcrumb.versions'
|
'breadcrumb.versions'
|
||||||
)} - Abyss Lab`}
|
)} - ${t('nav.abyss-lab')}`}
|
||||||
description={t('versions.list-page-description')}
|
description={t('versions.list-page-description')}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,9 @@ const WeaponShowPage = ({ weapon }: WeaponShowPageProps) => {
|
|||||||
return (
|
return (
|
||||||
<Box>
|
<Box>
|
||||||
<Head
|
<Head
|
||||||
title={`${t('breadcrumb.honkai-3rd')}: ${weaponName} - Abyss Lab`}
|
title={`${t('breadcrumb.honkai-3rd')}: ${weaponName} - ${t(
|
||||||
|
'nav.abyss-lab'
|
||||||
|
)}`}
|
||||||
description={`${t('breadcrumb.honkai-3rd')} ${t(
|
description={`${t('breadcrumb.honkai-3rd')} ${t(
|
||||||
'weapons-show.weapon'
|
'weapons-show.weapon'
|
||||||
)} / ${'⭐'.repeat(weapon.rarity)} / ${weaponCategory} / ATK : ${
|
)} / ${'⭐'.repeat(weapon.rarity)} / ${weaponCategory} / ATK : ${
|
||||||
|
|||||||
@@ -59,9 +59,9 @@ const WeaponListPage = ({ weaponDataList }: WeaponListPageProps) => {
|
|||||||
return (
|
return (
|
||||||
<Box>
|
<Box>
|
||||||
<Head
|
<Head
|
||||||
title={`${t('breadcrumb.honkai-3rd')}: ${t(
|
title={`${t('breadcrumb.honkai-3rd')}: ${t('breadcrumb.weapons')} - ${t(
|
||||||
'breadcrumb.weapons'
|
'nav.abyss-lab'
|
||||||
)} - Abyss Lab`}
|
)}`}
|
||||||
description={t('weapons-list.description')}
|
description={t('weapons-list.description')}
|
||||||
/>
|
/>
|
||||||
<Honkai3rdNavigator />
|
<Honkai3rdNavigator />
|
||||||
|
|||||||
Reference in New Issue
Block a user