Closed anssiko closed 11 months ago
@kenchris please review together with relevant parties and suggest changes as appropriate. We will refer to this issue when we submit the i18n review request.
This is tracked as part of the wide review #177 for this API.
This looks correct to me. Who else should review this?
Just personal impression, but first bullet should target DOMString like values but enum. and I agree that checklist is not clear on that point...
@kenchris @himorin thank you for your review and comments. Anyone interested in i18n should feel free to chime in here.
The API specification contains two enums whose values are English strings:
Enum values should not be considered "natural language strings". Yes, they generally use English language words as identifiers, but they are not intended for end-users to view nor are they free-form text values. Developers are expected to read the definition backing the keywords in enumerated values (the description of which can be localized). In fact, it is a best practice to define values in a locale-neutral way and wrap that with display strings (exactly as you go on to suggest).
Wide review has been completed as documented in #177. Thank you for your review and contributions.
This issue is a record of the Devices and Sensors Working Group's response to the Internationalization Checklist for the Compute Pressure API. Completed Checklist is required for the submission of the Internationalization review, one of the wide reviews tracked in #177.
The API specification contains two enums whose values are English strings:
The semantics of these strings are defined in the specification: https://www.w3.org/TR/compute-pressure/#dom-pressurestate https://www.w3.org/TR/compute-pressure/#dom-pressurefactor
These strings are only read by web developers and are not meant to be surfaces to the end user as is. In rare use cases where the state or pressure factor information is essential to be exposed to the end user (e.g. to aid debugging), web apps are expected to map these strings to language-aware strings as appropriate.
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
Summary
Only consideration that applies is "If the spec (or its implementation) contains any natural language". This is an implementation detail in mainstream use cases.