-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix negative percent issue on Stats for RTL languages #20656
Fix negative percent issue on Stats for RTL languages #20656
Conversation
📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## trunk #20656 +/- ##
=======================================
Coverage 40.46% 40.47%
=======================================
Files 1485 1485
Lines 68443 68450 +7
Branches 11312 11312
=======================================
+ Hits 27696 27704 +8
+ Misses 38246 38245 -1
Partials 2501 2501 ☔ View full report in Codecov by Sentry. |
Quality Gate passedIssues Measures |
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.
Fixes #17447
When the device language is set to Arabic, numbers with the percentage were being displayed as "%96-". This was the output of
android.icu.text.NumberFormat
function. I couldn't find any documentation related to this issue, but usingjava.text.NumberFormat
resolves it. See the screenshot below:Ignore the inaccurate chart. I manipulated the code to display the negative percentage.
To Test:
Regression Notes
Potential unintended areas of impact
What I did to test those areas of impact (or what existing automated tests I relied on)
What automated tests I added (or what prevented me from doing so)
PercentFormatterTest
.PR Submission Checklist:
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.Large and small screen sizes. (Tablet and smaller phones)Multi-tasking: Split screen and Pop-up view. (Android 10 or higher)