Add a translator comment about 'KB'
authorRyan Lortie <desrt@desrt.ca>
Mon, 5 Nov 2012 13:24:30 +0000 (08:24 -0500)
committerRyan Lortie <desrt@desrt.ca>
Mon, 5 Nov 2012 13:24:30 +0000 (08:24 -0500)
The GLib units policy used to be that 'KB' means 1024 bytes, 'MB' means
1024 KB, 'GB' means 1024 MB, etc.

Those days are over, but we have a deprecated function that still works
that way.  It contains the string "KB", marked for translation, which
has been a source of confusion for translators on multiple occasions.

https://bugzilla.gnome.org/show_bug.cgi?id=687516

glib/gutils.c

index 747e5b24da84c75dfd1fffc8a093e4397db5341c..9eb57c519a92ff6eba5ea36bf9358f77bfc8f441 100644 (file)
@@ -2321,6 +2321,11 @@ g_format_size_for_display (goffset size)
       if (size < (goffset) MEBIBYTE_FACTOR)
         {
           displayed_size = (gdouble) size / (gdouble) KIBIBYTE_FACTOR;
+          /* Translators: this is from the deprecated function g_format_size_for_display() which uses 'KB' to
+           * mean 1024 bytes.  I am aware that 'KB' is not correct, but it has been preserved for reasons of
+           * compatibility.  Users will not see this string unless a program is using this deprecated function.
+           * Please translate as literally as possible.
+           */
           return g_strdup_printf (_("%.1f KB"), displayed_size);
         }
       else if (size < (goffset) GIBIBYTE_FACTOR)