w3c / i18n-checker

W3C's i18n checker
https://validator.w3.org/i18n-checker/
Other
36 stars 17 forks source link

Consider merging with html validator #1

Closed r12a closed 8 years ago

r12a commented 8 years ago

This issue is meant to initiate a discussion about whether the i18n checker can be merged with the html validator(s). I'm not sure what's the best approach.

The i18n checker has two main elements:

  1. an information panel that tells you about key i18n info related to your document (including http headers)
  2. a set of checks that produce error, warning or information reports as appropriate, and include explanations with advice about what to do and where to find additional information.

The information panel at https://validator.w3.org/i18n-checker/ is very useful, and is pointed to from many places including many of our i18n educational materials, but the checks that appear below it duplicate some of the checks done by the html validator, and moreover, there are tests that are done by the html validator that it would be useful to replicate in the i18n checker report.

Although I prefer the styling and UI of the current i18n checker, it doesn't seem to make a lot of sense to duplicate the work of writing checks and the messages that accompany them, so i'm thinking that we should probably try to use the same code for both.

On the other hand, i think it can be a nice feature to report only i18n issues, so i'm a little sorry to lose that. I also think it's a shame that validator.nu doesn't distinguish between warnings and info-items like the i18n-checker does.

I'm not keen to have to update both validator and validator.nu, however. Perhaps i'd need to choose just validator.nu to merge with, which would mean dropping support for some of the formats that the i18n checker currently supports.

On the other hand, i'd also want to be able to modify the html validator in order to:

  1. add tests that the i18n checker runs but that the html validator doesn't to the html validator (see our list of current tests at https://www.w3.org/International/quicktips/checker - of course, a number of those are not relevant to HTML5 and would therefore be dropped).
  2. beef up some of the explanatory text in the exisiting reports from the html validator (sometimes to better explain the problem, but probably more often to point to useful resources and indicate what people should do). To get an idea of how things currently differ try the following two links: https://validator.w3.org/i18n-checker/check?uri=https%3A%2F%2Fwww.w3.org%2FInternational%2Ftests%2Frepo%2Fhtml%2Fsyntax%2Fparsing%2Fthe-input-byte-stream%2Fthe-input-byte-stream-018.html#validate-by-uri+ https://validator.w3.org/nu/?doc=https%3A%2F%2Fwww.w3.org%2FInternational%2Ftests%2Frepo%2Fhtml%2Fsyntax%2Fparsing%2Fthe-input-byte-stream%2Fthe-input-byte-stream-018.html (i'm not talking about changing the format of the validator reports, just making sure that additional useful info and links are provided.)

Another question to consider is how to combine the code. It's useful to maintain the URL for the i18n checker and its info table, but there are number of possible scenarios for the reports that follow the info table:

  1. using some kind of tagging perhaps, we identify checks run by the html validator that are i18n related and show the results of only those checks at the i18n checker location.
  2. we show a full html validator output at the i18n check location
  3. perhaps the html validator could be adapted to display the info table if requested by the user either in the UI or in GET. In this case, the URL for the i18n checker would simply run the html validator with the info panel switched on, and there'd be no need for a separate code base.

I'd like to gather opinions about whether this makes any sense (ccing @sideshowbarker to get his pov).

Other factors:

  1. I'm not sure how this affects the Unicorn integration. I guess it might ultimately mean removing the i18n checker from Unicorn.
  2. i don't know how to program in Java, so i don't know whether i'd be able to program the checks and messages as i did for the PHP version of the i18n checker. I could certainly provide a list of checks to perform and the explanatory text and links to go with that, so that someone else could program them, such as at https://www.w3.org/International/quicktips/checker.
r12a commented 8 years ago

Having worked on the i18n checker over the last couple of days, i'm now more inclined to think we should maintain the checker separately from the validator. There are a fair few tests that aren't just validation, or that may provide information that's not relevant for the validator, and there is much more emphasis on education in the checker. Also, the checker has some useful tailoring for pages with doctypes other than just HTML5 that take into account differences for encoding and language declarations. Add to that the usefulness of things mentioned above, such as a split between informational vs warning reports