Skip to content

Commit 08cd98c

Browse files
committed
modify alert condition for ease with translation
1 parent eeaa0f2 commit 08cd98c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/examples/src/flight-booker/App/composition.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ export default {
1616

1717
function book() {
1818
alert(
19-
`You have booked a ${flightType.value} leaving on ${
20-
departureDate.value
21-
}${isReturn.value ? ` and returning on ${returnDate.value}` : ``}`
19+
isReturn.value
20+
? `You have booked a return flight leaving on ${departureDate.value} and returning on ${returnDate.value}.`
21+
: `You have booked a one-way flight leaving on ${departureDate.value}.`
2222
)
2323
}
2424

src/examples/src/flight-booker/App/options.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ export default {
3939
methods: {
4040
book() {
4141
alert(
42-
`You have booked a ${this.flightType} leaving on ${this.departureDate}${
43-
this.isReturn ? ` and returning on ${this.returnDate}` : ``
44-
}`
42+
this.isReturn
43+
? `You have booked a return flight leaving on ${this.departureDate} and returning on ${this.returnDate}.`
44+
: `You have booked a one-way flight leaving on ${this.departureDate}.`
4545
)
4646
}
4747
}

0 commit comments

Comments
 (0)