Skip to content

Commit

Permalink
Merge pull request #3014 from HSLdevcom/add-tamperevr-feedid
Browse files Browse the repository at this point in the history
Add tamperevr feedid
  • Loading branch information
vesameskanen authored Dec 15, 2019
2 parents d2550ed + 32a5c37 commit 046c3b3
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 8 deletions.
3 changes: 2 additions & 1 deletion app/component/AlertPopUp.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Icon from './Icon';

const AlertPopUp = props => (
<FullscreenDialog
className={props.textId}
className={props.className}
renderContent={() => (
<React.Fragment>
{props.icon && (
Expand All @@ -26,6 +26,7 @@ const AlertPopUp = props => (
);

AlertPopUp.propTypes = {
className: PropTypes.string,
isPopUpOpen: PropTypes.bool,
textId: PropTypes.string,
icon: PropTypes.string,
Expand Down
9 changes: 8 additions & 1 deletion app/component/QuickSettingsPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,19 @@ class QuickSettingsPanel extends React.Component {
const applicableQuickOptionSets = getApplicableQuickOptionSets(
this.context,
);
const modesWithNoBicycle = this.context.config.modesWithNoBike;

return (
<div className={cx(['quicksettings-container'])}>
<AlertPopUp
className="no-bike-allowed-popup"
isPopUpOpen={this.state.isPopUpOpen}
textId="no-bike-allowed-popup"
textId={
Array.isArray(modesWithNoBicycle) &&
modesWithNoBicycle.includes('RAIL')
? 'no-bike-allowed-popup-train'
: 'no-bike-allowed-popup-tram-bus'
}
icon="caution"
togglePopUp={this.togglePopUp}
/>
Expand Down
5 changes: 4 additions & 1 deletion app/configurations/config.tampere.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default configMerger(walttiConfig, {

favicon: './sass/themes/tampere/favicon.png',

feedIds: ['tampere'],
feedIds: ['tampere', 'TampereVR'],

geoJson: {
layers: [
Expand Down Expand Up @@ -235,6 +235,9 @@ export default configMerger(walttiConfig, {
},
},

// boarding a long distance train with bicycle costs extra
modesWithNoBike: ['RAIL'],

// Number of days to include to the service time range from the future (DT-3175)
itineraryFutureDays: 60,
});
20 changes: 15 additions & 5 deletions app/translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,9 @@ const translations = {
nearest: 'Nächste',
'network-error': 'Ein Netzwerkfehler ist aufgetreten.',
next: 'Nächste',
'no-bike-allowed-popup':
'no-bike-allowed-popup-train':
'Bicycles are allowed on commuter trains but on long distance trains you have to pay an extra fee and it might require a reservation.',
'no-bike-allowed-popup-tram-bus':
'Die Fahrradmitnahme ist in Bussen und Straßenbahnen nicht erlaubt. Lassen Sie Ihr Fahrrad bitte an der Haltestelle oder an Park&Ride Plätzen, wenn Sie diese Verkehrsmittel benutzen. ',
'no-departures': 'Keine Abfahrten',
'no-favourite-locations': 'Fügen Sie ihre meist genutzen Orte hier hinzu.',
Expand Down Expand Up @@ -843,7 +845,9 @@ const translations = {
nearest: 'Nearest',
'network-error': 'Network error',
next: 'Next',
'no-bike-allowed-popup':
'no-bike-allowed-popup-train':
'Bicycles are allowed on commuter trains but on long distance trains you have to pay an extra fee and it might require a reservation.',
'no-bike-allowed-popup-tram-bus':
'Bicycles are not allowed on buses or trams. If you are using these vehicles on your route, leave the bicycle at the stop or at a Park-and-Ride. ',
'no-departures': 'No departures',
'no-favourite-locations':
Expand Down Expand Up @@ -1569,7 +1573,9 @@ const translations = {
nearest: 'Lähimmät',
'network-error': 'Verkkovirhe',
next: 'Seuraava',
'no-bike-allowed-popup':
'no-bike-allowed-popup-train':
'Lähiliikenteen juniin pyörän voi ottaa mukaan ilmaiseksi, mutta pitkän matkan junissa peritään lisämaksu ja mahdollisesti vaaditaan etukäteisvaraus.',
'no-bike-allowed-popup-tram-bus':
'Pyörää ei voi ottaa bussiin tai raitiovaunuun. Jos käytät reitilläsi näitä kulkuvälineitä, jätä pyörä pysäkille tai liityntäpysäköintiin.',
'no-departures': 'Ei lähteviä vuoroja',
'no-favourite-locations':
Expand Down Expand Up @@ -1952,7 +1958,9 @@ const translations = {
nearest: 'Le plus proche',
'network-error': 'Erreur réseau',
next: 'Suivant',
'no-bike-allowed-popup':
'no-bike-allowed-popup-train':
'Bicycles are allowed on commuter trains but on long distance trains you have to pay an extra fee and it might require a reservation.',
'no-bike-allowed-popup-tram-bus':
"Les vélos ne sont pas autorisés dans les bus ou les trams. Si vous utilisez ces véhicules sur votre trajet, laissez le vélo à l'arrêt ou à un Parc Relais.",
'no-favourite-locations':
'Ajoutez vos lieux favoris ici. Les boutons calculeront votre itinéraire automatiquement',
Expand Down Expand Up @@ -2605,7 +2613,9 @@ const translations = {
nearest: 'Närmaste',
'network-error': 'Nätverksfel',
next: 'Nästa',
'no-bike-allowed-popup':
'no-bike-allowed-popup-train':
'Du kan ta med cykeln i närtågen avgiftsfritt, men i andra tåg är det avgiftsbelagt och kräver möjligtvis en förhandsreservation.',
'no-bike-allowed-popup-tram-bus':
'Cyklar är inte tillåtna i bussar eller spårvagnar. Om du använder dessa fordon på din färd, lämna cykeln vid hållplatsen eller vid infartsparkeringen.',
'no-departures': 'Inga avgående resor',
'no-favourite-locations':
Expand Down

0 comments on commit 046c3b3

Please sign in to comment.