Skip to content

Commit 38ea597

Browse files
Merge pull request #830 from opentripplanner/spell-co2
refactor(itineraries): Spell CO₂ with the Unicode character.
2 parents cdcd014 + 9b5d0ec commit 38ea597

File tree

10 files changed

+10
-17
lines changed

10 files changed

+10
-17
lines changed

Diff for: example-config.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -426,8 +426,8 @@ itinerary:
426426
# airplane: 0.382
427427
# micromobility: 0
428428
# massUnit: "ounce"
429-
# showIfHigher: false // show the relative CO2 even if it's higher than driving
430-
# cutoffPercentage: 33 // Only show the CO2 comparison if the % difference from driving is at least this much
429+
# showIfHigher: false // show the relative CO₂ even if it's higher than driving
430+
# cutoffPercentage: 33 // Only show the CO₂ comparison if the % difference from driving is at least this much
431431

432432
### Popup config
433433
### OTP-RR supports a full-screen modal popup that can be launched from a set of

Diff for: i18n/en-US.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ common:
703703
{isMore, select,
704704
true {more}
705705
other {less}
706-
} CO<sub>2</sub> than driving alone
706+
} CO than driving alone
707707
708708
# Note to translator: the strings below are used in sentences such as:
709709
# "No trip found for bike, walk, and transit."

Diff for: i18n/es.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ common:
614614
transfers: '{transfers, plural, =0 {} one {# transferencia} other {# transferencias}}'
615615
relativeCo2: >
616616
{co2}
617-
de CO<sub>2</sub> en {isMore, select,
617+
de CO en {isMore, select,
618618
true {más}
619619
other {menos}
620620
} que conducir

Diff for: i18n/fr.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ common:
687687
transfers: "{transfers, plural, =0 {} one {# correspondance} other {# correspondances}}"
688688
relativeCo2: >
689689
{co2}
690-
de CO<sub>2</sub> en {isMore, select,
690+
de CO en {isMore, select,
691691
true {plus}
692692
other {moins}
693693
} qu'en voiture

Diff for: i18n/ko.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ common:
545545
noTransitFareProvided: 운임 정보가 없습니다
546546
relativeCo2: >
547547
{co2}
548-
CO<sub>2</sub> 를 자동차보다
548+
CO 를 자동차보다
549549
{isMore, select,
550550
true {더}
551551
other {덜}

Diff for: i18n/vi.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ common:
554554
noTransitFareProvided: Không có thông tin giá vé
555555
relativeCo2: >
556556
{co2}
557-
CO<sub>2</sub> {isMore, select,
557+
CO {isMore, select,
558558
true {nhiều}
559559
other {ít}
560560
} hơn so với xe hơi

Diff for: i18n/zh.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ common:
537537
{isMore, select,
538538
true {更多}
539539
other {更少}
540-
} CO<sub>2</sub> 比单独驾车
540+
} CO 比单独驾车
541541
time:
542542
departureArrivalTimes: '{startTime, time, short}—{endTime, time, short}'
543543
durationAgo: "{duration}前"

Diff for: lib/components/narrative/default/default-itinerary.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import FormattedDuration from '../../util/formatted-duration'
2828
import ItineraryBody from '../line-itin/connected-itinerary-body'
2929
import NarrativeItinerary from '../narrative-itinerary'
3030
import SimpleRealtimeAnnotation from '../simple-realtime-annotation'
31-
import Sub from '../../util/sub-text'
3231

3332
import { FlexIndicator } from './flex-indicator'
3433
import { ItineraryDescription } from './itinerary-description'
@@ -184,8 +183,7 @@ const ITINERARY_ATTRIBUTES = [
184183
value={Math.abs(co2VsBaselineRounded)}
185184
/>
186185
),
187-
isMore: co2VsBaselineRounded > 0,
188-
sub: Sub
186+
isMore: co2VsBaselineRounded > 0
189187
}}
190188
/>
191189
<StyledIconWrapperTextAlign>

Diff for: lib/components/narrative/metro/metro-itinerary.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import FormattedDuration from '../../util/formatted-duration'
2727
import ItineraryBody from '../line-itin/connected-itinerary-body'
2828
import NarrativeItinerary from '../narrative-itinerary'
2929
import SimpleRealtimeAnnotation from '../simple-realtime-annotation'
30-
import Sub from '../../util/sub-text'
3130

3231
import { DepartureTimesList } from './departure-times-list'
3332
import {
@@ -302,8 +301,7 @@ class MetroItinerary extends NarrativeItinerary {
302301
/>
303302
</LoadingBlurred>
304303
),
305-
isMore: roundedCo2VsBaseline > 0,
306-
sub: Sub
304+
isMore: roundedCo2VsBaseline > 0
307305
}}
308306
/>
309307
</IconWithText>

Diff for: lib/components/util/sub-text.js

-3
This file was deleted.

0 commit comments

Comments
 (0)