diff --git a/src/components/timetable/timetable.js b/src/components/timetable/timetable.js index a23564e0..2f9eb347 100644 --- a/src/components/timetable/timetable.js +++ b/src/components/timetable/timetable.js @@ -58,13 +58,21 @@ const getNotes = (notes, symbols) => { return parsedNotes; }; -const PrintButton = props => ( -
- -
-); +const PrintButton = lang => { + const PRINT_TEXT = { + fi: 'TULOSTA AIKATAULU', + sv: 'SKRIV UT TIDTABEL', + en: 'PRINT SCHEDULE', + }; + + return ( +
+ +
+ ); +}; class Timetable extends Component { constructor(props) { @@ -134,7 +142,7 @@ class Timetable extends Component { )} - {this.props.showPrintButton ? : ''} + {this.props.showPrintButton ? : ''} )} {this.props.showValidityPeriod && ( @@ -233,6 +241,7 @@ Timetable.defaultProps = { addressFi: null, showAddressInfo: true, showPrintButton: false, + lang: 'fi', }; Timetable.propTypes = { @@ -264,6 +273,7 @@ Timetable.propTypes = { showAddressInfo: PropTypes.bool, showPrintButton: PropTypes.bool, combinedDays: PropTypes.object.isRequired, + lang: PropTypes.string, }; export default Timetable; diff --git a/src/components/timetable/timetableContainer.js b/src/components/timetable/timetableContainer.js index e3089a09..367978d9 100644 --- a/src/components/timetable/timetableContainer.js +++ b/src/components/timetable/timetableContainer.js @@ -408,6 +408,7 @@ const propsMapper = mapProps(props => { hasDepartures: departures.length > 0, showAddressInfo: props.showAddressInfo, showPrintButton: props.showPrintButton, + lang: props.lang, }; }); @@ -429,6 +430,7 @@ TimetableContainer.defaultProps = { showStopInformation: false, showAddressInfo: true, showPrintButton: false, + lang: 'fi', }; TimetableContainer.propTypes = { @@ -449,6 +451,7 @@ TimetableContainer.propTypes = { showAddressInfo: PropTypes.bool, showPrintButton: PropTypes.bool, combinedDays: PropTypes.object, + lang: PropTypes.string, }; export default TimetableContainer;