From 53d84cc49d56a96a03f60363e6001ddf0d1ddf0c Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Wed, 8 Jan 2020 15:19:32 +0100 Subject: [PATCH] dmi: do not provide gettext() with an empty string Calling gettext("") returns the header of the relevant PO file, which is almost never what is wanted. This fixes https://bugs.launchpad.net/ubuntu/+source/lshw/+bug/1597886. Signed-off-by: Benno Schulenberg --- src/core/dmi.cc | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/core/dmi.cc b/src/core/dmi.cc index c4c01e0..5f6ea1a 100644 --- a/src/core/dmi.cc +++ b/src/core/dmi.cc @@ -273,9 +273,9 @@ static const char *dmi_board_type(u8 data) { static const char *boardtypes[] = { - "", - "", - "", + " ", + " ", + " ", N_("Server Blade"), N_("Connectivitiy Switch"), N_("System Management Module"), @@ -495,9 +495,9 @@ static const char *dmi_memory_array_location(u8 num) { static const char *memory_array_location[] = { - "", /* 0x00 */ - "", - "", + " ", /* 0x00 */ + " ", + " ", N_("System board or motherboard"), N_("ISA add-on card"), N_("EISA add-on card"), @@ -527,9 +527,9 @@ static const char *dmi_memory_device_form_factor(u8 num) { static const char *memory_device_form_factor[] = { - "", - "", - "", + " ", + " ", + " ", N_(" SIMM"), N_(" SIP"), N_(" Chip"), @@ -554,9 +554,9 @@ static const char *dmi_memory_device_type(u8 num) { static const char *memory_device_type[] = { - "", /* 0x00 */ - "", - "", + " ", /* 0x00 */ + " ", + " ", N_(" DRAM"), N_(" EDRAM"), N_(" VRAM"), @@ -575,9 +575,9 @@ static const char *dmi_memory_device_type(u8 num) N_(" DDR"), /* 0x12 */ N_(" DDR2"), /* 0x13 */ N_(" DDR2 FB-DIMM"), /* 0x14 */ - "", - "", - "", + " ", + " ", + " ", " DDR3", " FBD2", /* 0x19 */ " DDR4", -- 2.24.1