-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: removing texts (part 6) #315
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,4 +1,4 @@ | ||||||||||||||
import { TEXTS } from 'src/resources/texts' | ||||||||||||||
import { t } from 'i18next' | ||||||||||||||
import styled from 'styled-components' | ||||||||||||||
import { Moment } from 'moment' | ||||||||||||||
|
||||||||||||||
|
@@ -25,9 +25,9 @@ export const pointTypeToColor: Record<PointType, string> = { | |||||||||||||
|
||||||||||||||
export const pointTypeToDescription: Record<PointType, string | null> = { | ||||||||||||||
[PointType.BOUNDARY]: null, | ||||||||||||||
[PointType.GTFS]: TEXTS.timestamp_gtfs, | ||||||||||||||
[PointType.SIRI]: TEXTS.timestamp_siri, | ||||||||||||||
[PointType.TARGET]: TEXTS.timestamp_target, | ||||||||||||||
[PointType.GTFS]: t('timestamp_gtfs'), | ||||||||||||||
[PointType.SIRI]: t('timestamp_siri'), | ||||||||||||||
[PointType.TARGET]: t('timestamp_target'), | ||||||||||||||
} | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||||||||||
|
||||||||||||||
type PointProps = { | ||||||||||||||
|
@@ -58,7 +58,7 @@ type LabeledPointProps = { | |||||||||||||
} & PointProps | ||||||||||||||
|
||||||||||||||
export const LabeledPoint = ({ timestamp, top, type }: LabeledPointProps) => { | ||||||||||||||
const timeDisplay = timestamp.format(TEXTS.time_format) | ||||||||||||||
const timeDisplay = timestamp.format(t('time_format')) | ||||||||||||||
return ( | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. well, it's weird to find it in the translation file, you're right. it can simply be a constant |
||||||||||||||
<> | ||||||||||||||
<Point top={top} type={type} title={timeDisplay} /> | ||||||||||||||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not remove the i18next modal, because I'm still using it in pointTypeToDescription.