File tree Expand file tree Collapse file tree
features/courses/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 * 클릭할 때마다 테마 순환: soft → dark → minimal → soft
55 */
66
7+ import { useTranslation } from 'react-i18next' ;
78import { Palette } from 'lucide-react' ;
89import { useThemeStore } from '@/stores/themeStore' ;
9- import { themeLabels } from '@/config/themes' ;
1010
1111export function ThemeToggle ( ) {
12+ const { t } = useTranslation ( ) ;
1213 const { theme, cycleTheme } = useThemeStore ( ) ;
1314
15+ const labelKey = `theme.${ theme } ` as const ;
16+
1417 return (
1518 < button
1619 onClick = { cycleTheme }
@@ -20,10 +23,10 @@ export function ThemeToggle() {
2023 color : theme === 'dark' ? '#e5e7eb' : '#4b5563' ,
2124 border : `1px solid ${ theme === 'dark' ? '#4b5563' : '#d1d5db' } ` ,
2225 } }
23- title = "테마 변경"
26+ title = { t ( 'theme.change' ) }
2427 >
2528 < Palette size = { 14 } />
26- < span > { themeLabels [ theme ] } </ span >
29+ < span > { t ( labelKey ) } </ span >
2730 </ button >
2831 ) ;
2932}
Original file line number Diff line number Diff line change 77 */
88
99import { useState , useRef , useCallback } from 'react' ;
10+ import { useTranslation } from 'react-i18next' ;
1011import { Code2 } from 'lucide-react' ;
1112
1213import { CodeMirrorEditor , type CodeSelection } from '@/features/visualizers/shared/components/CodeMirrorEditor' ;
@@ -37,6 +38,7 @@ export function LessonCodePanel({
3738 className,
3839 style,
3940} : LessonCodePanelProps ) {
41+ const { t } = useTranslation ( ) ;
4042 const [ codeRatio , setCodeRatio ] = useState ( defaultRatio ) ;
4143 const isDragging = useRef ( false ) ;
4244 const containerRef = useRef < HTMLDivElement > ( null ) ;
@@ -97,7 +99,7 @@ export function LessonCodePanel({
9799 } }
98100 >
99101 < Code2 className = "w-3 h-3 mr-1.5" />
100- 에디터
102+ { t ( 'lesson.editor' ) }
101103 </ div >
102104 ) }
103105 < div className = "flex-1 overflow-y-auto" style = { { minHeight : 0 } } >
Original file line number Diff line number Diff line change 160160 "no_explanation" : " No explanation available" ,
161161 "expand" : " Show more" ,
162162 "collapse" : " Show less" ,
163+ "editor" : " Editor" ,
164+ "visualization" : " Visualization" ,
163165 "c_code" : " C Code" ,
164166 "python_code" : " Python Code" ,
165167 "java_code" : " Java Code" ,
435437 "send" : " Send" ,
436438 "success" : " Sent successfully! Thank you." ,
437439 "error" : " Failed to send. Please try again later."
440+ },
441+
442+ "theme" : {
443+ "change" : " Change theme" ,
444+ "soft" : " Soft" ,
445+ "dark" : " Dark" ,
446+ "minimal" : " Minimal"
438447 }
439448}
Original file line number Diff line number Diff line change 160160 "no_explanation" : " 설명이 없습니다" ,
161161 "expand" : " 더보기" ,
162162 "collapse" : " 접기" ,
163+ "editor" : " 에디터" ,
164+ "visualization" : " 시각화" ,
163165 "c_code" : " C 코드" ,
164166 "python_code" : " Python 코드" ,
165167 "java_code" : " Java 코드" ,
435437 "send" : " 전송" ,
436438 "success" : " 전송 완료! 감사합니다." ,
437439 "error" : " 전송 실패. 잠시 후 다시 시도해주세요."
440+ },
441+
442+ "theme" : {
443+ "change" : " 테마 변경" ,
444+ "soft" : " 소프트" ,
445+ "dark" : " 다크" ,
446+ "minimal" : " 미니멀"
438447 }
439448}
Original file line number Diff line number Diff line change 160160 "no_explanation" : " 暂无讲解" ,
161161 "expand" : " 展开" ,
162162 "collapse" : " 收起" ,
163+ "editor" : " 编辑器" ,
164+ "visualization" : " 可视化" ,
163165 "c_code" : " C 代码" ,
164166 "python_code" : " Python 代码" ,
165167 "java_code" : " Java 代码" ,
432434 "col_problem" : " 题目" ,
433435 "col_result" : " 结果" ,
434436 "col_submitted_at" : " 提交时间"
437+ },
438+
439+ "theme" : {
440+ "change" : " 切换主题" ,
441+ "soft" : " 柔和" ,
442+ "dark" : " 暗黑" ,
443+ "minimal" : " 简约"
435444 }
436445}
You can’t perform that action at this time.
0 commit comments