로컬라이제이션 적용 (영어 / 한국어 )
This commit is contained in:
1 parent
29fdb7e65c
commit
ad6f9e09a1
30 files changed
+1474
-309
No files matched your search
@@ -1,5 +1,6 @@
|
||||
|
||||
import React, { useState, useEffect, useRef } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { CrawlingResponse, TargetPersona, SellingPoint } from '../../types/api';
|
||||
|
||||
interface AnalysisResultSectionProps {
|
||||
@@ -276,6 +277,7 @@ const RadarChart: React.FC<RadarChartProps> = ({ data, size = 280 }) => {
|
||||
};
|
||||
|
||||
const AnalysisResultSection: React.FC<AnalysisResultSectionProps> = ({ onBack, onGenerate, data }) => {
|
||||
const { t } = useTranslation();
|
||||
const { processed_info, marketing_analysis } = data;
|
||||
const containerRef = useRef<HTMLDivElement>(null);
|
||||
const [buttonPosition, setButtonPosition] = useState({ left: 0, width: 0 });
|
||||
@@ -318,7 +320,7 @@ const AnalysisResultSection: React.FC<AnalysisResultSectionProps> = ({ onBack, o
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
|
||||
<path d="M15 18l-6-6 6-6" />
|
||||
</svg>
|
||||
<span>뒤로가기</span>
|
||||
<span>{t('analysis.back')}</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -327,9 +329,9 @@ const AnalysisResultSection: React.FC<AnalysisResultSectionProps> = ({ onBack, o
|
||||
<div className="bi-page-icon">
|
||||
<img src="/assets/images/star-icon.svg" alt="Star" className="bi-star-icon" />
|
||||
</div>
|
||||
<h1 className="bi-page-title">브랜드 인텔리전스</h1>
|
||||
<h1 className="bi-page-title">{t('analysis.pageTitle')}</h1>
|
||||
<p className="bi-page-desc">
|
||||
<span className="highlight">AI 데이터 분석</span>을 통해 도출된 {processed_info?.customer_name || '브랜드'}의 핵심 전략입니다.
|
||||
<span className="highlight">{t('analysis.pageDescHighlight')}</span>{t('analysis.pageDescBefore')}{processed_info?.customer_name || t('analysis.defaultBrandName')}{t('analysis.pageDescAfter')}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -342,27 +344,27 @@ const AnalysisResultSection: React.FC<AnalysisResultSectionProps> = ({ onBack, o
|
||||
<div className="absolute top-0 left-0 w-1.5 h-full bg-gradient-to-b from-[#2dd4bf] to-[#AE72F9]"></div>
|
||||
|
||||
<div className="bi-section-label mb-4">
|
||||
브랜드 정체성
|
||||
{t('analysis.brandIdentity')}
|
||||
</div>
|
||||
|
||||
<h2 className="bi-brand-name">{processed_info?.customer_name || '브랜드명'}</h2>
|
||||
<h2 className="bi-brand-name">{processed_info?.customer_name || t('analysis.brandNameFallback')}</h2>
|
||||
|
||||
<div className="bi-location mb-6">
|
||||
<MapPinIcon />
|
||||
<div>
|
||||
<p>{processed_info?.detail_region_info || '주소 정보 없음'}</p>
|
||||
<p>{processed_info?.detail_region_info || t('analysis.addressFallback')}</p>
|
||||
<p style={{ opacity: 0.7, marginTop: '4px' }}>{processed_info?.region || ''}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="space-y-6 border-t border-white/5 pt-6">
|
||||
<AnimatedItem index={0} baseDelay={100}>
|
||||
<div className="bi-subsection-title">입지 특성 분석</div>
|
||||
<p className="bi-body-text">{brandIdentity?.location_feature_analysis || '정보 없음'}</p>
|
||||
<div className="bi-subsection-title">{t('analysis.locationAnalysis')}</div>
|
||||
<p className="bi-body-text">{brandIdentity?.location_feature_analysis || t('analysis.noInfo')}</p>
|
||||
</AnimatedItem>
|
||||
<AnimatedItem index={1} baseDelay={100}>
|
||||
<div className="bi-subsection-title">컨셉 확장성</div>
|
||||
<p className="bi-body-text">{brandIdentity?.concept_scalability || '정보 없음'}</p>
|
||||
<div className="bi-subsection-title">{t('analysis.conceptScalability')}</div>
|
||||
<p className="bi-body-text">{brandIdentity?.concept_scalability || t('analysis.noInfo')}</p>
|
||||
</AnimatedItem>
|
||||
</div>
|
||||
</div>
|
||||
@@ -370,20 +372,20 @@ const AnalysisResultSection: React.FC<AnalysisResultSectionProps> = ({ onBack, o
|
||||
{/* 시장 포지셔닝 카드 */}
|
||||
<div className="bi-card">
|
||||
<h3 className="bi-card-title">
|
||||
시장 포지셔닝
|
||||
{t('analysis.marketPositioning')}
|
||||
</h3>
|
||||
|
||||
<div className="space-y-4">
|
||||
<AnimatedItem index={0} baseDelay={200}>
|
||||
<div className="bi-inner-box bi-inner-box-accent">
|
||||
<div className="bi-subsection-title">핵심 가치 (Core Value)</div>
|
||||
<div className="bi-value">{marketPositioning?.core_value || '정보 없음'}</div>
|
||||
<div className="bi-subsection-title">{t('analysis.coreValue')}</div>
|
||||
<div className="bi-value">{marketPositioning?.core_value || t('analysis.noInfo')}</div>
|
||||
</div>
|
||||
</AnimatedItem>
|
||||
<AnimatedItem index={1} baseDelay={200}>
|
||||
<div className="bi-inner-box">
|
||||
<div className="bi-subsection-title" style={{ color: '#6AB0B3' }}>카테고리 정의</div>
|
||||
<div className="bi-value">{marketPositioning?.category_definition || '정보 없음'}</div>
|
||||
<div className="bi-subsection-title" style={{ color: '#6AB0B3' }}>{t('analysis.categoryDefinition')}</div>
|
||||
<div className="bi-value">{marketPositioning?.category_definition || t('analysis.noInfo')}</div>
|
||||
</div>
|
||||
</AnimatedItem>
|
||||
</div>
|
||||
@@ -392,16 +394,16 @@ const AnalysisResultSection: React.FC<AnalysisResultSectionProps> = ({ onBack, o
|
||||
{/* 타겟 페르소나 카드 */}
|
||||
<div className="bi-card">
|
||||
<h3 className="bi-card-title">
|
||||
타겟 페르소나
|
||||
{t('analysis.targetPersona')}
|
||||
</h3>
|
||||
<div className="space-y-4">
|
||||
{targetPersonas.length === 0 && <p className="bi-body-text" style={{ color: '#6AB0B3' }}>정보 없음</p>}
|
||||
{targetPersonas.length === 0 && <p className="bi-body-text" style={{ color: '#6AB0B3' }}>{t('analysis.noInfo')}</p>}
|
||||
{targetPersonas.map((persona: TargetPersona, idx: number) => (
|
||||
<AnimatedItem key={idx} index={idx} baseDelay={300}>
|
||||
<div className="bi-inner-box">
|
||||
<div className="mb-4">
|
||||
<div className="bi-persona-name">{persona.persona}</div>
|
||||
<div className="bi-persona-age">{persona.age.min_age}~{persona.age.max_age}세</div>
|
||||
<div className="bi-persona-age">{persona.age.min_age}~{persona.age.max_age}{t('analysis.ageSuffix')}</div>
|
||||
</div>
|
||||
|
||||
{persona.favor_target.length > 0 && (
|
||||
@@ -429,7 +431,7 @@ const AnalysisResultSection: React.FC<AnalysisResultSectionProps> = ({ onBack, o
|
||||
{/* 주요 셀링 포인트 카드 */}
|
||||
<div className="bi-card min-h-[500px] flex flex-col">
|
||||
<h3 className="bi-card-title mb-6">
|
||||
주요 셀링 포인트 (USP)
|
||||
{t('analysis.sellingPoints')}
|
||||
</h3>
|
||||
|
||||
{/* 레이더 차트 */}
|
||||
@@ -450,7 +452,7 @@ const AnalysisResultSection: React.FC<AnalysisResultSectionProps> = ({ onBack, o
|
||||
|
||||
{/* 나머지 USP 리스트 */}
|
||||
<div className="space-y-4 flex-1">
|
||||
{sellingPoints.length === 0 && <p className="bi-body-text" style={{ color: '#6AB0B3' }}>정보 없음</p>}
|
||||
{sellingPoints.length === 0 && <p className="bi-body-text" style={{ color: '#6AB0B3' }}>{t('analysis.noInfo')}</p>}
|
||||
{sellingPoints
|
||||
.filter((usp: SellingPoint) => usp.english_category !== topUSP?.english_category)
|
||||
.map((usp: SellingPoint, idx: number) => (
|
||||
@@ -469,9 +471,9 @@ const AnalysisResultSection: React.FC<AnalysisResultSectionProps> = ({ onBack, o
|
||||
{/* 추천 타겟 키워드 */}
|
||||
<div className="max-w-[1440px] mx-auto px-4 md:px-8 mt-10">
|
||||
<div className="bi-card">
|
||||
<h3 className="bi-card-title">추천 타겟 키워드</h3>
|
||||
<h3 className="bi-card-title">{t('analysis.recommendedKeywords')}</h3>
|
||||
<div className="flex flex-wrap gap-3">
|
||||
{targetKeywords.length === 0 && <span className="bi-body-text" style={{ color: '#6AB0B3' }}>정보 없음</span>}
|
||||
{targetKeywords.length === 0 && <span className="bi-body-text" style={{ color: '#6AB0B3' }}>{t('analysis.noInfo')}</span>}
|
||||
{targetKeywords.map((keyword: string, idx: number) => (
|
||||
<span key={idx} className="bi-tag-outline"># {keyword}</span>
|
||||
))}
|
||||
@@ -489,7 +491,7 @@ const AnalysisResultSection: React.FC<AnalysisResultSectionProps> = ({ onBack, o
|
||||
className="pointer-events-auto bg-brand-purple hover:bg-brand-purpleHover text-white font-bold py-3 px-12 rounded-full shadow-2xl shadow-brand-purple/40 transform hover:scale-105 transition-all duration-300 flex items-center gap-2"
|
||||
>
|
||||
<SparklesIcon className="w-5 h-5" />
|
||||
콘텐츠 생성
|
||||
{t('analysis.generateContent')}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user