aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBurt P <pburt0@gmail.com>2017-07-12 12:24:50 -0500
committerLeandro Pereira <leandro@hardinfo.org>2017-07-12 19:38:41 -0700
commita823fea599c31beac0910ee5dbfcd72d733ff6b2 (patch)
treecbb66d72b1279b5e076463b14988544156db212e /modules
parente6adeb620e892fafe9f613234fb1a3aa090ff714 (diff)
User Info and Development header strings made translatable
Finishes https://github.com/lpereira/hardinfo/issues/38 Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'modules')
-rw-r--r--modules/computer.c2
-rw-r--r--modules/computer/users.c21
2 files changed, 12 insertions, 11 deletions
diff --git a/modules/computer.c b/modules/computer.c
index 5ca69242..97369db5 100644
--- a/modules/computer.c
+++ b/modules/computer.c
@@ -236,7 +236,7 @@ void scan_dev(gboolean reload)
gboolean found;
if (!detect_lang[i].regex) {
- dev_list = h_strdup_cprintf("[%s]\n", dev_list, detect_lang[i].compiler_name);
+ dev_list = h_strdup_cprintf("[%s]\n", dev_list, _(detect_lang[i].compiler_name));
continue;
}
diff --git a/modules/computer/users.c b/modules/computer/users.c
index e8f891ac..dcb332ac 100644
--- a/modules/computer/users.c
+++ b/modules/computer/users.c
@@ -39,15 +39,16 @@ scan_users_do(void)
while (passwd_) {
gchar *key = g_strdup_printf("USER%s", passwd_->pw_name);
- gchar *val = g_strdup_printf("[User Information]\n"
- "User ID=%d\n"
- "Group ID=%d\n"
- "Home directory=%s\n"
- "Default shell=%s\n",
- (gint) passwd_->pw_uid,
- (gint) passwd_->pw_gid,
- passwd_->pw_dir,
- passwd_->pw_shell);
+ gchar *val = g_strdup_printf("[%s]\n"
+ "%s=%d\n"
+ "%s=%d\n"
+ "%s=%s\n"
+ "%s=%s\n",
+ _("User Information"),
+ _("User ID"), (gint) passwd_->pw_uid,
+ _("Group ID"), (gint) passwd_->pw_gid,
+ _("Home directory"), passwd_->pw_dir,
+ _("Default shell"), passwd_->pw_shell);
moreinfo_add_with_prefix("COMP", key, val);
strend(passwd_->pw_gecos, ',');
@@ -55,6 +56,6 @@ scan_users_do(void)
passwd_ = getpwent();
g_free(key);
}
-
+
endpwent();
}