-
Notifications
You must be signed in to change notification settings - Fork 135
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
[Tracks] Use invariant locale when converting stat names from the enum types #12987
Conversation
Generated by 🚫 Danger |
📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.
|
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.
Change makes sense and works as expected. Great job at catching this issue @hichamboushaba.
Out of curiosity. I wonder if instead of relying on Locale.ROOT we could rely better on Locale.ENGLISH
since all tracking event names are in English
I don't have a strong opinion about this, but personally I feel that |
Closes: #12986
Description
This PR fixes an issue where some Tracks events are ignored when using Turkish language, when an event uses an
i
character, the cause is that we were using the deviceLocale
when lowercasing from the enum name, but we should be using the invariant locale here.Steps to reproduce
Testing information
Check logcat and confirm that no
EventNameException
is thrown.The tests that have been performed
^
RELEASE-NOTES.txt
if necessary. Use the "[Internal]" label for non-user-facing changes.Reviewer (or Author, in the case of optional code reviews):
Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement: