From 568a3775872df58afbbf2c6acaffe3ef2cdec961 Mon Sep 17 00:00:00 2001 From: Burt P Date: Wed, 12 Jul 2017 02:03:39 -0500 Subject: 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 --- modules/devices/devmemory.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'modules/devices') 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; -- cgit v1.2.3