refactor(i18n): 사용자 문구 참조를 중앙화
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
import type { SceneTheme } from '@/entities/scene';
|
||||
import { getSceneCardBackgroundStyle, type SceneAssetMap } from '@/entities/media';
|
||||
import { SOUND_PRESETS, type TimerPreset } from '@/entities/session';
|
||||
import { copy } from '@/shared/i18n';
|
||||
import { cn } from '@/shared/lib/cn';
|
||||
import { useReducedMotion } from '@/shared/lib/useReducedMotion';
|
||||
import { Toggle } from '@/shared/ui';
|
||||
@@ -58,6 +59,7 @@ export const ControlCenterSheetWidget = ({
|
||||
onSelectProFeature,
|
||||
onLockedClick,
|
||||
}: ControlCenterSheetWidgetProps) => {
|
||||
const { controlCenter } = copy.space;
|
||||
const reducedMotion = useReducedMotion();
|
||||
const isPro = plan === 'pro';
|
||||
const interactiveMotionClass = reducedMotion
|
||||
@@ -74,7 +76,7 @@ export const ControlCenterSheetWidget = ({
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<section className="space-y-2.5 rounded-2xl border border-white/12 bg-black/22 p-3.5 backdrop-blur-md">
|
||||
<SectionTitle title="Background" description={selectedScene?.name ?? '기본 배경'} />
|
||||
<SectionTitle title={controlCenter.sectionTitles.background} description={selectedScene?.name ?? copy.common.defaultBackground} />
|
||||
<div
|
||||
className={cn(
|
||||
'-mx-1 flex gap-2.5 overflow-x-auto px-1 pb-1.5 snap-x snap-mandatory scrollbar-none',
|
||||
@@ -116,7 +118,7 @@ export const ControlCenterSheetWidget = ({
|
||||
</section>
|
||||
|
||||
<section className="space-y-2.5 rounded-2xl border border-white/12 bg-black/22 p-3.5 backdrop-blur-md">
|
||||
<SectionTitle title="Time" description={selectedTimerLabel} />
|
||||
<SectionTitle title={controlCenter.sectionTitles.time} description={selectedTimerLabel} />
|
||||
<div className="grid grid-cols-3 gap-2">
|
||||
{timerPresets.slice(0, 3).map((preset) => {
|
||||
const selected = preset.label === selectedTimerLabel;
|
||||
@@ -145,8 +147,8 @@ export const ControlCenterSheetWidget = ({
|
||||
|
||||
<section className="space-y-2.5 rounded-2xl border border-white/12 bg-black/22 p-3.5 backdrop-blur-md">
|
||||
<SectionTitle
|
||||
title="Sound"
|
||||
description={SOUND_PRESETS.find((preset) => preset.id === selectedSoundPresetId)?.label ?? '기본'}
|
||||
title={controlCenter.sectionTitles.sound}
|
||||
description={SOUND_PRESETS.find((preset) => preset.id === selectedSoundPresetId)?.label ?? copy.common.default}
|
||||
/>
|
||||
<div className="grid grid-cols-3 gap-2">
|
||||
{SOUND_PRESETS.slice(0, 6).map((preset) => {
|
||||
@@ -175,12 +177,12 @@ export const ControlCenterSheetWidget = ({
|
||||
</section>
|
||||
|
||||
<div className="space-y-1.5 rounded-xl border border-white/12 bg-white/[0.03] px-3 py-2.5">
|
||||
<p className="text-[11px] text-white/58">추천: {sceneRecommendedSoundLabel} · {sceneRecommendedTimerLabel}</p>
|
||||
<p className="text-[10px] text-white/48">추천 조합은 참고 정보로만 제공돼요.</p>
|
||||
<p className="text-[11px] text-white/58">{controlCenter.recommendation(sceneRecommendedSoundLabel, sceneRecommendedTimerLabel)}</p>
|
||||
<p className="text-[10px] text-white/48">{controlCenter.recommendationHint}</p>
|
||||
</div>
|
||||
|
||||
<section className="space-y-2 rounded-2xl border border-white/12 bg-black/18 p-3 backdrop-blur-md">
|
||||
<SectionTitle title="Packs" description="확장/개인화" />
|
||||
<SectionTitle title={controlCenter.sectionTitles.packs} description={controlCenter.packsDescription} />
|
||||
<div className="space-y-1.5">
|
||||
{PRO_FEATURE_CARDS.map((feature) => {
|
||||
const locked = !isPro;
|
||||
@@ -213,13 +215,13 @@ export const ControlCenterSheetWidget = ({
|
||||
<section className="space-y-2 rounded-2xl border border-white/12 bg-black/18 px-3 py-2.5 backdrop-blur-md">
|
||||
<div className="flex items-center justify-between gap-3">
|
||||
<div className="min-w-0">
|
||||
<p className="text-[11px] text-white/72">컨트롤 자동 숨김</p>
|
||||
<p className="mt-0.5 text-[10px] text-white/52">입력이 없으면 잠시 후 패널을 닫아요.</p>
|
||||
<p className="text-[11px] text-white/72">{controlCenter.autoHideTitle}</p>
|
||||
<p className="mt-0.5 text-[10px] text-white/52">{controlCenter.autoHideDescription}</p>
|
||||
</div>
|
||||
<Toggle
|
||||
checked={autoHideControls}
|
||||
onChange={onAutoHideControlsChange}
|
||||
ariaLabel="컨트롤 자동 숨김"
|
||||
ariaLabel={controlCenter.autoHideAriaLabel}
|
||||
className="shrink-0"
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user