From 34e3872123da165564787954cfbde94b765e7509 Mon Sep 17 00:00:00 2001 From: minsik Date: Tue, 5 Nov 2024 13:13:22 +0900 Subject: [PATCH] =?UTF-8?q?=EB=8B=A4=EA=B5=AD=EC=96=B4=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/font/FontSetting.jsx | 43 +++++++++++----------- src/locales/ja.json | 13 +++++++ src/locales/ko.json | 13 +++++++ 3 files changed, 48 insertions(+), 21 deletions(-) diff --git a/src/components/common/font/FontSetting.jsx b/src/components/common/font/FontSetting.jsx index 54b22b3b..a658871d 100644 --- a/src/components/common/font/FontSetting.jsx +++ b/src/components/common/font/FontSetting.jsx @@ -14,15 +14,7 @@ const fonts = [ { name: '@Yu Gothic UI', value: '@Yu Gothic UI' }, { name: 'Yu Gothic UI', value: 'Yu Gothic UI' }, ] -const fontOptions = [ - { name: '보통', value: 'normal' }, - { name: '기울임꼴', value: 'italic' }, - { - name: '굵게', - value: 'bold', - }, - { name: '굵은 기울임꼴', value: 'boldAndItalic' }, -] + const fontSizes = [ ...Array.from({ length: 4 }).map((_, index) => { return { name: index + 8, value: index + 8 } @@ -34,17 +26,7 @@ const fontSizes = [ { name: 48, value: 48 }, { name: 72, value: 72 }, ] -const fontColors = [ - { name: '검정색', value: 'black' }, - { name: '빨강색', value: 'red' }, - { name: '파랑색', value: 'blue' }, - { name: '회색', value: 'gray' }, - { name: '황색', value: 'yellow' }, - { name: '녹색', value: 'green' }, - { name: '분홍색', value: 'pink' }, - { name: '황금색', value: 'gold' }, - { name: '남색', value: 'darkblue' }, -] + export default function FontSetting(props) { const contextPopupPosition = useRecoilValue(contextPopupPositionState) const { id, setIsShow, pos = contextPopupPosition, type, isConfig = false } = props @@ -57,7 +39,26 @@ export default function FontSetting(props) { const [selectedFontWeight, setSelectedFontWeight] = useState(currentFont.fontWeight) const [selectedFontSize, setSelectedFontSize] = useState(currentFont.fontSize) const [selectedFontColor, setSelectedFontColor] = useState(currentFont.fontColor) - + const fontOptions = [ + { name: getMessage('font.style.normal'), value: 'normal' }, + { name: getMessage('font.style.italic'), value: 'italic' }, + { + name: getMessage('font.style.bold'), + value: 'bold', + }, + { name: getMessage('font.style.bold.italic'), value: 'boldAndItalic' }, + ] + const fontColors = [ + { name: getMessage('color.black'), value: 'black' }, + { name: getMessage('color.red'), value: 'red' }, + { name: getMessage('color.blue'), value: 'blue' }, + { name: getMessage('color.gray'), value: 'gray' }, + { name: getMessage('color.yellow'), value: 'yellow' }, + { name: getMessage('color.green'), value: 'green' }, + { name: getMessage('color.pink'), value: 'pink' }, + { name: getMessage('color.gold'), value: 'gold' }, + { name: getMessage('color.darkblue'), value: 'darkblue' }, + ] const handleSaveBtn = () => { setGlobalFont((prev) => { return { diff --git a/src/locales/ja.json b/src/locales/ja.json index 390b3fe7..05ab09cf 100644 --- a/src/locales/ja.json +++ b/src/locales/ja.json @@ -483,6 +483,19 @@ "commons.east": "ドン", "commons.south": "南", "commons.north": "北", + "font.style.normal": "보통(JA)", + "font.style.italic": "기울임꼴(JA)", + "font.style.bold": "굵게(JA)", + "font.style.bold.italic": "굵은 기울임꼴(JA)", + "color.black": "검정색(JA)", + "color.red": "빨강색(JA)", + "color.blue": "파랑색(JA)", + "color.gray": "회색(JA)", + "color.yellow": "황색(JA)", + "color.green": "녹색(JA)", + "color.pink": "분홍색(JA)", + "color.gold": "황금색(JA)", + "color.darkblue": "남색(JA)", "site.name": "Q.CAST III", "site.sub_name": "太陽光発電システム図面管理サイト", "board.notice.title": "お知らせ", diff --git a/src/locales/ko.json b/src/locales/ko.json index 5f3fd48d..d8cef240 100644 --- a/src/locales/ko.json +++ b/src/locales/ko.json @@ -489,6 +489,19 @@ "commons.east": "동", "commons.south": "남", "commons.north": "북", + "font.style.normal": "보통", + "font.style.italic": "기울임꼴", + "font.style.bold": "굵게", + "font.style.bold.italic": "굵은 기울임꼴", + "color.black": "검정색", + "color.red": "빨강색", + "color.blue": "파랑색", + "color.gray": "회색", + "color.yellow": "황색", + "color.green": "녹색", + "color.pink": "분홍색", + "color.gold": "황금색", + "color.darkblue": "남색", "site.name": "Q.CAST III", "site.sub_name": "태양광 발전 시스템 도면관리 사이트", "board.notice.title": "공지사항",