Re: [w3c/payment-request] Localization and string metadata for descriptions (#948)

I'm going to add w3c/i18n-activity#1359 and w3c/i18n-activity#1357 as additional examples to this issue instead of cluttering your repo with additional specific issues. I've replicated the text of these issues in this comment.

----
14.1.2 PayerErrors dictionary 
https://www.w3.org/TR/2020/CR-payment-request-20201203/#payererrors-dictionary

```
 const payer = {
  email: "The domain is invalid.",
  phone: "Unknown country code.",
  name: "Not in database.",
};
```

Example 13 shows the payer errors dictionary being used to convey unlabeled natural language string values. As noted in other comments, there is no language negotiation scheme in place. There is also no metadata here to help with display.

----

PaymentShippingOption dictionary 
https://www.w3.org/TR/2020/CR-payment-request-20201203/#paymentshippingoption-dictionary

> >  label member
>    A human-readable string description of the item. The user agent SHOULD use this string to display the shipping option to the user. 

The `label` member has no language or direction metadata. Further, it cannot be localized by providing reference to a multilingual construct of some sort. There doesn't appear to be a language negotiation mechanism so that a language can be requested.

The SHOULD might be problematic vs. allowing the user agent to wrap the provided display string with a localized value, i.e. it could say something approximately like:

> The user agent SHOULD use this string (or a localized version available to the user agent locally) to display the shipping option to the user.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/payment-request/issues/948#issuecomment-811212807

Received on Wednesday, 31 March 2021 16:29:39 UTC