-
Notifications
You must be signed in to change notification settings - Fork 345
Description
Short i18n review checklist is here
This review is for both WebGPU and WGSL since WGSL is a companion language to the WebGPU API.
-
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 WebGPU API contains several
DOMStringthat are reasonably expected to be surfaced to a human:
-
GPUCompilationMessage.message which is a compiler message from the WGSL compiler.
-
GPUDeviceLostInfo.message that may describe in human-readable language the reason why the GPU was lost (it was disconnect, timed out, etc).
-
GPUValidationError.message which describe in human-readable language what error happened (similarly to
DOMException.message, see the explainer for why it is different) -
GPUCompilationMessage points at a location in a user-provided string by line number, position on the line, string offset, and length.
-
The WebGPU adapter identifier, depending on the resolution surrounding the GPU Adapter Identifier discussions. The information surfaced to the user may contain the GPU's vendor name, chip name, or other information.
The expectation is to use "first-strong" augmented with Unicode markers if need be. The implementations will have to decide when to add the markers.
-
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 WebGPU/WGSL doesn't allow producing text (unless Javascript uses WebGPU to draw text, but that's not decidable at the WebGPU level)
-
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 WebGPU/WGSL doesn't allow working with text.
-
If the spec (or its implementation) allows searching or matching of text, including syntax and identifiers
WebGPU has an associated shading language, WGSL. WGSL allows any Unicode in comments and UAX31 XID_Start and XID_Continue in identifiers. Identifiers in the WGSL store and compare by their code points and not through UAX15 equivalences such as canonical or compatibility. But where relevant, including places within WebGPU API, user agents are strongly encouraged to display a developer-visible warning when there are non-reader-visible code point differences, such as non-normalized code point sequences.
WGSL and WGSL identifiers are relevant inside parsing of WGSL, as well as in the WebGPU API GPUShaderModuleDescriptor.code/sourceMap/hints and GPUProgrammableStage.entryPoint/constants members. -
If the spec (or its implementation) sorts text
N/A WebGPU doesn't sort text.
-
If the spec (or its implementation) captures user input
N/A WebGPU doesn't capture user input.
-
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 WebGPU only deals with time in the timestamp queries, and they return nanosecond timestamps that are not related to any particular origin (it may be Unix epoch, or since the computer was booted, or the GPU booted, or anything else).
-
If the spec (or its implementation) allows any character encoding other than UTF-8.
WGSL source code is specified in GPUShaderModuleDescriptor.code as
USVString. WGSL uses UTF-8 encoding and only disallows the null character. Comments can contain any Unicode character, and identifiers can contain XID_Start or_low line at first character and XID_Continue for the rest from UAX31, which is the Unicode recommendation for Identifiers.All other strings (labels, debug group names, entry point names, etc) are developer-defined strings.
-
If the spec (or its implementation) defines markup.
N/A WebGPU doesn't define markup.
-
If the spec (or its implementation) deals with names, addresses, time & date formats, etc
N/A WebGPU doesn't deal with such information.
-
If the spec (or its implementation) describes a format or data that is likely to need localization.
N/A WebGPU doesn't define a format other than WGSL.
-
If the spec (or its implementation) makes any reference to or relies on any cultural norms
N/A WebGPU doesn't reference cultural norms (as far as we know).