w3c / payment-request

Payment Request API
https://www.w3.org/TR/payment-request-1.1/
Other
482 stars 183 forks source link

Editorial: use unicode name/code for currencies in note #942

Closed marcoscaceres closed 3 years ago

marcoscaceres commented 3 years ago

Begins to address https://github.com/w3c/i18n-activity/issues/1044


Preview | Diff

marcoscaceres commented 3 years ago

Browsers MAY display a currency symbol instead of a currency code.

We probably don't want to recommend this at all.

QUESTION: Should they only do that when there is ambiguity?

No, they SHOULD always do it - otherwise it would get really confusing.

QUESTION: Should they not display the currency symbol at all, or should they display the currency code along with the symbol?

That's a call for UX team - and it may be locale dependent. Thus, it's not our (the WG's/Spec's) call. We can only point out what the pitfalls are (the note).

The additional note seems good. I'll update.

marcoscaceres commented 3 years ago

The additional note seems good. I'll update.

Never mind :) it's the same.

marcoscaceres commented 3 years ago

Browsers that display the 3-letter currency codes generally do so using uppercase.

Note that we only say that the canonical form as it relates to the currency member. We don't say anything about how it should be shown: that's a UA/OS decision, not a spec decision.

marcoscaceres commented 3 years ago

@ianbjacobs, rereading you comments, and questions aside, I think the updated prose addresses your comments... or at least, can you help me understand more specifically where it doesn't.

I think there might be a misunderstanding in that there are no "ISO4217 and non-ISO sections." Let me clarify: any three letter combination is valid irrespective of ISO4217, as isWellFormedCurrencyCode doesn't care if a currency code is ISO4217 or not. Thus, saying "{"currency": "XXX"}" or "{"currency": "XBT"}" for that matter is totally valid, even though it's not part of ISO4217.

ianbjacobs commented 3 years ago

Hi @marcoscaceres,

At the 15 April 2021 WPWG call it was suggested to add an example of a 2-character currency symbol (just to make the point that not all currency symbols are single Unicode characters). One suggestion was to use PLN / zł.

A concrete editorial proposal is to change

(e.g., "USD" is shown as U+0024 Dollar Sign ($), "GBP" is U+00A3 Pound Sign (£), and the non-standard "XBT" could be shown as U+0243 Latin Capital Letter B with Stroke (Ƀ)).

to

(e.g., "USD" is shown as U+0024 Dollar Sign ($), "GBP" is shown as U+00A3 Pound Sign (£), "PLN" is shown as U+007A U+0142 Złoty (zł), and the non-standard "XBT" could be shown as U+0243 Latin Capital Letter B with Stroke (Ƀ)).

cc @aphillips, @r12a

marcoscaceres commented 3 years ago

Updated spec to include Złoty.