Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internationalization Checklist #184

Closed
Tracked by #177
anssiko opened this issue Feb 7, 2023 · 6 comments
Closed
Tracked by #177

Internationalization Checklist #184

anssiko opened this issue Feb 7, 2023 · 6 comments

Comments

@anssiko
Copy link
Member

anssiko commented Feb 7, 2023

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.

  • If the spec (or its implementation) contains any natural language text that will be read by a human (this includes error messages or other UI text, JSON strings, etc, etc),

The API specification contains two enums whose values are English strings:

enum PressureState { "nominal", "fair", "serious", "critical" };

enum PressureFactor { "thermal", "power-supply" };

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.

  • If the spec (or its implementation) allows content authors to produce typographically appealing text, either in its own right, or in association with graphics.

N/A

  • If the spec (or its implementation) allows the user to point into text, creates text fragments, concatenates text, allows the user to select or step through text (using a cursor or other methods), etc.

N/A

  • If the spec (or its implementation) allows searching or matching of text, including syntax and identifiers

N/A

  • If the spec (or its implementation) sorts text

N/A

  • If the spec (or its implementation) captures user input

N/A

  • If the spec (or its implementation) deals with time in any way that will be read by humans and/or crosses time zone boundaries

N/A

  • If the spec (or its implementation) allows any character encoding other than UTF-8.

N/A

  • If the spec (or its implementation) defines markup.

N/A

  • If the spec (or its implementation) deals with names, addresses, time & date formats, etc

N/A

  • If the spec (or its implementation) describes a format or data that is likely to need localization.

N/A

  • If the spec (or its implementation) makes any reference to or relies on any cultural norms

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.

@anssiko
Copy link
Member Author

anssiko commented Feb 7, 2023

@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.

@anssiko anssiko mentioned this issue Feb 7, 2023
29 tasks
@kenchris
Copy link
Contributor

kenchris commented Feb 7, 2023

This looks correct to me. Who else should review this?

@himorin
Copy link
Contributor

himorin commented Feb 7, 2023

Just personal impression, but first bullet should target DOMString like values but enum. and I agree that checklist is not clear on that point...

@anssiko
Copy link
Member Author

anssiko commented Feb 7, 2023

@kenchris @himorin thank you for your review and comments. Anyone interested in i18n should feel free to chime in here.

@aphillips
Copy link

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).

@anssiko
Copy link
Member Author

anssiko commented Dec 13, 2023

Wide review has been completed as documented in #177. Thank you for your review and contributions.

@anssiko anssiko closed this as completed Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants