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

Need improved localization of numeric abbreviations #584

Closed
3 tasks
mindgraffiti opened this issue Jan 10, 2019 · 3 comments
Closed
3 tasks

Need improved localization of numeric abbreviations #584

mindgraffiti opened this issue Jan 10, 2019 · 3 comments
Labels
category: architecture Related to architecture such as the database, FluxC, Networking, Core Data, etc. category: i18n Related to localization/internationalization. category: tracks Related to analytics, including Tracks Events. type: task An internally driven task.

Comments

@mindgraffiti
Copy link
Contributor

mindgraffiti commented Jan 10, 2019

Internal ref: p99K0U-SE-p2

For some places in the UI, we truncate the sales amount and use an abbreviation. For the US, these are k (thousands), m (millions), and b (billions) respectively. When I searched Stack Overflow, I found this discussion, suggesting the use of k, M, G, (because metric measurements are common) but no code samples or libraries on how this has been handled previously were listed in the discussion.

We might be able to adopt a similar approach as this GitHub project https://github.com/WizardMac/DSShortNumberFormatter.

WCAndroid has previously encountered this issue as well and did not find an immediate solution.

To Do

  • Research: are there any existing libraries or framework we could use?
  • What kind of time requirement would be needed for building our own?
  • Timebox and experiment with writing some sample code to test feasibility

Android issue tracking: woocommerce/woocommerce-android#671

@mindgraffiti mindgraffiti changed the title Spike: Research and estimate time to build a Numeric Abbreviation Localization library Spike: a Numeric Abbreviation Localization library Jan 10, 2019
@mindgraffiti mindgraffiti added category: architecture Related to architecture such as the database, FluxC, Networking, Core Data, etc. category: i18n Related to localization/internationalization. labels Jan 10, 2019
@mindgraffiti mindgraffiti added this to the Future milestone Jan 10, 2019
@bummytime
Copy link
Member

@ctarda had some good points on the way numbers are truncated in Asian languages which we should also consider.

@bummytime bummytime changed the title Spike: a Numeric Abbreviation Localization library Need improved localization of numeric abbreviations Feb 12, 2019
@bummytime
Copy link
Member

It's also worth mentioning that we need to consider how changing this abbreviation logic would work given the way we formatting currency based on the WC site settings.

Example: user is physically located in Western Europe, but their WC site is setup using US settings:

screen shot 2019-02-12 at 9 32 55 am

How do we resolve this?

@astralbodies
Copy link
Contributor

We've removed abbreviations/rounding from the app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: architecture Related to architecture such as the database, FluxC, Networking, Core Data, etc. category: i18n Related to localization/internationalization. category: tracks Related to analytics, including Tracks Events. type: task An internally driven task.
Projects
None yet
Development

No branches or pull requests

5 participants