Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
c52832f
refactor(i18n,TripTools): Extract localizable strings from component.
binh-dam-ibigroup Jul 6, 2021
16bd6e6
refactor(i18n,narrative): Localize SimpleRealtimeAnnotation.
binh-dam-ibigroup Jul 9, 2021
9770827
chore(codespell): Don't codespell non-english string resources.
binh-dam-ibigroup Jul 9, 2021
30cf4e6
chore(codespell): Do not codespell French language files.
binh-dam-ibigroup Jul 9, 2021
83fadcf
Merge remote-tracking branch 'philip-cline/react-intl' into react-int…
binh-dam-ibigroup Jul 9, 2021
f6131d4
refactor(i18n,SaveTripButton): Localize SaveTripButton.
binh-dam-ibigroup Jul 9, 2021
080a3e9
improvement(localize ItinerarySummary component & refactor a few func…
philip-cline Jul 12, 2021
f5cd8f1
refactor(Linting):
philip-cline Jul 13, 2021
2fcee4c
Merge branch 'dev' into react-intl-ramp-up
binh-dam-ibigroup Jul 15, 2021
2fc186d
chore(i18n): Fix strings for ItinerarySummary.
binh-dam-ibigroup Jul 15, 2021
0585227
refactor(i18n,RealtimeAnnotation): Extract strings for component.
binh-dam-ibigroup Jul 15, 2021
c066839
improvement(Addressing PR comments):
philip-cline Jul 16, 2021
9a3c475
improvement(Merge changes):
philip-cline Jul 16, 2021
adeb243
refactor(i18n,PlanFirstLastButtons): Localize component.
binh-dam-ibigroup Jul 20, 2021
8d7b2ac
improvement(localize narrative-itineraries-header):
philip-cline Jul 20, 2021
a5b7bd1
Merge branch 'react-intl-ramp-up' of https://github.com/opentripplann…
philip-cline Jul 20, 2021
1fbee66
improvement(address PR comments):
philip-cline Jul 20, 2021
4bbbe49
improvement(TabbedInteraries & ItinerarySummaries): Localize TabbedIt…
philip-cline Jul 20, 2021
25c3001
chore(i18n): Update language strings.
binh-dam-ibigroup Jul 21, 2021
1041533
Merge branch 'dev' into react-intl-ramp-up-pr1
binh-dam-ibigroup Aug 16, 2021
1883b3c
refactor: Fix lint
binh-dam-ibigroup Aug 16, 2021
ad8ea33
refactor(i18n): Address PR comments
philip-cline Aug 18, 2021
8a61663
refactor(SaveTripButton): Add comments to clarify PR feedback.
binh-dam-ibigroup Aug 19, 2021
666ae9f
refactor(TripTools): Use FormattedMessage with Start Over button.
binh-dam-ibigroup Aug 19, 2021
c9c1272
refactor(IconWithSpace): Apply icon with CSS spacing per PR comments.
binh-dam-ibigroup Aug 19, 2021
bbe1988
refactor(TabbedItineraries): Address PR comment on bullet, tweak rend…
binh-dam-ibigroup Aug 19, 2021
8297d2e
refactor(DefaultItinerary): Tweak styles.
binh-dam-ibigroup Aug 19, 2021
80ec210
refactor(IconWithSpace): Replace margin-inline* CSS with ::before/aft…
binh-dam-ibigroup Aug 20, 2021
b28ccbd
refactor(SaveTripButton,RtAnnotation): Make message ids all literals.
binh-dam-ibigroup Aug 23, 2021
fc3e0db
Merge branch 'dev' into react-intl-ramp-up-pr1
binh-dam-ibigroup Aug 23, 2021
7054a36
refactor: Address PR comments
binh-dam-ibigroup Sep 2, 2021
278c980
refactor(util/Icon): Add withSpace prop
binh-dam-ibigroup Sep 2, 2021
a629c47
refactor(narrative/icon): Remove in favor of components/util/icon.
binh-dam-ibigroup Sep 2, 2021
8e014aa
fix(TripSummary): Remove green bar outside of batch itinerary results.
binh-dam-ibigroup Sep 2, 2021
b07e031
refactor(FormattedTimeRange): Format time using default format for am…
binh-dam-ibigroup Sep 2, 2021
0f4a3c9
refactor(FormattedDuration): Make default export, rename file.
binh-dam-ibigroup Sep 2, 2021
a0c2b52
refactor(util/icon): Make tests pass.
binh-dam-ibigroup Sep 2, 2021
ea5305f
test(StopViewer): Update snapshots, still.
binh-dam-ibigroup Sep 3, 2021
4299ee0
Merge branch 'dev' into react-intl-ramp-up-pr1
binh-dam-ibigroup Sep 3, 2021
e399f4d
refactor(admin/trip-status): Remove unused import.
binh-dam-ibigroup Sep 3, 2021
7ef85a4
refactor(FieldTripStatusIcon): Fix import
binh-dam-ibigroup Sep 3, 2021
149b464
refactor(RealtimeAnnotation): Improve rich text rendering.
binh-dam-ibigroup Sep 3, 2021
42fec94
refactor(TabbedItineraries): Replace <br/>s with block <span>s.
binh-dam-ibigroup Sep 3, 2021
88c7e2b
Merge branch 'dev' into react-intl-ramp-up-pr1
binh-dam-ibigroup Sep 10, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
- uses: codespell-project/actions-codespell@master
with:
check_filenames: true
# The a11y test file has a false positive and the ignore list does not work
# skip git, yarn, and i18n non-english resources.
# Also, the a11y test file has a false positive and the ignore list does not work
# see https://github.com/opentripplanner/otp-react-redux/pull/436/checks?check_run_id=3369380014
skip: ./.git,yarn.lock,./a11y/a11y.test.js
skip: ./.git,yarn.lock,./a11y/a11y.test.js,./i18n/fr*
74 changes: 5 additions & 69 deletions __tests__/components/viewers/__snapshots__/stop-viewer.js.snap

Large diffs are not rendered by default.

101 changes: 93 additions & 8 deletions i18n/en-US.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,88 @@ _name: English
components:
DefaultItinerary:
clickDetails: Click to view details
# Use ordered placeholders for the departure-arrival string
# (this will accommodate right-to-left languages by swapping the order in this string).
departureArrivalTimes: "{startTime}—{endTime}"
# Use ordered placeholders when multiple modes are involved
# (this will accommodate right-to-left languages by swapping the order/separator in this string).
multiModeSummary: "{accessMode} to {transitMode}"
# If trip is less than one hour only display the minutes.
tripDurationFormatZeroHours: "{minutes, number} min"
# TODO: Distinguish between one hour (singular) and 2 hours or more?
tripDurationFormat: "{hours, number} hr {minutes, number} min"
ItinerarySummary:
fareCost: "{useMaxFare, select,
true {{minTotalFare} - {maxTotalFare}}
other {{minTotalFare}}
}"
NarrativeItinerariesHeader:
numIssues: "{issueNum, number} issues"
resultText: "{pending, select,
true {Finding your options...}
other {
{itineraryNum, number} {itineraryNum, plural,
one {itinerary found}
other {itineraries found}
}
}
}"
selectArrivalTime: Arrival time
selectBest: Best option
selectCost: Cost
selectDepartureTime: Departure time
selectDuration: Duration
selectWalkTime: Walk time
titleText: "{pending, select,
true {Finding your options...}
other {
{itineraryNum, number} {itineraryNum, plural,
one {itinerary}
other {itineraries}}
{issueNum, plural,
=0 {found}
one {(and {issueNum, number} issue) found}
other {(and {issueNum, number} issues) found}
}
}
}"
viewAll: View all options
PlanFirstLastButtons:
# Note to translator: these values are width-constrained.
first: First
last: Last
next: Next
previous: Previous
RealtimeAnnotation:
ignoreServiceDelays: Apply service delays
delaysNotShownInResults: "Your trip results are currently being affected by service delays.
These delays do not factor into travel times shown below."
delaysShownInResults: "Your trip results have been adjusted based on real-time
information. Under normal conditions, this trip would take {normalDuration}
using the following routes: {routes}."
ignoreServiceDelays: Ignore service delays
serviceUpdate: Service update
SaveTripButton:
cantSaveText: Cannot save
cantSaveTooltip: Only itineraries that include transit and no rentals or ride hailing can be monitored.
saveTripText: Save trip
signInText: Sign in to save trip
signInTooltip: Please sign in to save trip.
SimpleRealtimeAnnotation:
usingRealtimeInfo: This trip uses real-time traffic and delay information
TabbedItineraries:
optionNumber: "Option {optionNum, number}"
fareCost: "{hasMaxFare, select,
true {{minTotalFare}+}
other {{minTotalFare}}
}"
TripTools:
# Note to translator: copyLink, linkCopied, print, reportIssue,
# and startOver are width-constrained.
copyLink: Copy link
# Text that replaces the copyLink button text after user clicks it.
linkCopied: Copied
print: Print
reportIssue: Report Issue
reportEmailSubject: Reporting an Issue with OpenTripPlanner
reportEmailTemplate: " *** INSTRUCTIONS TO USER ***
This feature allows you to email a report to site administrators for review.
Please add any additional feedback for this trip under the 'Additional Comments'
section below and send using your regular email program."
startOver: Start Over # TODO: move to other category (common with hamburger 'Start Over' item)

# Common messages that appear in multiple components and modules
# are grouped below by topic.
Expand All @@ -49,7 +121,11 @@ common:
drive: Drive
micromobility: E-Scooter
micromobilityRent: Rental E-Scooter
walk: Walk
walk: Walk

itineraryDescriptions:
calories: "{calories, number} Cal"
transfers: "{transfers, plural, =0 {} one {{transfers} transfer} other {{transfers} transfers}}"

# OTP transit modes
# Note that identifiers are OTP modes converted to lowercase.
Expand All @@ -63,3 +139,12 @@ common:
cable_car: Cable Car
gondola: Gondola
funicular: Funicular

time:
# Use ordered placeholders for the departure-arrival string
# (this will accommodate right-to-left languages by swapping the order in this string).
departureArrivalTimes: "{startTime, time, short}—{endTime, time, short}"
tripDurationFormat: "{hours, plural,
=0 {{minutes, number} min}
other {{hours, number} hr {minutes, number} min}}"

94 changes: 90 additions & 4 deletions i18n/fr-FR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,85 @@ _name: Unofficial French Translations!
components:
DefaultItinerary:
clickDetails: Cliquez pour afficher les détails
departureArrivalTimes: "{startTime}—{endTime}"
multiModeSummary: "{accessMode} + {transitMode}"
tripDurationFormatZeroHours: "{minutes, number} mn"
tripDurationFormat: "{hours, number} h, {minutes, number} mn"
ItinerarySummary:
fareCost: "{useMaxFare, select,
true {{minTotalFare} - {maxTotalFare}}
other {{minTotalFare}}
}"
NarrativeItinerariesHeader:
numIssues: "{issueNum, number} problèmes"
resultText: "{pending, select,
true {Recherche de vos options en cours...}
other {
{itineraryNum, number} {itineraryNum, plural,
one {trajet trouvé}
other {trajets trouvés}
}
}
}"
selectArrivalTime: Heure d'arrivée
selectBest: Meilleure option
selectCost: Prix
selectDepartureTime: Heure de départ
selectDuration: Durée
selectWalkTime: Temps de marche
titleText: "{pending, select,
true {Recherche de vos options en cours...}
other {
{itineraryNum, number} {itineraryNum, plural,
one {trajet}
other {trajets}}
{issueNum, plural,
=0 {trouvé}
one {(et {issueNum, number} problème) trouvé}
other {(and {issueNum, number} problèmes) trouvés}
}
}
}"
viewAll: Voir toutes les options
PlanFirstLastButtons:
# Note to translator: these values are width-constrained.
first: Premier
last: Dernier
next: Suivant
previous: Précédent
RealtimeAnnotation:
ignoreServiceDelays: Appliquer les retards
delaysNotShownInResults: "Vos trajets recherchés sont perturbés par des retards.
Ces retards ne sont pas pris en compte dans les temps de trajet ci-dessous."
delaysShownInResults: "Vos trajets recherchés ont été mis à jour avec les conditions en temps réel.
En temps normal, ce trajet prendrait {normalDuration} en empruntant les lignes: {routes}."
ignoreServiceDelays: Ignorer les retards
serviceUpdate: Information sur le service
SaveTripButton:
cantSaveText: Impossible d'enregistrer
cantSaveTooltip: Seuls les trajets en transports en commun sans location de véhicules et sans course en voiture peuvent être suivis.
saveTripText: Enregistrer
signInText: Connectez-vous pour enregistrer
signInTooltip: Veuillez vous connecter pour enregistrer ce trajet.
SimpleRealtimeAnnotation:
usingRealtimeInfo: Ce trajet utilise les informations en temps réel sur le trafic et les retards
TabbedItineraries:
optionNumber: "Option {optionNum, number}"
fareCost: "{hasMaxFare, select,
true {À partir de {minTotalFare}}
other {{minTotalFare}}
}"
TripTools:
# Note to translator: copyLink, linkCopied, print, reportIssue,
# and startOver are width-constrained.
copyLink: Copier le lien
# Text that replaces the copyLink button text after user clicks it.
linkCopied: Copié
print: Imprimer
reportIssue: Un problème ? # "Signaler un problème" does not fit.
reportEmailSubject: Signaler un problème avec OpenTripPlanner
reportEmailTemplate: " *** A L'ATTENTION DE L'UTILISATEUR ***
Vous pouvez communiquer votre problème en détail aux administrateurs de ce site, par courriel.
Veuillez ajouter toute remarque sur cet itinéraire dans la section 'Additional Comments'
ci-dessous, puis envoyez depuis votre logiciel de messagerie usuel."
startOver: Recommencer

