Include input & option descriptions as data in registry#533
Include input & option descriptions as data in registry#533aphillips merged 5 commits intounicode-org:mainfrom
Conversation
a266e97 to
b9cbbc6
Compare
aphillips
left a comment
There was a problem hiding this comment.
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.
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.
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.
This list is incomplete? Can we point to CLDR data here?
There was a problem hiding this comment.
Again, I didn't change the values, only moved the description from the comment to the the contents.
| <!ATTLIST registry | ||
| xml:lang NMTOKEN #IMPLIED | ||
| > |
There was a problem hiding this comment.
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.
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.
Done. Many <desciption> now.
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.