PaymentRequest should format currency as "AUD $5.00" regardless of device location |
||||
Issue description
Chrome Version : 60.0.3100.0
What steps will reproduce the problem?
1. Call `new PaymentRequest([{supportedMethods: ['basic-card']}], {total: {label: 'Tots', amount: {currency: 'AUD', value: '5.00'}}}).show();`
What is the expected result?
Currency should be formatted "AUD $5.00".
What happens instead of that?
Currency is formated as "AUD A$5.00".
Please provide any additional information below. Attach a screenshot if
possible.
UserAgentString: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3100.0 Safari/537.36
Need to strip the longest matching prefix of the currency code (AUD) from the currency symbol (A$).
,
May 18 2017
Thanks, you're right!
,
May 18 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/fb2b1a4cf89b8912e9a0dc7e718ccef161d4fce4 commit fb2b1a4cf89b8912e9a0dc7e718ccef161d4fce4 Author: Mathieu Perreault <mathp@chromium.org> Date: Thu May 18 22:45:26 2017 [Currency] Trim the 1-letter version of the currency code Callers are expected to show the currency code next to the amount, so strip all variations of the currency code from the output, when possible. Bug: 724150 Test: components_unittests Change-Id: I4cbe59f710df0375785cf10068b343d00cc2cc29 Reviewed-on: https://chromium-review.googlesource.com/508222 Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org> Commit-Queue: Mathieu Perreault <mathp@chromium.org> Cr-Commit-Position: refs/heads/master@{#472958} [modify] https://crrev.com/fb2b1a4cf89b8912e9a0dc7e718ccef161d4fce4/components/payments/core/currency_formatter.cc [modify] https://crrev.com/fb2b1a4cf89b8912e9a0dc7e718ccef161d4fce4/components/payments/core/currency_formatter_unittest.cc
,
May 18 2017
,
Jun 27 2017
|
||||
►
Sign in to add a comment |
||||
Comment 1 by rouslan@chromium.org
, May 18 2017