Skip to content

Commit a698ab7

Browse files
committed
feat: 차트 한글로 변환
1 parent f0af9a4 commit a698ab7

3 files changed

Lines changed: 306 additions & 0 deletions

File tree

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
import type { ChartTextType } from '../types/chart.type';
2+
3+
export const ChartTextKR: ChartTextType = {
4+
// Misc prompts
5+
Line: '선',
6+
Candles: '캔들',
7+
'Hollow Candles': '빈 캔들',
8+
Sticks: '막대',
9+
Fills: '채우기',
10+
Color: '색상',
11+
'Positive color': '상승 색상',
12+
'Negative color': '하락 색상',
13+
Fill: '채우기',
14+
Save: '저장',
15+
Cancel: '취소',
16+
Apply: '적용',
17+
Reset: '초기화',
18+
Comparison: '비교',
19+
to: '~',
20+
'Scroll to increment': '스크롤하여 증가',
21+
'Click to toggle': '클릭하여 전환',
22+
Search: '검색',
23+
'Search results are limited to %1.': '검색 결과는 %1개로 제한됩니다.',
24+
25+
// Settings
26+
Settings: '설정',
27+
'Y-axis scale': 'Y축 스케일',
28+
'Change percent': '변화율',
29+
Regular: '일반',
30+
Logarithmic: '로그',
31+
32+
// Date-range selectors
33+
'Date Range': '날짜 범위',
34+
'Period selector': '기간 선택',
35+
D: '일',
36+
M: '월',
37+
YTD: '연초대비',
38+
Y: '년',
39+
Max: '전체',
40+
minute: '분',
41+
minutes: '분',
42+
hour: '시간',
43+
hours: '시간',
44+
day: '일',
45+
week: '주',
46+
month: '월',
47+
year: '년',
48+
Year: '년',
49+
Month: '월',
50+
Hour: '시간',
51+
Minute: '분',
52+
Wk: '주',
53+
54+
// Drawing
55+
Draw: '그리기',
56+
'Drawing tool': '그리기 도구',
57+
'Snap icon to data': '데이터에 아이콘 맞춤',
58+
'Line color': '선 색상',
59+
'Line thickness': '선 두께',
60+
'Line style': '선 스타일',
61+
'Fill color': '채우기 색상',
62+
Text: '텍스트',
63+
'Text color': '텍스트 색상',
64+
'Label font size': '라벨 글꼴 크기',
65+
Bold: '굵게',
66+
Italic: '기울임',
67+
'Label font family': '라벨 글꼴',
68+
'Show line extension': '선 연장 표시',
69+
Eraser: '지우개',
70+
Clear: '지우기',
71+
'Clear all drawings': '모든 그리기 지우기',
72+
Callout: '콜아웃',
73+
Doodle: '낙서',
74+
Ellipse: '타원',
75+
Fibonacci: '피보나치',
76+
'Fibonacci Timezone': '피보나치 시간대',
77+
'Horizontal Line': '수평선',
78+
'Horizontal Ray': '수평 광선',
79+
'Arrows & Icons': '화살표 및 아이콘',
80+
Label: '라벨',
81+
Polyline: '다중선',
82+
'Quadrant Line': '사분면선',
83+
Rectangle: '사각형',
84+
Regression: '회귀선',
85+
'Trend Line': '추세선',
86+
'Vertical Line': '수직선',
87+
88+
// Indicators
89+
Indicators: '지표',
90+
Increase: '증가',
91+
Decrease: '감소',
92+
'Accumulation Distribution': '',
93+
'Accumulative Swing Index': '',
94+
'Use Volume': '거래량 사용',
95+
'Limit move value': '',
96+
Period: '기간',
97+
'Aroon up': '아룬 상승',
98+
'Aroon down': '아룬 하락',
99+
Increasing: '증가',
100+
Decreasing: '감소',
101+
Upper: '상단',
102+
Average: '평균',
103+
Lower: '하단',
104+
Field: '필드',
105+
Type: '유형',
106+
'Fast period': '빠른 기간',
107+
'Slow period': '느린 기간',
108+
Overbought: '과매수',
109+
Oversold: '과매도',
110+
'Moving Average Type': '이동평균 유형',
111+
'Fast MA period': '빠른 이동평균 기간',
112+
'Slow MA period': '느린 이동평균 기간',
113+
'Signal period': '신호 기간',
114+
MACD: 'MACD',
115+
Signal: '신호',
116+
Offset: '오프셋',
117+
'Points/Percent': '포인트/퍼센트',
118+
'Shift type': '이동 유형',
119+
Shift: '이동',
120+
Top: '상단',
121+
Median: '중간값',
122+
Bottom: '하단',
123+
'%K Smoothing': '%K 평활화',
124+
'%D Smoothing': '%D 평활화',
125+
Fast: '빠름',
126+
Slow: '느림',
127+
'Signal color': '신호 색상',
128+
'Up volume': '상승 거래량',
129+
'Down volume': '하락 거래량',
130+
Deviation: '편차',
131+
Depth: '깊이',
132+
Aroon: '아룬',
133+
'Awesome Oscillator': '',
134+
'Bollinger Bands': '볼린저 밴드',
135+
'Chaikin Money Flow': '',
136+
'Chaikin Oscillator': '',
137+
'Commodity Channel Index': '',
138+
'Disparity Index': '',
139+
'Moving Average': '이동평균',
140+
'Moving Average Deviation': '이동평균 편차',
141+
'Moving Average Envelope': '이동평균 엔벨로프',
142+
'On Balance Volume': '',
143+
'Relative Strength Index': 'RSI',
144+
'Standard Deviation': '표준편차',
145+
'Stochastic Oscillator': '스토캐스틱',
146+
Trix: 'TRIX',
147+
'Typical Price': '대표가격',
148+
Volume: '거래량',
149+
VWAP: 'VWAP',
150+
'Williams R': '윌리엄스 %R',
151+
'Median Price': '중간가격',
152+
ZigZag: '지그재그',
153+
};
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
export type ChartTextType = Partial<{
2+
// Misc prompts
3+
Line: string;
4+
Candles: string;
5+
'Hollow Candles': string;
6+
Sticks: string;
7+
Fills: string;
8+
Color: string;
9+
'Positive color': string;
10+
'Negative color': string;
11+
Fill: string;
12+
Save: string;
13+
Cancel: string;
14+
Apply: string;
15+
Reset: string;
16+
Comparison: string;
17+
to: string;
18+
'Scroll to increment': string;
19+
'Click to toggle': string;
20+
Search: string;
21+
'Search results are limited to %1.': string;
22+
23+
// Settings
24+
Settings: string;
25+
'Y-axis scale': string;
26+
'Change percent': string;
27+
Regular: string;
28+
Logarithmic: string;
29+
30+
// Date-range selectors
31+
'Date Range': string;
32+
'Period selector': string;
33+
D: string;
34+
M: string;
35+
YTD: string;
36+
Y: string;
37+
Max: string;
38+
minute: string;
39+
minutes: string;
40+
hour: string;
41+
hours: string;
42+
day: string;
43+
week: string;
44+
month: string;
45+
year: string;
46+
Year: string;
47+
Month: string;
48+
Hour: string;
49+
Minute: string;
50+
Wk: string;
51+
52+
// Drawing
53+
Draw: string;
54+
'Drawing tool': string;
55+
'Snap icon to data': string;
56+
'Line color': string;
57+
'Line thickness': string;
58+
'Line style': string;
59+
'Fill color': string;
60+
Text: string;
61+
'Text color': string;
62+
'Label font size': string;
63+
Bold: string;
64+
Italic: string;
65+
'Label font family': string;
66+
'Show line extension': string;
67+
Eraser: string;
68+
Clear: string;
69+
'Clear all drawings': string;
70+
Callout: string;
71+
Doodle: string;
72+
Ellipse: string;
73+
Fibonacci: string;
74+
'Fibonacci Timezone': string;
75+
'Horizontal Line': string;
76+
'Horizontal Ray': string;
77+
'Arrows &amp; Icons': string;
78+
Label: string;
79+
Polyline: string;
80+
'Quadrant Line': string;
81+
Rectangle: string;
82+
Regression: string;
83+
'Trend Line': string;
84+
'Vertical Line': string;
85+
86+
// Indicators
87+
Indicators: string;
88+
Increase: string;
89+
Decrease: string;
90+
'Accumulation Distribution': string;
91+
'Accumulative Swing Index': string;
92+
'Use Volume': string;
93+
'Limit move value': string;
94+
Period: string;
95+
'Aroon up': string;
96+
'Aroon down': string;
97+
Increasing: string;
98+
Decreasing: string;
99+
Upper: string;
100+
Average: string;
101+
Lower: string;
102+
Field: string;
103+
Type: string;
104+
'Fast period': string;
105+
'Slow period': string;
106+
Overbought: string;
107+
Oversold: string;
108+
'Moving Average Type': string;
109+
'Fast MA period': string;
110+
'Slow MA period': string;
111+
'Signal period': string;
112+
MACD: string;
113+
Signal: string;
114+
Offset: string;
115+
'Points/Percent': string;
116+
'Shift type': string;
117+
Shift: string;
118+
Top: string;
119+
Median: string;
120+
Bottom: string;
121+
'%K Smoothing': string;
122+
'%D Smoothing': string;
123+
Fast: string;
124+
Slow: string;
125+
'Signal color': string;
126+
'Up volume': string;
127+
'Down volume': string;
128+
Deviation: string;
129+
Depth: string;
130+
Aroon: string;
131+
'Awesome Oscillator': string;
132+
'Bollinger Bands': string;
133+
'Chaikin Money Flow': string;
134+
'Chaikin Oscillator': string;
135+
'Commodity Channel Index': string;
136+
'Disparity Index': string;
137+
'Moving Average': string;
138+
'Moving Average Deviation': string;
139+
'Moving Average Envelope': string;
140+
'On Balance Volume': string;
141+
'Relative Strength Index': string;
142+
'Standard Deviation': string;
143+
'Stochastic Oscillator': string;
144+
Trix: string;
145+
'Typical Price': string;
146+
Volume: string;
147+
VWAP: string;
148+
'Williams R': string;
149+
'Median Price': string;
150+
ZigZag: string;
151+
}>;

src/features/tradeview/ui/Chart/ChartContainer.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import * as am5 from '@amcharts/amcharts5';
22
import am5themes_Animated from '@amcharts/amcharts5/themes/Animated';
33
import React, { useEffect, useRef, useState, type ReactNode } from 'react';
4+
import { ChartTextKR } from '../../const/chart.const';
45

56
export type ChartContainerProps = {
67
containerId: string;
@@ -41,6 +42,7 @@ export default function ChartContainer({
4142

4243
root.setThemes([am5themes_Animated.new(root), Theme]);
4344
root.numberFormatter.set('numberFormat', '#,###.00');
45+
root.language.setTranslationsAny(ChartTextKR);
4446

4547
setChartRoot(root);
4648

0 commit comments

Comments
 (0)