Skip to content

Commit

Permalink
patch up new traslation
Browse files Browse the repository at this point in the history
  • Loading branch information
DAYGoodTime committed Oct 2, 2023
1 parent 5a2bd6b commit 31bb6be
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 21 deletions.
5 changes: 4 additions & 1 deletion src/components/app/score-list-item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,15 @@ const { t, locale } = useI18n()
<i18n lang="yaml">
en-GB:
unknown-beatmap: Unknown Beatmap
detail: Detail
zh-CN:
unknown-beatmap: 未知铺面
detail: 详情
fr-FR:
unknown-beatmap: Beatmap Inconnue
detail: Detail
</i18n>

<template>
Expand Down Expand Up @@ -163,7 +166,7 @@ fr-FR:
class="flex gap-4 relative"
>
<div hover-btn>
<span class="text-2xl text-primary-content">Detail</span>
<span class="text-2xl text-primary-content">{{ t('detail') }}</span>
<icon name="fa-solid:expand" class="pl-1 w-8 h-8" />
</div>
<div class="flex flex-col">
Expand Down
7 changes: 6 additions & 1 deletion src/components/app/score/heading.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ defineProps<{
const { hasRankingSystem, hasRuleset } = useAdapterConfig()
const { t } = useI18n()
const scoreFmt = createScoreFormatter({ notation: undefined })
function haveStandardHitCounts(input: Score): input is typeof input & { hit: StandardHitCount } {
Expand All @@ -35,16 +37,19 @@ en-GB:
title: '{title} by {artist}'
map: '{version} created by {creator}'
play: '{player} played at {time}'
download-replay: Download replay
zh-CN:
title: "曲名\t\t\t{title}\n艺术家\t\t{artist}"
map: "难度\t\t\t{version}\n谱师\t\t\t{creator}"
play: '{player} 于 {time} 留下了此成绩'
download-replay: 下载回放
fr-FR:
title: '{title} par {artist}'
map: '{version} créé par {creator}'
play: '{player} joué le {time}'
download-replay: Download replay
</i18n>

<template>
Expand Down Expand Up @@ -133,6 +138,6 @@ fr-FR:
</div>
</div>
<div>
<a :href="`/replay/${score.id}/download`" class="btn btn-primary">Download replay <icon name="line-md:download-loop" class="w-5 h-5" /></a>
<a :href="`/replay/${score.id}/download`" class="btn btn-primary">{{ t('download-replay') }} <icon name="line-md:download-loop" class="w-5 h-5" /></a>
</div>
</template>
6 changes: 6 additions & 0 deletions src/components/app/scores/table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,20 @@ const pp = createPPFormatter()
en-GB:
no-score: No Score has been set so far.
actions: Actions
detail: Detail
replay: Replay
zh-CN:
no-score: 目前还没有任何成绩。
actions: 操作
detail: 详情
replay: 下载回放
fr-FR:
no-score: Aucun score trouvé.
actions: Actions
detail: Detail
replay: Replay
</i18n>

<template>
Expand Down
90 changes: 71 additions & 19 deletions src/pages/beatmapset/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,66 @@ async function update() {
en-GB:
beatmapset:
placement: '{title} by {artist}'
externam-links: External Links
direct-downloads: Direct downloads
creator: Creator
status: Status
beatmap-id: Beatmap ID
source-id: Source | ID
last-update: Last Update
star-rating: Star Rating
circle-size: Circle Size
approach-rate: Approach Rate
od: OD
hp-drain: HP Drain
duration: Duration
hit-Objects: Hit Objects
hit-object:
circles: circles
sliders: sliders
spinners: spinners
zh-CN:
beatmapset:
placement: "曲名:{title} \n 艺术家:{artist}"
externam-links: 其它链接
direct-downloads: 直接下载
creator: 铺师
status: 状态
beatmap-id: 铺面 ID
source-id: 来源 | ID
last-update: 上次更新时间
star-rating: 难度星级
circle-size: 圆圈大小
approach-rate: 缩圈速度
od: 准度要求
hp-drain: 掉血速度
duration: 长度
hit-objects: 物件统计
hit-object:
circles: 圆圈
sliders: 滑条
spinners: 转盘
fr-FR:
beatmapset:
placement: '{title} par {artist}'
externam-links: External Links
direct-downloads: Direct downloads
creator: Creator
status: Status
beatmap-id: Beatmap ID
source-id: Source | ID
last-update: Last Update
star-rating: Star Rating
circle-size: Circle Size
approach-rate: Approach Rate
od: OD
hp-drain: HP Drain
duration: Duration
hit-Objects: Hit Objects
hit-object:
circles: circles
sliders: sliders
spinners: spinners
</i18n>

<template>
Expand Down Expand Up @@ -220,7 +272,7 @@ fr-FR:
<ul class="menu menu-compact border-[1px] border-base-300/20 bg-base-200/80 w-max rounded-box">
<template v-if="links.external.length">
<li class="menu-title">
<span>External Links</span>
<span>{{ _t('beatmapset.externam-links') }}</span>
</li>
<li v-for="{ link, label } in links.external" :key="`external-${label}`">
<a :href="link">{{ label }}</a>
Expand All @@ -229,7 +281,7 @@ fr-FR:
<template v-if="links.directDownload.length">
<div class="divider" />
<li class="menu-title">
<span>Direct downloads</span>
<span>{{ _t('beatmapset.direct-downloads') }}</span>
</li>
<li v-for="{ link, label } in links.directDownload" :key="`direct-${label}`">
<a :href="link">{{ label }}</a>
Expand All @@ -246,39 +298,39 @@ fr-FR:
<dl>
<div class="stripe-odd rounded-tl-xl">
<dt class="text-sm font-medium text-gbase-500">
Creator
{{ _t('beatmapset.creator') }}
</dt>
<dd class="stripe-even flex gap-1 items-center">
{{ selectedMap.creator }}
</dd>
</div>
<div class="stripe-odd">
<dt class="text-sm font-medium text-gbase-500">
Status
{{ _t('beatmapset.status') }}
</dt>
<dd class="stripe-even flex gap-1 items-center">
{{ selectedMap.status }}
</dd>
</div>
<div class="stripe-odd">
<dt class="text-sm font-medium text-gbase-500">
Beatmap ID
{{ _t('beatmapset.beatmap-id') }}
</dt>
<dd class="stripe-even flex gap-1 items-center">
{{ selectedMap.id }}
</dd>
</div>
<div class="stripe-odd">
<dt class="text-sm font-medium text-gbase-500">
Source | ID
{{ _t('beatmapset.source-id') }}
</dt>
<dd class="stripe-even flex gap-1 items-center">
{{ BeatmapSource[beatmapset.source] }} | {{ selectedMap.foreignId }}
</dd>
</div>
<div class="stripe-odd">
<dt class="text-sm font-medium text-gbase-500">
Last Update
{{ _t('beatmapset.last-update') }}
</dt>
<dd class="stripe-even flex gap-1 items-center">
{{ selectedMap.lastUpdate }}
Expand All @@ -294,65 +346,65 @@ fr-FR:
</div>
<div class="stripe-odd">
<dt class="text-sm font-medium text-gbase-500">
Star Rating
{{ _t('beatmapset.star-rating') }}
</dt>
<dd class="stripe-even flex gap-1 items-center">
<img src="~/assets/icons/overall-difficulty.png" alt="" class="w-5 color-theme-light-invert">{{ selectedMap.properties.starRate }}
</dd>
</div>
<div class="stripe-odd">
<dt class="text-sm font-medium text-gbase-500">
Circle Size
{{ _t('beatmapset.circle-size') }}
</dt>
<dd class="stripe-even flex gap-1 items-center">
<img src="~/assets/icons/size.png" alt="" class="w-5 color-theme-light-invert">{{ selectedMap.properties.circleSize }}
</dd>
</div>
<div class="stripe-odd">
<dt class="text-sm font-medium text-gbase-500">
Approach Rate
{{ _t('beatmapset.approach-rate') }}
</dt>
<dd class="stripe-even flex gap-1 items-center">
<img src="~/assets/icons/approach-rate.png" alt="" class="w-5 color-theme-light-invert">{{ selectedMap.properties.approachRate }}
</dd>
</div>
<div class="stripe-odd">
<dt class="text-sm font-medium text-gbase-500">
OD
{{ _t('beatmapset.od') }}
</dt>
<dd class="stripe-even flex gap-1 items-center">
<img src="~/assets/icons/accuracy.png" alt="" class="w-5 color-theme-light-invert">{{ selectedMap.properties.accuracy }}
</dd>
</div>
<div class="stripe-odd">
<dt class="text-sm font-medium text-gbase-500">
HP Drain
{{ _t('beatmapset.hp-drain') }}
</dt>
<dd class="stripe-even flex gap-1 items-center">
<img src="~/assets/icons/hp-drain.png" alt="" class="w-5 color-theme-light-invert">{{ selectedMap.properties.hpDrain }}
</dd>
</div>
<div class="stripe-odd">
<dt class="text-sm font-medium text-gbase-500">
Duration
{{ _t('beatmapset.duration') }}
</dt>
<dd class="stripe-even flex gap-1 items-center">
<img src="~/assets/icons/length.png" alt="" class="w-5 color-theme-light-invert">{{ selectedMap.properties.totalLength }} seconds
</dd>
</div>
<div class="stripe-odd">
<dt class="text-sm font-medium text-gbase-500">
Hit Objects
{{ _t('beatmapset.hit-objects') }}
</dt>
<dd class="stripe-even">
<div class="flex gap-1 items-center">
<img src="~/assets/icons/circles.png" alt="" class="w-5 color-theme-light-invert"> {{ selectedMap.properties.count.circles }} circles,
<img src="~/assets/icons/circles.png" alt="" class="w-5 color-theme-light-invert"> {{ selectedMap.properties.count.circles }} {{ _t('beatmapset.hit-object.circles') }},
</div>
<div class="flex gap-1 items-center">
<img src="~/assets/icons/sliders.png" alt="" class="w-5 color-theme-light-invert">{{ selectedMap.properties.count.sliders }} sliders,
<img src="~/assets/icons/sliders.png" alt="" class="w-5 color-theme-light-invert">{{ selectedMap.properties.count.sliders }} {{ _t('beatmapset.hit-object.sliders') }},
</div>
<div class="flex gap-1 items-center">
<img src="~/assets/icons/spinners.png" alt="" class="w-5 color-theme-light-invert">{{ selectedMap.properties.count.spinners }} spinners,<br>
<img src="~/assets/icons/spinners.png" alt="" class="w-5 color-theme-light-invert">{{ selectedMap.properties.count.spinners }} {{ _t('beatmapset.hit-object.spinners') }},<br>
</div>
</dd>
</div>
Expand Down

0 comments on commit 31bb6be

Please sign in to comment.