Stats: Make suffixes use the US/Canada/Modern British version#10737
Merged
shiki merged 2 commits intowordpress-mobile:developfrom Nov 6, 2019
Conversation
shiki
approved these changes
Nov 6, 2019
Contributor
shiki
left a comment
There was a problem hiding this comment.
Thank you, @hafizrahman! LGTM! 🎉
|
😆 @ Qa/Qi. That'll be something if I ever see those numbers. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #10709
Now for a bit of word nerdery.
"k", "M", "B", and "T" are relatively well-known as suffixes for those numbers, but while working on this I found the last two numbers, quadrillion and quintillion, to be quite tricky.
As far as I can research, there are no standardized suffixes for these two numbers yet. Some examples from gaming websites and Stack Overflow use either the pair of "q" and "Q", or "Qa" and "Qi". I adopted the latter here since they feel more obvious and easily understandable.
This is also likely not something most users will encounter anyway, since these numbers are quite high, so we probably don't need to worry too much about it now. Once the majority of WordPress sites are successful enough to pull these sort of numbers, it will then be a good problem to have and revisit :)
Lastly, it pains me a bit that the suffixes is now made to be based on the US/Canada/Modern British version, but at least it feels more natural now. I hope that in the future we can refactor this into translatable strings instead.
PR submission checklist:
I have considered adding unit tests where possible.
I have considered if this change warrants user-facing release notes and have added them to
RELEASE-NOTES.txtif necessary.