ethernet: Add thousands separator to speed

Increases readability for speeds >= 1000 Mb/s.

Fixes #2804
This commit is contained in:
velsinki 2024-01-06 01:20:36 +01:00 committed by Felipe Borges
parent d1e31430a1
commit b76d6d0d00

View file

@ -213,8 +213,9 @@ device_ethernet_refresh_ui (NetDeviceEthernet *self)
if (state != NM_DEVICE_STATE_UNAVAILABLE) { if (state != NM_DEVICE_STATE_UNAVAILABLE) {
guint speed = nm_device_ethernet_get_speed (NM_DEVICE_ETHERNET (self->device)); guint speed = nm_device_ethernet_get_speed (NM_DEVICE_ETHERNET (self->device));
if (speed > 0) { if (speed > 0) {
/* Translators: network device speed */ /* Translators: the %'d is replaced by the network device speed with
speed_text = g_strdup_printf (_("%d Mb/s"), speed); * thousands separator, so do not change to %d */
speed_text = g_strdup_printf (_("%'d Mb/s"), speed);
} }
} }
status = panel_device_status_to_localized_string (self->device, speed_text); status = panel_device_status_to_localized_string (self->device, speed_text);