Skip to content

Commit

Permalink
英語翻訳漏れ修正
Browse files Browse the repository at this point in the history
  • Loading branch information
TinyKitten committed Oct 10, 2024
1 parent a6df6db commit 68340ba
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 68340ba

Please sign in to comment.