-
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
Conversation
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.
thanks for this PR!
I believe we don't really need the translation module in this file, would you consider removing it?
@@ -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')) |
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.
const timeDisplay = timestamp.format(t('time_format')) | |
const timeDisplay = timestamp.format('time_format') |
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.
well, it's weird to find it in the translation file, you're right. it can simply be a constant
[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 comment
The reason will be displayed to describe this comment to others. Learn more.
[PointType.GTFS]: t('timestamp_gtfs'), | |
[PointType.SIRI]: t('timestamp_siri'), | |
[PointType.TARGET]: t('timestamp_target'), | |
[PointType.GTFS]: 'timestamp_gtfs', | |
[PointType.SIRI]: 'timestamp_siri', | |
[PointType.TARGET]: 'timestamp_target', |
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.
@@ -1,4 +1,4 @@ | |||
import { TEXTS } from 'src/resources/texts' | |||
import { t } from 'i18next' |
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.
import { t } from 'i18next' |
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.
b92f91a
to
39c34a4
Compare
@amabelleS please consider this change #321 |
Description
Removed from pointTypeToDescription - Notice - I did
import { t } from 'i18next'
. because I used it in an object, not react component.DELETED texts.ts!