From 68340ba1baa9d6a44e5ed3f4c5c2568b9dc38370 Mon Sep 17 00:00:00 2001 From: Tsubasa SEKIGUCHI Date: Fri, 11 Oct 2024 02:02:51 +0900 Subject: [PATCH] =?UTF-8?q?=E8=8B=B1=E8=AA=9E=E7=BF=BB=E8=A8=B3=E6=BC=8F?= =?UTF-8?q?=E3=82=8C=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/RouteList.tsx | 11 ++++++++--- src/components/TrainTypeInfoModal.tsx | 10 +++++++--- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/components/RouteList.tsx b/src/components/RouteList.tsx index 6d2d0ad21..b6e4629f1 100644 --- a/src/components/RouteList.tsx +++ b/src/components/RouteList.tsx @@ -60,9 +60,14 @@ const ItemCell = ({ }, [currentStation?.groupId, item.stops]) const bottomText = useMemo(() => { - return `${item.stops[0]?.name}から${ - item.stops[item.stops.length - 1]?.name - }まで` + if (isJapanese) { + return `${item.stops[0]?.name}から${ + item.stops[item.stops.length - 1]?.name + }まで` + } + return `${item.stops[0]?.nameRoman} - ${ + item.stops[item.stops.length - 1]?.nameRoman + }` }, [item.stops]) return ( diff --git a/src/components/TrainTypeInfoModal.tsx b/src/components/TrainTypeInfoModal.tsx index 3dafca6e0..3741c1f7a 100644 --- a/src/components/TrainTypeInfoModal.tsx +++ b/src/components/TrainTypeInfoModal.tsx @@ -150,7 +150,9 @@ export const TrainTypeInfoModal: React.FC = ({ }} > {!loading && stopStations.length - ? stopStations.map((s) => s.name).join('、') + ? stopStations + .map((s) => (isJapanese ? s.name : s.nameRoman)) + .join('、') : `${translate('loadingAPI')}...`} = ({ flex: 1, }} > - {l.nameShort}:{' '} + {isJapanese ? l.nameShort : l.nameRoman}:{' '} = ({ lineHeight: RFValue(14), }} > - {l.trainType?.name ?? '普通/各駅停車'} + {isJapanese + ? l.trainType?.name ?? '普通/各駅停車' + : l.trainType?.nameRoman ?? 'Local'} ))}