Currency formatting is only handled for Android right now (using java.util.Currency). We should build a cross-platform system.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6758be03e71c7423fb1b43dc267049ebc4ceaf27 commit 6758be03e71c7423fb1b43dc267049ebc4ceaf27 Author: mathp <mathp@chromium.org> Date: Fri Jan 13 04:49:50 2017 [Payments] Currency formatter for order amounts. Uses ICU. This change also enables using it on the Desktop implementation. A followup will enable it on Android. BUG= 679797 TEST=CurrencyFormatterTest, LANGUAGE=fr_CA ./out/Default/chrome Review-Url: https://codereview.chromium.org/2621033003 Cr-Commit-Position: refs/heads/master@{#443493} [modify] https://crrev.com/6758be03e71c7423fb1b43dc267049ebc4ceaf27/chrome/browser/ui/BUILD.gn [modify] https://crrev.com/6758be03e71c7423fb1b43dc267049ebc4ceaf27/chrome/browser/ui/views/payments/order_summary_view_controller.cc [modify] https://crrev.com/6758be03e71c7423fb1b43dc267049ebc4ceaf27/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc [modify] https://crrev.com/6758be03e71c7423fb1b43dc267049ebc4ceaf27/components/payments/BUILD.gn [add] https://crrev.com/6758be03e71c7423fb1b43dc267049ebc4ceaf27/components/payments/currency_formatter.cc [add] https://crrev.com/6758be03e71c7423fb1b43dc267049ebc4ceaf27/components/payments/currency_formatter.h [add] https://crrev.com/6758be03e71c7423fb1b43dc267049ebc4ceaf27/components/payments/currency_formatter_unittest.cc [modify] https://crrev.com/6758be03e71c7423fb1b43dc267049ebc4ceaf27/components/payments/payment_request.cc [modify] https://crrev.com/6758be03e71c7423fb1b43dc267049ebc4ceaf27/components/payments/payment_request.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/94af7a6d022fc5368503a8c47480d012617376f3 commit 94af7a6d022fc5368503a8c47480d012617376f3 Author: mathp <mathp@chromium.org> Date: Sat Jan 14 11:10:05 2017 [Payment Request] Update the CurrencyStringFormatter to call the native impl. Uses components/payments/currency_formatter.h by way of a JNI bridge. Had to get rid of the junit tests because the implementation now require the native libraries to be loaded. BUG= 679797 TEST=CurrencyStringFormatterTest, manual Review-Url: https://codereview.chromium.org/2629883004 Cr-Commit-Position: refs/heads/master@{#443797} [add] https://crrev.com/94af7a6d022fc5368503a8c47480d012617376f3/chrome/android/java/src/org/chromium/chrome/browser/payments/CurrencyFormatter.java [delete] https://crrev.com/8c47492479edb7e7f9c1519e6366ca846f166dac/chrome/android/java/src/org/chromium/chrome/browser/payments/CurrencyStringFormatter.java [modify] https://crrev.com/94af7a6d022fc5368503a8c47480d012617376f3/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java [modify] https://crrev.com/94af7a6d022fc5368503a8c47480d012617376f3/chrome/android/java_sources.gni [add] https://crrev.com/94af7a6d022fc5368503a8c47480d012617376f3/chrome/android/javatests/src/org/chromium/chrome/browser/payments/CurrencyFormatterTest.java [delete] https://crrev.com/8c47492479edb7e7f9c1519e6366ca846f166dac/chrome/android/javatests/src/org/chromium/chrome/browser/payments/CurrencyStringFormatterTest.java [delete] https://crrev.com/8c47492479edb7e7f9c1519e6366ca846f166dac/chrome/android/junit/src/org/chromium/chrome/browser/payments/CurrencyStringFormatterUnitTest.java [modify] https://crrev.com/94af7a6d022fc5368503a8c47480d012617376f3/chrome/browser/android/chrome_jni_registrar.cc [modify] https://crrev.com/94af7a6d022fc5368503a8c47480d012617376f3/components/payments/android/BUILD.gn [add] https://crrev.com/94af7a6d022fc5368503a8c47480d012617376f3/components/payments/android/currency_formatter_android.cc [add] https://crrev.com/94af7a6d022fc5368503a8c47480d012617376f3/components/payments/android/currency_formatter_android.h [modify] https://crrev.com/94af7a6d022fc5368503a8c47480d012617376f3/components/payments/currency_formatter.cc [modify] https://crrev.com/94af7a6d022fc5368503a8c47480d012617376f3/components/payments/currency_formatter.h [modify] https://crrev.com/94af7a6d022fc5368503a8c47480d012617376f3/components/payments/currency_formatter_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6530e608480f9fae46b7ae5668636cce2d57814b commit 6530e608480f9fae46b7ae5668636cce2d57814b Author: mathp <mathp@chromium.org> Date: Tue Jan 17 19:22:03 2017 [Payments] Use formatter currency code on desktop Also fix the currency_system mojo definition to be normal_case. BUG= 680803 , 679797 TEST=existing Review-Url: https://codereview.chromium.org/2637603002 Cr-Commit-Position: refs/heads/master@{#444106} [modify] https://crrev.com/6530e608480f9fae46b7ae5668636cce2d57814b/chrome/android/java/src/org/chromium/chrome/browser/payments/CurrencyFormatter.java [modify] https://crrev.com/6530e608480f9fae46b7ae5668636cce2d57814b/chrome/browser/ui/views/payments/order_summary_view_controller.cc [modify] https://crrev.com/6530e608480f9fae46b7ae5668636cce2d57814b/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc [modify] https://crrev.com/6530e608480f9fae46b7ae5668636cce2d57814b/components/payments/payment_details_validation.cc [modify] https://crrev.com/6530e608480f9fae46b7ae5668636cce2d57814b/components/payments/payment_request.mojom [modify] https://crrev.com/6530e608480f9fae46b7ae5668636cce2d57814b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
Comment 1 by bugdroid1@chromium.org
, Jan 13 2017