[rfc][icedtea-web] Show cache size in itweb-settings (PR1604)

Jacob Wisor gitne at gmx.de
Fri Dec 6 07:54:04 PST 2013


Andrew Azores wrote:
> On 12/05/2013 06:10 PM, Jacob Wisor wrote:
>> Andrew Azores schrieb:
>>> I thought of that too but it seemed like the unit should be pretty 
>>> universal on these labels. I'm not opposed to moving it into the 
>>> Messages files though.
>>
>> In fact, "MB" is not an internationally acknowledged unit symbol. The 
>> IEC has defined "MiB" for megabyte (2^20 bytes). Btw, "MB" is commonly 
>> rather understood as 10^6 bytes.
> 
> And for the average end user, which unit are they familiar with? Is the 
> average end user going to care so much about the difference between 1 
> MiB and 1 MB, or are they going to see "200 MiB" and go around trying to 
> figure out what a mebibyte is exactly?

What I meant was that if the unit symbol was to be locale agnostic it should 
rather be "MiB" because it is has been agreed upon through the IEC. And in the 
case of choosing "MiB" over a locale specific unit symbol, I just wanted to 
point out that "MiB" also represents a locale agnostic number of bytes by 
definition, whereas a locale specific unit may not. For some locales "MB" may 
correspond to 10^6 bytes, for others maybe 2^20 bytes, or maybe something 
completely different. But, since you have made the unit symbol part of the 
affected message, I am okay with it. Thanks for fixing it.

Nevertheless, different unit symbols in different locales may lead to confusion 
over the actually denoted amount of storage space, e.g. 1,000 would lead to 
1,000 * 2^20 = 1,048,576,000 or 1,000 * 10^6 = 1,000,000,000. This is an offset 
by 48,576,000 bytes or 46.325... MiB. Sure, the average user will probably not 
really care, but admins may do care.

> If other localizations have their 
> own "more colloquial" symbol equivalent to MB, as opposed to MiB, then I 
> would also lean toward having the localizations present those colloquial 
> symbols as well. Presenting information to the end user is useless at 
> best if the information is unintelligible to them. This is the same as 
> the discussion on the message to show to users when running signed vs 
> unsigned applets - telling users that their signed applets would be run 
> with "all Java permissions" is really not as clear or useful to an 
> average end user as "unrestricted access to your data," even if the 
> former is technically more precise.
> 
>> Please read Wikipedia articles on the definition of units of data 
>> storage and their proper writing.
> 
> I am very well aware of the distinction, thank you.
> 
>>
>> If this is going to be fixed, I would rather insist to do it right. 
>> Either the IEC way with proper ISO number formatting or the localized 
>> way with a locale specific unit symbol and number formatting.
>> Omair is right, this has to be done correctly, otherwise it is a waste 
>> of effort because there are still other locale specific data 
>> renderings in IcedTea-Web pending to be fixed.
> 
> What number formatting are you talking about? The cache size slider in 
> question is limited to the range [-1, 1000]. 1000 is displayed as 
> "1,000" if that's along the lines of what you mean.  The formatting and
> display of that number is also not handled by the JLabel or the text put 
> into it read out of the Messages bundles, so I'd say if the slider's 
> presentation is something requiring discussion, it belongs in a new 
> discussion thread.

Yep, just checked it, that number in the JSpinner is rendered to a locale 
specific formatting too. Great! :-) Although its size looks a little bit odd.
But, the number displayed by the JSlider is not rendered to locale specific 
formatting. I did not look up the docs on whether that is configurable. If it's 
not, I wouldn't bother.

Jacob

>>> ----- Original Message -----
>>> From: "Omair Majid" <omajid at redhat.com>
>>> To: "Andrew Azores" <aazores at redhat.com>
>>> Cc: "IcedTea" <distro-pkg-dev at openjdk.java.net>
>>> Sent: Thursday, December 5, 2013 4:00:44 PM
>>> Subject: Re: [rfc][icedtea-web] Show cache size in itweb-settings 
>>> (PR1604)
>>>
>>> Hi,
>>>
>>> * Andrew Azores <aazores at redhat.com> [2013-12-05 15:57]:
>>>> Very very simple patch here. The Temporary Internet Files Panel
>>>> displays a cache size slider, but there's no indication of what
>>>> units are in use here. Evidently it's megabytes, so I've added this
>>>> unit to the label so that it's actually clear how large the cache
>>>> will be allowed to grow.
>>>
>>>> +        JLabel lCacheSize = new 
>>>> JLabel(Translator.R("TIFPCacheSize") + " (MB) :");
>>>
>>> I think it makes more sense to add the '(MB)' string to the localized
>>> text. Not all languages will have (MB) after the cache size string. What
>>> do you think?
>>>
>>> Thanks,
>>> Omair


More information about the distro-pkg-dev mailing list