[whatwg] Localized error messages

dolphinling dolphinling at myrealbox.com
Thu Nov 25 09:06:46 PST 2004


Olav Junker Kjær wrote:
> dolphinling wrote:
>  > WRT the "ugly consequences", if this is aesthetic remember that the
>  > error is coming from the UA, so it's not expected to mesh well with the
>  > page. If it's not aesthetic I'm not sure what you mean.
> 
> No, I was thinking about the consistency of the language in the error 
> description. If one field in a form uses build-in validation, and 
> another uses custom validation, the two error messages would be in two 
> different languages.
> 
> Consider the example error message in section 2.6:
> 
>  > The expected format is: a digit followed by three uppercase letters.
>  > You cannot complete this form until the field is correct.
> 
> Imagine how this would look on a danish page with an english UA:
> 
> : Det forventede format er: et tal efterfulgt af the store bogstaver
> : You cannot complete this form until the field is correct.
> 
> Thats what I call ugly :-)
> 

Hmm... I took "explanatory text saying why the value is currently 
invalid" to mean the UA would explain what the expected format was and 
where it differed from what was given. I realize now though that that 
would be nearly as hard as guessing what language the page was in.

On the other hand, I do think that error message could be a _bit_ more 
explanatory, and something like

: Det forventede format er: et tal efterfulgt af the store bogstaver
: The value you gave does not match the expected pattern.

...really isn't all that bad.

>  > Finally, if the page never says what language it is, how is the UA
>  > supposed to know? That would be a large problem on the majority of 
>  > the web.
> 
> You have a point there. But OTOH this would introduce a practical reason 
> (as distinct from a "semantic" reason) to declare the language of pages, 
> so maybe people would start doing it :-)
> 

It's more than just that, though. What are the chances that the UA 
actually has the required language installed? I know I only have English 
on my computer, so I wouldn't be able to recieve a Danish error message 
anyway.



More information about the whatwg mailing list