Skip to content

Commit

Permalink
chore: rename tram-local as speedtram
Browse files Browse the repository at this point in the history
  • Loading branch information
vesameskanen committed Sep 21, 2023
1 parent 064f7ec commit ed53fb1
Show file tree
Hide file tree
Showing 31 changed files with 99 additions and 99 deletions.
4 changes: 2 additions & 2 deletions app/component/itinerary.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ $itinerary-tab-switch-height: 48px;
&.bus-express {
@include getCircleSvg($bus-express-color, $fill);
}
&.tram-local {
@include getCircleSvg($tram-local-color, $fill);
&.speedtram {
@include getCircleSvg($speedtram-color, $fill);
}
&.airplane {
@include getCircleSvg($airplane-color, $fill);
Expand Down
6 changes: 3 additions & 3 deletions app/component/map/VehicleMarkerContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const MODES_WITH_ICONS = [
'rail',
'subway',
'ferry',
'tram-local',
'speedtram',
];

function getVehicleIcon(
Expand Down Expand Up @@ -84,8 +84,8 @@ function VehicleMarkerContainer(props) {
let mode;
if (type === ExtendedRouteTypes.BusExpress) {
mode = 'bus-express';
} else if (type === ExtendedRouteTypes.TramLocal) {
mode = 'tram-local';
} else if (type === ExtendedRouteTypes.SpeedTram) {
mode = 'speedtram';
} else {
mode = message.mode;
}
Expand Down
4 changes: 2 additions & 2 deletions app/component/map/popups/marker-popup.scss
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@
.funicular-stop {
color: $funicular-color;
}
.tram-local-stop {
color: $tram-local-color;
.speedtram-stop {
color: $speedtram-color;
}
}

Expand Down
10 changes: 5 additions & 5 deletions app/component/map/tile-layer/SelectStopRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ function SelectStopRow(
}
} else if (routes && type === 'TRAM' && config.useExtendedRouteTypes) {
const routesArray = JSON.parse(routes);
if (routesArray.some(p => p.gtfsType === ExtendedRouteTypes.TramLocal)) {
mode = 'tram-local';
if (routesArray.some(p => p.gtfsType === ExtendedRouteTypes.SpeedTram)) {
mode = 'speedtram';
}
}
const iconOptions = {};
Expand Down Expand Up @@ -63,9 +63,9 @@ function SelectStopRow(
iconOptions.iconId = 'icon-icon_funicular-stop-lollipop';
iconOptions.className = 'funicular-stop';
break;
case 'tram-local':
iconOptions.iconId = 'icon-icon_tram-local-stop-lollipop';
iconOptions.className = 'tram-local-stop';
case 'speedtram':
iconOptions.iconId = 'icon-icon_speedtram-stop-lollipop';
iconOptions.className = 'speedtram-stop';
break;
case 'FERRY':
iconOptions.iconId = !isNull(code)
Expand Down
4 changes: 2 additions & 2 deletions app/component/map/tile-layer/Stops.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Stops {
this.config.useExtendedRouteTypes
) {
const routes = JSON.parse(feature.properties.routes);
if (routes.some(p => p.gtfsType === ExtendedRouteTypes.TramLocal)) {
if (routes.some(p => p.gtfsType === ExtendedRouteTypes.SpeedTram)) {
hasLocalTramRoute = true;
}
}
Expand All @@ -75,7 +75,7 @@ class Stops {
mode = 'bus-express';
}
if (hasLocalTramRoute) {
mode = 'tram-local';
mode = 'speedtram';
}

drawStopIcon(
Expand Down
2 changes: 1 addition & 1 deletion app/configurations/config.hsl.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export default {
'mode-metro': '#CA4000',
'mode-citybike': '#f2b62d',
'mode-citybike-secondary': '#333333',
'mode-tram-local': '#007E79',
'mode-speedtram': '#007E79',
},
},
getAutoSuggestIcons: {
Expand Down
2 changes: 1 addition & 1 deletion app/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export const AlertEntityType = Object.freeze({
export const ExtendedRouteTypes = Object.freeze({
BusExpress: 702,
BusLocal: 704,
TramLocal: 900,
SpeedTram: 900,
});

export const ParkTypes = {
Expand Down
6 changes: 3 additions & 3 deletions app/translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -1488,6 +1488,7 @@ const translations = {
'skip-to-content': 'Skip to content',
slow: 'Slow',
'specify-location': 'Specify location',
speedtram: 'Jokeri Light Rail',
'splash-locating': 'Detecting location',
'splash-or-choose': 'or select your origin',
'splash-use-positioning': 'Use location services',
Expand Down Expand Up @@ -1577,7 +1578,6 @@ const translations = {
'track-short-no-num': 'Track',
traficom: 'Traficom',
tram: 'Tram',
'tram-local': 'Jokeri Light Rail',
'tram-with-route-number': 'Tram {routeNumber} {headSign}',
transfer: 'Transfer',
transfers: 'Number of transfers',
Expand Down Expand Up @@ -2623,6 +2623,7 @@ const translations = {
'skip-to-content': 'Siirry sisältöön',
slow: 'Hidas',
'specify-location': 'Määritä sijainti',
speedtram: 'Raide-Jokeri',
'splash-locating': 'Paikannetaan',
'splash-or-choose': 'tai valitse lähtöpaikaksi',
'splash-use-positioning': 'Käytä paikannusta',
Expand Down Expand Up @@ -2715,7 +2716,6 @@ const translations = {
'track-short-no-num': 'Raide',
traficom: 'Traficom',
tram: 'Raitiovaunu',
'tram-local': 'Raide-Jokeri',
'tram-with-route-number': 'Raitiovaunu {routeNumber} {headSign}',
transfer: 'Vaihto',
transfers: 'Vaihtojen määrä',
Expand Down Expand Up @@ -4543,6 +4543,7 @@ const translations = {
'skip-to-content': 'Till innehållet',
slow: 'Långsam',
'specify-location': 'Ange en plats',
speedtram: 'Spårjokern',
'splash-locating': 'Söker din plats...',
'splash-or-choose': 'eller välj en avfärdsplats',
'splash-please-allow-positioning':
Expand Down Expand Up @@ -4635,7 +4636,6 @@ const translations = {
'track-short-no-num': 'Spår',
traficom: 'Traficom',
tram: 'Spårvagn',
'tram-local': 'Spårjokern',
'tram-with-route-number': 'Spårvagn {routeNumber} {headSign}',
transfer: 'Byte',
transfers: 'Antal byten',
Expand Down
4 changes: 2 additions & 2 deletions app/util/modeUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ export const getRouteMode = route => {
return 'bus-express';
case ExtendedRouteTypes.BusLocal:
return 'bus-local';
case ExtendedRouteTypes.TramLocal:
return 'tram-local';
case ExtendedRouteTypes.SpeedTram:
return 'speedtram';
default:
return route.mode?.toLowerCase();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@digitransit-component/digitransit-component-autosuggest-panel",
"version": "2.0.8",
"version": "2.0.9",
"description": "digitransit-component autosuggest-panel module",
"main": "index.js",
"files": [
Expand Down Expand Up @@ -28,8 +28,8 @@
"author": "Digitransit Authors",
"license": "(AGPL-3.0 OR EUPL-1.2)",
"peerDependencies": {
"@digitransit-component/digitransit-component-autosuggest": "^1.9.12",
"@digitransit-component/digitransit-component-icon": "^0.2.2",
"@digitransit-component/digitransit-component-autosuggest": "^1.9.13",
"@digitransit-component/digitransit-component-icon": "^1.0.0",
"@hsl-fi/sass": "^0.2.0",
"classnames": "2.2.6",
"i18next": "^19.3.3",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@digitransit-component/digitransit-component-autosuggest",
"version": "1.9.12",
"version": "1.9.13",
"description": "digitransit-component autosuggest module",
"main": "index.js",
"files": [
Expand Down Expand Up @@ -36,8 +36,8 @@
},
"peerDependencies": {
"@digitransit-component/digitransit-component-dialog-modal": "^0.3.4",
"@digitransit-component/digitransit-component-icon": "^0.2.2",
"@digitransit-component/digitransit-component-suggestion-item": "^1.1.4",
"@digitransit-component/digitransit-component-icon": "^1.0.0",
"@digitransit-component/digitransit-component-suggestion-item": "^1.1.5",
"@hsl-fi/sass": "^0.2.0",
"classnames": "2.2.6",
"i18next": "^19.3.3",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@digitransit-component/digitransit-component-control-panel",
"version": "1.1.3",
"version": "1.1.4",
"description": "digitransit-component control-panel module",
"main": "index.js",
"files": [
Expand Down Expand Up @@ -29,7 +29,7 @@
"author": "Digitransit Authors",
"license": "(AGPL-3.0 OR EUPL-1.2)",
"peerDependencies": {
"@digitransit-component/digitransit-component-icon": "^0.2.2",
"@digitransit-component/digitransit-component-icon": "^1.0.0",
"@hsl-fi/sass": "~0.2.0",
"classnames": "2.2.6",
"i18next": "^19.3.3",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@digitransit-component/digitransit-component-datetimepicker",
"version": "0.7.5",
"version": "0.7.6",
"description": "digitransit-component datetimepicker module",
"main": "index.js",
"files": [
Expand Down Expand Up @@ -29,7 +29,7 @@
"author": "Digitransit Authors",
"license": "(AGPL-3.0 OR EUPL-1.2)",
"peerDependencies": {
"@digitransit-component/digitransit-component-icon": "^0.2.2",
"@digitransit-component/digitransit-component-icon": "^1.0.0",
"i18next": "^19.3.3",
"lodash": "4.17.21",
"lodash-es": "4.17.21",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@digitransit-component/digitransit-component-favourite-bar",
"version": "1.1.4",
"version": "1.1.5",
"description": "digitransit-component favourite-bar module",
"main": "index.js",
"files": [
Expand Down Expand Up @@ -32,8 +32,8 @@
"@digitransit-search-util/digitransit-search-util-uniq-by-label": "^1.1.0"
},
"peerDependencies": {
"@digitransit-component/digitransit-component-icon": "^0.2.2",
"@digitransit-component/digitransit-component-suggestion-item": "^1.1.4",
"@digitransit-component/digitransit-component-icon": "^1.0.0",
"@digitransit-component/digitransit-component-suggestion-item": "^1.1.5",
"@hsl-fi/sass": "^0.2.0",
"@hsl-fi/shimmer": "0.1.2",
"classnames": "2.2.6",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@digitransit-component/digitransit-component-favourite-editing-modal",
"version": "1.1.4",
"version": "1.1.5",
"description": "digitransit-component favourite-editing-modal module",
"main": "index.js",
"files": [
Expand Down Expand Up @@ -33,7 +33,7 @@
},
"peerDependencies": {
"@digitransit-component/digitransit-component-dialog-modal": "^0.3.4",
"@digitransit-component/digitransit-component-icon": "^0.2.2",
"@digitransit-component/digitransit-component-icon": "^1.0.0",
"@hsl-fi/container-spinner": "0.3.1",
"@hsl-fi/modal": "^0.3.1",
"@hsl-fi/sass": "^0.2.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@digitransit-component/digitransit-component-favourite-modal",
"version": "1.0.2",
"version": "1.0.3",
"description": "digitransit-component favourite-modal module",
"main": "index.js",
"files": [
Expand Down Expand Up @@ -29,7 +29,7 @@
"author": "Digitransit Authors",
"license": "(AGPL-3.0 OR EUPL-1.2)",
"peerDependencies": {
"@digitransit-component/digitransit-component-icon": "^0.2.2",
"@digitransit-component/digitransit-component-icon": "^1.0.0",
"@hsl-fi/modal": "^0.3.1",
"@hsl-fi/sass": "^0.2.0",
"classnames": "2.2.6",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@digitransit-component/digitransit-component-icon",
"version": "0.2.2",
"version": "1.0.0",
"description": "digitransit-component icon module",
"main": "index.js",
"files": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import CautionWhite from './assets/caution_white_exclamation.svg';
import Trash from './assets/trash.svg';
import ModeBus from './assets/mode_bus.svg';
import ModeBusExpress from './assets/bus-express.svg';
import ModeTramLocal from './assets/tram-local.svg';
import ModeSpeedTram from './assets/speedtram.svg';
import ModeBusLocal from './assets/bus-local.svg';
import ModeRail from './assets/mode_rail.svg';
import ModeTram from './assets/mode_tram.svg';
Expand All @@ -60,7 +60,7 @@ import TramWaltti from './assets/tram-waltti.svg';
import Check from './assets/check.svg';
import SearchBusStopDefault from './assets/search-bus-stop-default.svg';
import SearchBusStopExpressDefault from './assets/search-bus-stop-express-default.svg';
import SearchTramLocalStopDefault from './assets/search-tram-local-stop-default.svg';
import SearchSpeedTramStopDefault from './assets/search-speedtram-stop-default.svg';
import SearchRailStopDefault from './assets/search-rail-stop-default.svg';
import SearchFerryDefault from './assets/search-ferry-default.svg';
import SearchFerryStopDefault from './assets/search-ferry-stop-default.svg';
Expand Down Expand Up @@ -124,7 +124,7 @@ const IconMap = style => {
'mode-bus': <ModeBus style={style} />,
'mode-bus-express': <ModeBusExpress style={style} />,
'mode-bus-local': <ModeBusLocal style={style} />,
'mode-tram-local': <ModeTramLocal style={style} />,
'mode-speedtram': <ModeSpeedTram style={style} />,
'mode-rail': <ModeRail style={style} />,
'mode-tram': <ModeTram style={style} />,
'mode-subway': <Subway style={style} />,
Expand All @@ -151,8 +151,8 @@ const IconMap = style => {
'search-bus-stop-express-default': (
<SearchBusStopExpressDefault style={style} />
),
'search-tram-local-stop-default': (
<SearchTramLocalStopDefault style={style} />
'search-speedtram-stop-default': (
<SearchSpeedTramStopDefault style={style} />
),
'search-rail-stop-default': <SearchRailStopDefault style={style} />,
'search-ferry-default': <SearchFerryDefault style={style} />,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@digitransit-component/digitransit-component-suggestion-item",
"version": "1.1.4",
"version": "1.1.5",
"description": "digitransit-component suggestion-item module",
"main": "index.js",
"files": [
Expand Down Expand Up @@ -32,7 +32,7 @@
"recompose": "0.30.0"
},
"peerDependencies": {
"@digitransit-component/digitransit-component-icon": "^0.2.2",
"@digitransit-component/digitransit-component-icon": "^1.0.0",
"@hsl-fi/sass": " ^0.2.0",
"classnames": "2.2.6",
"i18next": "^19.3.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ import styles from './helpers/styles.scss';

const BUS_EXPRESS = 702;
const BUS_LOCAL = 704;
const TRAM_LOCAL = 900;
const SPEEDTRAM = 900;

const getRouteMode = props => {
switch (props.type) {
case BUS_LOCAL:
return 'bus-local';
case BUS_EXPRESS:
return 'bus-express';
case TRAM_LOCAL:
return 'tram-local';
case SPEEDTRAM:
return 'speedtram';
default:
return props?.mode?.toLowerCase() || 'bus';
}
Expand Down Expand Up @@ -128,8 +128,8 @@ function getIconProperties(
{ icon: 'search-bus-stop-express-default', color: 'mode-bus-express' },
],
[
'TRAM-LOCAL-default',
{ icon: 'search-tram-local-stop-default', color: 'mode-tram-local' },
'SPEEDTRAM-default',
{ icon: 'search-speedtram-stop-default', color: 'mode-speedtram' },
],
[
'BUS-digitransit',
Expand Down Expand Up @@ -208,8 +208,8 @@ function getIconProperties(
}
} else if (modes.includes('BUS-EXPRESS') && modeSet === 'default') {
iconStr = [layerIcon.get('BUS-EXPRESS'.concat('-').concat(modeSet))];
} else if (modes.includes('TRAM-LOCAL') && modeSet === 'default') {
iconStr = [layerIcon.get('TRAM-LOCAL'.concat('-').concat(modeSet))];
} else if (modes.includes('SPEEDTRAM') && modeSet === 'default') {
iconStr = [layerIcon.get('SPEEDTRAM'.concat('-').concat(modeSet))];
} else {
iconStr = [layerIcon.get(mode.concat('-').concat(modeSet))];
}
Expand Down
Loading

0 comments on commit ed53fb1

Please sign in to comment.