Skip to content

Commit 5a7c42d

Browse files
committed
feat: comprehensive translation coverage for all new content
- Add translations for new menu items (UX Patterns, Visual Patterns, Workflow & Rituals) - Add translations for all new page content and section labels - Add translations for footer links and sub-pages with proper indentation - Add comprehensive translations for interaction patterns with titles and descriptions - Update data structure to use translation keys instead of hardcoded text - Add Korean translations for all new content - Update components to use translation system consistently - Fix TypeScript interfaces to support new translation structure All new pages and content are now fully covered by the translation logic with proper English and Korean translations throughout the application.
1 parent 2747de2 commit 5a7c42d

File tree

10 files changed

+175
-50
lines changed

10 files changed

+175
-50
lines changed

src/app/product/UX-patterns/page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ const UXPatternsPage = () => {
1717
const router = useRouter();
1818

1919
const sections = [
20-
{ id: 'interaction-patterns', label: 'Interaction Patterns' },
21-
{ id: 'ui-kit', label: 'UI Kit' },
22-
{ id: 'micro-interactions', label: 'Micro-interactions' }
20+
{ id: 'interaction-patterns', label: t('pages.sections.interactionPatterns') },
21+
{ id: 'ui-kit', label: t('pages.sections.uiKit') },
22+
{ id: 'micro-interactions', label: t('pages.sections.microInteractions') }
2323
];
2424

2525

@@ -38,7 +38,7 @@ const UXPatternsPage = () => {
3838
whileHover={{ x: -4 }}
3939
>
4040
<ArrowLeft className="w-4 h-4" />
41-
<span>Back to Guidelines</span>
41+
<span>{t('pages.backToGuidelines')}</span>
4242
</motion.button>
4343
</div>
4444
</div>

src/app/product/visual-patterns/page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ const VisualPatternsPage = () => {
1515
const router = useRouter();
1616

1717
const sections = [
18-
{ id: 'principles', label: 'Design Principles' },
19-
{ id: 'guidelines', label: 'Visual Guidelines' },
20-
{ id: 'coming-soon', label: 'Coming Soon' }
18+
{ id: 'principles', label: t('pages.sections.designPrinciples') },
19+
{ id: 'guidelines', label: t('pages.sections.visualGuidelines') },
20+
{ id: 'coming-soon', label: t('pages.sections.comingSoon') }
2121
];
2222

2323
const principles = [
@@ -42,7 +42,7 @@ const VisualPatternsPage = () => {
4242
whileHover={{ x: -4 }}
4343
>
4444
<ArrowLeft className="w-4 h-4" />
45-
<span>Back to Guidelines</span>
45+
<span>{t('pages.backToGuidelines')}</span>
4646
</motion.button>
4747
</div>
4848
</div>

src/app/product/workflow-rituals/page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ const WorkflowRitualsPage = () => {
1515
const router = useRouter();
1616

1717
const sections = [
18-
{ id: 'principles', label: 'Core Principles' },
19-
{ id: 'workflow', label: 'Workflow Steps' },
20-
{ id: 'coming-soon', label: 'Coming Soon' }
18+
{ id: 'principles', label: t('pages.sections.corePrinciples') },
19+
{ id: 'workflow', label: t('pages.sections.workflowSteps') },
20+
{ id: 'coming-soon', label: t('pages.sections.comingSoon') }
2121
];
2222

2323
const principles = [
@@ -42,7 +42,7 @@ const WorkflowRitualsPage = () => {
4242
whileHover={{ x: -4 }}
4343
>
4444
<ArrowLeft className="w-4 h-4" />
45-
<span>Back to Guidelines</span>
45+
<span>{t('pages.backToGuidelines')}</span>
4646
</motion.button>
4747
</div>
4848
</div>

src/components/layout/Footer.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ const Footer = () => {
3131
'Product': [
3232
{ name: t('footer.product.principles'), href: '/design/product#principles' },
3333
{ name: t('footer.product.guidelines'), href: '/design/product#guidelines' },
34-
{ name: 'UX Patterns', href: '/design/product/UX-patterns', isIndented: true },
35-
{ name: 'Visual Patterns', href: '/design/product/visual-patterns', isIndented: true },
36-
{ name: 'Workflow & Rituals', href: '/design/product/workflow-rituals', isIndented: true },
34+
{ name: t('nav.product.uxPatterns'), href: '/design/product/UX-patterns', isIndented: true },
35+
{ name: t('nav.product.visualPatterns'), href: '/design/product/visual-patterns', isIndented: true },
36+
{ name: t('nav.product.workflowRituals'), href: '/design/product/workflow-rituals', isIndented: true },
3737
{ name: t('footer.product.resources'), href: '/design/product#resources' },
3838
],
3939
'Connect': [

src/components/layout/Header.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ const Header = () => {
2525
submenuItems: [
2626
{ name: t('product.sections.principles'), href: '/product#principles' },
2727
{ name: t('product.sections.guidelines'), href: '/product#guidelines' },
28-
{ name: 'UX Patterns', href: '/product/UX-patterns', isIndented: true },
29-
{ name: 'Visual Patterns', href: '/product/visual-patterns', isIndented: true },
30-
{ name: 'Workflow & Rituals', href: '/product/workflow-rituals', isIndented: true },
28+
{ name: t('nav.product.uxPatterns'), href: '/product/UX-patterns', isIndented: true },
29+
{ name: t('nav.product.visualPatterns'), href: '/product/visual-patterns', isIndented: true },
30+
{ name: t('nav.product.workflowRituals'), href: '/product/workflow-rituals', isIndented: true },
3131
{ name: t('product.sections.resources'), href: '/product#resources' },
3232
]
3333
},
@@ -46,7 +46,7 @@ const Header = () => {
4646
}}
4747
>
4848
<Logo size={32} className="text-white" />
49-
<span className="text-lg font-semibold text-foreground">Buzzvil Design</span>
49+
<span className="text-lg font-extrabold text-foreground">buzzvil / design</span>
5050
</motion.div>
5151

5252
{/* Desktop Navigation */}

src/components/ui/CodePreview.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import { useState } from 'react';
44
import { motion } from 'framer-motion';
55
import { Copy } from 'lucide-react';
6+
import { useLanguage } from '@/contexts/LanguageContext';
67

78
interface CodePreviewProps {
89
code: string;
@@ -12,6 +13,7 @@ interface CodePreviewProps {
1213

1314
const CodePreview = ({ code, patternId, className = '' }: CodePreviewProps) => {
1415
const [copiedPattern, setCopiedPattern] = useState<string | null>(null);
16+
const { t } = useLanguage();
1517

1618
const handleCopyCode = async () => {
1719
try {
@@ -27,15 +29,15 @@ const CodePreview = ({ code, patternId, className = '' }: CodePreviewProps) => {
2729
<div className={`space-y-3 ${className}`}>
2830
<div className="flex items-center justify-between">
2931
<h5 className="text-sm font-medium text-white">
30-
Code Example
32+
{t('codePreview.title')}
3133
</h5>
3234
<motion.button
3335
onClick={handleCopyCode}
3436
className="flex items-center space-x-1 text-xs text-muted-foreground hover:text-white transition-colors"
3537
whileTap={{ scale: 0.95 }}
3638
>
3739
<Copy className="w-3 h-3" />
38-
<span>{copiedPattern === patternId ? 'Copied!' : 'Copy'}</span>
40+
<span>{copiedPattern === patternId ? t('codePreview.copied') : t('codePreview.copy')}</span>
3941
</motion.button>
4042
</div>
4143
<div className="bg-muted/10 border border-border/50 rounded-lg p-4 overflow-x-auto">

src/components/ui/LivePreview.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import { ReactNode } from 'react';
44
import { Smartphone } from 'lucide-react';
5+
import { useLanguage } from '@/contexts/LanguageContext';
56

67
interface LivePreviewProps {
78
title: string;
@@ -10,10 +11,12 @@ interface LivePreviewProps {
1011
}
1112

1213
const LivePreview = ({ title, children, className = '' }: LivePreviewProps) => {
14+
const { t } = useLanguage();
15+
1316
return (
1417
<div className={`space-y-3 ${className}`}>
1518
<h5 className="text-sm font-medium text-white">
16-
Live Preview
19+
{t('livePreview.title')}
1720
</h5>
1821
<div className="flex justify-center">
1922
{/* Mobile Frame with 9:16 ratio (vertical phone) */}
@@ -30,7 +33,7 @@ const LivePreview = ({ title, children, className = '' }: LivePreviewProps) => {
3033
{title}
3134
</p>
3235
<p className="text-xs text-muted-foreground/70">
33-
Preview coming soon
36+
{t('livePreview.comingSoon')}
3437
</p>
3538
</div>
3639
)}

src/components/ui/PatternAccordion.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ import { motion, AnimatePresence } from 'framer-motion';
55
import { ChevronDown } from 'lucide-react';
66
import LivePreview from './LivePreview';
77
import CodePreview from './CodePreview';
8+
import { useLanguage } from '@/contexts/LanguageContext';
89

910
interface InteractionPattern {
1011
id: string;
11-
title: string;
12-
description: string;
12+
titleKey: string;
13+
descriptionKey: string;
1314
tags: string[];
1415
code?: string;
1516
}
@@ -21,6 +22,7 @@ interface PatternAccordionProps {
2122

2223
const PatternAccordion = ({ patterns, className = '' }: PatternAccordionProps) => {
2324
const [openPattern, setOpenPattern] = useState<string | null>(null);
25+
const { t } = useLanguage();
2426

2527
const handlePatternToggle = (patternId: string) => {
2628
setOpenPattern(openPattern === patternId ? null : patternId);
@@ -44,7 +46,7 @@ const PatternAccordion = ({ patterns, className = '' }: PatternAccordionProps) =
4446
>
4547
<div className="flex-1">
4648
<h4 className="text-base font-semibold text-white">
47-
{pattern.title}
49+
{t(pattern.titleKey)}
4850
</h4>
4951
</div>
5052
<motion.div
@@ -74,9 +76,9 @@ const PatternAccordion = ({ patterns, className = '' }: PatternAccordionProps) =
7476
<h5 className="text-sm font-medium text-white">
7577
Description
7678
</h5>
77-
<p className="text-muted-foreground leading-relaxed text-sm">
78-
{pattern.description}
79-
</p>
79+
<p className="text-muted-foreground leading-relaxed text-sm">
80+
{t(pattern.descriptionKey)}
81+
</p>
8082

8183
{/* Tags */}
8284
<div className="flex flex-wrap gap-2 mt-3">
@@ -102,7 +104,7 @@ const PatternAccordion = ({ patterns, className = '' }: PatternAccordionProps) =
102104

103105
{/* Right Column - Live Preview */}
104106
<div className="lg:col-span-1">
105-
<LivePreview title={pattern.title} />
107+
<LivePreview title={t(pattern.titleKey)} />
106108
</div>
107109
</div>
108110
</div>

src/contexts/LanguageContext.tsx

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,65 @@ const translations = {
250250
'product.resources.title': 'Product Resources',
251251
'product.resources.description': 'Download our design system components, templates, and development resources. Everything you need to build consistent product experiences.',
252252

253+
// New submenu items
254+
'nav.product.uxPatterns': 'UX Patterns',
255+
'nav.product.visualPatterns': 'Visual Patterns',
256+
'nav.product.workflowRituals': 'Workflow & Rituals',
257+
258+
// Page-specific translations
259+
'pages.backToGuidelines': 'Back to Guidelines',
260+
'pages.sections.interactionPatterns': 'Interaction Patterns',
261+
'pages.sections.uiKit': 'UI Kit',
262+
'pages.sections.microInteractions': 'Micro-interactions',
263+
'pages.sections.designPrinciples': 'Design Principles',
264+
'pages.sections.visualGuidelines': 'Visual Guidelines',
265+
'pages.sections.comingSoon': 'Coming Soon',
266+
'pages.sections.corePrinciples': 'Core Principles',
267+
'pages.sections.workflowSteps': 'Workflow Steps',
268+
269+
// Interaction Patterns specific
270+
'interactionPatterns.whileLoading': 'While loading',
271+
'interactionPatterns.whileLoading.description': 'Skeleton screens, loading states, and progressive disclosure patterns that keep users engaged during wait times.',
272+
'interactionPatterns.pageScroll': 'Page Scroll',
273+
'interactionPatterns.pageScroll.description': 'Default vertical scrolling as the primary interaction pattern, with parallax and reveal animations.',
274+
'interactionPatterns.notify': 'Notify',
275+
'interactionPatterns.notify.description': 'Toast notifications, banners, and system messages that provide feedback without interrupting user flow.',
276+
'interactionPatterns.alert': 'Alert',
277+
'interactionPatterns.alert.description': 'Critical notifications and warnings that require immediate user attention and action.',
278+
'interactionPatterns.pauseAsk': 'Pause & Ask',
279+
'interactionPatterns.pauseAsk.description': 'Modal dialogs and popups that pause user flow to gather information or confirm actions.',
280+
'interactionPatterns.magnify': 'Magnify',
281+
'interactionPatterns.magnify.description': 'Expandable content and bottom sheets that reveal additional information or options.',
282+
'interactionPatterns.screenToScreen': 'Screen to Screen',
283+
'interactionPatterns.screenToScreen.description': 'Smooth transitions between different views or screens with clear navigation hierarchy.',
284+
'interactionPatterns.feedback': 'Feedback',
285+
'interactionPatterns.feedback.description': 'Immediate visual or haptic feedback for user interactions to create responsive experiences.',
286+
'interactionPatterns.moreToCome': 'More to come',
287+
'interactionPatterns.moreToCome.description': 'Additional patterns will be added as we discover and document new interaction needs.',
288+
289+
// UI Kit specific
290+
'uiKit.atoms': 'Atoms',
291+
'uiKit.molecules': 'Molecules',
292+
'uiKit.organisms': 'Organisms',
293+
'uiKit.templates': 'Templates',
294+
'uiKit.pages': 'Pages',
295+
'uiKit.moreToCome': 'More to come',
296+
297+
// Micro-interactions specific
298+
'microInteractions.livingIcons': 'Living Icons',
299+
'microInteractions.emphasisOn': 'Emphasis On',
300+
'microInteractions.rewardDelights': 'Reward Delights',
301+
'microInteractions.moreToCome': 'More to come',
302+
303+
// Code preview
304+
'codePreview.title': 'Code Example',
305+
'codePreview.copy': 'Copy',
306+
'codePreview.copied': 'Copied!',
307+
308+
// Live preview
309+
'livePreview.title': 'Live Preview',
310+
'livePreview.comingSoon': 'Preview coming soon',
311+
253312
// Footer
254313
'footer.description': 'Home to Buzzvil\'s design source of truth. We build in the open. This portal is primarily meant to be used internally and by our partners, but we also like anyone to have a look at how we work!',
255314
'footer.foundations.mission': 'The Mission',
@@ -509,6 +568,65 @@ const translations = {
509568
'product.resources.title': '제품 리소스',
510569
'product.resources.description': '디자인 시스템 컴포넌트, 템플릿, 개발 리소스를 다운로드하세요. 일관된 제품 경험을 구축하는 데 필요한 모든 것.',
511570

571+
// New submenu items
572+
'nav.product.uxPatterns': 'UX 패턴',
573+
'nav.product.visualPatterns': '시각적 패턴',
574+
'nav.product.workflowRituals': '워크플로우 & 의식',
575+
576+
// Page-specific translations
577+
'pages.backToGuidelines': '가이드라인으로 돌아가기',
578+
'pages.sections.interactionPatterns': '상호작용 패턴',
579+
'pages.sections.uiKit': 'UI 키트',
580+
'pages.sections.microInteractions': '마이크로 상호작용',
581+
'pages.sections.designPrinciples': '디자인 원칙',
582+
'pages.sections.visualGuidelines': '시각적 가이드라인',
583+
'pages.sections.comingSoon': '곧 출시',
584+
'pages.sections.corePrinciples': '핵심 원칙',
585+
'pages.sections.workflowSteps': '워크플로우 단계',
586+
587+
// Interaction Patterns specific
588+
'interactionPatterns.whileLoading': '로딩 중',
589+
'interactionPatterns.whileLoading.description': '사용자가 대기하는 동안 참여를 유지하는 스켈레톤 화면, 로딩 상태, 점진적 공개 패턴입니다.',
590+
'interactionPatterns.pageScroll': '페이지 스크롤',
591+
'interactionPatterns.pageScroll.description': '패럴랙스와 공개 애니메이션을 포함한 주요 상호작용 패턴으로서의 기본 세로 스크롤입니다.',
592+
'interactionPatterns.notify': '알림',
593+
'interactionPatterns.notify.description': '사용자 플로우를 방해하지 않고 피드백을 제공하는 토스트 알림, 배너, 시스템 메시지입니다.',
594+
'interactionPatterns.alert': '경고',
595+
'interactionPatterns.alert.description': '즉각적인 사용자 주의와 조치가 필요한 중요한 알림과 경고입니다.',
596+
'interactionPatterns.pauseAsk': '일시정지 & 질문',
597+
'interactionPatterns.pauseAsk.description': '정보를 수집하거나 작업을 확인하기 위해 사용자 플로우를 일시 중지하는 모달 대화상자와 팝업입니다.',
598+
'interactionPatterns.magnify': '확대',
599+
'interactionPatterns.magnify.description': '추가 정보나 옵션을 보여주는 확장 가능한 콘텐츠와 바텀시트입니다.',
600+
'interactionPatterns.screenToScreen': '화면 간 이동',
601+
'interactionPatterns.screenToScreen.description': '명확한 네비게이션 계층을 가진 다른 뷰나 화면 간의 부드러운 전환입니다.',
602+
'interactionPatterns.feedback': '피드백',
603+
'interactionPatterns.feedback.description': '반응적인 경험을 만들기 위한 사용자 상호작용에 대한 즉각적인 시각적 또는 햅틱 피드백입니다.',
604+
'interactionPatterns.moreToCome': '더 많은 패턴 예정',
605+
'interactionPatterns.moreToCome.description': '새로운 상호작용 요구를 발견하고 문서화함에 따라 추가 패턴이 추가될 예정입니다.',
606+
607+
// UI Kit specific
608+
'uiKit.atoms': '원자',
609+
'uiKit.molecules': '분자',
610+
'uiKit.organisms': '유기체',
611+
'uiKit.templates': '템플릿',
612+
'uiKit.pages': '페이지',
613+
'uiKit.moreToCome': '더 많은 컴포넌트 예정',
614+
615+
// Micro-interactions specific
616+
'microInteractions.livingIcons': '살아있는 아이콘',
617+
'microInteractions.emphasisOn': '강조',
618+
'microInteractions.rewardDelights': '보상 기쁨',
619+
'microInteractions.moreToCome': '더 많은 패턴 예정',
620+
621+
// Code preview
622+
'codePreview.title': '코드 예제',
623+
'codePreview.copy': '복사',
624+
'codePreview.copied': '복사됨!',
625+
626+
// Live preview
627+
'livePreview.title': '라이브 미리보기',
628+
'livePreview.comingSoon': '미리보기 곧 출시',
629+
512630
// Footer
513631
'footer.description': '버즈빌의 디자인 진실의 원천이 되는 곳입니다. 우리는 공개적으로 구축합니다. 이 포털은 주로 내부적으로 그리고 파트너들이 사용하도록 의도되었지만, 우리가 어떻게 일하는지 누구나 살펴볼 수 있기를 좋아합니다!',
514632
'footer.foundations.mission': '미션',

0 commit comments

Comments
 (0)