Add a translator comment about 'KB'

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
This commit is contained in:
Ryan Lortie 2012-11-05 08:24:30 -05:00
parent 2b17e797a4
commit 81b27ffc1c

View File

@ -2321,6 +2321,11 @@ g_format_size_for_display (goffset size)
if (size < (goffset) MEBIBYTE_FACTOR) if (size < (goffset) MEBIBYTE_FACTOR)
{ {
displayed_size = (gdouble) size / (gdouble) KIBIBYTE_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); return g_strdup_printf (_("%.1f KB"), displayed_size);
} }
else if (size < (goffset) GIBIBYTE_FACTOR) else if (size < (goffset) GIBIBYTE_FACTOR)