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

Stats: Add singular strings to weekly roundup notification #20608

Merged

Conversation

irfano
Copy link
Member

@irfano irfano commented Apr 8, 2024

Fixes #17824
This fixes using the plural form of "view" and "comment" for singular values on Weekly roundup notifications.

Additionally, this fixes false positive test cases for

  • buildNotifications should not include likes and comments with 0 count
  • buildNotifications should not include likes with 0 count
  • buildNotifications should not include comments with 0 count
  • buildNotifications should include views, likes, and comments greater than zero
    in WeeklyRoundupNotifierTest. Before, it was always checking "mock_string" == "mock_string", which was always true.

To Test:

  1. Log in.
  2. Ensure one of your top 5 sites has 1 like/comment.
  3. Ensure notification permission is allowed.
  4. Open Me → Debug settings.
  5. Tap the menu button at the top right.
  6. Tap "Force show Weekly Roundup notification" button.
  7. Wait for a while, ~30 seconds.
  8. Tap the Weekly Roundup notification received.
  9. Verify that the notification text contains "1 comment" instead of "1 comments" and/or "1 like" instead of "1 likes".

Regression Notes

  1. Potential unintended areas of impact

    • None
  2. What I did to test those areas of impact (or what existing automated tests I relied on)

    • N/A
  3. What automated tests I added (or what prevented me from doing so)

    • Updated WeeklyRoundupNotifierTest.

PR Submission Checklist:

  • I have completed the Regression Notes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

Testing Checklist (strike-out the not-applying and unnecessary ones):

  • WordPress.com sites and self-hosted Jetpack sites.
  • Portrait and landscape orientations.
  • Light and dark modes.
  • Fonts: Larger, smaller and bold text.
  • High contrast.
  • Talkback.
  • Languages with large words or with letters/accents not frequently used in English.
  • Right-to-left languages. (Even if translation isn’t complete, formatting should still respect the right-to-left layout)
  • Large and small screen sizes. (Tablet and smaller phones)
  • Multi-tasking: Split screen and Pop-up view. (Android 10 or higher)

@dangermattic
Copy link
Collaborator

dangermattic commented Apr 8, 2024

1 Warning
⚠️ strings.xml files should only be updated on release branches, when the translations are downloaded by our automation.

Generated by 🚫 Danger

@irfano irfano added this to the 24.7 milestone Apr 8, 2024
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Apr 8, 2024

Jetpack📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack Jetpack
FlavorJalapeno
Build TypeDebug
Versionpr20608-4f2556b
Commit4f2556b
Direct Downloadjetpack-prototype-build-pr20608-4f2556b.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Apr 8, 2024

WordPress📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress WordPress
FlavorJalapeno
Build TypeDebug
Versionpr20608-4f2556b
Commit4f2556b
Direct Downloadwordpress-prototype-build-pr20608-4f2556b.apk
Note: Google Login is not supported on these builds.

Fix StringFormatCount lint error
Copy link

sonarqubecloud bot commented Apr 8, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

codecov bot commented Apr 8, 2024

Codecov Report

Attention: Patch coverage is 69.69697% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 40.39%. Comparing base (b24bac6) to head (4f2556b).

Files Patch % Lines
...oid/workers/weeklyroundup/WeeklyRoundupNotifier.kt 69.69% 6 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            trunk   #20608      +/-   ##
==========================================
- Coverage   40.39%   40.39%   -0.01%     
==========================================
  Files        1474     1474              
  Lines       67906    67920      +14     
  Branches    11226    11231       +5     
==========================================
+ Hits        27433    27438       +5     
- Misses      37994    38000       +6     
- Partials     2479     2482       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@ravishanker ravishanker left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Fixed a lint issue to merge.

@ravishanker ravishanker merged commit d1577bb into trunk Apr 8, 2024
20 checks passed
@ravishanker ravishanker deleted the issue/17824-add-singular-strings-to-weekly-roundup branch April 8, 2024 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Weekly Roundup: Add singular strings to notification
4 participants