Closed Bug 186977 Opened 23 years ago Closed 23 years ago

Message folder pane shows folder size in "MB", but also in "kb" (all lowercase)

Categories

(MailNews Core :: Backend, defect)

defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: durbacher, Assigned: mscott)

Details

Attachments

(2 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3b) Gecko/20021227 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3b) Gecko/20021227 With bug 173825 a message folder size column was introduced to the folder pane. Depending on the size of each folder it shows "kb" or "MB". In that other bug there is no obvious reason why a lowercase "b" is used for the unit "Bytes". So I think this was an accidental slip and it should be changed to "KB". Four reasons why I think this should be changed: - It looks odd (see screenshot I'll attach) - It is the same unit, so why use different case? - "b" is often used for "bits", not bytes, but from the source I see here it means "bytes" - From lxr I see Mozilla always uses "KB" for kilobytes (e.g. in the message pane where the user sees it simultaneously, which is even more confusing...), so it should be used here also, for consistency. (The uppercase "K" (used everywhere else) should be ok here, because it stands for a factor 1024 (as usual): there is a distinction (that at least some make) between "K" for 1024 and (defined by the metric system) "k" for 1000.) Although this bug is visible at the front end, I chose the "back end" component because the affected code seems to be pretty far inside mail. Feel free to change if I'm wrong... Reproducible: Always Steps to Reproduce: 1. Open mail window with some big (> 1 MB) and some small (< 1 MB) message folders visible 2. Make sure the "Size" column is shown in the folder pane (the left one) Actual Results: Folder size is shown in "kb" and "MB". Expected Results: "Folder size should be shown in "KB" and "MB".
Screenshot.
Attached patch patch — — Splinter Review
The problem is in mozilla/mailnews/base/src/nsMsgFolderDataSource.cpp line 1949. This patch should probably fix it. However, I leave it to the ones who wrote the code to decide if this is the right place. Therefore I added bienvenu (who wrote the "kb" code) to the cc: list. (Sorry if this was bad!)
Keywords: patch
the correct abbreviation for "kilo" is "k" (in small caps). for "mega" it is "M" (in caps). So the correct way would be "MB" for megabyte and "kB" for kilobyte
Attachment #110268 - Attachment is obsolete: true
Re comment #3: "k" is used by the metric system , which only defines strictly decimal multipliers which are always written lowercase. See the official SI brochure http://www.bipm.org/pdf/si-brochure.pdf on page 103 (pdf file page 23): "These SI prefixes [...] should not be used to indicate powers of 2" But here the binary multiplier is meant: the factor 1024, exactly one such power of two (also an example on that page). See http://www.ukmetrication.com/pcs.htm for explanation: > Kilobyte (KB or K) = 1024 bytes (2 ^ 10) "binary kilobyte" > kilobyte (kB) = 1000 bytes (10 ^ 3) "decimal kilobyte" At least this is common usage. According to the new IEC standard (IEC 60027-2) binary prefixes should be written "KiB" instead of "KB" for better distinction. This will probably also get the standard "IEEE 1541". But I have never seen that used yet and I'm sure you don't want Mozilla to use it. When I opened this bug I already expected some sort of controversy about it (although "KB" is used everywhere in Mozilla). However, I did not expect my patch being marked as obsolete so fast and without any discussion... I hope you had good reasons to do so.
Sorry about marking your patch as obsolete so quickly :-[ I wanted to offer a new patch with "kB" in it but got caught up in other things. I stand corrected.
Attachment #110268 - Attachment is obsolete: false
Patrick, what's your opinion about this bug now? If you are still opposed to "KB" then please state what you want to do about the rest of Mozilla using it... However, I'm going to request r/sr on this patch, but want first to hear if anybody on the cc list or whoever is opposed to fixing this bug as proposed. "Speak now or forever hold your peace"... :-)
:) I un-obsoleted the patch earlier. Your well-founded rebuttal has completely convinced me. Time for some r&sr.
Comment on attachment 110268 [details] [diff] [review] patch Requesting r= on this trivial one-line fix (only turning two letters to uppercase). Please tell me if sr= is necessary for such a small fix. I'll also need somebody to check this in for me (I can find somebody myself. Should I do so?).
Attachment #110268 - Flags: review?(bienvenu)
Comment on attachment 110268 [details] [diff] [review] patch sure, rs=bienvenu
Attachment #110268 - Flags: superreview+
I can check this in later today
fix checked in.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment on attachment 110268 [details] [diff] [review] patch Thanks!! Removing open r= request because rs= is sufficient. (Hope this is ok.)
Attachment #110268 - Flags: review?(bienvenu)
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: