mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-20 23:58:54 +02:00
gutils: Use no-break space in g_format_size()
It's undesirable for quantity and unit to be separated by line breaks. Fixes https://gitlab.gnome.org/GNOME/glib/issues/1625
This commit is contained in:
committed by
António Fernandes
parent
c33a98f42f
commit
3da40e9036
@@ -2378,36 +2378,60 @@ g_format_size_full (guint64 size,
|
||||
|
||||
const struct Format formats[4][6] = {
|
||||
{
|
||||
{ KILOBYTE_FACTOR, N_("%.1f kB") },
|
||||
{ MEGABYTE_FACTOR, N_("%.1f MB") },
|
||||
{ GIGABYTE_FACTOR, N_("%.1f GB") },
|
||||
{ TERABYTE_FACTOR, N_("%.1f TB") },
|
||||
{ PETABYTE_FACTOR, N_("%.1f PB") },
|
||||
{ EXABYTE_FACTOR, N_("%.1f EB") }
|
||||
/* Translators: Keep the no-break space between %.1f and the unit symbol */
|
||||
{ KILOBYTE_FACTOR, N_("%.1f kB") },
|
||||
/* Translators: Keep the no-break space between %.1f and the unit symbol */
|
||||
{ MEGABYTE_FACTOR, N_("%.1f MB") },
|
||||
/* Translators: Keep the no-break space between %.1f and the unit symbol */
|
||||
{ GIGABYTE_FACTOR, N_("%.1f GB") },
|
||||
/* Translators: Keep the no-break space between %.1f and the unit symbol */
|
||||
{ TERABYTE_FACTOR, N_("%.1f TB") },
|
||||
/* Translators: Keep the no-break space between %.1f and the unit symbol */
|
||||
{ PETABYTE_FACTOR, N_("%.1f PB") },
|
||||
/* Translators: Keep the no-break space between %.1f and the unit symbol */
|
||||
{ EXABYTE_FACTOR, N_("%.1f EB") }
|
||||
},
|
||||
{
|
||||
{ KIBIBYTE_FACTOR, N_("%.1f KiB") },
|
||||
{ MEBIBYTE_FACTOR, N_("%.1f MiB") },
|
||||
{ GIBIBYTE_FACTOR, N_("%.1f GiB") },
|
||||
{ TEBIBYTE_FACTOR, N_("%.1f TiB") },
|
||||
{ PEBIBYTE_FACTOR, N_("%.1f PiB") },
|
||||
{ EXBIBYTE_FACTOR, N_("%.1f EiB") }
|
||||
/* Translators: Keep the no-break space between %.1f and the unit symbol */
|
||||
{ KIBIBYTE_FACTOR, N_("%.1f KiB") },
|
||||
/* Translators: Keep the no-break space between %.1f and the unit symbol */
|
||||
{ MEBIBYTE_FACTOR, N_("%.1f MiB") },
|
||||
/* Translators: Keep the no-break space between %.1f and the unit symbol */
|
||||
{ GIBIBYTE_FACTOR, N_("%.1f GiB") },
|
||||
/* Translators: Keep the no-break space between %.1f and the unit symbol */
|
||||
{ TEBIBYTE_FACTOR, N_("%.1f TiB") },
|
||||
/* Translators: Keep the no-break space between %.1f and the unit symbol */
|
||||
{ PEBIBYTE_FACTOR, N_("%.1f PiB") },
|
||||
/* Translators: Keep the no-break space between %.1f and the unit symbol */
|
||||
{ EXBIBYTE_FACTOR, N_("%.1f EiB") }
|
||||
},
|
||||
{
|
||||
{ KILOBYTE_FACTOR, N_("%.1f kb") },
|
||||
{ MEGABYTE_FACTOR, N_("%.1f Mb") },
|
||||
{ GIGABYTE_FACTOR, N_("%.1f Gb") },
|
||||
{ TERABYTE_FACTOR, N_("%.1f Tb") },
|
||||
{ PETABYTE_FACTOR, N_("%.1f Pb") },
|
||||
{ EXABYTE_FACTOR, N_("%.1f Eb") }
|
||||
/* Translators: Keep the no-break space between %.1f and the unit symbol */
|
||||
{ KILOBYTE_FACTOR, N_("%.1f kb") },
|
||||
/* Translators: Keep the no-break space between %.1f and the unit symbol */
|
||||
{ MEGABYTE_FACTOR, N_("%.1f Mb") },
|
||||
/* Translators: Keep the no-break space between %.1f and the unit symbol */
|
||||
{ GIGABYTE_FACTOR, N_("%.1f Gb") },
|
||||
/* Translators: Keep the no-break space between %.1f and the unit symbol */
|
||||
{ TERABYTE_FACTOR, N_("%.1f Tb") },
|
||||
/* Translators: Keep the no-break space between %.1f and the unit symbol */
|
||||
{ PETABYTE_FACTOR, N_("%.1f Pb") },
|
||||
/* Translators: Keep the no-break space between %.1f and the unit symbol */
|
||||
{ EXABYTE_FACTOR, N_("%.1f Eb") }
|
||||
},
|
||||
{
|
||||
{ KIBIBYTE_FACTOR, N_("%.1f Kib") },
|
||||
{ MEBIBYTE_FACTOR, N_("%.1f Mib") },
|
||||
{ GIBIBYTE_FACTOR, N_("%.1f Gib") },
|
||||
{ TEBIBYTE_FACTOR, N_("%.1f Tib") },
|
||||
{ PEBIBYTE_FACTOR, N_("%.1f Pib") },
|
||||
{ EXBIBYTE_FACTOR, N_("%.1f Eib") }
|
||||
/* Translators: Keep the no-break space between %.1f and the unit symbol */
|
||||
{ KIBIBYTE_FACTOR, N_("%.1f Kib") },
|
||||
/* Translators: Keep the no-break space between %.1f and the unit symbol */
|
||||
{ MEBIBYTE_FACTOR, N_("%.1f Mib") },
|
||||
/* Translators: Keep the no-break space between %.1f and the unit symbol */
|
||||
{ GIBIBYTE_FACTOR, N_("%.1f Gib") },
|
||||
/* Translators: Keep the no-break space between %.1f and the unit symbol */
|
||||
{ TEBIBYTE_FACTOR, N_("%.1f Tib") },
|
||||
/* Translators: Keep the no-break space between %.1f and the unit symbol */
|
||||
{ PEBIBYTE_FACTOR, N_("%.1f Pib") },
|
||||
/* Translators: Keep the no-break space between %.1f and the unit symbol */
|
||||
{ EXBIBYTE_FACTOR, N_("%.1f Eib") }
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user