Skip to content

Commit

Permalink
Merge branch 'dev' into release/v8.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
TinyKitten committed Oct 10, 2024
2 parents 3da20ce + e9d2c16 commit a010154
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
11 changes: 8 additions & 3 deletions src/components/RouteList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
10 changes: 7 additions & 3 deletions src/components/TrainTypeInfoModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ export const TrainTypeInfoModal: React.FC<Props> = ({
}}
>
{!loading && stopStations.length
? stopStations.map((s) => s.name).join('、')
? stopStations
.map((s) => (isJapanese ? s.name : s.nameRoman))
.join('、')
: `${translate('loadingAPI')}...`}
</Typography>
<Typography
Expand Down Expand Up @@ -202,7 +204,7 @@ export const TrainTypeInfoModal: React.FC<Props> = ({
flex: 1,
}}
>
{l.nameShort}:{' '}
{isJapanese ? l.nameShort : l.nameRoman}:{' '}
</Typography>
<Typography
style={{
Expand All @@ -213,7 +215,9 @@ export const TrainTypeInfoModal: React.FC<Props> = ({
lineHeight: RFValue(14),
}}
>
{l.trainType?.name ?? '普通/各駅停車'}
{isJapanese
? l.trainType?.name ?? '普通/各駅停車'
: l.trainType?.nameRoman ?? 'Local'}
</Typography>
</View>
))}
Expand Down

0 comments on commit a010154

Please sign in to comment.