X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=ui%2Fncurses%2Fnc-sysinfo.c;h=bde8b331ce2b05fbe9ced376f5736fd31a78226f;hp=aa1daea612354618fe23b387fd8184056a4b13dd;hb=70907c3fc4b344d00ce900e6a536e9cc16a35216;hpb=a68cae0b9d1b165eef07011011a163b906e0587c;ds=sidebyside diff --git a/ui/ncurses/nc-sysinfo.c b/ui/ncurses/nc-sysinfo.c index aa1daea..bde8b33 100644 --- a/ui/ncurses/nc-sysinfo.c +++ b/ui/ncurses/nc-sysinfo.c @@ -25,6 +25,7 @@ #include #include #include +#include #include "nc-cui.h" #include "nc-textscreen.h" @@ -34,7 +35,7 @@ struct sysinfo_screen { struct text_screen text_scr; }; -extern const char *sysinfo_help_text; +extern const struct help_text sysinfo_help_text; struct nc_scr *sysinfo_screen_scr(struct sysinfo_screen *screen) { @@ -56,30 +57,30 @@ static void sysinfo_screen_populate(struct sysinfo_screen *screen, #define line(...) text_screen_append_line(&screen->text_scr, __VA_ARGS__) if (!sysinfo) { - line("Waiting for system information..."); + line(_("Waiting for system information...")); return; } - line("%-12s %s", "System type:", sysinfo->type ?: ""); - line("%-12s %s", "System id:", sysinfo->identifier ?: ""); + line("%-12s %s", _("System type:"), sysinfo->type ?: ""); + line("%-12s %s", _("System id:"), sysinfo->identifier ?: ""); if (sysinfo->n_blockdevs) { line(NULL); - line("Storage devices"); + line(_("Storage devices")); } for (i = 0; i < sysinfo->n_blockdevs; i++) { struct blockdev_info *info = sysinfo->blockdevs[i]; line("%s:", info->name); - line(" UUID: %s", info->uuid); - line(" mounted at: %s", info->mountpoint); + line(_(" UUID: %s"), info->uuid); + line(_(" mounted at: %s"), info->mountpoint); line(NULL); } if (sysinfo->n_interfaces) { line(NULL); - line("Network interfaces"); + line(_("Network interfaces")); } for (i = 0; i < sysinfo->n_interfaces; i++) { @@ -89,8 +90,10 @@ static void sysinfo_screen_populate(struct sysinfo_screen *screen, if_info_mac_str(info, macbuf, sizeof(macbuf)); line("%s:", info->name); - line(" MAC: %s", macbuf); - line(" link: %s", info->link ? "up" : "down"); + line(_(" MAC: %s"), macbuf); + /* TRANSLATORS: these "up" / "down" strings refer to the + * link status for a network connection. */ + line(_(" link: %s"), info->link ? _("up") : _("down")); line(NULL); } @@ -112,9 +115,9 @@ struct sysinfo_screen *sysinfo_screen_init(struct cui *cui, screen = talloc_zero(cui, struct sysinfo_screen); text_screen_init(&screen->text_scr, cui, - "Petitboot System Information", on_exit); + _("Petitboot System Information"), on_exit); text_screen_set_help(&screen->text_scr, - "System Information", sysinfo_help_text); + _("System Information"), &sysinfo_help_text); sysinfo_screen_update(screen, sysinfo);