Skip to content

Commit

Permalink
fix: add 'and' before last set of short platform info
Browse files Browse the repository at this point in the history
See #226
  • Loading branch information
davwheat committed Jul 7, 2024
1 parent 283083e commit 21c7b14
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/announcement-data/systems/stations/AmeyPhil.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4092,7 +4092,7 @@ export default class AmeyPhil extends StationAnnouncementSystem {
const order = Object.keys(shortPlatforms).sort((a, b) => a.localeCompare(b))
let firstAdded = false

order.forEach(s => {
order.forEach((s, i) => {
const plats = shortPlatforms[s]

if (!firstAdded) {
Expand Down Expand Up @@ -4121,7 +4121,9 @@ export default class AmeyPhil extends StationAnnouncementSystem {
} else {
files.push(
{
id: 's.customers for',
// If last set of short platforms, add 'and' before last item
// See: https://github.com/davwheat/rail-announcements/issues/226#issuecomment-2212472715
id: i === order.length - 1 ? 'm.and customers for' : 's.customers for',
opts: { delayStart: 200 },
},
...this.pluraliseAudio(plats, {
Expand Down

0 comments on commit 21c7b14

Please sign in to comment.