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

Add additional definitions of 'string' (w3c/i18n-actions#41) #117

Merged
merged 22 commits into from
Oct 19, 2023

Conversation

aphillips
Copy link
Contributor

@aphillips aphillips commented Sep 18, 2023

The working group discussed this in teleconference on 2023-09-21 and decided to rewrite this section to address our concerns.


There are multiple sources for the term 'string', including WEBIDL,
INFRA, Unicode, and XML Schema. In our discussions with RDF-star,
we have found that there is a need for generic string definitions
for use by JSON, Schema.org, RDF, and XML-based specs which are not
consistent with DOMString/USVString.

This PR needs to be accompanied by changes to the I18N-GLOSSARY in order
to be complete. This PR is for initial discussion purposes before we
embark on those changes.

Mentioning w3ctag/design-principles#454 because that issue tracks our coordination with TAG


Preview | Diff

aphillips and others added 2 commits September 18, 2023 15:39
There are multiple sources for the term 'string', including WEBIDL,
INFRA, Unicode, and XML Schema. In our discussions with RDF-star,
we have found that there is a need for generic string definitions
for use by JSON, Schema.org, RDF, and XML-based specs which are not
consistent with DOMString/USVString.

This PR needs to be accompanied by changes to the I18N-GLOSSARY in order
to be complete. This PR is for initial discussion purposes before we
embark on those changes.
@netlify
Copy link

netlify bot commented Sep 18, 2023

Deploy Preview for bp-i18n-specdev ready!

Name Link
🔨 Latest commit 6563800
🔍 Latest deploy log https://app.netlify.com/sites/bp-i18n-specdev/deploys/653147bea4e2b90008ae022b
😎 Deploy Preview https://deploy-preview-117--bp-i18n-specdev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@aphillips aphillips requested review from xfq and r12a September 18, 2023 22:43
index.html Outdated

<p>The best practices found in this section are mutually consistent with those in [[DESIGN-PRINCIPLES]]. The definitions in this section use terms found in the <cite>Internationalization Glossary</cite> [[I18N-GLOSSARY]]. Some of these definitions are taken directly from [[WEBIDL]], [[INFRA]], or the Unicode glossary; in which case the definitions are quoted verbatim and include links to their source. Please refer to instructions in the Internationalization Glossary for how to import and link definitions in your own specification.</p>

<p>[[UNICODE]] forms the basis for text on the Web, so the basic definition of a string is: <em>a well-formed sequence of zero or more <a>Unicode Scalar Values</a></em>. Because the term 'string' is ambiguous, this definition can be more specifically referred to using one of these definitions:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And CSS specifications can refer to the definition in https://www.w3.org/TR/css-values-4/#strings ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And some specs refer to RFC 3629 directly, not sure if that's something we want to recommend, though: https://w3c.github.io/IFT/Overview.html#primitives

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3629 is the (IETF) definition of UTF-8, not string.

CSS's definition is weird, since it appears to be a USVString but points to Infra's (DOMString) definition of string.

I don't think our set of references needs to be exhaustive and fewer references is actually better for our customers.

index.html Outdated Show resolved Hide resolved
aphillips and others added 5 commits September 26, 2023 07:22
This change significantly reorganizes the section on strings in hopes
of making the definitions clearer and to reduce the overall
repetitive nature of the text.

It also moves the text about design-principles to a note at the top,
rather than burying it in the text.

The relationship of DOMString and USVString to surrogates is clarified
and pulled into one place.
- Move inline style to local.css
- fix lint-ignore on string definition
- link to webidl definitions as needed
- add a note about why you want DOMString when specifying bytes on the
  wire
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
- Fix links to DOMString and USVString to use WebIDL markup
- Rephrase the sentence about UTF-8's relationship to surrogate code
  points.
We have a general practice of putting the best practice text
before the explanation of the BP so that users linking into
specdev can read below the best practice rather than having
to scroll up and start the section over.

This change moves the string definition guidance ahead of all
of the text about string types.
- Change the MUSTard to recommend USVString first.
- Split the MUSTard into two BPs
- Add a missing link around one instance of `USVString`
- Add an issue that includes a link to w3ctag/design-principles#454 and
  appropriately scary sounding text.
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
@aphillips aphillips requested a review from r12a October 13, 2023 16:57
@aphillips aphillips merged commit 8571869 into w3c:gh-pages Oct 19, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants