Skip to content
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

Merged
merged 9 commits into from
Dec 20, 2023

Conversation

binh-dam-ibigroup
Copy link
Collaborator

Checklist

  • Appropriate branch selected (all PRs must first be merged to dev before they can be merged to master)
  • Any modified or new methods or classes have helpful JavaDoc and code is thoroughly commented
  • The description lists all applicable issues this PR seeks to resolve
  • [na] The description lists any configuration setting(s) that differ from the default settings
  • All tests and CI builds passing

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.

Copy link
Contributor

@AdrianaCeric AdrianaCeric left a 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should actually be "FormatJS".

Copy link
Collaborator Author

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

Copy link
Collaborator Author

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)

Copy link
Contributor

@br648 br648 left a 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")
Copy link
Contributor

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.

Copy link
Collaborator Author

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!

@br648 br648 assigned binh-dam-ibigroup and unassigned br648 Dec 20, 2023
@binh-dam-ibigroup binh-dam-ibigroup merged commit b8786a7 into dev Dec 20, 2023
2 checks passed
@binh-dam-ibigroup binh-dam-ibigroup deleted the initial-trip-reminder-with-locale branch December 20, 2023 15:17
@binh-dam-ibigroup binh-dam-ibigroup mentioned this pull request May 23, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants