Skip to content

Commit

Permalink
Merge pull request #4866 from HSLdevcom/DT-5890-translations
Browse files Browse the repository at this point in the history
Dt 5890 translations
  • Loading branch information
vesameskanen authored Sep 25, 2023
2 parents 6ea65fb + a637d58 commit b8d6bb8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 10 deletions.
13 changes: 8 additions & 5 deletions app/component/ItineraryTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,12 @@ class ItineraryTab extends React.Component {
isMobile: PropTypes.bool.isRequired,
currentTime: PropTypes.number.isRequired,
hideTitle: PropTypes.bool,
currentLanguage: PropTypes.string,
};

static defaultProps = {
hideTitle: false,
currentLanguage: "fi"
};

static contextTypes = {
Expand Down Expand Up @@ -176,7 +178,7 @@ class ItineraryTab extends React.Component {
};

render() {
const { itinerary } = this.props;
const { itinerary, currentLanguage } = this.props;
const { config } = this.context;

if (!itinerary || !itinerary.legs[0]) {
Expand Down Expand Up @@ -315,14 +317,14 @@ class ItineraryTab extends React.Component {
values={{
callAgencyInfoUrl: get(
config,
'callAgencyInfo.callAgencyInfoLink',
`callAgencyInfo.${currentLanguage}.callAgencyInfoLink`,
),
}}
/>
<a href={config.callAgencyInfo.callAgencyInfoLink}>
<a href={config.callAgencyInfo[currentLanguage].callAgencyInfoLink}>
<FormattedMessage
id={config.callAgencyInfo.callAgencyInfoLinkText}
defaultMessage={config.callAgencyInfo.callAgencyInfoLinkText}
id={config.callAgencyInfo[currentLanguage].callAgencyInfoLinkText}
defaultMessage={config.callAgencyInfo[currentLanguage].callAgencyInfoLinkText}
/>
</a>
</div>
Expand Down Expand Up @@ -369,6 +371,7 @@ class ItineraryTab extends React.Component {
const withRelay = createFragmentContainer(
connectToStores(ItineraryTab, ['TimeStore'], context => ({
currentTime: context.getStore('TimeStore').getCurrentTime().unix(),
currentLanguage: context.getStore('PreferencesStore').getLanguage(),
})),
{
plan: graphql`
Expand Down
14 changes: 12 additions & 2 deletions app/configurations/config.tampere.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,18 @@ export default configMerger(walttiConfig, {
ticketLink: 'https://www.nysse.fi/liput-ja-hinnat.html',

callAgencyInfo: {
callAgencyInfoLink: 'https://nysse.fi/nyssykka',
callAgencyInfoLinkText: 'nysse.fi/nyssykka',
fi: {
callAgencyInfoLink: 'https://nysse.fi/kutsuliikenne',
callAgencyInfoLinkText: 'https://nysse.fi/kutsuliikenne',
},
sv: {
callAgencyInfoLink: 'https://nysse.fi/kutsuliikenne',
callAgencyInfoLinkText: 'https://nysse.fi/kutsuliikenne',
},
en: {
callAgencyInfoLink: 'https://nysse.fi/drt',
callAgencyInfoLinkText: 'https://nysse.fi/drt',
},
},

// mapping fareId from OTP fare identifiers to human readable form
Expand Down
6 changes: 3 additions & 3 deletions app/translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -1465,7 +1465,7 @@ const translations = {
'separate-ticket-required-disclaimer':
'This itinerary contains one or more legs for which {agencyName} does not sell tickets.',
'separate-ticket-required-for-call-agency-disclaimer':
'Voit tarkistaa kutsuliikenteen maksutavat ja käytännöt ',
'The journey includes demand responsive transport service. Please check the payment methods and practices on ',
'set-specific-settings': 'Set more specific settings',
'set-stop-as-routes': "Set the stop as route's",
settings: 'Settings',
Expand Down Expand Up @@ -2601,7 +2601,7 @@ const translations = {
'separate-ticket-required-disclaimer':
'Matka sisältää yhden tai useamman osuuden, jonka lippujen myynnistä {agencyName} ei vastaa.',
'separate-ticket-required-for-call-agency-disclaimer':
'Voit tarkistaa kutsuliikenteen maksutavat ja käytännöt ',
'Matka sisältää kutsuliikennettä. Voit tarkistaa maksutavat ja käytännöt ',
'set-specific-settings': 'Aseta tarkemmat asetukset',
'set-stop-as-routes': 'Aseta pysäkki reitin',
settings: 'Asetukset',
Expand Down Expand Up @@ -4521,7 +4521,7 @@ const translations = {
'separate-ticket-required-disclaimer':
'Resan består av en eller fleta etapper vilka kräver biljetter som inte säljs av {agencyName}.',
'separate-ticket-required-for-call-agency-disclaimer':
'Voit tarkistaa kutsuliikenteen maksutavat ja käytännöt ',
'I resan ingår anropsbusstrafiken. Bekanta dig med betalningsmetoder och praxis på ',
'set-specific-settings': 'Ställa avancerade inställningar',
'set-stop-as-routes': 'Ställa hållplats som rutter',
settings: 'Anpassa',
Expand Down

0 comments on commit b8d6bb8

Please sign in to comment.