-
Notifications
You must be signed in to change notification settings - Fork 61
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
Consider using ITS "Locale Filter" instead of data-lang #76
Comments
we don't actually need step 1, so it comes down to replacing all occurences of the downside is that it takes 2.5 times as long to type the attribute name for a content author, and since these attributes come in pairs, that's 5x the typing for each chunk of data labelled. Plus it makes the code marginally harder to read. In reality, ITS only defines data categories, and the actual names of attributes in the implementation don't have to be the same, just behave in the same way (so eg. in HTML we use the but i guess it makes sense to use the same attribute name as in the ITS standard. One advantage being that it is clearer to people why this attribute is not the same as using the i guess we could try it, and if it's too long we could revert back to |
I had assumed that this would now be implemented at |
i'm waiting for opinions from the group i'm a little worried about the length of |
Strange - I understood during our 1:1 call this week that you would move forward with its-locale-filter-list. |
I tend to agree with Felix. Using the ITS attribute allows ITS processors to understand the file without having to do any mapping, and after all it is just following the W3C's own recommendation. It's also a case different from |
The mapping through script is an afterthought and would have to be used if the right thing could not be done upfront. |
This addresses #76 I will update the script and styling to match in a following commit.
Can we close this issue now? |
Ok to close from my pov. |
Perhaps we should add that we are closing the issue because we implemented the proposal - replacing data-lang with its-locale-filter-list throughout. |
OK. Closing. |
Looking at the data-lang attribute the functionality seems identical to ITS "Locale Filter"
http://www.w3.org/TR/its20/#LocaleFilter
One should consider replacing data-lang with the standardized "Locale Filter" mechanism. This would be relatively easy:
at the top of https://github.com/w3c/clreq/blob/gh-pages/index.html add its-locale-filter-list="*" its-locale-filter-type="exclude"
replace all data-lang attributes with an its-locale-filter-list attribute. Its value is the same like for data-lang
replace in
https://github.com/w3c/clreq/blob/gh-pages/script.js
and in the CSS selectors all selectors for data-lang with a selector for its-locale-filter-list
Note that locale-filter is also understood by the w3c validator, so your document will keep to be valid, see this example
https://validator.w3.org/nu/?doc=http%3A%2F%2Fwww.w3.org%2FTR%2Fits20%2Fexamples%2Fhtml5%2FEX-locale-filter-local-html5-1.html
The text was updated successfully, but these errors were encountered: