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

Session timeout notification incorrectly says "Days" on iOS #7510

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ShisuiMadara
Copy link

Summary

When session expires, push notification says, “Please log in to continue receiving notifications. Sessions for test are configured to expire every 1 day.” Changed it to say hour.

Ticket Link

Fixes mattermost/mattermost#24112

Checklist

  • Added or updated unit tests (required for all new features)
  • Has UI changes
  • Includes text changes and localization file updates
  • Have tested against the 5 core themes to ensure consistency between them.

Device Information

This PR was tested on:

Screenshots

Release Note


@mattermost-build
Copy link
Contributor

Hello @ShisuiMadara,

Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here.

Per the Mattermost Contribution Guide, we need to add you to the list of approved contributors for the Mattermost project.

Please help complete the Mattermost contribution license agreement?
Once you have signed the CLA, please comment with /check-cla and confirm that the CLA check is green.

This is a standard procedure for many open source projects.

Please let us know if you have any questions.

We are very happy to have you join our growing community! If you're not yet a member, please consider joining our Contributors community channel to meet other contributors and discuss new opportunities with the core team.

Copy link
Contributor

@enahum enahum left a comment

Choose a reason for hiding this comment

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

Lets try and be more logical here and use the option that makes more sense. For example this would also read strange for 720 hours

@enahum
Copy link
Contributor

enahum commented Aug 19, 2023

You will also have to run npm run i18n-extract and make sure that trabslation strungs are updated in en.json

@ShisuiMadara
Copy link
Author

ShisuiMadara commented Aug 20, 2023

@enahum for the hours one, should I write a logic like if the time is greater than 24 hours, we can notify like 1 day and x hours? Similarly for 722 hours it will say something like 30 days and 2 hours

const body = intl.formatMessage({
id: 'mobile.session_expired',
defaultMessage: 'Please log in to continue receiving notifications. Sessions for {siteName} are configured to expire every {daysCount, number} {daysCount, plural, one {day} other {days}}.',
}, {siteName: serverName, daysCount: expiresInDays});
defaultMessage: 'Please log in to continue receiving notifications. Sessions for {siteName} are configured to expire in {daysCount, number} {days} and {hoursCount, number} {hours}.', // Update the message
Copy link
Contributor

Choose a reason for hiding this comment

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

@esethna can you please advice on the message that we should use for hours and days ?

Copy link
Contributor

Choose a reason for hiding this comment

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

We probably also need to remove the whole days part if the number of days is 0.

@enahum enahum requested a review from larkox September 1, 2023 08:27
@enahum enahum added 2: Dev Review Requires review by a core commiter 2: PM Review Requires review by a product manager 3: QA Review Requires review by a QA tester 2: UX Review Requires review by a UX Designer labels Sep 1, 2023
@enahum
Copy link
Contributor

enahum commented Sep 7, 2023

@ShisuiMadara I agree with @larkox when we have 0 days, the days part should not be part of the message. Also you have some tests failing

@mattermost-build
Copy link
Contributor

This PR has been automatically labelled "stale" because it hasn't had recent activity.
A core team member will check in on the status of the PR to help with questions.
Thank you for your contribution!

@enahum
Copy link
Contributor

enahum commented Sep 26, 2023

@ShisuiMadara will you be making the changes suggested?

@ShisuiMadara
Copy link
Author

Sorry @enahum you can assign it to someone else. I was expecting to close this earlier but now my schedule is too busy.

@enahum enahum removed their request for review October 19, 2023 07:46
@enahum
Copy link
Contributor

enahum commented Oct 19, 2023

@larkox can you take over or assign this to you team or HW? as you see fit really...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2: Dev Review Requires review by a core commiter 2: PM Review Requires review by a product manager 2: UX Review Requires review by a UX Designer 3: QA Review Requires review by a QA tester Contributor Lifecycle/1:stale release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Session timeout notification incorrectly says "Days" on iOS
5 participants