-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Include input & option descriptions as data in registry #533
Conversation
a266e97
to
b9cbbc6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the general direction. Some comments (mainly editorial).
<option name="timeStyle" values="full long medium short"> | ||
The predefined time formatting style to use. | ||
</option> | ||
<option name="calendar" values="buddhist chinese coptic dangi ethioaa ethiopic gregory hebrew indian islamic islamic-umalqura islamic-tbla islamic-civil islamic-rgsa iso8601 japanese persian roc"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which source did you use for these? We should have a pointer as this list is not likely to be stabilized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know. But once they move from comments to data, we should spend some extra effort on it 😉
<option name="calendar" values="buddhist chinese coptic dangi ethioaa ethiopic gregory hebrew indian islamic islamic-umalqura islamic-tbla islamic-civil islamic-rgsa iso8601 japanese persian roc"> | ||
Calendar to use. | ||
</option> | ||
<option name="numberingSystem" values="arab arabext bali beng deva fullwide gujr guru hanidec khmr knda laoo latn limb mlym mong mymr orya tamldec telu thai tibt"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This list is incomplete? Can we point to CLDR data here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, I didn't change the values, only moved the description from the comment to the the contents.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ibid
<!ATTLIST registry | ||
xml:lang NMTOKEN #IMPLIED | ||
> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added xml:lang
as an optional attribute on the top-level <registry>
, as well as directly on <input>
and <option>
, to indicate the language of the included descriptions.
Should this be required, though? Or are there use cases where a <registry>
could be e.g. embedded in another XML document, where the locale is defined somewhere further up the tree?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should do this differently. Literally in the next tab of the browser I have a PR open on string-meta with best practices. See also this article.
I think we'd be best off here by putting the natural language string descriptions into sub-elements description
which are allowed to vary by xml:lang
. Setting xml:lang="en"
at the registry
element level would allow us to have <description>
without xml:lang
attributes throughout.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Many <desciption>
now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sheep it.
🐑
One rather important consumer of the registry is syntax highlighting. For that use, we should include the descriptions of the inputs and options in the actual registry data, rather than just in the comments. And the element bodies are a rather excellent place for that.