common:
accessModes:
Expand All @@ -16,7 +91,12 @@ common:
drive: Voiture
micromobility: Trottinette électrique
micromobilityRent: Trottinette électrique en libre-service
walk: Marche
walk: À pied

itineraryDescriptions:
calories: "{calories, number} kcal" # SI unit
transfers: "{transfers, plural, =0 {} one {{transfers} correspondance} other {{transfers} correspondances}}"


otpTransitModes:
tram: Tram
Expand All @@ -27,3 +107,9 @@ common:
cable_car: Tram tiré par câble
gondola: Téléphérique
funicular: Funiculaire

time:
departureArrivalTimes: "{startTime, time, short}—{endTime, time, short}"
tripDurationFormat: "{hours, plural,
=0 {{minutes, number} mn}
other {{hours, number} h {minutes, number} mn}}"
2 changes: 1 addition & 1 deletion lib/components/admin/call-history-window.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'
import { connect } from 'react-redux'

import * as callTakerActions from '../../actions/call-taker'
import Icon from '../narrative/icon'
import Icon from '../util/icon'

import CallRecord from './call-record'
import DraggableWindow from './draggable-window'
Expand Down
2 changes: 1 addition & 1 deletion lib/components/admin/call-record.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import humanizeDuration from 'humanize-duration'
import moment from 'moment'
import React, { Component } from 'react'

import Icon from '../narrative/icon'
import {searchToQuery} from '../../util/call-taker'
import Icon from '../util/icon'

import CallTimeCounter from './call-time-counter'
import QueryRecord from './query-record'
Expand Down
2 changes: 1 addition & 1 deletion lib/components/admin/call-taker-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import * as apiActions from '../../actions/api'
import * as callTakerActions from '../../actions/call-taker'
import * as fieldTripActions from '../../actions/field-trip'
import * as uiActions from '../../actions/ui'
import Icon from '../narrative/icon'
import { isModuleEnabled, Modules } from '../../util/config'
import Icon from '../util/icon'

import {
CallHistoryButton,
Expand Down
2 changes: 1 addition & 1 deletion lib/components/admin/draggable-window.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component } from 'react'
import Draggable from 'react-draggable'

import Icon from '../narrative/icon'
import Icon from '../util/icon'

const noop = () => {}

Expand Down
2 changes: 1 addition & 1 deletion lib/components/admin/field-trip-details.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import { connect } from 'react-redux'
import styled from 'styled-components'

import * as fieldTripActions from '../../actions/field-trip'
import Icon from '../narrative/icon'
import {
getActiveFieldTripRequest,
getGroupSize,
GROUP_FIELDS,
PAYMENT_FIELDS,
TICKET_TYPES
} from '../../util/call-taker'
import Icon from '../util/icon'

import DraggableWindow from './draggable-window'
import EditableSection from './editable-section'
Expand Down
2 changes: 1 addition & 1 deletion lib/components/admin/field-trip-itinerary-group-size.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { Badge } from 'react-bootstrap'

import Icon from '../narrative/icon'
import Icon from '../util/icon'

export default function FieldTripGroupSize ({ itinerary }) {
return itinerary.fieldTripGroupSize > 0 && (
Expand Down
2 changes: 1 addition & 1 deletion lib/components/admin/field-trip-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { Badge, Button } from 'react-bootstrap'
import { connect } from 'react-redux'

import * as fieldTripActions from '../../actions/field-trip'
import Icon from '../narrative/icon'
import Loading from '../narrative/loading'
import {getVisibleRequests, TABS} from '../../util/call-taker'
import {FETCH_STATUS} from '../../util/constants'
import Icon from '../util/icon'

import FieldTripStatusIcon from './field-trip-status-icon'
import {FieldTripRecordButton, WindowHeader} from './styled'
Expand Down
3 changes: 2 additions & 1 deletion lib/components/admin/field-trip-notes.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import React, { Component } from 'react'
import { Badge, Button as BsButton } from 'react-bootstrap'
import styled from 'styled-components'

import Icon from '../narrative/icon'
import Icon from '../util/icon'

import {
Button,
Full,
Expand Down
2 changes: 1 addition & 1 deletion lib/components/admin/field-trip-status-icon.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'

import Icon from '../narrative/icon'
import Icon from '../util/icon'

const FieldTripStatusIcon = ({ ok }) => (
ok
Expand Down
2 changes: 1 addition & 1 deletion lib/components/admin/mailables-window.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import {Badge, Button} from 'react-bootstrap'
import {connect} from 'react-redux'

import * as callTakerActions from '../../actions/call-taker'
import Icon from '../narrative/icon'
import {getModuleConfig, isModuleEnabled, Modules} from '../../util/config'
import Icon from '../util/icon'
import {createLetter, LETTER_FIELDS} from '../../util/mailables'

import {
Expand Down
2 changes: 1 addition & 1 deletion lib/components/admin/styled.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Button as BsButton } from 'react-bootstrap'
import styled, {css} from 'styled-components'

import Icon from '../narrative/icon'
import Icon from '../util/icon'

import DefaultCounter from './call-time-counter'

Expand Down
2 changes: 1 addition & 1 deletion lib/components/app/app-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import { connect } from 'react-redux'
import { DropdownButton, MenuItem } from 'react-bootstrap'
import { withRouter } from 'react-router'

import Icon from '../narrative/icon'
import * as callTakerActions from '../../actions/call-taker'
import * as fieldTripActions from '../../actions/field-trip'
import { MainPanelContent, setMainPanelContent } from '../../actions/ui'
import { isModuleEnabled, Modules } from '../../util/config'
import Icon from '../util/icon'

// TODO: make menu items configurable via props/config

Expand Down
2 changes: 1 addition & 1 deletion lib/components/form/batch-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import styled from 'styled-components'

import * as apiActions from '../../actions/api'
import * as formActions from '../../actions/form'
import Icon from '../narrative/icon'
import Icon from '../util/icon'
import { hasValidLocation, getActiveSearch, getShowUserSettings } from '../../util/state'

import BatchPreferences from './batch-preferences'
Expand Down
2 changes: 1 addition & 1 deletion lib/components/form/mode-buttons.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React, { useContext } from 'react'
import { OverlayTrigger, Tooltip } from 'react-bootstrap'
import styled from 'styled-components'

import Icon from '../narrative/icon'
import { ComponentContext } from '../../util/contexts'
import Icon from '../util/icon'

import {buttonCss} from './batch-styled'

Expand Down
Loading