Skip to content

Commit 95f09bd

Browse files
committed
fix(messages): use messages for FeedInfoPanel
1 parent b2507b0 commit 95f09bd

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
lines changed

i18n/english.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ Breadcrumbs:
1515
root: Explore
1616
projects: Projects
1717
deployments: Deployments
18+
FeedInfoPanel:
19+
uploadShapefile:
20+
title: Upload route shapefile
21+
body: Select a zipped shapefile to display on map. Note: this is only for use as a visual aid.
22+
error: Uploaded file must be a valid zip file (.zip).
1823
RegionSearch:
1924
placeholder: Search for regions or agencies
2025
PublicFeedsTable:

i18n/espanol.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ Breadcrumbs:
1515
root: Explore
1616
projects: Projects
1717
deployments: Deployments
18+
FeedInfoPanel:
19+
uploadShapefile:
20+
title: Upload route shapefile
21+
body: Select a zipped shapefile to display on map. Note: this is only for use as a visual aid.
22+
error: Uploaded file must be a valid zip file (.zip).
1823
RegionSearch:
1924
placeholder: Search for regions or agencies
2025
PublicFeedsTable:

i18n/francais.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ Breadcrumbs:
1515
root: Explore
1616
projects: Projects
1717
deployments: Deployments
18+
FeedInfoPanel:
19+
uploadShapefile:
20+
title: Upload route shapefile
21+
body: Select a zipped shapefile to display on map. Note: this is only for use as a visual aid.
22+
error: Uploaded file must be a valid zip file (.zip).
1823
RegionSearch:
1924
placeholder: Search for regions or agencies
2025
PublicFeedsTable:

lib/editor/components/FeedInfoPanel.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { browserHistory } from 'react-router'
55

66
import CreateSnapshotModal from './CreateSnapshotModal'
77
import SelectFileModal from '../../common/components/SelectFileModal.js'
8+
import {getComponentMessages, getMessage} from '../../common/util/config'
89
import {isValidZipFile} from '../../common/util/util'
910
import { GTFS_ICONS } from '../util/ui'
1011

@@ -65,10 +66,11 @@ export default class FeedInfoPanel extends Component {
6566
_openSnapshotModal = () => this.refs.snapshotModal.open()
6667

6768
showUploadFileModal = () => {
69+
const messages = getComponentMessages('FeedInfoPanel')
6870
const {displayRoutesShapefile, feedSource} = this.props
6971
this.refs.selectFileModal.open({
70-
title: 'Upload route shapefile',
71-
body: `Select a zipped shapefile to display on map. Note: this is only for use as a visual aid.`,
72+
title: getMessage(messages, 'uploadShapefile.title'),
73+
body: getMessage(messages, 'uploadShapefile.body'),
7274
onConfirm: (files) => {
7375
const file = files[0]
7476
if (isValidZipFile(file)) {
@@ -78,7 +80,7 @@ export default class FeedInfoPanel extends Component {
7880
return false
7981
}
8082
},
81-
errorMessage: 'Uploaded file must be a valid zip file (.zip).'
83+
errorMessage: getMessage(messages, 'uploadShapefile.error')
8284
})
8385
}
8486

0 commit comments

Comments
 (0)