From kde-devel Sun Jul 12 22:27:35 2009 From: Parker Coates Date: Sun, 12 Jul 2009 22:27:35 +0000 To: kde-devel Subject: Re: How to configure konqueror to show KB and MB instead of KiB and Message-Id: <85d347350907121527q4cb8c9f5o667952396d7940ac () mail ! gmail ! com> X-MARC-Message: https://marc.info/?l=kde-devel&m=124743774124896 On Fri, Jul 10, 2009 at 6:32 AM, Karl Ove Hufthammer wrote: > As a translator of KDE, let me chime in. > > First, I’m very happy to see that KDE (at least Konqueror and Dolphin) has > finally changed to properly labeling the units as KiB, MiB, etc. > > For us translators, this has been a continuing source of frustration. We > wish to provide the correct translations of the units (KiB if it’s a KiB, kB > if it’s a kB, kb if it’s a kb, etc.) as a service to the users, even if the > original strings are incorrect. However, the inconsistent use of the letters > make this very time-consuming, and sometimes very difficult. > > Basically, for every every time we encounter a KB, a kb, or a similar > string, we have to look up the source for the file containing the string, > figure out where the string is used (which may be in a completely different > source file), and what it means (dividing by 1024 or 1024 * 1024 indicates a > KiB and a MiB, respectively). > > How big is this problem? Quite big. Here are just some of the different > strings used in various official KDE apps (I have not included strings for > MiB, GiB, etc.): > > KB > kB > kb > kBytes > kBi > kbit > > Do you know what all of these means? Always? Do the author (frequently not). > Do the user? > > We have a similar issue when the units are used to measure speed or > frequency. I have found all of the following in various KDE apps: > > kbps > Kbps > kbs > kb/s > kB/s > KB/s > kbits/s > kbit/sec > kb/sec > > Each time I have to look up to see if the author meant a 1000 bytes, 1024 > bytes, 1000 bits, 1024 bits, and then provide the correct translation, e.g., > KiB/s or kb/s (which both follow the official SI system for derived units, > where ‘ps’ or ‘/sec’ or ‘/secs’ is never used). > > So, I’d ask the KDE developer to *please* clean up this mess. > > Follow SI consistently. Preferably also use kibi and mebi units instead kilo > and mega units (exceptions where decimal units are ‘standard’ is OK). > > And if possible, please include comments with each string showing that you > have done so (example: ‘Note: MiB = 1024 × 1024 bytes’, ‘Note: b = bit’, > ‘Note: B = byte’, ’Note: kb/s = 1000 bits per second’), so we don’t have to > double-check the source code to ensure the author got it right. I would strongly encourage you to report such inconsistent use of units as bugs. For file/mail/data sizes, the only right solution is to use KLocale::formatByteSize(). Anything else would seem like a bug to me. Maybe to enforce further consistency we should add KLocale::formatByteRate(double bytesPerSecond) for file transfers and such and KLocale::formatBitRate(double bitsPerSecond) for lower level transmission rates. The former should use the same logic as formatByteSize() whatever that turns out to be. The later should probably only use "bit/s" with power of 10 prefixes, because as far as I know that's the only commonly used standard. Parker >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<