aboutsummaryrefslogtreecommitdiff
path: root/modules/devices/devmemory.c
diff options
context:
space:
mode:
authorBurt P <pburt0@gmail.com>2017-07-12 02:03:39 -0500
committerLeandro Pereira <leandro@hardinfo.org>2017-07-12 19:38:41 -0700
commit568a3775872df58afbbf2c6acaffe3ef2cdec961 (patch)
tree66a9a9bcef33801c86fa80345c4435e439058434 /modules/devices/devmemory.c
parent88d8efe0000894c9a771453692aeda56dc72a024 (diff)
Changes related to gettext and shell interface quirks
* Fixes for "..." special fields. * Computer->Summary and Computer->OS are more translatable, and and if the label is translated, the special code for updating the ... will still work. * Devices->Memory labels are currently not translated, some limitations exist. The labels were being double-translated on update. The earlier fix for Summary->RAM breaks if they are translated. * A bunch of trailing whitespace in the edited files was removed by the editor, and that created some noise in the diff. A rather frustrating experience. Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'modules/devices/devmemory.c')
-rw-r--r--modules/devices/devmemory.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/devices/devmemory.c b/modules/devices/devmemory.c
index 8fef9d6b..a3211895 100644
--- a/modules/devices/devmemory.c
+++ b/modules/devices/devmemory.c
@@ -61,13 +61,16 @@ void scan_memory_do(void)
g_strstrip(newkeys[1]);
/* try to find a localizable label */
- tmp_label = g_hash_table_lookup(memlabels, newkeys[0]);
- if (tmp_label == NULL)
+ tmp = g_hash_table_lookup(memlabels, newkeys[0]);
+ if (tmp)
+ tmp_label = _(tmp);
+ else
tmp_label = newkeys[0];
+ /* although it doesn't matter... */
moreinfo_add_with_prefix("DEV", newkeys[0], g_strdup(newkeys[1]));
- tmp = g_strconcat(meminfo, _(tmp_label), "=", newkeys[1], "\n", NULL);
+ tmp = g_strconcat(meminfo, newkeys[0], "=", newkeys[1], "\n", NULL);
g_free(meminfo);
meminfo = tmp;