-
Notifications
You must be signed in to change notification settings - Fork 2
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
Localized trip times in notifications #201
Conversation
…using the user's locale.
…ip notifications.
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.
Tests pass; good catch on this one!
Arguments.of("es", "17:44"), | ||
Arguments.of("ko", "오후 5:44"), | ||
Arguments.of("vi", "17:44"), | ||
Arguments.of("zh", "下午5:44"), // Note: formatjs shows 24-hour format for Chinese. |
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.
Arguments.of("zh", "下午5:44"), // Note: formatjs shows 24-hour format for Chinese. | |
Arguments.of("zh", "下午5:44"), // Note: format.js shows 24-hour format for Chinese. |
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.
Should actually be "FormatJS".
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.
Heck, idk. They have all three spellings on a single page - header, intro paragraph, and copyright: https://formatjs.io/docs/getting-started/installation
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.
"Format.JS" it is (6d0b495)
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.
Just one comment on a param I think is now redundant. Apart from that, all good.
@@ -41,9 +43,6 @@ private DateTimeUtils() { | |||
public static final DateTimeFormatter DEFAULT_DATE_FORMATTER = DateTimeFormatter.ofPattern( | |||
DEFAULT_DATE_FORMAT_PATTERN | |||
); | |||
public static final DateTimeFormatter NOTIFICATION_TIME_FORMATTER = DateTimeFormatter.ofPattern( | |||
ConfigUtils.getConfigPropertyAsText("NOTIFICATION_TIME_FORMAT", "HH:mm") |
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.
Can "NOTIFICATION_TIME_FORMAT" now be removed from env.yml.tmp, env.schema.json and README.md? It doesn't appear to be used anywhere else.
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.
Removed in 8811f9f, thanks for reminding me of these places!
Checklist
dev
before they can be merged tomaster
)Description
This PR fixes the initial reminder to use the itinerary start time (and not
trip.tripTime
)and updates trip notification contents with localized times (e.g. "5:44 PM" vs. "17:44").
There are no other changes to trip notification contents.