summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sysinfo.cpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/sysinfo.cpp b/src/sysinfo.cpp
index e60e133..1e60e1c 100644
--- a/src/sysinfo.cpp
+++ b/src/sysinfo.cpp
@@ -73,8 +73,11 @@ namespace {
NULL);
- char* markup = g_strdup_printf(_("Release %s"), this->distro_release.c_str());
-
+ /* Translators: The first string parameter is release version (codename),
+ * the second one is the architecture, 32 or 64-bit */
+ char* markup = g_strdup_printf(_("Release %s %s"),
+ this->distro_release.c_str(),
+ this->get_os_type().c_str());
g_object_set(G_OBJECT(release),
"label",
markup,
@@ -98,6 +101,20 @@ namespace {
this->memory_bytes = mem.total;
}
+ string get_os_type ()
+ {
+ int bits;
+
+ if (GLIB_SIZEOF_VOID_P == 8)
+ bits = 64;
+ else
+ bits = 32;
+
+ /* translators: This is the type of architecture, for example:
+ * "64-bit" or "32-bit" */
+ return string(g_strdup_printf (_("%d-bit"), bits));
+ }
+
typedef struct
{
const char* regex;