From c2d8aeb5726734787191eeaab0237c86a61a831b Mon Sep 17 00:00:00 2001 From: ysCha Date: Thu, 4 Jun 2026 09:46:47 +0900 Subject: [PATCH] =?UTF-8?q?[2089]=20useSwal=20alert=20html=20=EC=A7=80?= =?UTF-8?q?=EC=9B=90=20+=20=EC=A0=80=EA=B5=AC=EB=B0=B0=20=EA=B2=BD?= =?UTF-8?q?=EA=B3=A0=20=EC=A4=84=EB=B0=94=EA=BF=88=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - useSwal alert 분기에 html 옵션 지원 추가 (html 있으면 html, 없으면 text) - roof-pitch-warning: text → html + \n을
로 치환하여 줄바꿈 렌더링 - ja.json: 構造物 → 架台 용어 수정 + \n 추가 - ko.json: 문구 다듬기 + \n 추가 --- src/hooks/useSwal.js | 2 +- src/locales/ja.json | 2 +- src/locales/ko.json | 2 +- src/util/roof-pitch-warning.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hooks/useSwal.js b/src/hooks/useSwal.js index f904091d..227f96ee 100644 --- a/src/hooks/useSwal.js +++ b/src/hooks/useSwal.js @@ -30,7 +30,7 @@ export const useSwal = () => { if (type === 'alert') { MySwal.fire({ title, - text, + ...(html ? { html } : { text }), icon: icon === '' ? 'success' : icon, confirmButtonText: getMessage('common.ok'), }).then(() => { diff --git a/src/locales/ja.json b/src/locales/ja.json index 88e88a2a..e6092ae9 100644 --- a/src/locales/ja.json +++ b/src/locales/ja.json @@ -65,7 +65,7 @@ "modal.roof.shape.setting.patten.a": "Aパターン", "modal.roof.shape.setting.patten.b": "Bパターン", "modal.roof.shape.setting.side": "個別に設定", - "modal.roof.material.low.pitch.warning": "2寸以上2.5寸未満の瓦を使用する場合、適用可能な瓦製品および構造物に制限があります。必ず施工マニュアルをご確認ください。", + "modal.roof.material.low.pitch.warning": "2寸以上2.5寸未満の瓦を使用する場合、適用可能な瓦製品および架台に制限があります。\n必ず施工マニュアルをご確認ください。", "plan.menu.roof.cover": "伏せ図入力", "plan.menu.roof.cover.outline.drawing": "外壁線を描く", "plan.menu.roof.cover.roof.shape.setting": "屋根形状の設定", diff --git a/src/locales/ko.json b/src/locales/ko.json index 956d552d..b000c736 100644 --- a/src/locales/ko.json +++ b/src/locales/ko.json @@ -65,7 +65,7 @@ "modal.roof.shape.setting.patten.a": "A 패턴", "modal.roof.shape.setting.patten.b": "B 패턴", "modal.roof.shape.setting.side": "변별로 설정", - "modal.roof.material.low.pitch.warning": "2寸 이상 2.5寸 미만의 기와를 사용하는 경우, 적용 가능한 기와 제품 및 구조물에 제한이 있습니다. 반드시 시공 매뉴얼을 확인해 주세요.", + "modal.roof.material.low.pitch.warning": "2寸 이상 2.5寸 미만의 기와를 사용하는 경우, 적용 가능한 기와 제품 및 구조물 에 제한이 있습니다. \n반드시 시공 매뉴얼을 확인해 주시기 바랍니다.", "plan.menu.roof.cover": "지붕덮개", "plan.menu.roof.cover.outline.drawing": "외벽선 그리기", "plan.menu.roof.cover.roof.shape.setting": "지붕형상 설정", diff --git a/src/util/roof-pitch-warning.js b/src/util/roof-pitch-warning.js index 17099f91..377e9eda 100644 --- a/src/util/roof-pitch-warning.js +++ b/src/util/roof-pitch-warning.js @@ -72,7 +72,7 @@ export const notifyLowPitchRestrictionForRoofs = async (roofs, swalFire, getMess swalFire({ type: 'alert', icon: 'warning', - text: getMessage('modal.roof.material.low.pitch.warning'), + html: getMessage('modal.roof.material.low.pitch.warning').replace(/\n/g, '
'), confirmFn: () => resolve(), }) }) -- 2.47.2