ui/ncurses: Properly size cancel and help buttons
[petitboot] / ui / ncurses / nc-menu.c
index a77ea98ec87af303b99de9ae5959309e47cea049..7ff2468cb1c47d3b1caae9cf3180523ad920f939 100644 (file)
@@ -265,7 +265,7 @@ struct pmenu_item *pmenu_find_device(struct pmenu *menu, struct device *dev,
                if (matched) {
                        snprintf(buf,sizeof(buf),"[%s: %s / %s]",
                                dev->type == DEVICE_TYPE_DISK ?
-                               "Disk" : "CD/DVD",
+                                       _("Disk") : _("CD/DVD"),
                                bd->name, bd->uuid);
                }
                break;
@@ -282,8 +282,8 @@ struct pmenu_item *pmenu_find_device(struct pmenu *menu, struct device *dev,
                if (matched) {
                        mac_str(intf->hwaddr, intf->hwaddr_size,
                                hwaddr, sizeof(hwaddr));
-                       snprintf(buf,sizeof(buf),"[Interface %s / %s]",
-                               intf->name, hwaddr);
+                       snprintf(buf,sizeof(buf),"[%s: %s / %s]",
+                               _("Network"), intf->name, hwaddr);
                }
                break;
 
@@ -294,8 +294,8 @@ struct pmenu_item *pmenu_find_device(struct pmenu *menu, struct device *dev,
        if (!matched) {
                pb_debug("%s: No matching device found for %s (%s)\n",
                        __func__,opt->device_id, dev->id);
-               snprintf(buf,sizeof(buf),"[Unknown Device: %s]",
-                       dev->id);
+               snprintf(buf, sizeof(buf), "[%s: %s]",
+                       _("Unknown Device"), dev->id);
        }
 
        dev_hdr = pmenu_item_create(menu, buf);
@@ -409,6 +409,9 @@ static void pmenu_process_key(struct nc_scr *scr, int key)
        case 'c':
                cui_show_config(cui_from_arg(scr->ui_ctx));
                break;
+       case 'l':
+               cui_show_lang(cui_from_arg(scr->ui_ctx));
+               break;
        case KEY_F(1):
        case 'h':
                if (menu->help_text)