로컬라이제이션 적용 (영어 / 한국어 )

This commit is contained in:
HyeongBaeYang committed 2026-02-10 14:39:58 +09:00
1 parent 29fdb7e65c
commit ad6f9e09a1
30 files changed
+1474 -309

No files matched your search

+24 -22
View File
@@ -1,11 +1,13 @@
import React, { useState, useEffect } from 'react';
import { useTranslation } from 'react-i18next';
import { getSocialAccounts, getYouTubeConnectUrl, disconnectSocialAccount, TokenExpiredError, handleSocialReconnect } from '../../utils/api';
import { SocialAccount } from '../../types/api';
type TabType = 'basic' | 'payment' | 'business';
const MyInfoContent: React.FC = () => {
const { t } = useTranslation();
const [activeTab, setActiveTab] = useState<TabType>('business');
const [businessUrl, setBusinessUrl] = useState('');
const [socialAccounts, setSocialAccounts] = useState<SocialAccount[]>([]);
@@ -24,7 +26,7 @@ const MyInfoContent: React.FC = () => {
setSocialAccounts(response.accounts || []);
} catch (error) {
if (error instanceof TokenExpiredError) {
alert('YouTube 인증이 만료되었습니다. 재연동 페이지로 이동합니다.');
alert(t('myInfo.youtubeExpiredAlert'));
handleSocialReconnect(error.reconnectUrl);
return;
}
@@ -42,7 +44,7 @@ const MyInfoContent: React.FC = () => {
window.location.href = response.auth_url;
} catch (error) {
if (error instanceof TokenExpiredError) {
alert('YouTube 인증이 만료되었습니다. 재연동 페이지로 이동합니다.');
alert(t('myInfo.youtubeExpiredAlert'));
handleSocialReconnect(error.reconnectUrl);
return;
}
@@ -58,7 +60,7 @@ const MyInfoContent: React.FC = () => {
setSocialAccounts(prev => prev.filter(acc => acc.id !== accountId));
} catch (error) {
if (error instanceof TokenExpiredError) {
alert('YouTube 인증이 만료되었습니다. 재연동 페이지로 이동합니다.');
alert(t('myInfo.youtubeExpiredAlert'));
handleSocialReconnect(error.reconnectUrl);
return;
}
@@ -76,14 +78,14 @@ const MyInfoContent: React.FC = () => {
const hasConnectedAccounts = youtubeAccounts.length > 0 || instagramAccounts.length > 0;
const tabs = [
{ id: 'basic' as TabType, label: '기본 정보' },
{ id: 'payment' as TabType, label: '결제 정보' },
{ id: 'business' as TabType, label: '내 비즈니스 & 소셜 채널 관리' },
{ id: 'basic' as TabType, label: t('myInfo.tabBasic') },
{ id: 'payment' as TabType, label: t('myInfo.tabPayment') },
{ id: 'business' as TabType, label: t('myInfo.tabBusiness') },
];
return (
<main className="myinfo-page">
<h1 className="myinfo-title">내 정보</h1>
<h1 className="myinfo-title">{t('myInfo.title')}</h1>
{/* 탭 네비게이션 */}
<div className="myinfo-tabs">
@@ -102,13 +104,13 @@ const MyInfoContent: React.FC = () => {
<div className="myinfo-content">
{activeTab === 'basic' && (
<div className="myinfo-section">
<p className="myinfo-placeholder">기본 정보 설정 기능이 준비 중입니다.</p>
<p className="myinfo-placeholder">{t('myInfo.basicPlaceholder')}</p>
</div>
)}
{activeTab === 'payment' && (
<div className="myinfo-section">
<p className="myinfo-placeholder">결제 정보 설정 기능이 준비 중입니다.</p>
<p className="myinfo-placeholder">{t('myInfo.paymentPlaceholder')}</p>
</div>
)}
@@ -116,22 +118,22 @@ const MyInfoContent: React.FC = () => {
<>
{/* 내 비즈니스 섹션 */}
<div className="myinfo-section">
<h2 className="myinfo-section-title">내 비즈니스</h2>
<h2 className="myinfo-section-title">{t('myInfo.myBusiness')}</h2>
<div className="myinfo-business-card">
<h3 className="myinfo-business-empty-title">아직 등록된 비즈니스가 없어요</h3>
<h3 className="myinfo-business-empty-title">{t('myInfo.noBusinessTitle')}</h3>
<p className="myinfo-business-empty-desc">
네이버 지도 URL을 입력하면, 영상 제작에 필요한 정보를 자동으로 불러와요
{t('myInfo.noBusinessDesc')}
</p>
<div className="myinfo-business-input-row">
<input
type="text"
value={businessUrl}
onChange={(e) => setBusinessUrl(e.target.value)}
placeholder="네이버 지도 URL 입력"
placeholder={t('myInfo.naverMapUrlPlaceholder')}
className="myinfo-business-input"
/>
<button className="myinfo-business-submit">
비즈니스 등록
{t('myInfo.registerBusiness')}
</button>
</div>
</div>
@@ -139,7 +141,7 @@ const MyInfoContent: React.FC = () => {
{/* 소셜 채널 섹션 */}
<div className="myinfo-section">
<h2 className="myinfo-section-title">소셜 채널</h2>
<h2 className="myinfo-section-title">{t('myInfo.socialChannels')}</h2>
{/* 연결 버튼들 (가로 배치) */}
<div className="myinfo-social-buttons">
@@ -149,7 +151,7 @@ const MyInfoContent: React.FC = () => {
className={`myinfo-social-btn ${youtubeAccounts.length > 0 ? 'connected' : ''}`}
>
<img src="/assets/images/social-youtube.png" alt="YouTube" className="myinfo-social-btn-icon" />
<span>{isConnecting === 'youtube' ? '연결 중...' : 'YouTube 연결'}</span>
<span>{isConnecting === 'youtube' ? t('myInfo.youtubeConnecting') : t('myInfo.youtubeConnect')}</span>
</button>
<button
@@ -157,7 +159,7 @@ const MyInfoContent: React.FC = () => {
className="myinfo-social-btn disabled"
>
<img src="/assets/images/social-instagram.png" alt="Instagram" className="myinfo-social-btn-icon" />
<span>Instagram 연결</span>
<span>{t('myInfo.instagramConnect')}</span>
</button>
</div>
@@ -189,13 +191,13 @@ const MyInfoContent: React.FC = () => {
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5">
<polyline points="20 6 9 17 4 12" />
</svg>
연결됨
{t('myInfo.connected')}
</span>
<button
onClick={() => handleDisconnectAccount(account.id)}
className="myinfo-connected-disconnect"
>
연결 해제
{t('myInfo.disconnectAccount')}
</button>
</div>
</div>
@@ -226,13 +228,13 @@ const MyInfoContent: React.FC = () => {
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5">
<polyline points="20 6 9 17 4 12" />
</svg>
연결됨
{t('myInfo.connected')}
</span>
<button
onClick={() => handleDisconnectAccount(account.id)}
className="myinfo-connected-disconnect"
>
연결 해제
{t('myInfo.disconnectAccount')}
</button>
</div>
</div>
@@ -241,7 +243,7 @@ const MyInfoContent: React.FC = () => {
)}
{isLoadingAccounts && (
<p className="myinfo-loading">계정 정보를 불러오는 중...</p>
<p className="myinfo-loading">{t('myInfo.loadingAccounts')}</p>
)}
</div>
</>