[whatwg] <progress> draft

Le 2006-03-28 ? 16:07, Ian Hickson a ?crit :

> Currently, this:
>
>    <meter value="0.25">400k / 16,000k</meter>
>
> ...will show a 25% meter, and this:
>
>    <meter>400k / 16,000k</meter>
>
> ...will show a 2.5% meter.
>
> Assuming you meant 2.5%, I think that's a great example of why in  
> fact not
> requiring the attribute is a good thing.

The attribute may be of a standardized format, but the content ought  
to be localizable, shouldn't it?

If so, number formats varies around the world, how should these be  
handled?

     <meter>12.20 / 3,000.00</meter>
     <meter>12,20 / 3 000,00</meter>
     <meter>12,20 / 3.000,00</meter>

I don't think it is possible to extract localized numbers reliably  
without knowing the locale first, and you may not want the browser  
trying to be that *clever* either.

See <http://en.wikipedia.org/wiki/Decimal_separator> for some more  
formats.

All this means that if someone relies on setting the content in a web  
application to set the value and maximum, when later the application  
is internationalized the meter will misbehave until you add the  
attribute. It will misbehave but only when having thousand separators  
or decimal values -- any such error may be left unnoticed easily.


Michel Fortin
michel.fortin at michelf.com
http://www.michelf.com/

Received on Tuesday, 28 March 2006 15:32:11 UTC